Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QtopiaPowerManager class implements default device power management behaviour. More...
#include <QtopiaPowerManager>
Inherits QObject and QWSScreenSaver.
Inherited by PhonePowerManager.
The QtopiaPowerManager class implements default device power management behaviour.
Qt Extended provides an implementation for a phone device. These implementations support the following three timeouts and actions.
PhonePowerManager (phone/phonepowermanager.cpp)
To extend the default behaviour it is necessary to subclass either PhonePowerManager or QtopiaPowerManager. A minimal subclass of QtopiaPowerManager has to reimplement the following functions:
Applications can interact with the Qt Extended power management via the QtopiaPowerManagerService. For more details on how to utilize services see the Services documentation.
This class provides functionality to temporarily restrict power management. It might be necessary to surpress the diming of the backlight e.g., when the mediaplayer is showing a video or to prevent the suspension of the device when the user is playing music. The QtopiaPowerConstraintManager ensures that application cannot request restriction beyond their own life time.
ValueSpace path | Description |
---|---|
/Hardware/ScreenSaver/CurrentLevel | Returns current level of the screen saver. A value of zero means that the system is up and running and no power management option has been activated yet. This state is active while the user interacts with the device. The mapping of the remaining levels depends on this classes subclass that is in use (e.g. see PhonePowerManager). |
/Hardware/ScreenSaver/Timeout/Dim | Contains the number of seconds until the displays dims. |
/Hardware/ScreenSaver/Timeout/LightOff | Contains the number of seconds until the display turns off. This timeout starts once the Dim state has been reached. |
/Hardware/ScreenSaver/Timeout/Suspend | Contains the number of seconds until the system suspends. This timeout starts once the Lightoff state has been reached. |
/Hardware/ScreenSaver/State/DimEnabled | Returns true if display dimming is enabled; other false. |
/Hardware/ScreenSaver/State/LightOffEnabled | Returns true if turning the display of is part of the power management process; other false. |
/Hardware/ScreenSaver/State/SuspendEnabled | Returns true if the system will suspend; otherwise false. |
This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.
See also setIntervals(), save(), PhonePowerManager, QtopiaPowerManagerService, and QtopiaPowerConstraintManager.
Constructs a QtopiaPowerManager instance.
This function is called when the QtopiaPowerConstraintManager::forceSuspend() signal is emitted. The default implementation suspends the system using the Suspend service. Custom implementations may want to re-implement this method if suspending can be prevented so as to avoid processing the SystemSuspendHandler tasks.
Restores the state of the device when power saving is active. This usually happens when the user interacts with the device.
Reimplemented from QWSScreenSaver.
This function is called by Qt Extended when a timeout has occurred and dynamically maps level onto a power saving action.
This function needs to be reimplemented by subclasses.
Reimplemented from QWSScreenSaver.
Activates or deactivates the power manager given the flag on. When activated, power management is enabled. When deactivated, power management is completely disabled.
Resets the intervals to the default configuration for the power manager. The default values are defined in configuration files and can be edited by the user using the Power Management application.
This function sets the internal timeouts for the power manager. It expects an array v containing the timeout values and size being the number of entries in v. This allows any arbitrary number of power saving levels.
This function needs to be reimplemented by subclasses. However any overriding function should call QtopiaPowerManager::setIntervals() as part of its implementation.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |