QWhereabouts Class Reference
|
Constant | Value | Description |
---|---|---|
QWhereabouts::NotAvailable | 0 | Positional data cannot be retrieved. This is the default state. |
QWhereabouts::Initializing | 1 | The object is in the initialization stage. It will change to the Available state when it is successfully initialized. |
QWhereabouts::Available | 2 | The object is able to receive position data, but it is not currently able to provide position updates as there is no position fix. |
QWhereabouts::PositionFixAcquired | 3 | A position fix has been acquired and position updates can now be provided. |
This enum defines the methods that may be used to calculate and retrieve the information to provide a QWhereaboutsUpdate.
Constant | Value | Description |
---|---|---|
QWhereabouts::AssistedUpdate | 0x01 | Position data is calculated using assistance data from an AGPS module. (This is generally used to obtain faster and more accurate fixes.) |
QWhereabouts::NetworkBasedUpdate | 0x02 | The position data is calculated by a remote server. |
QWhereabouts::TerminalBasedUpdate | 0x04 | The position data is calculated by the terminal (i.e. the mobile device). |
The UpdateMethods type is a typedef for QFlags<UpdateMethod>. It stores an OR combination of UpdateMethod values.
This property holds this property holds the interval between each update, in milliseconds.
If setUpdateInterval() is called after startUpdates(), the interval change will not take effect until startUpdates() is called again.
The default update interval is 0. An update interval of 0 means that updated() is emitted as soon as a valid update becomes available.
Access functions:
Constructs a whereabouts object with the given updateMethods and parent.
Destroys the whereabouts object.
Sets the value of lastUpdate() to update and emits updated().
Note that updated() should only be emitted while the state is QWhereabouts::PositionFixAcquired, and the provided update should always have valid date/time and coordinate values. Receivers of the signal should be able to assume that the provided update is valid without additional verification.
Returns the last update that was emitted through updated(), or an invalid update if no updates have been emitted yet.
The returned update may contain out-of-date information if updated() has not been emitted for some time. Use requestUpdate() if you require fresh positional data.
See also startUpdates() and emitUpdated().
Requests that updated() be emitted with the current whereabouts if possible. This can be called regardless of whether startUpdates() has already been called.
This is useful if you need to retrieve the current whereabouts but you do not need the periodic updates offered by startUpdates().
If the state is currently QWhereabouts::NotAvailable, the object will first be initialized and will begin to provide updates once it is in the QWhereabouts::PositionFixAcquired state.
See also startUpdates() and lastUpdate().
Sets the current state to state and emits stateChanged() if necessary.
See also state().
Starts emitting updated() with the interval specified by updateInterval(), or less frequently if updates are not available at a particular time. If updateInterval() is 0, updated() is emitted as soon as a valid update becomes available.
If startUpdates() has already been called, this restarts with updateInterval() as the new update interval.
If the state is currently QWhereabouts::NotAvailable, the object will first be initialized and will begin to provide updates once it is in the QWhereabouts::PositionFixAcquired state.
See also stopUpdates().
This is an overloaded member function, provided for convenience.
Starts providing updates with an update interval of msec milliseconds.
Returns the current state.
See also setState().
This signal is emitted when the whereabouts object's state changes to state.
See also setState().
Stops emitting updated() at regular intervals.
See also startUpdates().
Returns the methods that this whereabouts object uses to retrieve positional data.
This signal is emitted to notify recipients of a newly available update.
See also startUpdates(), stopUpdates(), and requestUpdate().
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 ! |
Copyright © 2000-2012 - www.developpez.com