Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

BatteryInfo

The BatteryInfo element provides various information about the battery status. More...

Inherits QtObject

Properties

Signals

Methods

Detailed Description

Property Documentation

read-onlybatteryCount : int

This property holds the number of batteries available, or -1 on error or the information is not available.


read-onlychargerType : enumeration

This property holds the type of the charger. Possible values are:

  • BatteryInfo.UnknownCharger - The charger type is unknown, or no charger.
  • BatteryInfo.WallCharger - Using wall (mains) charger.
  • BatteryInfo.USBCharger - Using USB charger when the system cannot differentiate the current.
  • BatteryInfo.VariableCurrentCharger - Using variable current charger such as bicycle or solar.

read-onlyenergyUnit : enumeration

This property holds the energy unit used. Possible values are:

  • BatteryInfo.UnitUnknown - Energy unit unknown.
  • BatteryInfo.UnitmAh - Energy described in milliamp-hour (mAh)
  • BatteryInfo.UnitmWh - Energy described in milliwatt-hour (mWh)

monitorBatteryCount : bool

This property holds whether or not monitor the change of battery counts.

See also batteryCount.


monitorBatteryStatus : bool

This property holds whether or not monitor the change of battery's status.

See also onBatteryStatusChanged.


monitorChargerType : bool

This property holds whether or not monitor the change of charger type.

See also chargerType.


monitorChargingState : bool

This property holds whether or not monitor the change of charging state.

See also onChargingStateChanged.


monitorCurrentFlow : bool

This property holds whether or not monitor the flow of batteries.

See also onCurrentFlowChanged.


monitorRemainingCapacity : bool

This property holds whether or not monitor the remaining capacity of batteries.

See also onRemainingCapacityChanged.


monitorRemainingChargingTime : bool

This property holds whether or not monitor the remaining charging time of batteries.

See also onRemainingChargingTimeChanged.


monitorVoltage : bool

This property holds whether or not monitor the voltage of batteries.

See also onVoltageChanged.


Signal Documentation

BatteryInfo::onBatteryStatusChanged(int battery, BatteryStatus status)

This handler is called when status of battery has changed to status. Note that it won't be called unless monitorBatteryStatus is set true.

See also batteryStatus and monitorBatteryStatus.


BatteryInfo::onChargingStateChanged(int battery, ChargingState state)

This handler is called when charging state of battery has changed to state. Note that it won't be called unless monitorChargingState is set true.

See also chargingState and monitorChargingState.


BatteryInfo::onCurrentFlowChanged(int battery, int flow)

This handler is called when current flow of battery has changed to flow. Note that it won't be called unless monitorCurrentFlow is set true.

See also currentFlow and monitorCurrentFlow.


BatteryInfo::onRemainingCapacityChanged(int battery, int capacity)

This handler is called when remaining capacity of battery has changed to capacity. Note that it won't be called unless monitorRemainingCapacity is set true.

See also remainingCapacity and monitorRemainingCapacity.


BatteryInfo::onRemainingChargingTimeChanged(int battery, int seconds)

This handler is called when remaining charging time of battery has changed to seconds. Note that it won't be called unless monitorRemainingChargingTime is set true.

See also remainingChargingTime and monitorRemainingChargingTime.


BatteryInfo::onVoltageChanged(int battery, int voltage)

This handler is called when voltage of battery has changed to voltage. Note that it won't be called unless monitorVoltage is set true.

See also voltage and monitorVoltage.


Method Documentation

BatteryStatus BatteryInfo::batteryStatus(int battery)

Returns the status of the given battery. Possible values are:

  • BatteryInfo.BatteryStatusUnknown - Battery level undetermined.
  • BatteryInfo.BatteryEmpty - Battery is considered be empty and device needs to shut down.
  • BatteryInfo.BatteryLow - Battery level is low and warnings need to be issued to the user.
  • BatteryInfo.BatteryOk - Battery level is Ok. It is above "Low" but not "Full".
  • BatteryInfo.BatteryFull - Battery is fully charged.

See also onBatteryStatusChanged.


ChargingState BatteryInfo::chargingState(int battery)

Returns the charging state of the given battery. Possible values are:

  • BatteryInfo.UnknownChargingState - The charging state is unknown or charging error occured.
  • BatteryInfo.NotCharging - The battery is not charging, i.e. too low charger power.
  • BatteryInfo.Charging - The battery is charging.
  • BatteryInfo.Discharging - The battery is discharging.
  • BatteryInfo.Full - The battery is fully charged.

See also onChargingStateChanged.


int BatteryInfo::currentFlow(int battery)

Returns the current flow of the battery.

See also onCurrentFlowChanged.


int BatteryInfo::maximumCapacity(int battery)

Returns the maximum capacity of the battery


int BatteryInfo::remainingCapacity(int battery)

Returns the remaining capacity of the battery.

See also onRemainingCapacityChanged.


int BatteryInfo::remainingChargingTime(int battery)

Returns the remaining charging time of the battery.

See also onRemainingChargingTimeChanged.


int BatteryInfo::voltage(int battery)

Returns the voltage of the battery.

See also onVoltageChanged.


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 5.0-snapshot
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 !
 
 
 
 
Partenaires

Hébergement Web