| Home · All Classes · Annotated · Functions |
The QPowerStatus class represents a snapshot of the systems power status at a given time. More...
#include <QPowerStatus>
The QPowerStatus class represents a snapshot of the systems power status at a given time.
An updated status can be obtained by calling QPowerStatusManager::readStatus().
| Constant | Value | Description |
|---|---|---|
| QPowerStatus::Offline | 0 | the device is running on battery |
| QPowerStatus::Online | 1 | the device is powered by an external power source |
| QPowerStatus::Backup | 2 | the device is running on backup power |
| QPowerStatus::Unknown | 3 | status is unknown |
| Constant | Value | Description |
|---|---|---|
| QPowerStatus::High | 0x01 | battery is fully charged |
| QPowerStatus::Low | 0x02 | the battery level is low |
| QPowerStatus::VeryLow | 0x04 | very low battery level |
| QPowerStatus::Critical | 0x08 | critical battery level |
| QPowerStatus::Charging | 0x10 | the battery is being charged |
| QPowerStatus::NotPresent | 0x20 | the status if the battery is unknown |
Constructs a QPowerStatus object.
Returns the AC status of the device.
Returns the status of the backup battery.
Returns true if the value returned by batteryPercentRemaining() reflects the true value of remaining battery. If for instance APM is not available the return value of remaining battery does not reflect the true value.
Returns the remaining battery life (percentage of charge).
Returns the battery status of the device.
Returns the remaining battery life in seconds.
Returns true if this power status is not equal to ps, otherwise returns false.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |