QtMobility Reference Documentation

Contents

QSystemDeviceInfo Class Reference

The QSystemDeviceInfo class provides access to device information from the system. More...

 #include <QSystemDeviceInfo>

Inherits QObject.

This class was introduced in Qt Mobility 1.2.

Public Types

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 }

Properties

Public Functions

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 ()

Signals

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 )

Additional Inherited Members

Detailed Description

The QSystemDeviceInfo class provides access to device information from the system.

Member Type Documentation

enum QSystemDeviceInfo::BatteryStatus

This enum describes the status of the main battery.

ConstantValueDescription
QSystemDeviceInfo::NoBatteryLevel0Battery level undetermined.
QSystemDeviceInfo::BatteryCritical1Battery level is critical 3% or less.
QSystemDeviceInfo::BatteryVeryLow2Battery level is very low, 10% or less.
QSystemDeviceInfo::BatteryLow3Battery level is low 40% or less.
QSystemDeviceInfo::BatteryNormal4Battery level is above 40%.

enum QSystemDeviceInfo::InputMethod
flags QSystemDeviceInfo::InputMethodFlags

This enum describes the device method of user input.

ConstantValueDescription
QSystemDeviceInfo::Keys0x0000001Device has key/buttons.
QSystemDeviceInfo::Keypad0x0000002Device has keypad (1,2,3, etc).
QSystemDeviceInfo::Keyboard0x0000004Device has qwerty keyboard.
QSystemDeviceInfo::SingleTouch0x0000008Device has single touch screen.
QSystemDeviceInfo::MultiTouch0x0000010Device has multi-point touch screen.
QSystemDeviceInfo::Mouse0x0000020Device has a mouse.

The InputMethodFlags type is a typedef for QFlags<InputMethod>. It stores an OR combination of InputMethod values.

enum QSystemDeviceInfo::KeyboardType
flags QSystemDeviceInfo::KeyboardTypeFlags

This enum describes the type of keyboard.

ConstantValueDescription
QSystemDeviceInfo::UnknownKeyboard0Error or unknown keyboard type..
QSystemDeviceInfo::SoftwareKeyboard0x0000001Software Keyboard.
QSystemDeviceInfo::ITUKeypad0x0000002Standard phone keyboard.
QSystemDeviceInfo::HalfQwertyKeyboard0x0000004Half qwerty keboard like on Nokia E55.
QSystemDeviceInfo::FullQwertyKeyboard0x0000008Standard qwerty type keyboard.
QSystemDeviceInfo::WirelessKeyboard0x0000010Bluetooth or other wireless keyboard.
QSystemDeviceInfo::FlipKeyboard0x0000020Keybord or keypad the slides or flips out.

The KeyboardTypeFlags type is a typedef for QFlags<KeyboardType>. It stores an OR combination of KeyboardType values.

enum QSystemDeviceInfo::KeypadType

This enum describe the type of keypad/keyboard.

ConstantValueDescription
QSystemDeviceInfo::PrimaryKeypad0Primary keypad or keyboard used.
QSystemDeviceInfo::SecondaryKeypad1Secondary keypad or keyboard used.

enum QSystemDeviceInfo::LockType
flags QSystemDeviceInfo::LockTypeFlags

This enum describes the type of lock.

ConstantValueDescription
QSystemDeviceInfo::UnknownLock0Lock type is unknown, or error.
QSystemDeviceInfo::PinLocked0x0000001Device is PIN or password locked.
QSystemDeviceInfo::TouchAndKeyboardLocked0x0000002Touch and/or keyboard is locked.

The LockTypeFlags type is a typedef for QFlags<LockType>. It stores an OR combination of LockType values.

enum QSystemDeviceInfo::PowerState

This enum describes the power state:

ConstantValueDescription
QSystemDeviceInfo::UnknownPower0Power error.
QSystemDeviceInfo::BatteryPower1On battery power.
QSystemDeviceInfo::WallPower2On wall power.
QSystemDeviceInfo::WallPowerChargingBattery3On wall power and charging main battery.

enum QSystemDeviceInfo::Profile

This enum describes the current operating profile of the device or computer.

