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  · 

QHardwareInterface Class Reference
[QtBaseModule]

The QHardwareInterface class is the base class of all hardware abstraction classes. More...

    #include <QHardwareInterface>

Inherits QAbstractIpcInterface.

Inherited by QBootSourceAccessory, QKeypadLightAccessory, QPowerSource, QSignalSource, and QVibrateAccessory.

Public Functions

Additional Inherited Members


Detailed Description

The QHardwareInterface class is the base class of all hardware abstraction classes.

QHardwareInterface and the abstraction classes are part of the Qt Extended Hardware Abstraction, which provides information on the availability of physical device and an API for controlling those devices. The device API is split into two sets of classes: iabstraction provider classes and abstraction client classes. Both sets are subclasses of QHardwareInterface.

The provider classes implement device-specific code for controlling the hardware feature and manage the state that is reported to the rest of Qt Extended through the client API. Provider classes are created by passing QAbstractIpcInterface::Server as the mode parameter when constructing QHardwareInterface derived classes.

The client classes provide an API for querying the state of and controlling devices. Client classes communicate with provider classes through an Inter Process Communication (IPC) mechanism. Multiple client instances can connect to a single provider. Client classes are created by passing QAbstractIpcInterface::Client as the mode parameter when constructing QHardwareInterface derived classes.

Qt Extended automatically recognizes any subclass of QHardwareInterface as a Qt Extended hardware abstraction. Each abstraction follows the principal of client and provider split whereby the provider is a subclass of the client class. See the documentation for QAbstractIpcInterface for more information on writing and using interface classes.

The system supports multiple providers of the same interface type. For example, a device could have a primary and secondary battery. Each battery would be exposed as a separate instance of a QPowerSourceProvider derived class. Default devices can be defined in the Trolltech/HardwareAccessories.conf configuration file. The file contains a list of interface names and the identity of the default device, for example:

    [Defaults]
    QPowerSource = DefaultBattery
    QSignalSource = DefaultSignal
    QVibrateAccessory = Modem

See also QHardwareManager and QAbstractIpcInterface.


Member Function Documentation

QHardwareInterface::QHardwareInterface ( const QString & name, const QString & id = QString(), QObject * parent = 0, QAbstractIpcInterface::Mode mode = Client )

Constructs a new QHardwareInterface object with interface type name, identity id and operates in mode. The object is attached to parent.

If id is empty the default device for name will be automatically selected.

QHardwareInterface::~QHardwareInterface ()

Destroys the hardware interface object.

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