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  · 

QBootSourceAccessory Class Reference
[QtBaseModule]

The QBootSourceAccessory class provides an interface for querying the event which triggered the last boot sequence. More...

    #include <QBootSourceAccessory>

Inherits QHardwareInterface.

Inherited by QBootSourceAccessoryProvider.

Public Types

  • enum Source { Unknown, PowerKey, Charger, Alarm, Watchdog, Software }

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QBootSourceAccessory class provides an interface for querying the event which triggered the last boot sequence.

QBootSourceAccessory can be used to query the event which triggered the last boot using bootSource(). For example the following code checks if the device was booted by plugging in the charger:

    QBootSourceAccessory bsa;
    if (bsa.bootSource() == QBootSourceAccessory::Charger) {
        ...
    }

Boot source implementations should inherit from QBootSourceAccessoryProvider.

See also QBootSourceAccessoryProvider and QHardwareInterface.


Member Type Documentation

enum QBootSourceAccessory::Source

Defines the events which can trigger a boot sequence

ConstantValueDescription
QBootSourceAccessory::Unknown0Boot was triggered by an unknown event
QBootSourceAccessory::PowerKey1Boot was triggered by pressing the power-on key
QBootSourceAccessory::Charger2Boot was triggered by plugging in the battery charger
QBootSourceAccessory::Alarm3Boot was triggered by an RTC alarm
QBootSourceAccessory::Watchdog4Boot was triggered by the expiration of the watchdog timer
QBootSourceAccessory::Software5Boot was triggered by software, e.g. via a software reboot.


Member Function Documentation

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

Construct a new boot source accessory object for the given provider id and attaches it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.

If id is empty, this class will use the default boot source provider that supports the boot source interface. If there is more than one service that supports the boot source interface, the caller should enumerate them with QHardwareManager::providers() and create separate QBootSourceAccessory objects for each.

See also QHardwareManager::providers().

QBootSourceAccessory::~QBootSourceAccessory ()

Destroys the boot source hardware abstraction.

QBootSourceAccessory::Source QBootSourceAccessory::bootSource () const

Returns the event which triggered the last boot sequence.

void QBootSourceAccessory::bootSourceModified ()   [signal]

This signal is emitted when bootSource() changes.

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