Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtpositioning-plugins.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtpositioning-plugins.html
6
\title Qt Positioning Plugins
7
\brief Default Plugins and Implementing Qt Positioning plugins
8
9
Qt Positioning provides the majority of its functionality through plugins.
10
This document outlines how to develop a new position plugin.
11
12
\section1 Default plugins
13
Some plugins already ship with Qt. These are:
14
15
\table
16
\row
17
\li \b android
18
\li Wraps \l {Qt Positioning Android plugin}{Android} positioning subsystem.
19
Available only on Android.
20
\row
21
\li \b corelocation
22
\li Wraps \l {Qt Positioning Core Location plugin}{iOS and \macos}
23
positioning subsystems. Available only on Apple platforms supporting
24
corelocation.
25
\row
26
\li \b geoclue2
27
\li A \l {Qt Positioning GeoClue v2 plugin}{GeoClue v2} backend that
28
provides an interface to the GeoClue v2 D-Bus service.
29
\row
30
\li \b gypsy
31
\li A \l {Qt Positioning Gypsy plugin}{Gypsy} backend that provides
32
an interface to the Gypsy daemon.
33
\row
34
\li \b winrt
35
\li Wraps WinRT positioning subsystem. Available only on WinRT and Windows10.
36
\row
37
\li \b nmea
38
\li An \l {Qt Positioning NMEA plugin}{NMEA} backend that parses NMEA
39
streams from a GPS receiver to provide position updates. This plugin can
40
use serial port, socket or file as a source.
41
\row
42
\li \b positionpoll
43
\li A backend providing only area monitoring functionalities via polling on position updates.
44
\endtable
45
46
47
\section1 Plugin Description
48
49
Each plugin is described by a json file. The json describes the plugins capabilities and
50
version. Below is an example of a json file used by the postionpoll plugin:
51
52
\quotefile ../../../plugins/position/positionpoll/plugin.json
53
54
The entries have the following meaning:
55
56
\table
57
\header
58
\li Key
59
\li Description
60
\row
61
\li Keys
62
\li The unique name/key of the plugin. Each position plugin must have a unique name.
63
\row
64
\li Provider
65
\li The provider name of the services. Multiple plugins may have the same name.
66
In such cases the Version string will be used to further distinguish the plugins.
67
\row
68
\li Position
69
\li Set to \c true if the plugin implements a \l QGeoPositionInfoSource.
70
\row
71
\li Satellite
72
\li Set to \c true if the plugin implements a \l QGeoSatelliteInfoSource.
73
\row
74
\li Monitor
75
\li Set to \c true if the plugin implements a \l QGeoAreaMonitorSource.
76
\row
77
\li Priority
78
\li The plugin priority. If multiple plugins have the same provider name, the plugin
79
with the higest priority will be used.
80
\endtable
81
82
\section1 Implementing Plugins
83
84
A plugin implementer needs to subclass \l QGeoPositionInfoSourceFactory and override one or more of
85
its functions. If a plugin does not support a specific feature the function should return 0 or
86
utilize the default implementation.
87
88
\list
89
\li \l QGeoPositionInfoSourceFactory::areaMonitor()
90
\li \l QGeoPositionInfoSourceFactory::positionInfoSource()
91
\li \l QGeoPositionInfoSourceFactory::satelliteInfoSource()
92
\endlist
93
*/
qtpositioning
src
positioning
doc
src
qtpositioning-plugins.qdoc
Generated on
for Qt by
1.16.1