| Home · All Classes · Grouped Classes · Annotated · 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.
Qtopia provides an implementation for a phone device. These implementations support the following three timeouts and actions.
PhonePowerManager (phone/phonepowermanager.cpp)
To extend Qtopia's 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 Qtopia 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.
This class is part of the Qtopia server and cannot be used by other Qtopia 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 Qtopia 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 a containing the timeout values and size being the number of entries in a. 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 © 2007 Trolltech | Trademarks | Qtopia 4.3.0 |