Qt Positioning 지오클루 v2 플러그인

개요

이 플러그인은 GeoClue v2 라이브러리에 대한 인터페이스입니다. 이 라이브러리가 시스템에 설치되어 있어야 작동합니다.

이 플러그인은 D-Bus를 사용하여 GeoClue v2 D-Bus 서비스와의 통신을 설정하고 위치 정보를 제공합니다.

플러그인은 위치 정보만 수신하는 데 사용할 수 있습니다. 위성 정보는 제공하지 않습니다.

플러그인은 공급자 이름 geoclue2를 사용하여 로드할 수 있습니다.

파라미터

다음 표에는 geoclue2 플러그인에 전달할 있는 매개변수가 나열되어 있습니다.

파라미터설명
desktopIdD-Bus 서비스에서 사용하는 데스크톱 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.