QtMobility Reference Documentation

QML DeviceInfo Element

The DeviceInfo element allows you to access information anbout the device and receive notifications from the device. More...

This element was introduced in Mobility 1.1.

Properties

Signal Handlers

Detailed Description

This element is part of the QtMobility.systeminfo 1.1 module. It is a convience class to make QML usage easier.

Note: To use notification signals, you need to set the monitor* properties to true.

The following table lists the incompatible changes made to the start* functions between QtMobility 1.1 and 1.2, where they became Q_PROPERTY:

QtMobility 1.1QtMobility 1.2Notes
slot void startBatteryLevelChanged();void startBatteryLevelChanged(bool on);Became Q_PROPERTY monitorBatteryLevelChanges in QtMobility 1.2
slot void startBatteryStatusChanged();void startBatteryStatusChanged(bool on);Became Q_PROPERTY monitorBatteryStatusChanges in QtMobility 1.2
slot void startPowerStateChanged();void startPowerStateChanged(bool on);Became Q_PROPERTY monitorPowerStateChanges in QtMobility 1.2
slot void startCurrentProfileChanged();void startCurrentProfileChanged(bool on);Became Q_PROPERTY monitorCurrentProfileChanges in QtMobility 1.2
slot void startBluetoothStateChanged();void startBluetoothStateChanged(bool on);Became Q_PROPERTY monitorBluetoothStateChanges in QtMobility 1.2

Example new usage:

QtMobility 1.1:

 deviceinfo.startBatteryLevelChanged();

QtMobility 1.2:

 monitorBatteryLevelChanges: true

See also QSystemDeviceInfo.

Property Documentation

batteryLevel : int

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

This property group was introduced in Mobility 1.1.


batteryStatus : BatteryStatus

Returns the battery charge status.

This property group was introduced in Mobility 1.1.


currentBluetoothPowerState : bool

Gets the current bluetooth power state.

This property group was introduced in Mobility 1.2.


currentPowerState : PowerState

Gets the current QSystemDeviceInfo::currentPowerState state.

This property group was introduced in Mobility 1.2.


currentProfile : Profile

Gets the current QSystemDeviceInfo::currentProfile device profile.

This property group was introduced in Mobility 1.2.


currentThermalState : ThermalState

Returns the current thermal state of the device.

This property group was introduced in Mobility 1.2.

See also QSystemDeviceInfo::ThermalState.


imei : QString

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

This property group was introduced in Mobility 1.2.


imsi : QString

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

This property group was introduced in Mobility 1.2.


inputMethodType : InputMethodFlags

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

This property group was introduced in Mobility 1.2.


isDeviceLocked : bool

Returns true if the device is locked, otherwise false.

This property group was introduced in Mobility 1.2.


isKeyboardFlippedOpen : bool

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

This property group was introduced in Mobility 1.2.


isWirelessKeyboardConnected : bool

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

This property group was introduced in Mobility 1.2.


keyboardTypes : KeyboardTypeFlags

Returns the type of keyboards found.

This property group was introduced in Mobility 1.2.


lockStatus : LockTypeFlags

Returns the QSystemDeviceInfo::LockTypeFlags type of lock state the device might be in. The LockType must be currently active not just enabled.

This property group was introduced in Mobility 1.2.


manufacturer : QString

Returns the name of the manufacturer of this device. In the case of desktops, the name of the vendor of the motherboard.

This property group was introduced in Mobility 1.2.


messageRingtoneVolume() : int

Returns the active profile's message ringtone volume. From 0 to 100.

This property group was introduced in Mobility 1.2.


model : QString

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.

This property group was introduced in Mobility 1.2.


monitorBatteryLevelChanges : bool

Use the monitorBatteryLevelChanges signal.

This property group was introduced in Mobility 1.2.


monitorBatteryStatusChanges : bool

Use the monitorBatteryStatusChanges signal.

This property group was introduced in Mobility 1.2.


monitorBluetoothStateChanges : bool

Use the bluetoothStateChanges signal.

This property group was introduced in Mobility 1.2.


monitorCurrentProfileChanges : bool

Use the monitorCurrentProfileChanges signal.

This property group was introduced in Mobility 1.2.


monitorKeyboardFlips() : bool

Start the connection for the keyboardFlipped signal.

This property group was introduced in Mobility 1.2.


monitorLockStatusChanges() : bool

Start the connection for the lockStatusChanged signal.

This property group was introduced in Mobility 1.2.


monitorPowerStateChanges : bool

Use the monitorPowerStateChanges signal.

This property group was introduced in Mobility 1.2.


monitorThermalStateChanges : bool

Use the thermalStateChanges signal.

This property group was introduced in Mobility 1.2.


monitorWirelessKeyboardConnects() : bool

Start the connection for the wirelessKeyboardConnected signal.

This property group was introduced in Mobility 1.2.


primaryKeypadLightOn() : bool

Returns the whether he primary keypad or keyboard light is on.

This property group was introduced in Mobility 1.2.


productName : QString

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

This property group was introduced in Mobility 1.2.


secondaryKeypadLightOn() : bool

Returns the whether he secondary keypad or keyboard light is on.

This property group was introduced in Mobility 1.2.


simStatus : SimStatus

Returns the QSystemDeviceInfo::simStatus status of SIM card.

This property group was introduced in Mobility 1.2.


uniqueID : string

Returns a unique identifier for the machine.

Depending on security enforcement on platform, this may return a non unique number, or 0.

This property group was introduced in Mobility 1.2.


vibrationActive() : bool

Returns the whether the active profile's vibration is active.

This property group was introduced in Mobility 1.2.


voiceRingtoneVolume() : int

Returns the active profile's voice ringtone volume. From 0 to 100.

This property group was introduced in Mobility 1.2.


Signal Handler Documentation

DeviceInfo::batteryLevelChanged ( int )

This handler is called when battery level has changed.

This documentation was introduced in Mobility 1.1.


DeviceInfo::batteryStatusChanged ( DeviceInfo::BatteryStatus )

This handler is called when battery status has changed.

This documentation was introduced in Mobility 1.1.


DeviceInfo::bluetoothStateChanged ( bool )

This handler is called when bluetooth power state has changed.

This documentation was introduced in Mobility 1.1.


DeviceInfo::currentProfileChanged ( DeviceInfo::Profile )

This handler is called when current device profile has changed.

This documentation was introduced in Mobility 1.1.


DeviceInfo::deviceLocked ( bool )

This signal is emitted whenever the device lock state changes

This documentation was introduced in Mobility 1.2.


DeviceInfo::keyboardFlipped ( bool )

This signal is emitted whenever a phone flips open.

This documentation was introduced in Mobility 1.2.


DeviceInfo::lockStatusChanged ( DeviceInfo::LockTypeFlags )

This signal is emitted whenever the lock state changes

This documentation was introduced in Mobility 1.2.


DeviceInfo::powerStateChanged ( DeviceINfo::PowerState )

This handler is called when the power state has changed.

This documentation was introduced in Mobility 1.1.


DeviceInfo::thermalStateChanged ( DeviceInfo::ThermalState )

This handler is called when thermal state has changed.

This documentation was introduced in Mobility 1.2.


DeviceInfo::wirelessKeyboardConnected ( bool )

This signal is emitted whenever a wireless keyboard is connected

This documentation was introduced in Mobility 1.2.


X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.