on 539b375 help sign in
unity8/qml/Tutorial/Tutorial.qml
85 lines 2.3 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.3
18import Ubuntu.Components 1.1
20Item {
21 id: root
23 property alias active: loader.active
24 property bool paused
26 property Item launcher
27 property Item panel
28 property Item stages
29 property Item overlay
31 readonly property bool launcherEnabled: loader.item ? loader.item.launcherEnabled : true
32 readonly property bool stagesEnabled: loader.item ? loader.item.stagesEnabled : true
33 readonly property bool panelEnabled: loader.item ? loader.item.panelEnabled : true
34 readonly property bool panelContentEnabled: loader.item ? loader.item.panelContentEnabled : true
35 readonly property bool running: loader.item ? loader.item.running : false
37 function finish() {
38 if (loader.item) {
39 loader.item.finish();
40 }
41 }
43 signal finished()
45 Loader {
46 id: loader
47 anchors.fill: parent
48 source: "TutorialContent.qml"
50 Binding {
51 target: loader.item
52 property: "paused"
53 value: root.paused
54 }
56 Binding {
57 target: loader.item
58 property: "launcher"
59 value: root.launcher
60 }
62 Binding {
63 target: loader.item
64 property: "panel"
65 value: root.panel
66 }
68 Binding {
69 target: loader.item
70 property: "stages"
71 value: root.stages
72 }
74 Binding {
75 target: loader.item
76 property: "overlay"
77 value: root.overlay
78 }
80 Connections {
81 target: loader.item
82 onFinished: root.finished()
83 }
84 }