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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Location

The Location element holds location data. More...

Inherits QtObject

This type was introduced in Qt Location 5.0.

Properties

Detailed Description

Location elements represent a geographic "location", in a human sense. This consists of a specific Coordinate, as well as an Address and a BoundingBox. The BoundingBox delineates the limits of what geographic area is considered "part of" the location. For example, a Location representing a house would have the Coordinate set to the center of the house's block of land, the Address to its street address, and the BoundingBox would show roughly the limits of the block itself.

The Location element is most commonly seen as the contents of a search model such as the GeocodeModel. When a GeocodeModel returns the list of locations found for a given query, it represents these as Location elements.

Example Usage

The following example shows a simple Location element being declared with a set coordinate and address.

 Address {
     id: houseAddress
     ...
 }

 Coordinate {
     id: coord
     latitude: -27.3; longitude: 153.1
 }

 Location {
     coordinate: coord
     address: houseAddress
 }

Property Documentation

address : Address

This property holds the address of the location which can be use to retrieve address details of the location.


boundingBox : BoundingBox

This property holds bounding box of area on map occupied by location.

Note: this property's changed() signal is currently emitted only if the whole element changes, not if only the contents of the element change.


coordinate : Coordinate

This property holds the exact geographical coordinate of the location which can be used to retrieve the latitude, longitude and altitude of the location.

Note: this property's changed() signal is currently emitted only if the whole element changes, not if only the contents of the element change.


location : QGeoLocation

For details on how to use this property to interface between C++ and QML see "Interfaces between C++ and QML Code".


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 5.0-snapshot
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