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

Qt Positioning Gypsy plugin

Uses the Gypsy daemon to provide satellite information.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Overview

The plugin is an interface to the Gypsy daemon. It requires the daemon to be installed and running on the system to function.

The plugin uses D-Bus and GLib to connect to GPS device and provide satellite information.

Currently the plugin does not provide positioning information.

The plugin can be loaded using provider name gypsy.

Parameters

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

Parameter

Description

deviceName

The name of the device (or path to the device file) that will be used to provide satellite information. The typical values can be /dev/ttyUSB0 or /dev/ttyACM0.

gconfKey

The key that will be used to extract device name from the GConf configuration system.

The plugin supports two ways of specifying the device name:

  • Specify the device name directly with the deviceName plugin parameter.

  • Specify the configuration key using gconfKey plugin parameter and extract the device name from the GConf configuration system. This approach is useful when the device name is already specified for some other GConf-based application.

By default, when none of the parameters is specified, the plugin will try to extract the device name from the GConf configuration system using the following hardcoded key:

 
Sélectionnez
/apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice

Using GConf to set parameters

To specify a value for a key in the GConf configuration system, use gconftool-2 as follows:

 
Sélectionnez
gconftool-2 -t string -s /apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice /dev/ttyUSB0

Usage example

The following examples show how to create a gypsy satellite info source from C++.

Specifying device name directly:

 
Sélectionnez
QVariantMap parameters;
parameters["deviceName"] = "/dev/ttyACM0";
QGeoSatelliteInfoSource *source = QGeoSatelliteInfoSource::createSource("gypsy", parameters, this);

Using GConf key:

 
Sélectionnez
QVariantMap parameters;
parameters["gconfKey"] = "/apps/myapp/mykey";
QGeoSatelliteInfoSource *source = QGeoSatelliteInfoSource::createSource("gypsy", parameters, this);

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