QtMobility Reference Documentation

Contents

QML DeviceInfo Element

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

Properties

Signals

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 follow table lists the \b incompatible changes made to the start* functions from QtMobility 1.1 to QtMobility 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

read-onlybatteryLevel : int

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

This documentation was introduced in Qt Mobility Mobility 1.1.


read-onlybatteryStatus : BatteryStatus

Returns the battery charge status.

This documentation was introduced in Qt Mobility Mobility 1.1.


read-onlycurrentBluetoothPowerState : bool

Gets the current bluetooth power state.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlycurrentPowerState : PowerState

Gets the current QSystemDeviceInfo::currentPowerState state.

This documentation was introduced in Qt Mobility Mobility 1.2.


currentProfile : Profile

Gets the current QSystemDeviceInfo::currentProfile device profile.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlycurrentThermalState : ThermalState

Returns the current thermal state of the device.

This documentation was introduced in Qt Mobility 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 documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyimsi : QString

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyinputMethodType : InputMethodFlags

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyisDeviceLocked : bool

Returns true if the device is locked, otherwise false.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyisKeyboardFlippedOpen : bool

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyisWirelessKeyboardConnected : bool

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlykeyboardTypes : KeyboardTypeFlags

Returns the type of keyboards found.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlylockStatus : LockTypeFlags

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymanufacturer : QString

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymessageRingtoneVolume() : int

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymodel : 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 documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorBatteryLevelChanges : bool

Use the monitorBatteryLevelChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


monitorBatteryStatusChanges : bool

Use the monitorBatteryStatusChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorBluetoothStateChanges : bool

Use the bluetoothStateChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorCurrentProfileChanges : bool

Use the monitorCurrentProfileChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorKeyboardFlips() : bool

Start the connection for the keyboardFlipped signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorLockStatusChanges() : bool

Start the connection for the lockStatusChanged signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


monitorPowerStateChanges : bool

Use the monitorPowerStateChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorThermalStateChanges : bool

Use the thermalStateChanges signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlymonitorWirelessKeyboardConnects() : bool

Start the connection for the wirelessKeyboardConnected signal.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyprimaryKeypadLightOn() : bool

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyproductName : QString

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlysecondaryKeypadLightOn() : bool

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlysimStatus : SimStatus

Returns the QSystemDeviceInfo::simStatus status of SIM card.

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyuniqueID : string

Returns a unique identifier for the machine.

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyvibrationActive() : bool

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

This documentation was introduced in Qt Mobility Mobility 1.2.


read-onlyvoiceRingtoneVolume() : int

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

This documentation was introduced in Qt Mobility Mobility 1.2.


Signal Documentation

DeviceInfo::batteryLevelChanged ( int )

This handler is called when battery level has changed.

This documentation was introduced in Qt Mobility Mobility 1.1.


DeviceInfo::batteryStatusChanged ( DeviceInfo::BatteryStatus )

This handler is called when battery status has changed.

This documentation was introduced in Qt Mobility Mobility 1.1.


DeviceInfo::bluetoothStateChanged ( bool )

This handler is called when bluetooth power state has changed.

This documentation was introduced in Qt Mobility Mobility 1.1.


DeviceInfo::currentProfileChanged ( DeviceInfo::Profile )

This handler is called when current device profile has changed.

This documentation was introduced in Qt Mobility Mobility 1.1.


DeviceInfo::deviceLocked ( bool )

This signal is emitted whenever the device lock state changes

This documentation was introduced in Qt Mobility Mobility 1.2.


DeviceInfo::keyboardFlipped ( bool )

This signal is emitted whenever a phone flips open.

This documentation was introduced in Qt Mobility Mobility 1.2.


DeviceInfo::lockStatusChanged ( DeviceInfo::LockTypeFlags )

This signal is emitted whenever the lock state changes

This documentation was introduced in Qt Mobility Mobility 1.2.


DeviceInfo::powerStateChanged ( DeviceINfo::PowerState )

This handler is called when the power state has changed.

This documentation was introduced in Qt Mobility Mobility 1.1.


DeviceInfo::thermalStateChanged ( DeviceInfo::ThermalState )

This handler is called when thermal state has changed.

This documentation was introduced in Qt Mobility Mobility 1.2.


DeviceInfo::wirelessKeyboardConnected ( bool )

This signal is emitted whenever a wireless keyboard is connected

This documentation was introduced in Qt Mobility Mobility 1.2.