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 readonly property int useNativeOrientation: -1
25 // The only writable property in the API
26 // all other properties are set according to the device name
27 property alias name: priv.state
29 readonly property alias primaryOrientation: priv.primaryOrientation
30 readonly property alias supportedOrientations: priv.supportedOrientations
31 readonly property alias landscapeOrientation: priv.landscapeOrientation
32 readonly property alias invertedLandscapeOrientation: priv.invertedLandscapeOrientation
33 readonly property alias portraitOrientation: priv.portraitOrientation
34 readonly property alias invertedPortraitOrientation: priv.invertedPortraitOrientation
36 readonly property alias category: priv.category
38 readonly property alias supportsMultiColorLed: priv.supportsMultiColorLed
40 readonly property var deviceConfigParser: DeviceConfigParser {
44 readonly property var priv: StateGroup {
47 property int primaryOrientation: deviceConfigParser.primaryOrientation == Qt.PrimaryOrientation ?
48 root.useNativeOrientation : deviceConfigParser.primaryOrientation
50 property int supportedOrientations: deviceConfigParser.supportedOrientations
52 property int landscapeOrientation: deviceConfigParser.landscapeOrientation
53 property int invertedLandscapeOrientation: deviceConfigParser.invertedLandscapeOrientation
54 property int portraitOrientation: deviceConfigParser.portraitOrientation
55 property int invertedPortraitOrientation: deviceConfigParser.invertedPortraitOrientation
56 property string category: deviceConfigParser.category
57 property bool supportsMultiColorLed: deviceConfigParser.supportsMultiColorLed
64 primaryOrientation: root.useNativeOrientation
65 supportedOrientations: Qt.PortraitOrientation
66 | Qt.LandscapeOrientation
67 | Qt.InvertedLandscapeOrientation
68 landscapeOrientation: Qt.LandscapeOrientation
69 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
70 portraitOrientation: Qt.PortraitOrientation
71 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
79 primaryOrientation: root.useNativeOrientation
80 supportedOrientations: Qt.PortraitOrientation
81 | Qt.LandscapeOrientation
82 | Qt.InvertedLandscapeOrientation
83 landscapeOrientation: Qt.LandscapeOrientation
84 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
85 portraitOrientation: Qt.PortraitOrientation
86 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
94 primaryOrientation: root.useNativeOrientation
95 supportedOrientations: Qt.PortraitOrientation
96 | Qt.InvertedPortraitOrientation
97 | Qt.LandscapeOrientation
98 | Qt.InvertedLandscapeOrientation
99 landscapeOrientation: Qt.LandscapeOrientation
100 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
101 portraitOrientation: Qt.PortraitOrientation
102 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
103 supportsMultiColorLed: false
111 primaryOrientation: root.useNativeOrientation
112 supportedOrientations: Qt.PortraitOrientation
113 | Qt.InvertedPortraitOrientation
114 | Qt.LandscapeOrientation
115 | Qt.InvertedLandscapeOrientation
116 landscapeOrientation: Qt.LandscapeOrientation
117 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
118 portraitOrientation: Qt.PortraitOrientation
119 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
127 primaryOrientation: Qt.InvertedLandscapeOrientation
128 supportedOrientations: Qt.PortraitOrientation
129 | Qt.InvertedPortraitOrientation
130 | Qt.LandscapeOrientation
131 | Qt.InvertedLandscapeOrientation
132 landscapeOrientation: Qt.InvertedLandscapeOrientation
133 invertedLandscapeOrientation: Qt.LandscapeOrientation
134 portraitOrientation: Qt.PortraitOrientation
135 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
143 primaryOrientation: root.useNativeOrientation
144 supportedOrientations: root.useNativeOrientation
145 landscapeOrientation: Qt.LandscapeOrientation
146 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
147 portraitOrientation: Qt.PortraitOrientation
148 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
156 supportsMultiColorLed: false