Qt Positioning C++ Classes

Positioningモジュールは、QMLとC++インターフェースを介して位置情報を提供します。詳細...

クラス

QGeoAddress

QGeoLocation のアドレスを表します。

QGeoAreaMonitorInfo

近接を監視するエリアまたは領域のパラメータを記述する

QGeoAreaMonitorSource

指定された座標セットに対する近接変化の検出を可能にする

QGeoCircle

円形の地理領域を定義します

QGeoCoordinate

地球の表面上の地理的位置を定義する

QGeoLocation

位置に関する基本情報を表す

QGeoPath

地理パスを定義

QGeoPolygon

地理的な多角形を定義する

QGeoPositionInfo

特定の時点における全地球的な位置、方向、速度に関する情報が含まれています。

QGeoPositionInfoSource

位置の更新を配信するための抽象ベースクラス

QGeoPositionInfoSourceFactory

測位データの外部プロバイダーのプラグイン・インターフェイスとして使用されるファクトリー・クラス

QGeoRectangle

矩形の地理エリアを定義する

QGeoSatelliteInfo

衛星の基本情報を含む

QGeoSatelliteInfoSource

衛星情報の更新を配信するための抽象ベースクラス

QGeoShape

地理エリアを定義

QNmeaPositionInfoSource

NMEAデータソースを使用した位置情報

QNmeaSatelliteInfoSource

NMEA データソースを使用した衛星情報

詳細説明

Qt Positioning モジュールをロードするには、.qml ファイルに以下の記述を追加します。

import QtPositioning

C++ プロジェクトの場合は、現在のユースケースに適したヘッダーを含めます。

#include <QGeoCoordinate>

モジュールの使用

Qt モジュールを使用するには、モジュールライブラリを直接、または他の依存関係を通してリンクする必要があります。CMakeや qmakeなど、いくつかのビルドツールはこのための専用サポートを持っています。

CMake でのビルド

find_package() コマンドを使って、Qt6 パッケージの中から必要なモジュールコンポーネントを探します:

find_package(Qt6 REQUIRED COMPONENTS Positioning)
target_link_libraries(mytarget PRIVATE Qt6::Positioning)

qmakeでビルドする

qmakeでビルドするようにモジュールを設定するには、プロジェクトの.proファイルにQT 変数の値としてモジュールを追加します:

QT += positioning

詳しくは、Qt Positioning Overviewを参照してください。

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