QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
Viewer3DShowAction.qml
Go to the documentation of this file.
1import QGroundControl
2import QGroundControl.Controls
3
4ToolStripAction {
5 id: root
6
7 property bool _is3DViewOpen: QGCViewer3DManager.displayMode === QGCViewer3DManager.View3D
8 property bool _viewer3DEnabled: QGroundControl.settingsManager.viewer3DSettings.enabled.rawValue
9
10 iconSource: _is3DViewOpen ? "/qmlimages/PaperPlane.svg" : "/qml/QGroundControl/Viewer3D/City3DMapIcon.svg"
11 text: _is3DViewOpen ? qsTr("Fly") : qsTr("3D View")
12 visible: _viewer3DEnabled
13
14 onTriggered: {
15 if (_is3DViewOpen) {
16 QGCViewer3DManager.setDisplayMode(QGCViewer3DManager.Map);
17 } else {
18 QGCViewer3DManager.setDisplayMode(QGCViewer3DManager.View3D);
19 }
20 }
21}