QSystemAlignedTimer Class ReferenceThe QSystemAlignedTimer class provides a service for applications to synchronize their activity. More... #include <QSystemAlignedTimer> Inherits: QObject. This class was introduced in Qt Mobility 1.2. Public Types
Properties
Public Functions
Public Slots
Signals
Static Public Members
Additional Inherited Members
Detailed DescriptionThe QSystemAlignedTimer class provides a service for applications to synchronize their activity. QSystemAlignedTimer is a fuzzy timer that allows applications that must do periodic activity like after being in sleep mode a certain period, to synchronize their activities in the same window of time. For example send network "alive" messages at the same time (i.e. turn the wireless radio on at the same time). The service is not only for network-aware applications, it is for use by any applications that need to periodic wake-ups. The recommended use case is when app uses single-shot timer only: set mintime 0 for the first call 'to jump to the train' and mintime > 0 after 1st wakeup. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QSystemAlignedTimer::NoError | 0 | No error. |
QSystemAlignedTimer::AlignedTimerNotSupported | 1 | The aligned timer is not support on this platform |
QSystemAlignedTimer::InvalidArgument | 2 | Interval arguments are invalid. |
QSystemAlignedTimer::TimerFailed | 3 | General timer failure. |
QSystemAlignedTimer::InternalError | 4 | Internal error. |
Returns true if the timer is running; otherwise false.
Access functions:
bool | isActive () const |
This property holds the timer's maximumInterval.
Returns this current timer maximum interval.
Access functions:
int | maximumInterval () const |
void | setMaximumInterval ( int seconds ) |
This property holds the timers's minimumInterval.
Returns this current timer minimum interval.
Access functions:
int | minimumInterval () const |
void | setMinimumInterval ( int seconds ) |
Whether the timer is single shot.
Access functions:
bool | isSingleShot () const |
void | setSingleShot ( bool singleShot ) |
Constructs a QSystemAlignedTimer object with the given parent.
Destructs the QSystemAlignedTimer
This signal is emitted when an error happens.
Returns the last AlignedTimerError.
This static function starts a timer to call a slot after a minimumTime interval has elapsed, and ensures that it will be called before the maximumTime has elapsed.
These values are specified in seconds.
The receiver is the receiver object and the member is the slot.
See also setSingleShot().
Starts the timer with the minimal interval of minimumTime, and maximum interval maximumTime in seconds.
This is not a guaranteed interval, and the timeout signal may be fired at any time, depending on other clients attached to this timer.
In the case of minimalInterval of 0, it means 'wake me up when someone else is woken up'.
If you need a window of time in which your timer should fire, use QSystemAlignedTimer::setWindow
Starts the alignedtimer.
Stops this timer request.
This signal is emitted when the timer times out.
This should be called when the application wakes up via other means than QSystemAlignedTimer timeout.
Other applications that are in their wakeup window *may* be woken up. Single-shot timer is canceled, and reoccuring timer interval will restart.
Symbian does not support this wokeUp call for reoccuring timers and will simply ignore it.
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 ! |
Copyright © 2000-2012 - www.developpez.com