The BatteryInfo element allows you to receive battery change notifications from the device. More...
This element was introduced in Mobility 1.2.
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.
Returns the battery charge status.
This property group was introduced in Mobility 1.2.
Returns the currently used charger type.
This property group was introduced in Mobility 1.2.
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.
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.
This signal is emitted when battery status has changed.
This documentation was introduced in Mobility 1.2.
See also QSystemBatteryInfo::ChargingState.
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.
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.
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.
BatteryInfo::remainingChargingTimeChanged ( int ) |
This signal is emitted when remianing charge time has changed.
This documentation was introduced in Mobility 1.2.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.