DebugWindow.qml 5.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*=====================================================================

 QGroundControl Open Source Ground Control Station

 (c) 2009 - 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>

 This file is part of the QGROUNDCONTROL project

 QGROUNDCONTROL is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 QGROUNDCONTROL is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.

 ======================================================================*/

import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
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 {
47 48 49 50
            id:             _textMeasure
            text:           "X"
            color:          qgcPal.window
            font.family:    ScreenTools.normalFontFamily
51 52 53 54 55 56 57 58
        }

        GridLayout {
            anchors.margins: 20
            anchors.top:     parent.top
            anchors.left:    parent.left
            columns: 2
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
59
                text:   qsTr("Qt Platform:")
60
                color:  qgcPal.text
61
                font.family:    ScreenTools.normalFontFamily
62 63 64 65
            }
            Text {
                text:   Qt.platform.os
                color:  qgcPal.text
66
                font.family:    ScreenTools.normalFontFamily
67 68
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
69
                text:   qsTr("Default font width:")
70
                color:  qgcPal.text
71
                font.family:    ScreenTools.normalFontFamily
72 73 74 75
            }
            Text {
                text:   _textMeasure.contentWidth
                color:  qgcPal.text
76
                font.family:    ScreenTools.normalFontFamily
77 78
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
79
                text:   qsTr("Default font height:")
80
                color:  qgcPal.text
81
                font.family:    ScreenTools.normalFontFamily
82 83 84 85
            }
            Text {
                text:   _textMeasure.contentHeight
                color:  qgcPal.text
86
                font.family:    ScreenTools.normalFontFamily
87 88
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
89
                text:   qsTr("Default font pixel 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 {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
99
                text:   qsTr("Default font point size:")
100
                color:  qgcPal.text
101
                font.family:    ScreenTools.normalFontFamily
102 103 104 105
            }
            Text {
                text:   _textMeasure.font.pointSize
                color:  qgcPal.text
106
                font.family:    ScreenTools.normalFontFamily
107 108
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
109
                text:   qsTr("QML Screen Desktop:")
110
                color:  qgcPal.text
111
                font.family:    ScreenTools.normalFontFamily
112 113 114 115
            }
            Text {
                text:   Screen.desktopAvailableWidth + " x " + Screen.desktopAvailableHeight
                color:  qgcPal.text
116
                font.family:    ScreenTools.normalFontFamily
117 118
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
119
                text:   qsTr("QML Screen Size:")
120
                color:  qgcPal.text
121
                font.family:    ScreenTools.normalFontFamily
122 123 124 125
            }
            Text {
                text:   Screen.width + " x " + Screen.height
                color:  qgcPal.text
126
                font.family:    ScreenTools.normalFontFamily
127 128
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
129
                text:   qsTr("QML Pixel Density:")
130
                color:  qgcPal.text
131
                font.family:    ScreenTools.normalFontFamily
132 133 134 135
            }
            Text {
                text:   Screen.pixelDensity
                color:  qgcPal.text
136
                font.family:    ScreenTools.normalFontFamily
137 138
            }
            Text {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
139
                text:   qsTr("QML Pixel Ratio:")
140
                color:  qgcPal.text
141
                font.family:    ScreenTools.normalFontFamily
142 143 144 145
            }
            Text {
                text:   Screen.devicePixelRatio
                color:  qgcPal.text
146
                font.family:    ScreenTools.normalFontFamily
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
            }
        }

        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
            }
        }
    }
}