@@ -1,5 +1,5 @@
2− * Copyright (C) 2013,2014 Canonical, Ltd.
2+ * Copyright (C) 2014 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
@@ -20,115 +20,60 @@ import Ubuntu.Components 1.1
23+ property alias active: loader.active
23 property Item launcher
26 property Item launcher
24 property Item panel
27 property Item panel
25 property Item stages
28 property Item stages
26 property Item overlay
29 property Item overlay
28− readonly property bool launcherEnabled: !running ||
31+ readonly property bool launcherEnabled: loader.item ? loader.item.launcherEnabled : true
29− (!paused && loader.target === leftComponent)
30− readonly property bool stagesEnabled: !running
32+ readonly property bool stagesEnabled: loader.item ? loader.item.stagesEnabled : true
31− readonly property bool panelEnabled: !running
33+ readonly property bool panelEnabled: loader.item ? loader.item.panelEnabled : true
32− readonly property bool panelContentEnabled: !running
34+ readonly property bool panelContentEnabled: loader.item ? loader.item.panelContentEnabled : true
33− readonly property bool running: loader.sourceComponent !== null
35+ readonly property bool running: loader.item ? loader.item.running : false
35− property bool paused: false
37 signal finished()
37 signal finished()
58− loader.sourceComponent = null;
62− loader.load(leftComponent);
67 id: loader
40 id: loader
68− objectName: "tutorialLoader"
41+ anchors.fill: parent
42+ source: "TutorialContent.qml"
70− property Component target: {
46+ property: "paused"
71− if (next) {
47+ value: root.paused
73− } else if (loader.item && loader.item.shown) {
74− return sourceComponent;
80− property Component next: null
50+ Binding {
81−
51+ target: loader.item
82− function load(comp) {
52+ property: "launcher"
83− if (loader.item) {
53+ value: root.launcher
87− loader.sourceComponent = comp;
91− Connections {
56+ Binding {
92 target: loader.item
57 target: loader.item
93− onFinished: {
58+ property: "panel"
94− loader.sourceComponent = loader.next;
59+ value: root.panel
95− if (loader.next != null) {
103 Binding {
62 Binding {
104 target: loader.item
63 target: loader.item
105− property: "paused"
64+ property: "stages"
106− value: root.paused
65+ value: root.stages
113− objectName: "tutorialLeft"
115− anchors.fill: parent
116− launcher: root.launcher
118− onFinished: loader.load(leftFinishComponent)
68+ Binding {
123− id: leftFinishComponent
124− TutorialLeftFinish {
125− objectName: "tutorialLeftFinish"
127− anchors.fill: parent
128− textXOffset: root.launcher.panelWidth
129− backgroundFadesOut: true
131− onFinished: root.launcher.hide()
76+ onFinished: root.finished()