on 3ebd113 help sign in
unity8/qml/DeviceConfiguration.qml
93 lines 2.8 kB history raw
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
17import QtQuick 2.4
19StateGroup {
20 id: root
22 readonly property int useNativeOrientation: -1
24 property int primaryOrientation: useNativeOrientation
26 property int supportedOrientations: Qt.PortraitOrientation
27 | Qt.InvertedPortraitOrientation
28 | Qt.LandscapeOrientation
29 | Qt.InvertedLandscapeOrientation
31 // Supported values so far:
32 // "phone", "tablet" or "desktop"
33 property string category: "phone"
35 property int ignoredMice: 0
38 property alias name: root.state
40 states: [
41 State {
42 name: "mako"
43 PropertyChanges {
44 target: root
45 supportedOrientations: Qt.PortraitOrientation
46 | Qt.LandscapeOrientation
47 | Qt.InvertedLandscapeOrientation
48 }
49 },
50 State {
51 name: "krillin"
52 PropertyChanges {
53 target: root
54 supportedOrientations: Qt.PortraitOrientation
55 | Qt.LandscapeOrientation
56 | Qt.InvertedLandscapeOrientation
57 }
58 },
59 State {
60 name: "arale"
61 PropertyChanges {
62 target: root
63 supportedOrientations: Qt.PortraitOrientation
64 | Qt.LandscapeOrientation
65 | Qt.InvertedLandscapeOrientation
66 ignoredMice: 1
67 }
68 },
69 State {
70 name: "manta"
71 PropertyChanges {
72 target: root
73 category: "tablet"
74 }
75 },
76 State {
77 name: "flo"
78 PropertyChanges {
79 target: root
80 primaryOrientation: Qt.InvertedLandscapeOrientation
81 category: "tablet"
82 }
83 },
84 State {
85 name: "desktop"
86 PropertyChanges {
87 target: root
88 category: "desktop"
89 }
90 }
91 ]