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/>.
23 // This allows to override device name, used for convergence
24 // to set screens to desktop "mode"
25 property var overrideName: false
27 readonly property int useNativeOrientation: -1
29 readonly property alias name: priv.name;
31 readonly property alias primaryOrientation: priv.primaryOrientation
32 readonly property alias supportedOrientations: priv.supportedOrientations
33 readonly property alias landscapeOrientation: priv.landscapeOrientation
34 readonly property alias invertedLandscapeOrientation: priv.invertedLandscapeOrientation
35 readonly property alias portraitOrientation: priv.portraitOrientation
36 readonly property alias invertedPortraitOrientation: priv.invertedPortraitOrientation
38 readonly property alias category: priv.category
40 readonly property var deviceConfig: DeviceConfig {}
42 readonly property var binding: Binding {
45 value: root.overrideName ? overrideName : deviceConfig.name
48 readonly property var priv: StateGroup {
51 property int primaryOrientation: deviceConfig.primaryOrientation == Qt.PrimaryOrientation ?
52 root.useNativeOrientation : deviceConfig.primaryOrientation
54 property int supportedOrientations: deviceConfig.supportedOrientations
56 property int landscapeOrientation: deviceConfig.landscapeOrientation
57 property int invertedLandscapeOrientation: deviceConfig.invertedLandscapeOrientation
58 property int portraitOrientation: deviceConfig.portraitOrientation
59 property int invertedPortraitOrientation: deviceConfig.invertedPortraitOrientation
60 property string category: deviceConfig.category
61 property string name: deviceConfig.name
62 property bool supportsMultiColorLed: deviceConfig.supportsMultiColorLed
69 primaryOrientation: root.useNativeOrientation
70 supportedOrientations: Qt.PortraitOrientation
71 | Qt.LandscapeOrientation
72 | Qt.InvertedLandscapeOrientation
73 landscapeOrientation: Qt.LandscapeOrientation
74 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
75 portraitOrientation: Qt.PortraitOrientation
76 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
85 primaryOrientation: root.useNativeOrientation
86 supportedOrientations: Qt.PortraitOrientation
87 | Qt.LandscapeOrientation
88 | Qt.InvertedLandscapeOrientation
89 landscapeOrientation: Qt.LandscapeOrientation
90 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
91 portraitOrientation: Qt.PortraitOrientation
92 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
101 primaryOrientation: root.useNativeOrientation
102 supportedOrientations: Qt.PortraitOrientation
103 | Qt.InvertedPortraitOrientation
104 | Qt.LandscapeOrientation
105 | Qt.InvertedLandscapeOrientation
106 landscapeOrientation: Qt.LandscapeOrientation
107 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
108 portraitOrientation: Qt.PortraitOrientation
109 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
110 supportsMultiColorLed: false
119 primaryOrientation: root.useNativeOrientation
120 supportedOrientations: Qt.PortraitOrientation
121 | Qt.InvertedPortraitOrientation
122 | Qt.LandscapeOrientation
123 | Qt.InvertedLandscapeOrientation
124 landscapeOrientation: Qt.LandscapeOrientation
125 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
126 portraitOrientation: Qt.PortraitOrientation
127 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
136 primaryOrientation: Qt.InvertedLandscapeOrientation
137 supportedOrientations: Qt.PortraitOrientation
138 | Qt.InvertedPortraitOrientation
139 | Qt.LandscapeOrientation
140 | Qt.InvertedLandscapeOrientation
141 landscapeOrientation: Qt.InvertedLandscapeOrientation
142 invertedLandscapeOrientation: Qt.LandscapeOrientation
143 portraitOrientation: Qt.PortraitOrientation
144 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
153 primaryOrientation: root.useNativeOrientation
154 supportedOrientations: root.useNativeOrientation
155 landscapeOrientation: Qt.LandscapeOrientation
156 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
157 portraitOrientation: Qt.PortraitOrientation
158 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
167 supportsMultiColorLed: false