QGeoSatelliteInfoSourceclass is an abstract base class for the distribution of satellite information updates. 更多 …
def
sourceName
()
def
updateInterval
()
def
error
()
def
minimumUpdateInterval
()
def
requestUpdate
([timeout=0])
def
setUpdateInterval
(msec)
def
startUpdates
()
def
stopUpdates
()
def
error
(arg__1)
def
requestTimeout
()
def
satellitesInUseUpdated
(satellites)
def
satellitesInViewUpdated
(satellites)
def
availableSources
()
def
createDefaultSource
(parameters, parent)
def
createDefaultSource
(parent)
def
createSource
(sourceName, parameters, parent)
def
createSource
(sourceName, parent)
The static function
createDefaultSource()creates a default satellite data source that is appropriate for the platform, if one is available. Otherwise, availableQGeoPositionInfoSourceFactoryplugins will be checked for one that has a satellite data source available.调用
startUpdates()andstopUpdates()to start and stop regular updates, orrequestUpdate()to request a single update. When an update is available,satellitesInViewUpdated()and/orsatellitesInUseUpdated()会被发射。If regular satellite updates are required,
setUpdateInterval()can be used to specify how often these updates should be emitted. If no interval is specified, updates are simply provided whenever they are available. For example:// Emit updates every 10 seconds if available QGeoSatelliteInfoSource *source = QGeoSatelliteInfoSource::createDefaultSource(0); if (source) source->setUpdateInterval(10000);To remove an update interval that was previously set, call
setUpdateInterval()with a value of 0.Note that the satellite source may have a minimum value requirement for update intervals, as returned by
minimumUpdateInterval().
QGeoSatelliteInfoSource
(
parent
)
¶
parent
–
QObject
PySide2.QtPositioning.QGeoSatelliteInfoSource.
Error
¶
The Error enumeration represents the errors which can occur.
|
常量 |
描述 |
|---|---|
|
QGeoSatelliteInfoSource.AccessError |
The connection setup to the satellite backend failed because the application lacked the required privileges. |
|
QGeoSatelliteInfoSource.ClosedError |
The satellite backend closed the connection, which happens for example in case the user is switching location services to off. This object becomes invalid and should be deleted. A new satellite source can be created by calling
|
|
QGeoSatelliteInfoSource.NoError |
没有发生错误。 |
|
QGeoSatelliteInfoSource.UnknownSourceError |
发生无法识别的错误。 |
PySide2.QtPositioning.QGeoSatelliteInfoSource.
availableSources
(
)
¶
字符串列表
Returns a list of available source plugins, including the default system backend if one is available.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
createDefaultSource
(
parent
)
¶
parent
–
QObject
Creates and returns a source with the specified
parent
that reads from the system’s default source of satellite update information, or the highest priority available plugin.
Returns 0 if the system has no default satellite source, no valid plugins could be found or the user does not have the permission to access the satellite data.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
createDefaultSource
(
参数
,
parent
)
¶
参数 –
parent
–
QObject
Creates and returns a satellite source with the given
parent
that reads from the system’s default sources of satellite data, or the plugin with the highest available priority.
Returns nullptr if the system has no default satellite source, no valid plugins could be found or the user does not have the permission to access the satellite information.
This method passes
参数
to the factory to configure the source.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
createSource
(
sourceName
,
parent
)
¶
sourceName – unicode
parent
–
QObject
Creates and returns a source with the given
parent
, by loading the plugin named
sourceName
.
Returns 0 if the plugin cannot be found.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
createSource
(
sourceName
,
参数
,
parent
)
¶
sourceName – unicode
参数 –
parent
–
QObject
Creates and returns a satellite source with the given
parent
, by loading the plugin named
sourceName
.
Returns nullptr if the plugin cannot be found.
This method passes
参数
to the factory to configure the source.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
error
(
)
¶
返回上次发生的错误。
This signal is not emitted when a
requestTimeout()
has occurred.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
minimumUpdateInterval
(
)
¶
int
PySide2.QtPositioning.QGeoSatelliteInfoSource.
requestTimeout
(
)
¶
PySide2.QtPositioning.QGeoSatelliteInfoSource.
requestUpdate
(
[
timeout=0
]
)
¶
timeout
–
int
Attempts to get the current satellite information and emit
satellitesInViewUpdated()
and
satellitesInUseUpdated()
with this information. If the current satellite information cannot be found within the given
timeout
(in milliseconds) or if
timeout
is less than the value returned by
minimumUpdateInterval()
,
requestTimeout()
is emitted.
If the timeout is zero, the timeout defaults to a reasonable timeout period as appropriate for the source.
This does nothing if another update request is in progress. However it can be called even if
startUpdates()
has already been called and regular updates are in progress.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
satellitesInUseUpdated
(
satellites
)
¶
satellites –
PySide2.QtPositioning.QGeoSatelliteInfoSource.
satellitesInViewUpdated
(
satellites
)
¶
satellites –
PySide2.QtPositioning.QGeoSatelliteInfoSource.
setUpdateInterval
(
msec
)
¶
msec
–
int
另请参阅
PySide2.QtPositioning.QGeoSatelliteInfoSource.
sourceName
(
)
¶
unicode
Returns the unique name of the satellite source implementation in use.
This is the same name that can be passed to
createSource()
in order to create a new instance of a particular satellite source implementation.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
startUpdates
(
)
¶
Starts emitting updates at regular intervals. The updates will be provided whenever new satellite information becomes available.
If satellite information cannot be retrieved or some other form of timeout has occurred the
satellitesInViewUpdated()
and
satellitesInUseUpdated()
signals may be emitted with empty parameter lists.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
stopUpdates
(
)
¶
Stops emitting updates at regular intervals.
PySide2.QtPositioning.QGeoSatelliteInfoSource.
updateInterval
(
)
¶
int
另请参阅