The QSystemDeviceInfo class provides access to device information from the system. More...
#include <QSystemDeviceInfo>
Inherits: QObject.
Note: All functions in this class are reentrant.
This class was introduced in Qt Mobility 1.0.
class | ProfileDetails |
enum | BatteryStatus { NoBatteryLevel, BatteryCritical, BatteryVeryLow, BatteryLow, BatteryNormal } |
enum | InputMethod { Keys, Keypad, Keyboard, SingleTouch, MultiTouch, Mouse } |
flags | InputMethodFlags |
enum | KeyboardType { UnknownKeyboard, SoftwareKeyboard, ITUKeypad, HalfQwertyKeyboard, ..., FlipKeyboard } |
flags | KeyboardTypeFlags |
enum | KeypadType { PrimaryKeypad, SecondaryKeypad } |
enum | LockType { UnknownLock, PinLocked, TouchAndKeyboardLocked } |
flags | LockTypeFlags |
enum | PowerState { UnknownPower, BatteryPower, WallPower, WallPowerChargingBattery } |
enum | Profile { UnknownProfile, SilentProfile, NormalProfile, LoudProfile, ..., CustomProfile } |
enum | SimStatus { SimNotAvailable, SingleSimAvailable, DualSimAvailable, SimLocked } |
enum | ThermalState { UnknownThermal, NormalThermal, WarningThermal, AlertThermal, ErrorThermal } |
|
|
QSystemDeviceInfo ( QObject * parent = 0 ) | |
virtual | ~QSystemDeviceInfo () |
ProfileDetails | activeProfileDetails () |
int | batteryLevel () const |
QSystemDeviceInfo::BatteryStatus | batteryStatus () |
bool | currentBluetoothPowerState () |
QSystemDeviceInfo::PowerState | currentPowerState () |
QSystemDeviceInfo::Profile | currentProfile () |
QSystemDeviceInfo::ThermalState | currentThermalState () |
QString | imei () |
QString | imsi () |
QSystemDeviceInfo::InputMethodFlags | inputMethodType () |
bool | isDeviceLocked () |
bool | isKeyboardFlippedOpen () |
bool | isWirelessKeyboardConnected () |
QSystemDeviceInfo::KeyboardTypeFlags | keyboardTypes () |
bool | keypadLightOn ( QSystemDeviceInfo::KeypadType type ) |
QSystemDeviceInfo::LockTypeFlags | lockStatus () |
QString | manufacturer () |
QString | model () |
QString | productName () |
QSystemDeviceInfo::SimStatus | simStatus () |
QByteArray | uniqueDeviceID () |
void | batteryLevelChanged ( int level ) |
void | batteryStatusChanged ( QSystemDeviceInfo::BatteryStatus status ) |
void | bluetoothStateChanged ( bool on ) |
void | currentProfileChanged ( QSystemDeviceInfo::Profile profile ) |
void | deviceLocked ( bool isLocked ) |
void | keyboardFlipped ( bool open ) |
void | lockStatusChanged ( QSystemDeviceInfo::LockTypeFlags type ) |
void | powerStateChanged ( QSystemDeviceInfo::PowerState state ) |
void | thermalStateChanged ( QSystemDeviceInfo::ThermalState state ) |
void | wirelessKeyboardConnected ( bool connected ) |
The QSystemDeviceInfo class provides access to device information from the system.
Note: All functions in this class are reentrant. However, in Symbian platform this class is not reentrant since Symbian Belle (Qt Mobility version 1.2).
Warning: On Symbian this class does not support QObject::moveToThread().
This enum describes the status of the main battery.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::NoBatteryLevel | 0 | Battery level undetermined. |
QSystemDeviceInfo::BatteryCritical | 1 | Battery level is critical 3% or less. |
QSystemDeviceInfo::BatteryVeryLow | 2 | Battery level is very low, 10% or less. |
QSystemDeviceInfo::BatteryLow | 3 | Battery level is low 40% or less. |
QSystemDeviceInfo::BatteryNormal | 4 | Battery level is above 40%. |
This enum describes the device method of user input.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::Keys | 0x0000001 | Device has key/buttons. |
QSystemDeviceInfo::Keypad | 0x0000002 | Device has keypad (1,2,3, etc). |
QSystemDeviceInfo::Keyboard | 0x0000004 | Device has qwerty keyboard. |
QSystemDeviceInfo::SingleTouch | 0x0000008 | Device has single touch screen. |
QSystemDeviceInfo::MultiTouch | 0x0000010 | Device has multi-point touch screen. |
QSystemDeviceInfo::Mouse | 0x0000020 | Device has a mouse. |
The InputMethodFlags type is a typedef for QFlags<InputMethod>. It stores an OR combination of InputMethod values.
This enum describes the type of keyboard.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::UnknownKeyboard | 0 | Error or unknown keyboard type.. |
QSystemDeviceInfo::SoftwareKeyboard | 0x0000001 | Software Keyboard. |
QSystemDeviceInfo::ITUKeypad | 0x0000002 | Standard phone keyboard. |
QSystemDeviceInfo::HalfQwertyKeyboard | 0x0000004 | Half qwerty keboard like on Nokia E55. |
QSystemDeviceInfo::FullQwertyKeyboard | 0x0000008 | Standard qwerty type keyboard. |
QSystemDeviceInfo::WirelessKeyboard | 0x0000010 | Bluetooth or other wireless keyboard. |
QSystemDeviceInfo::FlipKeyboard | 0x0000020 | Keybord or keypad the slides or flips out. |
The KeyboardTypeFlags type is a typedef for QFlags<KeyboardType>. It stores an OR combination of KeyboardType values.
This enum describe the type of keypad/keyboard.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::PrimaryKeypad | 0 | Primary keypad or keyboard used. |
QSystemDeviceInfo::SecondaryKeypad | 1 | Secondary keypad or keyboard used. |
This enum describes the type of lock.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::UnknownLock | 0 | Lock type is unknown, or error. |
QSystemDeviceInfo::PinLocked | 0x0000001 | Device is PIN or password locked. |
QSystemDeviceInfo::TouchAndKeyboardLocked | 0x0000002 | Touch and/or keyboard is locked. |
The LockTypeFlags type is a typedef for QFlags<LockType>. It stores an OR combination of LockType values.
This enum describes the power state:
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::UnknownPower | 0 | Power error. |
QSystemDeviceInfo::BatteryPower | 1 | On battery power. |
QSystemDeviceInfo::WallPower | 2 | On wall power. |
QSystemDeviceInfo::WallPowerChargingBattery | 3 | On wall power and charging main battery. |
This enum describes the current operating profile of the device or computer.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::UnknownProfile | 0 | Profile unknown or error. |
QSystemDeviceInfo::SilentProfile | 1 | Silent profile. |
QSystemDeviceInfo::NormalProfile | 2 | Normal profile. |
QSystemDeviceInfo::LoudProfile | 3 | Loud profile. |
QSystemDeviceInfo::VibProfile | 4 | Vibrate profile. |
QSystemDeviceInfo::OfflineProfile | 5 | Offline profile. |
QSystemDeviceInfo::PowersaveProfile | 6 | Powersave profile. |
QSystemDeviceInfo::BeepProfile | 8 | Beep profile. |
QSystemDeviceInfo::CustomProfile | 7 | Custom profile. |
This enum describes the status is the sim card or cards.
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::SimNotAvailable | 0 | SIM is not available on this device. |
QSystemDeviceInfo::SingleSimAvailable | 1 | One SIM card is available on this. |
QSystemDeviceInfo::DualSimAvailable | 2 | Two SIM cards are available on this device. |
QSystemDeviceInfo::SimLocked | 3 | Device has SIM lock enabled. |
This enum describes the thermal state:
Constant | Value | Description |
---|---|---|
QSystemDeviceInfo::UnknownThermal | 0 | UnKnown State. |
QSystemDeviceInfo::NormalThermal | 1 | Normal State. |
QSystemDeviceInfo::WarningThermal | 2 | Warning State. |
QSystemDeviceInfo::AlertThermal | 3 | Alert State. |
QSystemDeviceInfo::ErrorThermal | 4 | Thermal Error. |
This property holds the battery level.
Returns the battery charge level as percentage 1 - 100 scale.
This property was introduced in Qt Mobility 1.0.
Access functions:
int | batteryLevel () const |
Notifier signal:
void | batteryLevelChanged ( int level ) |
This property holds the battery status.
Returns the battery charge status.
This property was introduced in Qt Mobility 1.0.
Access functions:
QSystemDeviceInfo::BatteryStatus | batteryStatus () |
Notifier signal:
void | batteryStatusChanged ( QSystemDeviceInfo::BatteryStatus status ) |
This property holds bluetooth power state.
Gets the current bluetooth power state.
This property was introduced in Qt Mobility 1.1.
Access functions:
bool | currentBluetoothPowerState () |
Notifier signal:
void | bluetoothStateChanged ( bool on ) |
This property holds the power state.
Gets the current QSystemDeviceInfo::currentPowerState state.
This property was introduced in Qt Mobility 1.2.
Access functions:
QSystemDeviceInfo::PowerState | currentPowerState () |
Notifier signal:
void | powerStateChanged ( QSystemDeviceInfo::PowerState state ) |
This property holds the device profile.
Gets the current QSystemDeviceInfo::currentProfile device profile.
This property was introduced in Qt Mobility 1.1.
Access functions:
QSystemDeviceInfo::Profile | currentProfile () |
Notifier signal:
void | currentProfileChanged ( QSystemDeviceInfo::Profile profile ) |
This property holds the thermal state.
Gets the current QSystemDeviceInfo::currentThermalState state.
This property was introduced in Qt Mobility 1.2.
Access functions:
QSystemDeviceInfo::ThermalState | currentThermalState () |
Notifier signal:
void | thermalStateChanged ( QSystemDeviceInfo::ThermalState state ) |
This property holds the IMEI.
Returns the International Mobile Equipment Identity (IMEI), or a null QString in the case of none.
This property was introduced in Qt Mobility 1.0.
Access functions:
QString | imei () |
This property holds the IMSI.
Returns the International Mobile Subscriber Identity (IMSI), or a null QString in the case of none.
This property was introduced in Qt Mobility 1.0.
Access functions:
QString | imsi () |
This property holds the supported inputmethods.
Returns the QSystemDeviceInfo::InputMethodFlags InputMethodType that the system uses.
This property was introduced in Qt Mobility 1.0.
Access functions:
QSystemDeviceInfo::InputMethodFlags | inputMethodType () |
This property holds device lock.
Returns true if the device is locked, otherwise false.
This property was introduced in Qt Mobility 1.0.
Access functions:
bool | isDeviceLocked () |
Notifier signal:
void | deviceLocked ( bool isLocked ) |
This property holds flip keyboard open.
Returns true if the flip keyboard is open, otherwise false;
This property was introduced in Qt Mobility 1.2.
Access functions:
bool | isKeyboardFlippedOpen () |
Notifier signal:
void | keyboardFlipped ( bool open ) |
This property holds wireless keyboard connected.
Returns true if a wireless keyboard is connected, otherwise false;
This property was introduced in Qt Mobility 1.2.
Access functions:
bool | isWirelessKeyboardConnected () |
Notifier signal:
void | wirelessKeyboardConnected ( bool connected ) |
This property holds the Keyboard Type.
Returns the type of keyboards found.
This property was introduced in Qt Mobility 1.2.
Access functions:
QSystemDeviceInfo::KeyboardTypeFlags | keyboardTypes () |
This property holds type of lock.
Returns the QSystemDeviceInfo::LockTypeFlags type of lock state the device might be in. The LockType must be currently active not just enabled.
This property was introduced in Qt Mobility 1.2.
Access functions:
QSystemDeviceInfo::LockTypeFlags | lockStatus () |
Notifier signal:
void | lockStatusChanged ( QSystemDeviceInfo::LockTypeFlags type ) |
This property holds the manufacture's name.
Returns the name of the manufacturer of this device. In the case of desktops, the name of the vendor of the motherboard.
This property was introduced in Qt Mobility 1.0.
Access functions:
QString | manufacturer () |
This property holds the model name.
Returns the public-known model information of the device, e.g. N8, E7, etc. In the case where no model information is present, the CPU architect, such as i686, or machine type, such as Server, Desktop or Laptop.
This property was introduced in Qt Mobility 1.0.
Access functions:
QString | model () |
This property holds the product name.
Returns the internal product name of the device, e.g. RM-774. In the case where no product name is available, an empty string is returned.
This property was introduced in Qt Mobility 1.0.
Access functions:
QString | productName () |
This property holds the status of the sim card.
Returns the QSystemDeviceInfo::simStatus status of SIM card.
This property was introduced in Qt Mobility 1.0.
Access functions:
QSystemDeviceInfo::SimStatus | simStatus () |
Access functions:
QByteArray | uniqueDeviceID () |
The QSystemDeviceInfo class provides access to device information from the system.
Constructs a QSystemDeviceInfo with the given parent.
Destroys the QSystemDeviceInfo object.
Returns a QSystemDeviceInfo::ProfileDetails for the currently active profile.
This function was introduced in Qt Mobility 1.2.
This signal is emitted when battery level has changed to level.
This function was introduced in Qt Mobility 1.1.
This signal is emitted when battery status has changed to status.
This function was introduced in Qt Mobility 1.1.
This signal is emitted whenever bluetooth state changes to on.
This function was introduced in Qt Mobility 1.0.
This signal is emitted whenever the users active profile changes to profile.
This function was introduced in Qt Mobility 1.1.
This signal is emitted whenever the device lock state changes to isLocked.
This function was introduced in Qt Mobility 1.2.
This signal is emitted whenever a phone flips open, specified by open.
This function was introduced in Qt Mobility 1.2.
Returns true if the key pad, indicated by type, light is on, otherwise false;
This function was introduced in Qt Mobility 1.2.
This signal is emitted whenever the lock state changes, with LockType type.
This function was introduced in Qt Mobility 1.2.
This signal is emitted when the power state has changed to state, such as when a phone gets plugged in to the wall
This function was introduced in Qt Mobility 1.1.
This signal is emitted when the thermal state has changed to state.
This function was introduced in Qt Mobility 1.2.
This signal is emitted whenever a wireless keyboard is connected, specified by connected
This function was introduced in Qt Mobility 1.2.