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

Qt Positioning GeoClue v2 plugin

Uses the GeoClue v2 library to provide positioning updates.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Overview

This plugin is an interface to the GeoClue v2 library. It requires this library to be installed on the system to function.

The plugin uses D-Bus to establish communication with the GeoClue v2 D-Bus service and to provide positioning information.

The plugin can be used to receive only the positioning information. It does not provide satellite information.

The plugin can be loaded by using the provider name geoclue2.

Parameters

The following table lists parameters that can be passed to the geoclue2 plugin.

Parameter

Description

desktopId

The Desktop Id property used by the D-Bus service. If the parameter is not specified, the application name provided by QCoreApplication::applicationName() is used.

Usage example

The following examples show how to create a geoclue2 PositionSource from C++ and QML.

QML

 
Sélectionnez
PositionSource {
    name: "geoclue2"
    PluginParameter { name: "desktopId"; value: "SomeIdentifierString" }
}

C++

 
Sélectionnez
QVariantMap params;
params["desktopId"] = "SomeIdentifierString";
QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createSource("geoclue2", params, this);

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