ConstantValueDescription
QSystemDeviceInfo::UnknownProfile0Profile unknown or error.
QSystemDeviceInfo::SilentProfile1Silent profile.
QSystemDeviceInfo::NormalProfile2Normal profile.
QSystemDeviceInfo::LoudProfile3Loud profile.
QSystemDeviceInfo::VibProfile4Vibrate profile.
QSystemDeviceInfo::OfflineProfile5Offline profile.
QSystemDeviceInfo::PowersaveProfile6Powersave profile.
QSystemDeviceInfo::BeepProfile8Beep profile.
QSystemDeviceInfo::CustomProfile7Custom profile.

enum QSystemDeviceInfo::SimStatus

This enum describes the status is the sim card or cards.

ConstantValueDescription
QSystemDeviceInfo::SimNotAvailable0SIM is not available on this device.
QSystemDeviceInfo::SingleSimAvailable1One SIM card is available on this.
QSystemDeviceInfo::DualSimAvailable2Two SIM cards are available on this device.
QSystemDeviceInfo::SimLocked3Device has SIM lock enabled.

enum QSystemDeviceInfo::ThermalState

This enum describes the thermal state:

ConstantValueDescription
QSystemDeviceInfo::UnknownThermal0UnKnown State.
QSystemDeviceInfo::NormalThermal1Normal State.
QSystemDeviceInfo::WarningThermal2Warning State.
QSystemDeviceInfo::AlertThermal3Alert State.
QSystemDeviceInfo::ErrorThermal4Thermal Error.

Property Documentation

batteryLevel : const int

This property holds the battery level.

Returns the battery charge level as percentage 1 - 100 scale.

Access functions:

int batteryLevel () const

Notifier signal:

void batteryLevelChanged ( int level )

batteryStatus : const BatteryStatus

This property holds the battery status.

Returns the battery charge status.

Access functions:

QSystemDeviceInfo::BatteryStatus batteryStatus ()

Notifier signal:

void batteryStatusChanged ( QSystemDeviceInfo::BatteryStatus status )

currentBluetoothPowerState : const bool

This property holds bluetooth power state.

Gets the current bluetooth power state.

Access functions:

bool currentBluetoothPowerState ()

Notifier signal:

void bluetoothStateChanged ( bool on )

currentPowerState : const PowerState

This property holds the power state.

Gets the current QSystemDeviceInfo::currentPowerState state.

Access functions:

QSystemDeviceInfo::PowerState currentPowerState ()

Notifier signal:

void powerStateChanged ( QSystemDeviceInfo::PowerState state )

currentProfile : const Profile

This property holds the device profile Gets the current QSystemDeviceInfo::currentProfile device profile.

Access functions:

QSystemDeviceInfo::Profile currentProfile ()

Notifier signal:

void currentProfileChanged ( QSystemDeviceInfo::Profile profile )

currentThermalState : const ThermalState

This property holds the thermal state.

Gets the current QSystemDeviceInfo::currentThermalState state.

Access functions:

QSystemDeviceInfo::ThermalState currentThermalState ()

Notifier signal:

void thermalStateChanged ( QSystemDeviceInfo::ThermalState state )

imei : const QString

This property holds the IMEI.

Returns the International Mobile Equipment Identity (IMEI), or a null QString in the case of none.

Access functions:

QString imei ()

imsi : const QString

This property holds the IMSI.

Returns the International Mobile Subscriber Identity (IMSI), or a null QString in the case of none.

Access functions:

QString imsi ()

inputMethodType : const QSystemDeviceInfo::InputMethodFlags

This property holds the supported inputmethods.

Returns the QSystemDeviceInfo::InputMethodFlags InputMethodType that the system uses.

Access functions:

QSystemDeviceInfo::InputMethodFlags inputMethodType ()

isDeviceLocked : const bool

This property holds device lock.

Returns true if the device is locked, otherwise false.

Access functions:

bool isDeviceLocked ()

Notifier signal:

void deviceLocked ( bool isLocked )

isKeyboardFlippedOpen : const bool

This property holds flip keyboard open.

