Qt Positioning GeoClue v2プラグイン

概要

このプラグインはGeoClue v2ライブラリへのインターフェースです。機能するには、このライブラリがシステムにインストールされている必要があります。

このプラグインは、D-Bus を使用して GeoClue v2 D-Bus サービスとの通信を確立し、測位情報を提供します。

このプラグインは、測位情報の受信のみに使用できます。衛星情報は提供しません

プラグインは、プロバイダ名geoclue2 でロードできます。

パラメータ

以下の表は、geoclue2プラグインに渡すことができるパラメータの一覧です。

パラメータ説明
desktopIdD-Bus サービスが使用するDesktop Idプロパティ。このパラメータが指定されていない場合は、QCoreApplication::applicationName() で指定されたアプリケーション名が使用されます。

以下の例では、C++ および QML からgeoclue2 PositionSource を作成する方法を示します。

QML

PositionSource {
    name: "geoclue2"
    PluginParameter { name: "desktopId"; value: "SomeIdentifierString" }
}

C++

QVariantMap params;
params["desktopId"] = "SomeIdentifierString";
QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createSource("geoclue2", params, this);

© 2025 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.