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 var deviceConfig: DeviceConfig {}
43 readonly property var binding: Binding {
46 value: root.overrideName ? overrideName : deviceConfig.name
47 restoreMode: Binding.RestoreBinding
50 readonly property var priv: StateGroup {
53 property int primaryOrientation: deviceConfig.primaryOrientation == Qt.PrimaryOrientation ?
54 root.useNativeOrientation : deviceConfig.primaryOrientation
56 property int supportedOrientations: deviceConfig.supportedOrientations
58 property int landscapeOrientation: deviceConfig.landscapeOrientation
59 property int invertedLandscapeOrientation: deviceConfig.invertedLandscapeOrientation
60 property int portraitOrientation: deviceConfig.portraitOrientation
61 property int invertedPortraitOrientation: deviceConfig.invertedPortraitOrientation
62 property string category: deviceConfig.category
63 property string name: deviceConfig.name
64 property bool supportsMultiColorLed: deviceConfig.supportsMultiColorLed
71 primaryOrientation: root.useNativeOrientation
72 supportedOrientations: Qt.PortraitOrientation
73 | Qt.LandscapeOrientation
74 | Qt.InvertedLandscapeOrientation
75 landscapeOrientation: Qt.LandscapeOrientation
76 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
77 portraitOrientation: Qt.PortraitOrientation
78 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
87 primaryOrientation: root.useNativeOrientation
88 supportedOrientations: Qt.PortraitOrientation
89 | Qt.LandscapeOrientation
90 | Qt.InvertedLandscapeOrientation
91 landscapeOrientation: Qt.LandscapeOrientation
92 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
93 portraitOrientation: Qt.PortraitOrientation
94 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
103 primaryOrientation: root.useNativeOrientation
104 supportedOrientations: Qt.PortraitOrientation
105 | Qt.InvertedPortraitOrientation
106 | Qt.LandscapeOrientation
107 | Qt.InvertedLandscapeOrientation
108 landscapeOrientation: Qt.LandscapeOrientation
109 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
110 portraitOrientation: Qt.PortraitOrientation
111 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
112 supportsMultiColorLed: false
121 primaryOrientation: root.useNativeOrientation
122 supportedOrientations: Qt.PortraitOrientation
123 | Qt.InvertedPortraitOrientation
124 | Qt.LandscapeOrientation
125 | Qt.InvertedLandscapeOrientation
126 landscapeOrientation: Qt.LandscapeOrientation
127 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
128 portraitOrientation: Qt.PortraitOrientation
129 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
138 primaryOrientation: Qt.InvertedLandscapeOrientation
139 supportedOrientations: Qt.PortraitOrientation
140 | Qt.InvertedPortraitOrientation
141 | Qt.LandscapeOrientation
142 | Qt.InvertedLandscapeOrientation
143 landscapeOrientation: Qt.InvertedLandscapeOrientation
144 invertedLandscapeOrientation: Qt.LandscapeOrientation
145 portraitOrientation: Qt.PortraitOrientation
146 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
155 primaryOrientation: root.useNativeOrientation
156 supportedOrientations: root.useNativeOrientation
157 landscapeOrientation: Qt.LandscapeOrientation
158 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
159 portraitOrientation: Qt.PortraitOrientation
160 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
169 supportsMultiColorLed: false