Returns true if the flip keyboard is open, otherwise false;

Access functions:

bool isKeyboardFlippedOpen ()

Notifier signal:

void keyboardFlipped ( bool open )

isWirelessKeyboardConnected : const bool

This property holds wireless keyboard connected.

Returns true if a wireless keyboard is connected, otherwise false;

Access functions:

bool isWirelessKeyboardConnected ()

Notifier signal:

void wirelessKeyboardConnected ( bool connected )

keyboardTypes : const KeyboardTypeFlags

This property holds the Keyboard Type.

Returns the type of keyboards found.

Access functions:

QSystemDeviceInfo::KeyboardTypeFlags keyboardTypes ()

lockStatus : const QSystemDeviceInfo::LockTypeFlags

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.

Access functions:

QSystemDeviceInfo::LockTypeFlags lockStatus ()

Notifier signal:

void lockStatusChanged ( QSystemDeviceInfo::LockTypeFlags type )

manufacturer : const QString

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.

Access functions:

QString manufacturer ()

model : const QString

This property holds the model name.

Returns the model information of the device. In the case of desktops where no model information is present, the CPU architect, such as i686, and machine type, such as Server, Desktop or Laptop.

Access functions:

QString model ()

productName : const QString

This property holds the product name.

Returns the product name of the device. In the case where no product information is available, an empty string will be returned.

Access functions:

QString productName ()

simStatus : const SimStatus

This property holds the status of the sim card. Returns the QSystemDeviceInfo::simStatus status of SIM card.

Access functions:

QSystemDeviceInfo::SimStatus simStatus ()

uniqueDeviceID : const QByteArray

Access functions:

QByteArray uniqueDeviceID ()

Member Function Documentation

QSystemDeviceInfo::QSystemDeviceInfo ( QObject * parent = 0 )

The QSystemDeviceInfo class provides access to device information from the system.

Constructs a QSystemDeviceInfo with the given parent.

QSystemDeviceInfo::~QSystemDeviceInfo () [virtual]

Destroys the QSystemDeviceInfo object.

ProfileDetails QSystemDeviceInfo::activeProfileDetails ()

Returns a QSystemDeviceInfo::ProfileDetails for the currently active profile.

void QSystemDeviceInfo::batteryLevelChanged ( int level ) [signal]

This signal is emitted when battery level has changed. level is the new level.

void QSystemDeviceInfo::batteryStatusChanged ( QSystemDeviceInfo::BatteryStatus status ) [signal]

This signal is emitted when battery status has changed. status is the new status.

void QSystemDeviceInfo::bluetoothStateChanged ( bool on ) [signal]

This signal is emitted whenever bluetooth state changes, specified by on.

void QSystemDeviceInfo::currentProfileChanged ( QSystemDeviceInfo::Profile profile ) [signal]

This signal is emitted whenever the users active profile changes, specified by profile.

void QSystemDeviceInfo::deviceLocked ( bool isLocked ) [signal]

This signal is emitted whenever the device lock state changes, indicated by isLocked is true otherwise unlocked.

void QSystemDeviceInfo::keyboardFlipped ( bool open ) [signal]

This signal is emitted whenever a phone flips open, specified by open.

bool QSystemDeviceInfo::keypadLightOn ( QSystemDeviceInfo::KeypadType type )

Returns true if the key pad, indicated by type, light is on, otherwise false;

void QSystemDeviceInfo::lockStatusChanged ( QSystemDeviceInfo::LockTypeFlags type ) [signal]

This signal is emitted whenever the lock state changes, with LockType type.

void QSystemDeviceInfo::powerStateChanged ( QSystemDeviceInfo::PowerState state ) [signal]

This signal is emitted when the power state has changed, such as when a phone gets plugged in to the wall. state is the new power state.

void QSystemDeviceInfo::thermalStateChanged ( QSystemDeviceInfo::ThermalState state ) [signal]

This signal is emitted when the thermal state has changed. state is the new thermal state.

void QSystemDeviceInfo::wirelessKeyboardConnected ( bool connected ) [signal]

This signal is emitted whenever a wireless keyboard is connected, specified by connected