本页内容

QGeoPositionInfoSourceFactory Class

QGeoPositionInfoSourceFactory 类是一个工厂类,用作外部定位数据提供商的插件接口。更多内容...

头文件: #include <QGeoPositionInfoSourceFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS Positioning)
target_link_libraries(mytarget PRIVATE Qt6::Positioning)
qmake: QT += positioning

公共函数

virtual ~QGeoPositionInfoSourceFactory()
virtual QGeoAreaMonitorSource *areaMonitor(QObject *parent, const QVariantMap &parameters) = 0
virtual QGeoPositionInfoSource *positionInfoSource(QObject *parent, const QVariantMap &parameters) = 0
virtual QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent, const QVariantMap &parameters) = 0

详细说明

每个工厂方法都接受一个参数,用于配置要创建的源文件。

成员函数文档

[virtual noexcept] QGeoPositionInfoSourceFactory::~QGeoPositionInfoSourceFactory()

销毁位置信息源工厂。

[pure virtual] QGeoAreaMonitorSource *QGeoPositionInfoSourceFactory::areaMonitor(QObject *parent, const QVariantMap &parameters)

返回一个与该插件关联的新QGeoAreaMonitorSource 对象,其父对象为parent ,并使用parameters 作为配置参数。也可返回0,此时插件加载器将使用优先级次高的工厂。

[pure virtual] QGeoPositionInfoSource *QGeoPositionInfoSourceFactory::positionInfoSource(QObject *parent, const QVariantMap &parameters)

返回一个与该插件关联的新QGeoPositionInfoSource 对象,其父对象为parent ,并使用parameters 作为配置参数。该方法也可返回0,此时插件加载器将使用优先级次高的工厂。

[pure virtual] QGeoSatelliteInfoSource *QGeoPositionInfoSourceFactory::satelliteInfoSource(QObject *parent, const QVariantMap &parameters)

返回一个与该插件相关联的新QGeoSatelliteInfoSource 对象,其父类为parent ,并使用parameters 作为配置参数。该方法也可返回0,此时插件加载器将使用优先级次高的工厂。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.