on f41454c help sign in
unity8/qml/Tutorial/Tutorial.qml
78 lines 2.1 kB history raw
1/*
2 * Copyright (C) 2014 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 */
17import QtQuick 2.4
18import Ubuntu.Components 1.3
20Item {
21 id: root
23 property alias active: loader.active
24 property bool paused
25 property real edgeSize
27 property Item launcher
28 property Item panel
30 readonly property bool launcherEnabled: loader.item ? loader.item.launcherEnabled : true
31 readonly property bool spreadEnabled: loader.item ? loader.item.spreadEnabled : true
32 readonly property bool panelEnabled: loader.item ? loader.item.panelEnabled : true
33 readonly property bool panelContentEnabled: loader.item ? loader.item.panelContentEnabled : true
34 readonly property bool running: loader.item ? loader.item.running : false
36 function finish() {
37 if (loader.item) {
38 loader.item.finish();
39 }
40 }
42 signal finished()
44 Loader {
45 id: loader
46 anchors.fill: parent
47 source: "TutorialContent.qml"
49 Binding {
50 target: loader.item
51 property: "paused"
52 value: root.paused
53 }
55 Binding {
56 target: loader.item
57 property: "edgeSize"
58 value: root.edgeSize
59 }
61 Binding {
62 target: loader.item
63 property: "launcher"
64 value: root.launcher
65 }
67 Binding {
68 target: loader.item
69 property: "panel"
70 value: root.panel
71 }
73 Connections {
74 target: loader.item
75 onFinished: root.finished()
76 }
77 }