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 bool foldable: deviceConfig.foldable
42 readonly property string foldableSysfsPath: deviceConfig.foldableSysfsPath
43 readonly property int innerGridUnit: deviceConfig.innerGridUnit
44 readonly property int coverGridUnit: deviceConfig.coverGridUnit
45 readonly property int coverOrientationAngle: deviceConfig.coverOrientationAngle
47 readonly property var deviceConfig: DeviceConfig {}
49 readonly property var binding: Binding {
52 value: root.overrideName ? overrideName : deviceConfig.name
53 restoreMode: Binding.RestoreBinding
56 readonly property var priv: StateGroup {
59 property int primaryOrientation: deviceConfig.primaryOrientation == Qt.PrimaryOrientation ?
60 root.useNativeOrientation : deviceConfig.primaryOrientation
62 property int supportedOrientations: deviceConfig.supportedOrientations
64 property int landscapeOrientation: deviceConfig.landscapeOrientation
65 property int invertedLandscapeOrientation: deviceConfig.invertedLandscapeOrientation
66 property int portraitOrientation: deviceConfig.portraitOrientation
67 property int invertedPortraitOrientation: deviceConfig.invertedPortraitOrientation
68 property string category: deviceConfig.category
69 property string name: deviceConfig.name
70 property bool supportsMultiColorLed: deviceConfig.supportsMultiColorLed
77 primaryOrientation: root.useNativeOrientation
78 supportedOrientations: Qt.PortraitOrientation
79 | Qt.LandscapeOrientation
80 | Qt.InvertedLandscapeOrientation
81 landscapeOrientation: Qt.LandscapeOrientation
82 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
83 portraitOrientation: Qt.PortraitOrientation
84 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
93 primaryOrientation: root.useNativeOrientation
94 supportedOrientations: Qt.PortraitOrientation
95 | Qt.LandscapeOrientation
96 | Qt.InvertedLandscapeOrientation
97 landscapeOrientation: Qt.LandscapeOrientation
98 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
99 portraitOrientation: Qt.PortraitOrientation
100 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
109 primaryOrientation: root.useNativeOrientation
110 supportedOrientations: Qt.PortraitOrientation
111 | Qt.InvertedPortraitOrientation
112 | Qt.LandscapeOrientation
113 | Qt.InvertedLandscapeOrientation
114 landscapeOrientation: Qt.LandscapeOrientation
115 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
116 portraitOrientation: Qt.PortraitOrientation
117 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
118 supportsMultiColorLed: false
127 primaryOrientation: root.useNativeOrientation
128 supportedOrientations: Qt.PortraitOrientation
129 | Qt.InvertedPortraitOrientation
130 | Qt.LandscapeOrientation
131 | Qt.InvertedLandscapeOrientation
132 landscapeOrientation: Qt.LandscapeOrientation
133 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
134 portraitOrientation: Qt.PortraitOrientation
135 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
144 primaryOrientation: Qt.InvertedLandscapeOrientation
145 supportedOrientations: Qt.PortraitOrientation
146 | Qt.InvertedPortraitOrientation
147 | Qt.LandscapeOrientation
148 | Qt.InvertedLandscapeOrientation
149 landscapeOrientation: Qt.InvertedLandscapeOrientation
150 invertedLandscapeOrientation: Qt.LandscapeOrientation
151 portraitOrientation: Qt.PortraitOrientation
152 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
161 primaryOrientation: root.useNativeOrientation
162 supportedOrientations: root.useNativeOrientation
163 landscapeOrientation: Qt.LandscapeOrientation
164 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
165 portraitOrientation: Qt.PortraitOrientation
166 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
175 supportsMultiColorLed: false