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 objectName: "flyToolStrip_viewer3DButton"
8
9 property bool _is3DViewOpen: QGCViewer3DManager.displayMode === QGCViewer3DManager.View3D
10 property bool _viewer3DEnabled: QGroundControl.settingsManager.viewer3DSettings.enabled.rawValue
11
12 iconSource: _is3DViewOpen ? "/qmlimages/PaperPlane.svg" : "/qml/QGroundControl/Viewer3D/City3DMapIcon.svg"
13 text: _is3DViewOpen ? qsTr("Fly") : qsTr("3D View")
14 visible: _viewer3DEnabled
15
16 onTriggered: {
17 if (_is3DViewOpen) {
18 QGCViewer3DManager.setDisplayMode(QGCViewer3DManager.Map);
19 } else {
20 QGCViewer3DManager.setDisplayMode(QGCViewer3DManager.View3D);
21 }
22 }
23}