QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
DebugWindow.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Dialogs
4import QtQuick.Layouts
5import QtQuick.Window
6
7import QGroundControl
8import QGroundControl.Controls
9
10Item {
11
12 Text {
13 id: _textMeasure
14 text: "X"
15 color: qgcPal.window
16 font.family: ScreenTools.normalFontFamily
17 }
18
19 GridLayout {
20 anchors.margins: 20
21 anchors.top: parent.top
22 anchors.left: parent.left
23 columns: 3
24 Text {
25 text: qsTr("Qt Platform:")
26 color: qgcPal.text
27 font.family: ScreenTools.normalFontFamily
28 }
29 Text {
30 text: Qt.platform.os
31 color: qgcPal.text
32 font.family: ScreenTools.normalFontFamily
33 }
34 Text {
35 text: qsTr("Font Point Size 10")
36 color: qgcPal.text
37 font.pointSize: 10
38 font.family: ScreenTools.normalFontFamily
39 }
40 Text {
41 text: qsTr("Default font width:")
42 color: qgcPal.text
43 font.family: ScreenTools.normalFontFamily
44 }
45 Text {
46 text: _textMeasure.contentWidth
47 color: qgcPal.text
48 font.family: ScreenTools.normalFontFamily
49 }
50 Text {
51 text: qsTr("Font Point Size 10.5")
52 color: qgcPal.text
53 font.pointSize: 10.5
54 font.family: ScreenTools.normalFontFamily
55 }
56 Text {
57 text: qsTr("Default font height:")
58 color: qgcPal.text
59 font.family: ScreenTools.normalFontFamily
60 }
61 Text {
62 text: _textMeasure.contentHeight
63 color: qgcPal.text
64 font.family: ScreenTools.normalFontFamily
65 }
66 Text {
67 text: qsTr("Font Point Size 11")
68 color: qgcPal.text
69 font.pointSize: 11
70 font.family: ScreenTools.normalFontFamily
71 }
72 Text {
73 text: qsTr("Default font pixel size:")
74 color: qgcPal.text
75 font.family: ScreenTools.normalFontFamily
76 }
77 Text {
78 text: _textMeasure.font.pointSize
79 color: qgcPal.text
80 font.family: ScreenTools.normalFontFamily
81 }
82 Text {
83 text: qsTr("Font Point Size 11.5")
84 color: qgcPal.text
85 font.pointSize: 11.5
86 font.family: ScreenTools.normalFontFamily
87 }
88 Text {
89 text: qsTr("Default font point size:")
90 color: qgcPal.text
91 font.family: ScreenTools.normalFontFamily
92 }
93 Text {
94 text: _textMeasure.font.pointSize
95 color: qgcPal.text
96 font.family: ScreenTools.normalFontFamily
97 }
98 Text {
99 text: qsTr("Font Point Size 12")
100 color: qgcPal.text
101 font.pointSize: 12
102 font.family: ScreenTools.normalFontFamily
103 }
104 Text {
105 text: qsTr("QML Screen Desktop:")
106 color: qgcPal.text
107 font.family: ScreenTools.normalFontFamily
108 }
109 Text {
110 text: Screen.desktopAvailableWidth + " x " + Screen.desktopAvailableHeight
111 color: qgcPal.text
112 font.family: ScreenTools.normalFontFamily
113 }
114 Text {
115 text: qsTr("Font Point Size 12.5")
116 color: qgcPal.text
117 font.pointSize: 12.5
118 font.family: ScreenTools.normalFontFamily
119 }
120 Text {
121 text: qsTr("QML Screen Size:")
122 color: qgcPal.text
123 font.family: ScreenTools.normalFontFamily
124 }
125 Text {
126 text: Screen.width + " x " + Screen.height
127 color: qgcPal.text
128 font.family: ScreenTools.normalFontFamily
129 }
130 Text {
131 text: qsTr("Font Point Size 13")
132 color: qgcPal.text
133 font.pointSize: 13
134 font.family: ScreenTools.normalFontFamily
135 }
136 Text {
137 text: qsTr("QML Pixel Density:")
138 color: qgcPal.text
139 font.family: ScreenTools.normalFontFamily
140 }
141 Text {
142 text: Screen.pixelDensity.toFixed(4)
143 color: qgcPal.text
144 font.family: ScreenTools.normalFontFamily
145 }
146 Text {
147 text: qsTr("Font Point Size 13.5")
148 color: qgcPal.text
149 font.pointSize: 13.5
150 font.family: ScreenTools.normalFontFamily
151 }
152 Text {
153 text: qsTr("QML Pixel Ratio:")
154 color: qgcPal.text
155 font.family: ScreenTools.normalFontFamily
156 }
157 Text {
158 text: Screen.devicePixelRatio
159 color: qgcPal.text
160 font.family: ScreenTools.normalFontFamily
161 }
162 Text {
163 text: qsTr("Font Point Size 14")
164 color: qgcPal.text
165 font.pointSize: 14
166 font.family: ScreenTools.normalFontFamily
167 }
168 Text {
169 text: qsTr("Default Point:")
170 color: qgcPal.text
171 font.family: ScreenTools.normalFontFamily
172 }
173 Text {
174 text: ScreenTools.defaultFontPointSize
175 color: qgcPal.text
176 font.family: ScreenTools.normalFontFamily
177 }
178 Text {
179 text: qsTr("Font Point Size 14.5")
180 color: qgcPal.text
181 font.pointSize: 14.5
182 font.family: ScreenTools.normalFontFamily
183 }
184 Text {
185 text: qsTr("Computed Font Height:")
186 color: qgcPal.text
187 font.family: ScreenTools.normalFontFamily
188 }
189 Text {
190 text: ScreenTools.defaultFontPixelHeight
191 color: qgcPal.text
192 font.family: ScreenTools.normalFontFamily
193 }
194 Text {
195 text: qsTr("Font Point Size 15")
196 color: qgcPal.text
197 font.pointSize: 15
198 font.family: ScreenTools.normalFontFamily
199 }
200 Text {
201 text: qsTr("Computed Screen Height:")
202 color: qgcPal.text
203 font.family: ScreenTools.normalFontFamily
204 }
205 Text {
206 text: (Screen.height / Screen.pixelDensity * Screen.devicePixelRatio).toFixed(0)
207 color: qgcPal.text
208 font.family: ScreenTools.normalFontFamily
209 }
210 Text {
211 text: qsTr("Font Point Size 15.5")
212 color: qgcPal.text
213 font.pointSize: 15.5
214 font.family: ScreenTools.normalFontFamily
215 }
216 Text {
217 text: qsTr("Computed Screen Width:")
218 color: qgcPal.text
219 font.family: ScreenTools.normalFontFamily
220 }
221 Text {
222 text: (Screen.width / Screen.pixelDensity * Screen.devicePixelRatio).toFixed(0)
223 color: qgcPal.text
224 font.family: ScreenTools.normalFontFamily
225 }
226 Text {
227 text: qsTr("Font Point Size 16")
228 color: qgcPal.text
229 font.pointSize: 16
230 font.family: ScreenTools.normalFontFamily
231 }
232 Text {
233 text: qsTr("Desktop Available Width:")
234 color: qgcPal.text
235 font.family: ScreenTools.normalFontFamily
236 }
237 Text {
238 text: Screen.desktopAvailableWidth
239 color: qgcPal.text
240 font.family: ScreenTools.normalFontFamily
241 }
242 Text {
243 text: qsTr("Font Point Size 16.5")
244 color: qgcPal.text
245 font.pointSize: 16.5
246 font.family: ScreenTools.normalFontFamily
247 }
248 Text {
249 text: qsTr("Desktop Available Height:")
250 color: qgcPal.text
251 font.family: ScreenTools.normalFontFamily
252 }
253 Text {
254 text: Screen.desktopAvailableHeight
255 color: qgcPal.text
256 font.family: ScreenTools.normalFontFamily
257 }
258 Text {
259 text: qsTr("Font Point Size 17")
260 color: qgcPal.text
261 font.pointSize: 17
262 font.family: ScreenTools.normalFontFamily
263 }
264 }
265
266 Rectangle {
267 id: square
268 width: 100
269 height: 100
270 color: qgcPal.text
271 anchors.right: parent.right
272 anchors.bottom: parent.bottom
273 anchors.margins: 10
274 Text {
275 text: "100x100"
276 anchors.centerIn: parent
277 color: qgcPal.window
278 }
279 }
280
281 Component.onCompleted: {
282 for (var i = 10; i < 360; i = i + 60) {
283 var colorValue = Qt.hsla(i/360, 0.85, 0.5, 1);
284 seriesColors.push(colorValue)
285 colorListModel.append({"colorValue": colorValue.toString()})
286 }
287 }
288
289 property var seriesColors: []
290
291 ListModel {
292 id: colorListModel
293 }
294
295 Column {
296 width: 100
297 spacing: 0
298 anchors.right: square.left
299 anchors.bottom: parent.bottom
300 anchors.margins: 10
301 Repeater {
302 model: colorListModel
303 delegate: Rectangle {
304 width: 100
305 height: 100 / 6
306 color: colorValue
307 Text {
308 text: colorValue
309 color: "#202020"
310 font.pointSize: _textMeasure.font.pointSize * 0.75
311 anchors.centerIn: parent
312 }
313 }
314 }
315 }
316
317}