QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FlyViewInsetViewer.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Dialogs
4import QtQuick.Layouts
5
6import QtLocation
7import QtPositioning
8import QtQuick.Window
9import QtQml.Models
10
11import QGroundControl
12import QGroundControl.Controls
13import QGroundControl.FlyView
14import QGroundControl.FlightMap
15
16// This is the ui overlay layer for the widgets/tools for Fly View
17Item {
18 id: _root
19 property var insetsToView: QGCToolInsets {}
20 property int _linethickness: 3
21
22 Rectangle {
23 anchors.left: parent.left
24 anchors.verticalCenter: parent.verticalCenter
25 anchors.leftMargin: parent.width/8
26 height: checkboxcolumn.height
27 width: checkboxcolumn.width
28 color: "dimgray"
29
30 ColumnLayout {
31 id: checkboxcolumn
32 QGCCheckBox{
33 checked: true
34 text: "leftEdgeTopInset"
35 onClicked: leftEdgeTopInset.visible = checked
36 textColor: leftEdgeTopInset.color
37 textBold: true
38 }
39 QGCCheckBox{
40 checked: true
41 text: "leftEdgeBottomInset"
42 onClicked: leftEdgeBottomInset.visible = checked
43 textColor: leftEdgeBottomInset.color
44 textBold: true
45 }
46 QGCCheckBox{
47 checked: true
48 text: "rightEdgeTopInset"
49 onClicked: rightEdgeTopInset.visible = checked
50 textColor: rightEdgeTopInset.color
51 textBold: true
52 }
53 QGCCheckBox{
54 checked: true
55 text: "rightEdgeBottomInset"
56 onClicked: rightEdgeBottomInset.visible = checked
57 textColor: rightEdgeBottomInset.color
58 textBold: true
59 }
60 QGCCheckBox{
61 checked: true
62 text: "topEdgeLeftInset"
63 onClicked: topEdgeLeftInset.visible = checked
64 textColor: topEdgeLeftInset.color
65 textBold: true
66 }
67 QGCCheckBox{
68 checked: true
69 text: "topEdgeRightInset"
70 onClicked: topEdgeRightInset.visible = checked
71 textColor: topEdgeRightInset.color
72 textBold: true
73 }
74 QGCCheckBox{
75 checked: true
76 text: "bottomEdgeLeftInset"
77 onClicked: bottomEdgeLeftInset.visible = checked
78 textColor: bottomEdgeLeftInset.color
79 textBold: true
80 }
81 QGCCheckBox{
82 checked: true
83 text: "bottomEdgeRightInset"
84 onClicked: bottomEdgeRightInset.visible = checked
85 textColor: bottomEdgeRightInset.color
86 textBold: true
87 }
88 QGCCheckBox{
89 checked: true
90 text: "centerInsetRect"
91 onClicked: centerInsetRect.visible = checked
92 textColor: centerInsetRect.border.color
93 textBold: true
94 }
95 }
96
97 }
98
99 Rectangle { // leftEdgeTopInset
100 id: leftEdgeTopInset
101 anchors.top: parent.top
102 anchors.left: parent.left
103 anchors.leftMargin: insetsToView.leftEdgeTopInset
104 height: parent.height
105 width: _linethickness
106 color: "coral"
107 }
108 Rectangle { // leftEdgeBottomInset
109 id: leftEdgeBottomInset
110 anchors.top: parent.top
111 anchors.left: parent.left
112 anchors.leftMargin: insetsToView.leftEdgeBottomInset
113 height: parent.height
114 width: _linethickness
115 color: "cornflowerblue"
116 }
117 Rectangle { // rightEdgeTopInset
118 id: rightEdgeTopInset
119 anchors.top: parent.top
120 anchors.right: parent.right
121 anchors.rightMargin: insetsToView.rightEdgeTopInset
122 height: parent.height
123 width: _linethickness
124 color: "darkslateblue"
125 }
126 Rectangle { // rightEdgeBottomInset
127 id: rightEdgeBottomInset
128 anchors.top: parent.top
129 anchors.right: parent.right
130 anchors.rightMargin: insetsToView.rightEdgeBottomInset
131 height: parent.height
132 width: _linethickness
133 color: "firebrick"
134 }
135 Rectangle { // topEdgeLeftInset
136 id: topEdgeLeftInset
137 anchors.top: parent.top
138 anchors.left: parent.left
139 anchors.topMargin: insetsToView.topEdgeLeftInset
140 height: _linethickness
141 width: parent.width
142 color: "mediumseagreen"
143 }
144 Rectangle { // topEdgeRightInset
145 id: topEdgeRightInset
146 anchors.top: parent.top
147 anchors.left: parent.left
148 anchors.topMargin: insetsToView.topEdgeRightInset
149 height: _linethickness
150 width: parent.width
151 color: "moccasin"
152 }
153 Rectangle { // bottomEdgeLeftInset
154 id: bottomEdgeLeftInset
155 anchors.bottom: parent.bottom
156 anchors.left: parent.left
157 anchors.bottomMargin: insetsToView.bottomEdgeLeftInset
158 height: _linethickness
159 width: parent.width
160 color: "salmon"
161 }
162 Rectangle { // bottomEdgeRightInset
163 id: bottomEdgeRightInset
164 anchors.bottom: parent.bottom
165 anchors.left: parent.left
166 anchors.bottomMargin: insetsToView.bottomEdgeRightInset
167 height: _linethickness
168 width: parent.width
169 color: "slategrey"
170 }
171 Rectangle {
172 id: centerInsetRect
173 x: insetsToView.leftEdgeCenterInset
174 y: insetsToView.topEdgeCenterInset
175 width: _root.width - insetsToView.leftEdgeCenterInset - insetsToView.rightEdgeCenterInset
176 height: _root.height - insetsToView.topEdgeCenterInset - insetsToView.bottomEdgeCenterInset
177 color: "transparent"
178 border.color: "yellow"
179 border.width: 1
180 radius: 0
181 }
182}