2 * Copyright (C) 2013,2014 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/>.
18 import Ubuntu.Components 1.1
23 property Item launcher
26 readonly property bool launcherEnabled: !running ||
27 (!paused && tutorialLeft.shown)
28 readonly property bool spreadEnabled: !running
29 readonly property bool panelEnabled: !running
30 readonly property bool panelContentEnabled: !running
31 readonly property alias running: d.running
33 property bool paused: false
34 property real edgeSize
35 property bool useEdgeDragArea
46 Component.onCompleted: {
67 objectName: "tutorialLeft"
69 launcher: root.launcher
70 paused: !shown || root.paused
72 onFinished: tutorialLeftFinish.show()
76 id: tutorialLeftFinish
77 objectName: "tutorialLeftFinish"
79 textXOffset: root.launcher.panelWidth
80 paused: !shown || root.paused
81 text: root.useEdgeDragArea ? i18n.tr("Tap here to continue.") : i18n.tr("Click here to finish.")
85 if (root.useEdgeDragArea) {
88 // Last two screens use EdgeDragArea (right edge spread and
89 // bottom edge). So just end tutorial here.
97 objectName: "tutorialRight"
99 edgeSize: root.edgeSize
101 paused: !shown || root.paused
103 onFinished: tutorialBottom.show()
108 objectName: "tutorialBottom"
110 edgeSize: root.edgeSize
111 paused: !shown || root.paused
113 onFinished: tutorialBottomFinish.show()
116 TutorialBottomFinish {
117 id: tutorialBottomFinish
118 objectName: "tutorialBottomFinish"
120 backgroundFadesOut: true
121 paused: !shown || root.paused
123 onFinished: root.finish()