@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
17import QtQuick 2.4
17import QtQuick 2.4
@@ -34,57 +35,83 @@ QtObject {
35 readonly property alias category: priv.category
36 readonly property alias category: priv.category
38+ readonly property var deviceConfigParser: DeviceConfigParser {
37 readonly property var priv: StateGroup {
42 readonly property var priv: StateGroup {
40− property int primaryOrientation: root.useNativeOrientation
45+ property int primaryOrientation: deviceConfigParser.primaryOrientation == Qt.PrimaryOrientation ?
46+ root.useNativeOrientation : deviceConfigParser.primaryOrientation
42− property int supportedOrientations: Qt.PortraitOrientation
48+ property int supportedOrientations: deviceConfigParser.supportedOrientations
43− | Qt.InvertedPortraitOrientation
44− | Qt.LandscapeOrientation
45− | Qt.InvertedLandscapeOrientation
47− property int landscapeOrientation: Qt.LandscapeOrientation
50+ property int landscapeOrientation: deviceConfigParser.landscapeOrientation
48− property int invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
51+ property int invertedLandscapeOrientation: deviceConfigParser.invertedLandscapeOrientation
49− property int portraitOrientation: Qt.PortraitOrientation
52+ property int portraitOrientation: deviceConfigParser.portraitOrientation
50− property int invertedPortraitOrientation: Qt.InvertedPortraitOrientation
53+ property int invertedPortraitOrientation: deviceConfigParser.invertedPortraitOrientation
52− // Supported values so far:
53− // "phone", "tablet" or "desktop"
54− property string category: "phone"
54+ property string category: deviceConfigParser.category
58 name: "mako"
58 name: "mako"
59 PropertyChanges {
59 PropertyChanges {
60 target: priv
60 target: priv
61+ primaryOrientation: root.useNativeOrientation
61 supportedOrientations: Qt.PortraitOrientation
62 supportedOrientations: Qt.PortraitOrientation
62 | Qt.LandscapeOrientation
63 | Qt.LandscapeOrientation
63 | Qt.InvertedLandscapeOrientation
64 | Qt.InvertedLandscapeOrientation
65+ landscapeOrientation: Qt.LandscapeOrientation
66+ invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
67+ portraitOrientation: Qt.PortraitOrientation
68+ invertedPortraitOrientation: Qt.InvertedPortraitOrientation
67 name: "krillin"
73 name: "krillin"
68 PropertyChanges {
74 PropertyChanges {
69 target: priv
75 target: priv
76+ primaryOrientation: root.useNativeOrientation
70 supportedOrientations: Qt.PortraitOrientation
77 supportedOrientations: Qt.PortraitOrientation
71 | Qt.LandscapeOrientation
78 | Qt.LandscapeOrientation
72 | Qt.InvertedLandscapeOrientation
79 | Qt.InvertedLandscapeOrientation
80+ landscapeOrientation: Qt.LandscapeOrientation
81+ invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
82+ portraitOrientation: Qt.PortraitOrientation
83+ invertedPortraitOrientation: Qt.InvertedPortraitOrientation
76 name: "arale"
88 name: "arale"
77 PropertyChanges {
89 PropertyChanges {
78 target: priv
90 target: priv
91+ primaryOrientation: root.useNativeOrientation
79 supportedOrientations: Qt.PortraitOrientation
92 supportedOrientations: Qt.PortraitOrientation
80 | Qt.LandscapeOrientation
93 | Qt.LandscapeOrientation
81 | Qt.InvertedLandscapeOrientation
94 | Qt.InvertedLandscapeOrientation
95+ landscapeOrientation: Qt.LandscapeOrientation
96+ invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
97+ portraitOrientation: Qt.PortraitOrientation
98+ invertedPortraitOrientation: Qt.InvertedPortraitOrientation
85 name: "manta"
103 name: "manta"
86 PropertyChanges {
104 PropertyChanges {
87 target: priv
105 target: priv
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
88 category: "tablet"
115 category: "tablet"
@@ -92,9 +119,15 @@ QtObject {
92 name: "flo"
119 name: "flo"
93 PropertyChanges {
120 PropertyChanges {
94 target: priv
121 target: priv
122+ primaryOrientation: Qt.InvertedLandscapeOrientation
123+ supportedOrientations: Qt.PortraitOrientation
124+ | Qt.InvertedPortraitOrientation
125+ | Qt.LandscapeOrientation
126+ | Qt.InvertedLandscapeOrientation
95 landscapeOrientation: Qt.InvertedLandscapeOrientation
127 landscapeOrientation: Qt.InvertedLandscapeOrientation
96 invertedLandscapeOrientation: Qt.LandscapeOrientation
128 invertedLandscapeOrientation: Qt.LandscapeOrientation
97− primaryOrientation: Qt.InvertedLandscapeOrientation
129+ portraitOrientation: Qt.PortraitOrientation
130+ invertedPortraitOrientation: Qt.InvertedPortraitOrientation
98 category: "tablet"
131 category: "tablet"
@@ -102,8 +135,13 @@ QtObject {
102 name: "desktop"
135 name: "desktop"
103 PropertyChanges {
136 PropertyChanges {
104 target: priv
137 target: priv
105− category: "desktop"
138+ primaryOrientation: root.useNativeOrientation
106 supportedOrientations: root.useNativeOrientation
139 supportedOrientations: root.useNativeOrientation
140+ landscapeOrientation: Qt.LandscapeOrientation
141+ invertedLandscapeOrientation: Qt.InvertedLandscapeOrientation
142+ portraitOrientation: Qt.PortraitOrientation
143+ invertedPortraitOrientation: Qt.InvertedPortraitOrientation