MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML BatteryInfo Element

The BatteryInfo element allows you to receive battery change notifications from the device. More...

This element was introduced in Mobility 1.2.

Properties

Signals

Detailed Description

This element is part of the QtMobility.systeminfo 1.2 module. It is a convience class to make QML usage easier.

Note: To use notification signals, you need to set the monitor* properties to true.

 BatteryInfo {
     id: batinfo
         monitorChargerTypeChanges: true
         monitorChargingStateChanges: true
 }

See also QSystemBatteryInfo.

Property Documentation

batteryStatus : BatteryStatus

Returns the battery charge status.

This property group was introduced in Mobility 1.2.


chargerType : ChargerType

Returns the currently used charger type.

This property group was introduced in Mobility 1.2.


chargingState : ChargingState

Returns the charging state.

This property group was introduced in Mobility 1.2.


currentFlow : int

Returns the amount of current flowing out from the battery (a short term averge), milliapmeres (mA). Positive current means discharging and negative current means charging.

This property group was introduced in Mobility 1.2.


energyMeasurementUnit : EnergyUnit

Returns the QSystemBatteryInfo::EnergyUnit that the system uses.

This property group was introduced in Mobility 1.2.


maxBars : int

Returns the Maximum number of bars the system uses. In the case that the system has no default number of battery bars, 0 is returned.

This property group was introduced in Mobility 1.2.


monitorBatteryStatusChanges() : bool

Start the connection for the batteryStatusChanged signal.

This property group was introduced in Mobility 1.2.


monitorChargerTypeChanges : bool

Start the connection for the chargerTypeChanged signal.

This property group was introduced in Mobility 1.2.


monitorChargingStateChanges : bool

Start the connection for the chargingStateChanged signal.

This property group was introduced in Mobility 1.2.


monitorCurrentFlowChanges : bool

Start the connection for the currentFlowChanged signal.

This property group was introduced in Mobility 1.2.


monitorNominalCapacityChanges : bool

Start the connection for the nominalCapacityChanged signal.

This property group was introduced in Mobility 1.2.


monitorRemainingCapacityBarsChanges : bool

Start the connection for the remainingCapacityBarsChanged signal.

This property group was introduced in Mobility 1.2.


monitorRemainingCapacityChanges : bool

Start the connection for the remainingCapacityChanged signal.

This property group was introduced in Mobility 1.2.


monitorRemainingCapacityPercentChanges : bool

Start the connection for the remainingCapacityPercentChanged signal.

This property group was introduced in Mobility 1.2.


monitorRemainingChargingTimeChanges : bool

Start the connection for the remainingChargingTimeChanged signal.

This property group was introduced in Mobility 1.2.


nominalCapacity : int

Returns the nominal (maximum) capacity of the battery, in milliampere-hours (mAh). If no battery is found, -1.

This property group was introduced in Mobility 1.2.


remainingCapacity : int

Returns the remaining battery level of the battery in BatteryInfo::EnergyUnit.

This property group was introduced in Mobility 1.2.

See also QSystemBatteryInfo::EnergyUnit.


remainingCapacityBars : int

Returns the remaining capacity in number of bars. The bar count will not necessarily always reflect one to one on the remaining capacity percentage.

This property group was introduced in Mobility 1.2.


remainingCapacityPercent : int

Returns the remaining battery level of the battery in percent. If no battery is found, -1.

This property group was introduced in Mobility 1.2.


remainingChargingTime : int

Returns the remaining time of charging in seconds if charging, 0 if battery is full and not charging, or -1 no battery found.

This property group was introduced in Mobility 1.2.


voltage : int

Returns the voltage of the battery, in millivolts (mV). If no battery is found, -1.

This property group was introduced in Mobility 1.2.


Signal Documentation

BatteryInfo::batteryStatusChanged ( BatteryInfo::BatteryStatus )

This signal is emitted when battery status has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::ChargingState.


BatteryInfo::chargerTypeChanged ( BatteryInfo::ChargerType )

This signal is emitted when the charger type has changed, such as when a phone gets plugged in to the wall, or usb.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::ChargerType.


BatteryInfo::chargingStateChanged ( BatteryInfo::ChargingState )

This signal is emitted when charging state has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::ChargingState.


BatteryInfo::currentFlowChanged ( int )

This signal is emitted when the short term averge battery current has changed, or on some systems at regular intervals.

On some systems where this can lead to a CPU intensive process, you should disconnect from this signal when you are finished.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::currentFlow.


BatteryInfo::nominalCapacityChanged ( int )

This signal is emitted when nominal (maximum) battery level has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::nominalCapacity.


BatteryInfo::remainingCapacityBarsChanged ( int )

This signal is emitted when battery level has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::remainingCapacityBars.


BatteryInfo::remainingCapacityChanged ( QSystemBatteryInfo::EnergyUnit )

This signal is emitted when battery capacity has changed, reported in QSystemBatteryInfo::EnergyUnit.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::remainingCapacity.


BatteryInfo::remainingCapacityPercentChanged ( int )

This signal is emitted when battery capacity in percent has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::remainingCapacityPercent.


BatteryInfo::remainingChargingTimeChanged ( int )

This signal is emitted when remianing charge time has changed.

This documentation was introduced in Mobility 1.2.

See also QSystemBatteryInfo::remainingChargingTime.