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  · 

QDeviceIndicators Class Reference
[QtBaseModule]

The QDeviceIndicators class allows applications to control indicator lights. More...

    #include <QDeviceIndicators>

Inherits QObject.

Public Types

Public Functions

  • 29 public functions inherited from QObject

Signals

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QDeviceIndicators class allows applications to control indicator lights.

The QDeviceIndicators class can be used by applications to control visual lights on a device. For example, many devices have an "Email" light that is illuminated whenever there are new messages. Each light has a name, and is manipulated through it's state such as On or Flash and attributes such as Color. The names of each indicator, and their supported states and attributes are device specific. Typically the implementer of QDeviceIndicatorsProvider would document these and provide them to the user of QDeviceIndicators.

QDeviceIndicators acts as a thin convenience wrapper around entries in the Qt Extended Value Space. The current status on indicators is located under the /Hardware/IndicatorLights path. For example, the "Email" indicator state could be read and set directly through the /Hardware/IndicatorLights/Email item.

Note: Because QDeviceIndicators uses Value Space, it is not thread safe and may only be used from an application's main thread.

See also QDeviceIndicatorsProvider.


Member Type Documentation

enum QDeviceIndicators::IndicatorState

Represents the state of a device indicator.

ConstantValueDescription
QDeviceIndicators::Off0The indicator light is not illuminated.
QDeviceIndicators::On1The indicator light is illuminated.
QDeviceIndicators::Flash2The indicator is flashing on and off.
QDeviceIndicators::Throb3The indicator is smoothly cycling from zero intensity to full intensity and back again


Member Function Documentation

QDeviceIndicators::QDeviceIndicators ( QObject * parent = 0 )

Create a new QDeviceIndicators instance with the provided parent.

QDeviceIndicators::~QDeviceIndicators ()   [virtual]

Destroys the instance.

QVariant QDeviceIndicators::indicatorAttribute ( const QString & name, const QString & attribute ) const

Returns the value of the attribute of the given indcator's name. An invalid QVariant is returned if the indicator name does not exist or attribute is not supported.

See also setIndicatorAttribute().

IndicatorState QDeviceIndicators::indicatorState ( const QString & name )

Returns the current indicator state for name.

See also setIndicatorState() and isIndicatorStateSupported().

void QDeviceIndicators::indicatorStateChanged ( const QString & name, QDeviceIndicators::IndicatorState newState )   [signal]

Emitted whenever the indicator name changes state. newState will be set to the new indicator state.

See also indicatorState() and setIndicatorState().

bool QDeviceIndicators::isIndicatorStateSupported ( const QString & name, IndicatorState state )

Returns true if the indicator name supports a given state. Returns false if the state is not supported or the indicator name is not recognised.

See also indicatorState() and setIndicatorState().

bool QDeviceIndicators::isIndicatorSupported ( const QString & name )

Returns true if the indicator name is supported by the device.

See also supportedIndicators().

void QDeviceIndicators::setIndicatorAttribute ( const QString & name, const QString & attribute, const QVariant & value )

Attempts to set the attribute of indicator name to value. Setting an attribute is an asynchronous event. Honoring or ignoring the request is up to the implementation of QDeviceIndicatorsProvider, typically valid requests would always be honored.

See also indicatorAttribute().

void QDeviceIndicators::setIndicatorState ( const QString & name, IndicatorState state )

Attempts to change the indicator name to the provided state. Setting an indicator is an asynchronous event. If necessary, callers should monitor the indicatorStateChanged() signal to determine when the state change occurs.

See also indicatorState() and isIndicatorStateSupported().

QStringList QDeviceIndicators::supportedIndicators () const

Returns the list of all indicators supported by the device.

See also isIndicatorSupported().

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 94
  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. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  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 7
Page suivante

Le Qt Quarterly au hasard

Logo

Un plugin pour QImage

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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 qtextended4.4
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