QPowerStatus Class Reference
|
Key | Description |
---|---|
PowerSources/PrimaryWallSource | Name of the QPowerSource to use as the primary wall source. |
PowerSources/PrimaryBatterySource | Name of the QPowerSource to use as the primary battery source. |
If the primary wall source is not configured, the PrimaryAC QPowerSource name is tried first, and, if not available, the first AC source is used. If the primary wall source is configured, but the specified provider does not exist, then no QPowerSource is used.
If the primary battery source is not configured, the DefaultBattery QPowerSource is tried first, and, if not available, the first battery source is used. If the primary battery source is configured, but the specified provider does not exist, then no QPowerSource is used.
The battery status level is determined by mapping a battery percentage to one the four defined levels. The configuration for the various battery status levels are also defined in the Trolltech/HardwareAccessories configuration file in the following way:
Key | Description |
---|---|
PrimaryBattery/NormalStatus | If the battery charge is above this percentage level, it is considered Normal. The default is 30. |
PrimaryBattery/LowStatus | If the battery charge is above this percentage level, but below the normal status level, it is considered Low. The default is 15. |
PrimaryBattery/VeryLowStatus | If the battery charge is above this percentage level, but below the low status level, it is considered very Low. The default is 5. |
If any one of these values is specified illegally (for example, the NormalStatus is lower than the LowStatus), the default values are used.
See also QPowerSource.
Describes the status of the device's battery connection.
Constant | Value | Description |
---|---|---|
QPowerStatus::Normal | 0 | The battery level is within normal operational range. |
QPowerStatus::Low | 1 | The battery is low. |
QPowerStatus::VeryLow | 2 | The battery is very low. |
QPowerStatus::Critical | 3 | The battery is at a critical level. The device should shut down to preserve data. |
QPowerStatus::NoBattery | 4 | There is no battery in the device. |
Describes the status of the device's wall connection.
Constant | Value | Description |
---|---|---|
QPowerStatus::Available | 0 | The device is connected to a wall power supply. |
QPowerStatus::NotAvailable | 1 | The device is not connected to a wall power supply, but connection is supported. |
QPowerStatus::NoWallSource | 2 | The device is not connected to a wall power supply, and no such connection is supported. |
Construct a new QPowerStatus instance with the specified parent.
Destroy the QPowerStatus instance.
Returns true if the primary battery is charging, false if not. If there is no primary battery, false is returned.
This signal is emitted when the batteries charging flag changes.
See also QPowerStatus::batteryCharging().
Returns a pointer to the QPowerSource instance representing the primary battery power source, or null if there is no primary battery power source.
Returns the status of the primary battery power source, or NoBattery if there is no primary battery source.
This signal is emitted whenever the battery status changes.
See also QPowerStatus::batteryStatus().
Returns a pointer to the QPowerSource instance representing the primary wall power source, or null if there is no primary wall power source.
Return the status of the primary wall power source, or NoWallSource if there is no primary wall power source.
This signal is emitted whenever the wall status changes.
See also QPowerStatus::wallStatus().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com