2 * Copyright (C) 2015-2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 // This allows to override device name, used for convergence
25 // to set screens to desktop "mode"
26 property var overrideName: false
28 readonly property int useNativeOrientation: -1
30 readonly property alias name: priv.name;
32 readonly property alias primaryOrientation: priv.primaryOrientation
33 readonly property alias supportedOrientations: priv.supportedOrientations
34 readonly property alias landscapeOrientation: priv.landscapeOrientation
35 readonly property alias invertedLandscapeOrientation: priv.invertedLandscapeOrientation
36 readonly property alias portraitOrientation: priv.portraitOrientation
37 readonly property alias invertedPortraitOrientation: priv.invertedPortraitOrientation
39 readonly property alias category: priv.category
41 readonly property alias collapsedPanelHeight: priv.collapsedPanelHeight
43 readonly property var deviceConfig: DeviceConfig {}
45 readonly property var binding: Binding {
48 value: root.overrideName ? overrideName : deviceConfig.name
49 restoreMode: Binding.RestoreBinding
52 readonly property var priv: StateGroup {
55 property int primaryOrientation: deviceConfig.primaryOrientation == Qt.PrimaryOrientation ?
56 root.useNativeOrientation : deviceConfig.primaryOrientation
58 property int supportedOrientations: deviceConfig.supportedOrientations
60 property int landscapeOrientation: deviceConfig.landscapeOrientation
61 property int invertedLandscapeOrientation: deviceConfig.invertedLandscapeOrientation
62 property int portraitOrientation: deviceConfig.portraitOrientation
63 property int invertedPortraitOrientation: deviceConfig.invertedPortraitOrientation
64 property string category: deviceConfig.category
65 property string name: deviceConfig.name
66 property bool supportsMultiColorLed: deviceConfig.supportsMultiColorLed
68 property int collapsedPanelHeight: deviceConfig.collapsedPanelHeight
75 primaryOrientation: root.useNativeOrientation
76 supportedOrientations: Qt.PortraitOrientation
77 | Qt.LandscapeOrientation
78 | Qt.InvertedLandscapeOrientation
79 landscapeOrientation: Qt.LandscapeOrientation
80 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
81 portraitOrientation: Qt.PortraitOrientation
82 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
91 primaryOrientation: root.useNativeOrientation
92 supportedOrientations: Qt.PortraitOrientation
93 | Qt.LandscapeOrientation
94 | Qt.InvertedLandscapeOrientation
95 landscapeOrientation: Qt.LandscapeOrientation
96 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
97 portraitOrientation: Qt.PortraitOrientation
98 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
107 primaryOrientation: root.useNativeOrientation
108 supportedOrientations: Qt.PortraitOrientation
109 | Qt.InvertedPortraitOrientation
110 | Qt.LandscapeOrientation
111 | Qt.InvertedLandscapeOrientation
112 landscapeOrientation: Qt.LandscapeOrientation
113 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
114 portraitOrientation: Qt.PortraitOrientation
115 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
116 supportsMultiColorLed: false
125 primaryOrientation: root.useNativeOrientation
126 supportedOrientations: Qt.PortraitOrientation
127 | Qt.InvertedPortraitOrientation
128 | Qt.LandscapeOrientation
129 | Qt.InvertedLandscapeOrientation
130 landscapeOrientation: Qt.LandscapeOrientation
131 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
132 portraitOrientation: Qt.PortraitOrientation
133 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
142 primaryOrientation: Qt.InvertedLandscapeOrientation
143 supportedOrientations: Qt.PortraitOrientation
144 | Qt.InvertedPortraitOrientation
145 | Qt.LandscapeOrientation
146 | Qt.InvertedLandscapeOrientation
147 landscapeOrientation: Qt.InvertedLandscapeOrientation
148 invertedLandscapeOrientation: Qt.LandscapeOrientation
149 portraitOrientation: Qt.PortraitOrientation
150 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
159 primaryOrientation: root.useNativeOrientation
160 supportedOrientations: root.useNativeOrientation
161 landscapeOrientation: Qt.LandscapeOrientation
162 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
163 portraitOrientation: Qt.PortraitOrientation
164 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
173 supportsMultiColorLed: false
179 readonly property var debugConnections: Connections {
180 target: DebuggingController
182 function onDeviceInfoReloadRequested() {
183 deviceConfig.reload();