Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QDeviceInfo Class

The QDeviceInfo class provides various information of the system. More...

 #include <QDeviceInfo>

Inherits: QObject.

Public Types

enum Feature { BluetoothFeature, CameraFeature, FmRadioFeature, FmTransmitterFeature, ..., NfcFeature }
enum LockType { NoLock, PinLock, TouchOrKeyboardLock, UnknownLock }
flags LockTypeFlags
enum ThermalState { UnknownThermal, NormalThermal, WarningThermal, AlertThermal, ErrorThermal }
enum Version { Os, Firmware }

Properties

  • 1 property inherited from QObject

Public Functions

QDeviceInfo(QObject * parent = 0)
virtual ~QDeviceInfo()
QDeviceInfo::LockTypeFlags activatedLocks() const
QDeviceInfo::LockTypeFlags enabledLocks() const
bool hasFeature(QDeviceInfo::Feature feature) const
QString imei(int interface) const
int imeiCount() const
QString manufacturer() const
QString model() const
QString productName() const
QDeviceInfo::ThermalState thermalState() const
QString uniqueDeviceID() const
QString version(QDeviceInfo::Version type) const
  • 31 public functions inherited from QObject

Signals

void activatedLocksChanged(QDeviceInfo::LockTypeFlags types)
void enabledLocksChanged(QDeviceInfo::LockTypeFlags types)
void thermalStateChanged(QDeviceInfo::ThermalState state)

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QDeviceInfo class provides various information of the system.

Member Type Documentation

enum QDeviceInfo::Feature

This enum describes the features of the device.

ConstantValueDescription
QDeviceInfo::BluetoothFeature0Bluetooth feature.
QDeviceInfo::CameraFeature1Camera feature.
QDeviceInfo::FmRadioFeature2Frequency modulation (FM) radio feature.
QDeviceInfo::FmTransmitterFeature3Frequency modulation (FM) radio transmitter feature.
QDeviceInfo::InfraredFeature4Infrared communication feature.
QDeviceInfo::LedFeature5Light-emitting diode (LED) feature.
QDeviceInfo::MemoryCardFeature6Memory card feature.
QDeviceInfo::UsbFeature7Universal system bus (USB) feature.
QDeviceInfo::VibrationFeature8Vibration feature.
QDeviceInfo::WlanFeature9Wireless local area network (WLAN) feature.
QDeviceInfo::SimFeature10Subscriber identity module (SIM) feature.
QDeviceInfo::PositioningFeature11Positioning feature, e.g. Global Positioning System (GPS).
QDeviceInfo::VideoOutFeature12Video out feature.
QDeviceInfo::HapticsFeature13Haptics feature, the platform can provide audio and/or visual and/or vibration feedback.
QDeviceInfo::NfcFeature14Near Field Communication (NFC) feature.

enum QDeviceInfo::LockType
flags QDeviceInfo::LockTypeFlags

This enum describes lock type on the device.

ConstantValueDescription
QDeviceInfo::NoLock0No lock.
QDeviceInfo::PinLock0x0000001Device can be locked by PIN code or password.
QDeviceInfo::TouchOrKeyboardLock0x0000002Device can be locked by touch or keyboard.
QDeviceInfo::UnknownLock0x0000004lock types requested but no result received yet.

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

enum QDeviceInfo::ThermalState

This enum describes the thermal state:

ConstantValueDescription
QDeviceInfo::UnknownThermal0The thermal state is unknown.
QDeviceInfo::NormalThermal1The thermal state is normal.
QDeviceInfo::WarningThermal2The thermal state is warning.
QDeviceInfo::AlertThermal3The thermal state is alert.
QDeviceInfo::ErrorThermal4The thermal state is error.

enum QDeviceInfo::Version

This enum describes the version component.

ConstantValueDescription
QDeviceInfo::Os0Operating system version. For Linux, it returns the version of the distribution if any.
QDeviceInfo::Firmware1Version of (flashable) system as a whole. For Linux, it's the version of the kernel.

Property Documentation

activatedLocks : const LockTypeFlags

This property holds the activated lock types.

The current activated lock types of the device. It suggests that these lock types are also enabled.

Access functions:

QDeviceInfo::LockTypeFlags activatedLocks() const

Notifier signal:

void activatedLocksChanged(QDeviceInfo::LockTypeFlags types)

enabledLocks : const LockTypeFlags

This property holds the enabled lock types.

The current lock types that are enabled on the device. Note that it doesn't mean the device is currently locked.

Access functions:

QDeviceInfo::LockTypeFlags enabledLocks() const

Notifier signal:

void enabledLocksChanged(QDeviceInfo::LockTypeFlags types)

thermalState : const ThermalState

This property holds the thermal state.

The current thermal state of the device. If there are more than one thermal zone devices available, the state of the most critical one is reported.

Access functions:

QDeviceInfo::ThermalState thermalState() const

Notifier signal:

void thermalStateChanged(QDeviceInfo::ThermalState state)

Member Function Documentation

QDeviceInfo::QDeviceInfo(QObject * parent = 0)

Constructs a QDeviceInfo object with the given parent.

QDeviceInfo::~QDeviceInfo() [virtual]

Destroys the object

bool QDeviceInfo::hasFeature(QDeviceInfo::Feature feature) const

Returns true if the feature is supported, otherwise false.

QString QDeviceInfo::imei(int interface) const

Returns the International Mobile Equipment Identity (IMEI) of the given interface on the device. In case of error, or the information is not available, an empty string is returned.

int QDeviceInfo::imeiCount() const

Returns the count of available International Mobile Equipment Identity (IMEI) of the device. In case of error, or the information is not available, -1 is returned.

QString QDeviceInfo::manufacturer() const

Returns the name of the manufacturer of this device, or the name of the vendor of the motherboard as a fallback. In case of error, or the information is not available, an empty string is returned.

QString QDeviceInfo::model() const

Returns the model information of the device, e.g. N8, or the CPU architect as a fallback. In case of error, or the information is not available, an empty string is returned.

QString QDeviceInfo::productName() const

Returns the internal product name of the device, e.g. RM-774. In case of error, or the information is not available, an empty string is returned.

For Linux, it returns the codename of the distribution if any.

QString QDeviceInfo::uniqueDeviceID() const

Returns a unique identifier for the device, or an empty string if on error or not available.

QString QDeviceInfo::version(QDeviceInfo::Version type) const

Returns the version of type. In case of error, or the version is unknown, an empty string is returned.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web