IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

geocircle QML Value Type

The geocircle type represents a circular geographic area.

This type was introduced in Qt 5.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

geocircle QML Value Type

  • Import Statement: import QtPositioning 6.4

  • Since:: Qt 5.2

  • Group: geocircle is part of qmlvaluetypes, qml-QtPositioning5-basictypes

Detailed Description

The geocircle type is a geoshape that represents a circular geographic area. It is a direct representation of a QGeoCircle and is defined in terms of a coordinate which specifies the center of the circle and a qreal which specifies the radius of the circle in meters.

The circle is considered invalid if the center coordinate is invalid or if the radius is less than zero.

Example Usage

Use properties of type var to store a geocircle. To create a geocircle value, use the QtPositioning.circle() function:

 
Sélectionnez
import QtPositioning

Item {
    property var region: QtPositioning.circle(QtPositioning.coordinate(-27.5, 153.1), 1000)
}

When integrating with C++, note that any QGeoCircle value passed into QML from C++ is automatically converted into a geocircle value, and vise-versa.

Properties

 
center
 
Sélectionnez
coordinate radius

This property holds the coordinate of the center of the geocircle.

radius
 
Sélectionnez
real radius

This property holds the radius of the geocircle in meters.

The default value for the radius is -1 indicating an invalid geocircle area.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+