@@ -0,0 +1,107 @@
1+/*
2+ * Copyright (C) 2016 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+import Ubuntu.Gestures 0.1
20+
21+Item {
22+ TabletSideStageTouchGesture {
23+ minimumTouchPoints: 2
24+ maximumTouchPoints: 2
25+ anchors.fill: parent
26+
27+ onRecognisedPressChanged: {
28+ print("Press recognized:", recognisedPress)
29+ if (recognisedPress) {
30+ overlayTimer.running = true;
31+ }
32+ }
33+ onDragStarted: print("Drag started")
34+ onDropped: print("Dropped")
35+ onCancelled: print("Cancelled")
36+ }
37+
38+ Timer {
39+ id: overlayTimer
40+ interval: 2000
41+ }
42+
43+ InverseMouseArea {
44+ anchors.fill: overlay
45+ onClicked: overlayTimer.stop()
46+ }
47+
48+ Item {
49+ id: overlay
50+ anchors.fill: parent
51+ visible: overlayTimer.running
52+ enabled: visible
53+
54+ Image {
55+ source: "graphics/arrows-centre.png"
56+ width: units.gu(6)
57+ height: width
58+ anchors.centerIn: parent
59+ }
60+
61+ ResizeGrip { // top left
62+ anchors.horizontalCenter: parent.left
63+ anchors.verticalCenter: parent.top
64+ }
65+
66+ ResizeGrip { // top center
67+ anchors.horizontalCenter: parent.horizontalCenter
68+ anchors.verticalCenter: parent.top
69+ rotation: 45
70+ }
71+
72+ ResizeGrip { // top right
73+ anchors.horizontalCenter: parent.right
74+ anchors.verticalCenter: parent.top
75+ rotation: 90
76+ }
77+
78+ ResizeGrip { // right
79+ anchors.horizontalCenter: parent.right
80+ anchors.verticalCenter: parent.verticalCenter
81+ rotation: 135
82+ }
83+
84+ ResizeGrip { // bottom right
85+ anchors.horizontalCenter: parent.right
86+ anchors.verticalCenter: parent.bottom
87+ }
88+
89+ ResizeGrip { // bottom center
90+ anchors.horizontalCenter: parent.horizontalCenter
91+ anchors.verticalCenter: parent.bottom
92+ rotation: 45
93+ }
94+
95+ ResizeGrip { // bottom left
96+ anchors.horizontalCenter: parent.left
97+ anchors.verticalCenter: parent.bottom
98+ rotation: 90
99+ }
100+
101+ ResizeGrip { // left
102+ anchors.horizontalCenter: parent.left
103+ anchors.verticalCenter: parent.verticalCenter
104+ rotation: 135
105+ }
106+ }
107+}