Home · All Namespaces · All Classes
Public Member Functions

BatteryStatusIndicator Class Reference

#include <statusindicator.h>

Inheritance diagram for BatteryStatusIndicator:
Inheritance graph
[legend]
Collaboration diagram for BatteryStatusIndicator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BatteryStatusIndicator (ApplicationContext &context, QGraphicsItem *parent=NULL)
virtual ~BatteryStatusIndicator ()

Detailed Description

A status indicator for showing the battery charge level or battery charging animation.

Definition at line 192 of file statusindicator.h.


Constructor & Destructor Documentation

BatteryStatusIndicator::BatteryStatusIndicator ( ApplicationContext context,
QGraphicsItem *  parent = NULL 
) [explicit]

Constructs a BatteryStatusIndicator.

Parameters:
context the application context to get status information from
parent parent MWidget

Definition at line 205 of file statusindicator.cpp.

                                                                                                 :
    StatusIndicator(parent)
{
    setObjectName(QString(metaObject()->className()) + BATTERY_MODE_NORMAL);

    batteryLevel = createContextItem(context, "Battery.ChargeBars");
    connect(batteryLevel, SIGNAL(contentsChanged()), this, SLOT(batteryLevelChanged()));

    batteryCharging = createContextItem(context, "Battery.IsCharging");
    connect(batteryCharging, SIGNAL(contentsChanged()), this, SLOT(batteryChargingChanged()));

    batterySaveMode = createContextItem(context, "System.PowerSaveMode");
    connect(batterySaveMode, SIGNAL(contentsChanged()), this, SLOT(batteryChargingChanged()));

    // Set the initial power save mode (in case it has been switched on before reboot, etc)
    if (batterySaveMode->value().toBool()) {
        setObjectName(QString(metaObject()->className()) + BATTERY_MODE_POWERSAVE);
    }

    batteryLevelChanged ();
}

Here is the call graph for this function:

BatteryStatusIndicator::~BatteryStatusIndicator (  )  [virtual]

Definition at line 227 of file statusindicator.cpp.

{
}


The documentation for this class was generated from the following files:

Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:19:35
Doxygen 1.7.1
MeeGo Touch