QmDeviceMode Provides information and actions on device operation mode and power save mode. More...
#include <qmdevicemode.h>
Public Types | |
enum | DeviceMode { Error = -1, Normal = 0, Flight } |
Possible device operation modes. More... | |
enum | PSMState { PSMError = -1, PSMStateOff = 0, PSMStateOn } |
Possible power save modes for the device. More... | |
Signals | |
void | deviceModeChanged (MeeGo::QmDeviceMode::DeviceMode mode) |
Sent when device operation mode has changed. | |
void | devicePSMStateChanged (MeeGo::QmDeviceMode::PSMState state) |
Sent when device power save mode has changed. | |
Public Member Functions | |
QmDeviceMode (QObject *parent=0) | |
Constructor. | |
~QmDeviceMode () | |
DeviceMode | getMode () const |
Gets the current operation mode. | |
PSMState | getPSMState () const |
Gets the current power save mode. | |
bool | setMode (DeviceMode mode) |
Sets the device operation mode. | |
bool | setPSMState (PSMState state) |
Sets the device power save state. | |
bool | setPSMBatteryMode (int percentages) |
Sets the device battery-level based power save mode. | |
int | getPSMBatteryMode () |
Gets the device battery-level based power save mode. | |
Protected Member Functions | |
void | connectNotify (const char *signal) |
void | disconnectNotify (const char *signal) |
Properties | |
DeviceMode | mode |
PSMState | state |
QmDeviceMode Provides information and actions on device operation mode and power save mode.
Definition at line 50 of file qmdevicemode.h.
Possible device operation modes.
Definition at line 60 of file qmdevicemode.h.
Possible power save modes for the device.
PSMError |
Power save mode could not be figured out. |
PSMStateOff |
Power save mode is off. |
PSMStateOn |
Power save mode is on. |
Definition at line 68 of file qmdevicemode.h.
MeeGo::QmDeviceMode::QmDeviceMode | ( | QObject * | parent = 0 |
) |
Constructor.
parent | The parent object |
MeeGo::QmDeviceMode::~QmDeviceMode | ( | ) |
void MeeGo::QmDeviceMode::connectNotify | ( | const char * | signal | ) | [protected] |
void MeeGo::QmDeviceMode::deviceModeChanged | ( | MeeGo::QmDeviceMode::DeviceMode | mode | ) | [signal] |
Sent when device operation mode has changed.
mode | Current operation mode |
void MeeGo::QmDeviceMode::devicePSMStateChanged | ( | MeeGo::QmDeviceMode::PSMState | state | ) | [signal] |
Sent when device power save mode has changed.
state | Current power save mode |
void MeeGo::QmDeviceMode::disconnectNotify | ( | const char * | signal | ) | [protected] |
DeviceMode MeeGo::QmDeviceMode::getMode | ( | ) | const |
Gets the current operation mode.
int MeeGo::QmDeviceMode::getPSMBatteryMode | ( | ) |
Gets the device battery-level based power save mode.
PSMState MeeGo::QmDeviceMode::getPSMState | ( | ) | const |
Gets the current power save mode.
bool MeeGo::QmDeviceMode::setMode | ( | DeviceMode | mode | ) |
Sets the device operation mode.
mode | Operation mode to set |
bool MeeGo::QmDeviceMode::setPSMBatteryMode | ( | int | percentages | ) |
Sets the device battery-level based power save mode.
percentages | The battery charging level (0-100) in percentages after powersave mode is automatically enabled. Value 0 means never. |
bool MeeGo::QmDeviceMode::setPSMState | ( | PSMState | state | ) |
Sets the device power save state.
state | Power state mode to set |
DeviceMode MeeGo::QmDeviceMode::mode [read, write] |
Definition at line 55 of file qmdevicemode.h.
PSMState MeeGo::QmDeviceMode::state [read, write] |
Definition at line 56 of file qmdevicemode.h.