DebugWindow.qml 8.05 KB
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
9 10


11 12
import QtQuick 2.3
import QtQuick.Controls 1.2
13
import QtQuick.Controls.Styles 1.4
14
import QtQuick.Dialogs 1.2
15
import QtQuick.Layouts 1.2
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
import QtQuick.Window 2.2

import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0

QGCView {
    id:         qgcView
    viewPanel:  panel

    QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }

    QGCViewPanel {
        id:             panel
        anchors.fill:   parent

        Text {
34 35 36 37
            id:             _textMeasure
            text:           "X"
            color:          qgcPal.window
            font.family:    ScreenTools.normalFontFamily
38 39 40 41 42 43
        }

        GridLayout {
            anchors.margins: 20
            anchors.top:     parent.top
            anchors.left:    parent.left
dogmaphobic's avatar
dogmaphobic committed
44
            columns: 3
45
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
46
                text:   qsTr("Qt Platform:")
47
                color:  qgcPal.text
48
                font.family:    ScreenTools.normalFontFamily
49 50 51 52
            }
            Text {
                text:   Qt.platform.os
                color:  qgcPal.text
53
                font.family:    ScreenTools.normalFontFamily
54
            }
dogmaphobic's avatar
dogmaphobic committed
55 56 57 58 59 60
            Text {
                text:   qsTr("Font Point Size 10")
                color:  qgcPal.text
                font.pointSize: 10
                font.family:    ScreenTools.normalFontFamily
            }
61
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
62
                text:   qsTr("Default font width:")
63
                color:  qgcPal.text
64
                font.family:    ScreenTools.normalFontFamily
65 66 67 68
            }
            Text {
                text:   _textMeasure.contentWidth
                color:  qgcPal.text
69
                font.family:    ScreenTools.normalFontFamily
70
            }
dogmaphobic's avatar
dogmaphobic committed
71 72 73 74 75 76
            Text {
                text:   qsTr("Font Point Size 10.5")
                color:  qgcPal.text
                font.pointSize: 10.5
                font.family:    ScreenTools.normalFontFamily
            }
77
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
78
                text:   qsTr("Default font height:")
79
                color:  qgcPal.text
80
                font.family:    ScreenTools.normalFontFamily
81 82 83 84
            }
            Text {
                text:   _textMeasure.contentHeight
                color:  qgcPal.text
85
                font.family:    ScreenTools.normalFontFamily
86
            }
dogmaphobic's avatar
dogmaphobic committed
87 88 89 90 91 92
            Text {
                text:   qsTr("Font Point Size 11")
                color:  qgcPal.text
                font.pointSize: 11
                font.family:    ScreenTools.normalFontFamily
            }
93
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
94
                text:   qsTr("Default font pixel size:")
95
                color:  qgcPal.text
96
                font.family:    ScreenTools.normalFontFamily
97 98
            }
            Text {
99
                text:   _textMeasure.font.pointSize
100
                color:  qgcPal.text
101
                font.family:    ScreenTools.normalFontFamily
102
            }
dogmaphobic's avatar
dogmaphobic committed
103 104 105 106 107 108
            Text {
                text:   qsTr("Font Point Size 11.5")
                color:  qgcPal.text
                font.pointSize: 11.5
                font.family:    ScreenTools.normalFontFamily
            }
109
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
110
                text:   qsTr("Default font point size:")
111
                color:  qgcPal.text
112
                font.family:    ScreenTools.normalFontFamily
113 114 115 116
            }
            Text {
                text:   _textMeasure.font.pointSize
                color:  qgcPal.text
117
                font.family:    ScreenTools.normalFontFamily
118
            }
dogmaphobic's avatar
dogmaphobic committed
119 120 121 122 123 124
            Text {
                text:   qsTr("Font Point Size 12")
                color:  qgcPal.text
                font.pointSize: 12
                font.family:    ScreenTools.normalFontFamily
            }
125
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
126
                text:   qsTr("QML Screen Desktop:")
127
                color:  qgcPal.text
128
                font.family:    ScreenTools.normalFontFamily
129 130 131 132
            }
            Text {
                text:   Screen.desktopAvailableWidth + " x " + Screen.desktopAvailableHeight
                color:  qgcPal.text
133
                font.family:    ScreenTools.normalFontFamily
134
            }
dogmaphobic's avatar
dogmaphobic committed
135 136 137 138 139 140
            Text {
                text:   qsTr("Font Point Size 12.5")
                color:  qgcPal.text
                font.pointSize: 12.5
                font.family:    ScreenTools.normalFontFamily
            }
141
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
142
                text:   qsTr("QML Screen Size:")
143
                color:  qgcPal.text
144
                font.family:    ScreenTools.normalFontFamily
145 146 147 148
            }
            Text {
                text:   Screen.width + " x " + Screen.height
                color:  qgcPal.text
149
                font.family:    ScreenTools.normalFontFamily
150 151
            }
            Text {
dogmaphobic's avatar
dogmaphobic committed
152
                text:   qsTr("Font Point Size 13")
153
                color:  qgcPal.text
dogmaphobic's avatar
dogmaphobic committed
154
                font.pointSize: 13
155
                font.family:    ScreenTools.normalFontFamily
156 157
            }
            Text {
dogmaphobic's avatar
dogmaphobic committed
158
                text:   qsTr("QML Pixel Density:")
159
                color:  qgcPal.text
160
                font.family:    ScreenTools.normalFontFamily
161 162
            }
            Text {
dogmaphobic's avatar
dogmaphobic committed
163
                text:   Screen.pixelDensity.toFixed(4)
164
                color:  qgcPal.text
165
                font.family:    ScreenTools.normalFontFamily
166 167
            }
            Text {
dogmaphobic's avatar
dogmaphobic committed
168
                text:   qsTr("Font Point Size 13.5")
169
                color:  qgcPal.text
dogmaphobic's avatar
dogmaphobic committed
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
                font.pointSize: 13.5
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("QML Pixel Ratio:")
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           Screen.devicePixelRatio
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("Font Point Size 14")
                color:          qgcPal.text
                font.pointSize: 14
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("Default Point:")
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           ScreenTools.defaultFontPointSize
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("Font Point Size 14.5")
                color:          qgcPal.text
                font.pointSize: 14.5
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("Computed Font Height:")
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           ScreenTools.defaultFontPixelHeight
                color:          qgcPal.text
                font.family:    ScreenTools.normalFontFamily
            }
            Text {
                text:           qsTr("Font Point Size 15")
                color:          qgcPal.text
                font.pointSize: 15
219
                font.family:    ScreenTools.normalFontFamily
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
            }
        }

        Rectangle {
            width:              100
            height:             100
            color:              qgcPal.text
            anchors.right:      parent.right
            anchors.bottom:     parent.bottom
            anchors.margins:    10
            Text {
                text: "100x100"
                anchors.centerIn: parent
                color:  qgcPal.window
            }
        }
    }
}