@@ -0,0 +1,103 @@
1+/*
2+* Copyright (C) 2017 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+*/
16+
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+
20+import "../../qml/ApplicationMenus"
21+import "../../qml/Panel"
22+import "../../qml/Components/PanelState"
23+
24+import QMenuModel 0.1
25+import Unity.Indicators 0.1 as Indicators
26+
27+Item {
28+ width: units.gu(180)
29+ height: units.gu(120)
30+
31+ UnityMenuModel {
32+ id: menuModel
33+ busName: contextBusName
34+ menuObjectPath: "/com/ubuntu/Menu/0"
35+ actions: { "unity": "/com/ubuntu/Menu/0" }
36+ }
37+
38+ Panel {
39+ id: panel
40+
41+ height: parent.height
42+ width: parent.width / 2
43+ minimizedPanelHeight: units.gu(6)
44+
45+ mode: "windowed"
46+
47+ applicationMenus {
48+ model: menuModel
49+ }
50+
51+ Rectangle {
52+ width: 50
53+ height: 50
54+ anchors.centerIn: parent
55+ color: "gray"
56+ rotation: 45
57+ Timer {
58+ interval: 20
59+ running: true
60+ repeat: true
61+ onTriggered: parent.rotation = parent.rotation+1
62+ }
63+ }
64+
65+ Rectangle {
66+ color: "green"
67+ anchors.bottom: parent.bottom
68+ anchors.right: parent.right
69+ Label {
70+ id: label
71+ anchors.centerIn: parent
72+ text: "Click here to open touch menu manually"
73+ }
74+ width: label.width + units.gu(2)
75+ height: label.height + units.gu(2)
76+ MouseArea {
77+ anchors.fill: parent
78+ onClicked: panel.applicationMenus.show();
79+ }
80+ visible: !panel.applicationMenus.shown
81+ }
82+ }
83+
84+ Rectangle {
85+ color: "blue"
86+ height: parent.height
87+ width: parent.width / 2
88+ x: width
89+
90+ MenuBar {
91+ id: menuBar
92+ height: units.gu(3)
93+ width: parent.width
94+ enableKeyFilter: true
95+ unityMenuModel: menuModel
96+ }
97+ }
98+
99+ Component.onCompleted: {
100+ theme.name = "Ubuntu.Components.Themes.SuruDark";
101+ PanelState.title = "Drag here to open touch menu";
102+ }
103+}