| CMakeLists.txt |
|
1701 |
- |
| geosatelliteinfo.qdoc |
|
2901 |
- |
| locationsingleton.cpp |
!
\qmltype QtPositioning
\inqmlmodule QtPositioning
\since 5.2
\brief The QtPositioning global object provides useful functions for working with location-based
types in QML.
\qml
import QtPositioning
Item {
property var coordinate: QtPositioning.coordinate(-27.5, 153.1)
}
\endqml
|
9263 |
- |
| locationsingleton_p.h |
|
2861 |
- |
| positioningplugin.cpp |
!
\qmlvaluetype geoCoordinate
\ingroup qmlvaluetypes
\inqmlmodule QtPositioning
\since 5.2
\brief The geoCoordinate type represents and stores a geographic position.
This type is a QML representation of \l QGeoCoordinate and represents a geographic
position in the form of \l {latitude}, \l longitude and \l altitude attributes.
The \l latitude attribute specifies the number of
decimal degrees above and below the equator. A positive latitude indicates the Northern
Hemisphere and a negative latitude indicates the Southern Hemisphere. The \l longitude
attribute specifies the number of decimal degrees east and west. A positive longitude
indicates the Eastern Hemisphere and a negative longitude indicates the Western Hemisphere.
The \l altitude attribute specifies the number of meters above sea level. Together, these
attributes specify a 3-dimensional position anywhere on or near the Earth's surface.
The \l isValid attribute can be used to test if a coordinate is valid. A coordinate is
considered valid if it has a valid latitude and longitude. A valid altitude is not required.
The latitude must be between -90 and 90 inclusive and the longitude must be between -180 and
180 inclusive.
The geoCoordinate type is used by many other types in the Qt Location module, for specifying
the position of an object on a Map, the current position of a device and many other tasks.
They also feature a number of important utility methods that make otherwise complex
calculations simple to use, such as \l {atDistanceAndAzimuth}().
\section1 Accuracy
The latitude, longitude and altitude attributes stored in the geoCoordinate type are represented
as doubles, giving them approximately 16 decimal digits of precision -- enough to specify
micrometers. The calculations performed in geoCoordinate's methods such as \l {azimuthTo}() and
\l {distanceTo}() also use doubles for all intermediate values, but the inherent inaccuracies in
their spherical Earth model dominate the amount of error in their output.
\section1 Example Usage
To create a geoCoordinate use one of the methods described below. In all cases, specifying the
\l altitude attribute is optional.
To create a geoCoordinate value, use the \l{QtPositioning::coordinate}{QtPositioning.coordinate()}
function:
\qml
import QtPositioning
Location { coordinate: QtPositioning.coordinate(-27.5, 153.1) }
\endqml
or as separate \l latitude, \l longitude and \l altitude components:
\qml
Location {
coordinate {
latitude: -27.5
longitude: 153.1
}
}
\endqml
When integrating with C++, note that any QGeoCoordinate value passed into QML from C++ is
automatically converted into a geoCoordinate value, and vice-versa.
|
18960 |
- |
| qdeclarativegeoaddress.cpp |
!
\qmltype Address
\inqmlmodule QtPositioning
\since 5.2
\brief The Address QML type represents a specific location as a street address.
An Address is used as a unit of data for queries such as (Reverse) Geocoding
or Places searches -- many of these operations either accept an Address
or return one.
Not all properties of an Address are necessarily available or relevant
in all parts of the world and all locales. The \l district, \l state and
\l county properties are particularly area-specific for many data sources,
and often only one or two of these are available or useful.
The Address has a \l text property which holds a formatted string. It
is the recommended way to display an address to the user and typically
takes the format of an address as found on an envelope, but this is not always
the case. The \l text may be automatically generated from constituent
address properties such as \l street, \l city and and so on, but can also
be explicitly assigned. See \l text for details.
\section2 Example Usage
The following code snippet shows the declaration of an Address object.
\code
Address {
id: address
street: "53 Brandl St"
city: "Eight Mile Plains"
country: "Australia"
countryCode: "AUS"
}
\endcode
This could then be used, for example, as the value of a geocoding query,
to get an exact longitude and latitude for the address.
\sa {QGeoAddress}
|
10128 |
- |
| qdeclarativegeoaddress_p.h |
|
3298 |
- |
| qdeclarativegeolocation.cpp |
!
\qmltype Location
\inqmlmodule QtPositioning
\since 5.2
\brief The Location type holds location data.
Location types represent a geographic "location", in a human sense. This
consists of a specific \l {coordinate}, an \l {address} and a
\l {boundingShape}{bounding shape}.
The \l {boundingShape}{bounding shape} represents the recommended region
to display when viewing this location.
The Location type 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 objects.
\section2 Example Usage
The following example shows a simple Location object being declared:
\code
Location {
coordinate {
latitude: -27.3
longitude: 153.1
}
address: Address {
...
}
}
\endcode
|
6764 |
- |
| qdeclarativegeolocation_p.h |
|
3093 |
- |
| qdeclarativepluginparameter.cpp |
!
\qmltype PluginParameter
\inqmlmodule QtPositioning
\ingroup qml-QtPositioning5-common
\since QtPositioning 5.14
\brief The PluginParameter type describes a parameter for a
\omit
plugin, either geoservice \l Plugin, or
\endomit
position plugin.
The PluginParameter object is used to provide a parameter of some kind
to a plugin. Typically, these parameters contain details like an application
token for access to a service, or a proxy server to use for network access,
or the serial port to which a serial GPS receiver is connected.
To set such a parameter, declare a PluginParameter inside an element that
accepts plugin parameters as configuration objects, such as a
\omit
\l Plugin object, or a
\endomit
\l PositionSource object, and set values for its \l{name} and \l{value}
properties. A list of valid parameter names for each plugin is available
from the
\omit
\l {Qt Location#Plugin References and Parameters}{plugin reference pages}
for geoservice plugins, and
\endomit
\l {Qt Positioning plugins#Default plugins}{default plugins page} for
position plugins.
\section2 Example Usage
The following example shows the instantiation of the
\l {Qt Positioning NMEA plugin}{NMEA} plugin with the \e nmea.source
parameter that specifies the data source.
\code
PositionSource {
name: "nmea"
PluginParameter { name: "nmea.source"; value: "serial:/dev/ttyACM0" }
}
\endcode
|
3174 |
- |
| qdeclarativepluginparameter_p.h |
|
1615 |
- |
| qdeclarativeposition.cpp |
!
\qmltype Position
//! \nativetype QDeclarativePosition
\inqmlmodule QtPositioning
\since 5.2
\brief The Position type holds positional data at a particular point in time,
such as coordinate (longitude, latitude, altitude) and speed.
The Position type holds values related to geographic location such as
a \l coordinate (longitude, latitude, and altitude), the \l timestamp when
the Position was obtained, the \l speed at that time, and the accuracy of
the data.
Primarily, it is used in the \l{PositionSource::position}{position} property
of a \l{PositionSource}, as the basic unit of data available from the system
location data source.
Not all properties of a Position object are necessarily valid or available
(for example latitude and longitude may be valid, but speed update has not been
received or set manually). As a result, corresponding "valid" properties
are available (for example \l{coordinate} and \l{longitudeValid}, \l{latitudeValid}
etc) to discern whether the data is available and valid in this position
update.
Position objects are read-only and can only be produced by a PositionSource.
\section2 Example Usage
See the example given for the \l {PositionSource} type, or the
\l {Satellite Info} example application.
\sa PositionSource, coordinate
|
19012 |
- |
| qdeclarativeposition_p.h |
|
9404 |
- |
| qdeclarativepositionsource.cpp |
|
28553 |
- |
| qdeclarativepositionsource_p.h |
|
7632 |
- |
| qdeclarativesatellitesource.cpp |
!
\qmltype SatelliteSource
\inqmlmodule QtPositioning
\since 6.5
\brief The SatelliteSource class provides the satellite information.
The SatelliteSource class provides information about satellites in use and
satellites in view. This class is a QML representation of
\l QGeoSatelliteInfoSource.
Like its C++ equivalent, the class supports different plugins. Use the
\l name property to specify the name of the plugin to be used, and provide
\l {PluginParameter}s, if required. If the \l name property is not set,
a default plugin will be used. See \l {Qt Positioning Plugins} for more
information on the available plugins.
Use the \l valid property to check the SatelliteSource state.
Use the \l updateInterval property to indicate how often your application
wants to receive the satellite information updates. The \l start(),
\l stop() and \l update() methods can be used to control the operation
of the SatelliteSource, as well as the \l active property, which when set
is equivalent to calling \l start() or \l stop().
When the SatelliteSource is active, satellite information updates can
be retrieved using the \l satellitesInView and \l satellitesInUse
properties.
If an error happens during satellite information updates, use the
\l sourceError property to get the actual error code.
\section2 Example Usage
The following example shows a SatelliteSource which is using the
\l {Qt Positioning NMEA plugin}{NMEA} plugin to receive satellite
information updates every second and print the amount of satellites
in view and satellites in use to the console.
\qml
SatelliteSource {
id: source
name: "nmea"
active: true
updateInterval: 1000
PluginParameter { name: "nmea.source"; value: "serial:/dev/ttyACM0" }
onSatellitesInUseChanged: {
console.log("Satellites in use:", source.satellitesInUse.length)
}
onSatellitesInViewChanged: {
console.log("Satellites in view:", source.satellitesInView.length)
}
}
\endqml
\sa QGeoSatelliteInfoSource, PluginParameter, geoSatelliteInfo
|
16618 |
- |
| qdeclarativesatellitesource_p.h |
|
5031 |
- |
| qpositioningquickglobal.h |
|
630 |
- |
| qpositioningquickglobal_p.h |
|
693 |
- |
| qpositioningquickmodule.cpp |
|
238 |
- |
| qpositioningquickmodule_p.h |
|
3263 |
- |
| qquickgeocoordinateanimation.cpp |
!
\qmltype CoordinateAnimation
\inherits PropertyAnimation
\inqmlmodule QtPositioning
\since 5.3
\brief A PropertyAnimation for geo coordinate properties.
A specialized \l{PropertyAnimation} that defines an animation
between two \l{geoCoordinate}{coordinates}.
By default, a \l{geoCoordinate::latitude}{latitude} of the
\l geoCoordinate is animated in the direction of shortest
(geodesic) distance between those coordinates. Since CoordinateAnimation uses Mercator
map projection, the \l{geoCoordinate::latitude}{latitude} animation
is always between -90 and 90 degrees.
The \l{geoCoordinate::longitude}{longitude} animation path is not
limited and can go over 180 degrees in both west and east directions.
The \l{direction} property can be set to specify the direction in which the
\l{geoCoordinate::longitude}{longitude} animation should occur.
\sa {Animation and Transitions in Qt Quick}
|
9261 |
- |
| qquickgeocoordinateanimation_p.h |
|
2003 |
- |
| qquickgeocoordinateanimation_p_p.h |
|
1538 |
- |