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 var deviceConfigParser: DeviceConfigParser {
42 readonly property var priv: StateGroup {
45 property int primaryOrientation: deviceConfigParser.primaryOrientation == Qt.PrimaryOrientation ?
46 root.useNativeOrientation : deviceConfigParser.primaryOrientation
48 property int supportedOrientations: deviceConfigParser.supportedOrientations
50 property int landscapeOrientation: deviceConfigParser.landscapeOrientation
51 property int invertedLandscapeOrientation: deviceConfigParser.invertedLandscapeOrientation
52 property int portraitOrientation: deviceConfigParser.portraitOrientation
53 property int invertedPortraitOrientation: deviceConfigParser.invertedPortraitOrientation
54 property string category: deviceConfigParser.category
61 primaryOrientation: root.useNativeOrientation
62 supportedOrientations: Qt.PortraitOrientation
63 | Qt.LandscapeOrientation
64 | Qt.InvertedLandscapeOrientation
65 landscapeOrientation: Qt.LandscapeOrientation
66 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
67 portraitOrientation: Qt.PortraitOrientation
68 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
76 primaryOrientation: root.useNativeOrientation
77 supportedOrientations: Qt.PortraitOrientation
78 | Qt.LandscapeOrientation
79 | Qt.InvertedLandscapeOrientation
80 landscapeOrientation: Qt.LandscapeOrientation
81 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
82 portraitOrientation: Qt.PortraitOrientation
83 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
106 primaryOrientation: root.useNativeOrientation
107 supportedOrientations: Qt.PortraitOrientation
108 | Qt.InvertedPortraitOrientation
109 | Qt.LandscapeOrientation
110 | Qt.InvertedLandscapeOrientation
111 landscapeOrientation: Qt.LandscapeOrientation
112 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
113 portraitOrientation: Qt.PortraitOrientation
114 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
122 primaryOrientation: Qt.InvertedLandscapeOrientation
123 supportedOrientations: Qt.PortraitOrientation
124 | Qt.InvertedPortraitOrientation
125 | Qt.LandscapeOrientation
126 | Qt.InvertedLandscapeOrientation
127 landscapeOrientation: Qt.InvertedLandscapeOrientation
128 invertedLandscapeOrientation: Qt.LandscapeOrientation
129 portraitOrientation: Qt.PortraitOrientation
130 invertedPortraitOrientation: Qt.InvertedPortraitOrientation
138 primaryOrientation: root.useNativeOrientation
139 supportedOrientations: root.useNativeOrientation
140 landscapeOrientation: Qt.LandscapeOrientation
141 invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
142 portraitOrientation: Qt.PortraitOrientation
143 invertedPortraitOrientation: Qt.InvertedPortraitOrientation