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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QML DeviceInfo Element

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

  • List of all members, including inherited members
  • 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 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

    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.


    read-onlycurrentProfile : 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.


    read-onlyimei : 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.


    isWirelessKeyboardConnected : bool

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

    This documentation was introduced in Qt Mobility Mobility 1.2.


    keyboardTypes : 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.


    read-onlymonitorBatteryStatusChanges : 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.


    read-onlymonitorPowerStateChanges : 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.


    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 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.


    Publicité

    Best Of

    Actualités les plus lues

    Semaine
    Mois
    Année
    1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 77
    2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
    3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
    4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
    5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
    6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
    7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
    Page suivante

    Le blog Digia au hasard

    Logo

    Créer des applications avec un style Metro avec Qt, exemples en QML et C++, un article de Digia Qt traduit par Thibaut Cuvelier

    Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

    Communauté

    Ressources

    Liens utiles

    Contact

    • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

    Qt dans le magazine

    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 qtmobility-1.2
    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