~zsombi/ubuntu-ui-toolkit/03-styleditem-styleset

« back to all changes in this revision

Viewing changes to tests/resources/header/backButton.qml

  • Committer: Zsombor Egri
  • Date: 2015-03-10 18:03:58 UTC
  • mfrom: (1434.1.13 02-styleset)
  • Revision ID: zsombor.egri@canonical.com-20150310180358-aunnni7a9z9k9c7h
prereq sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013-2015 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser 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.2
 
19
 
 
20
MainView {
 
21
    id: mainView
 
22
    width: units.gu(50)
 
23
    height: units.gu(70)
 
24
 
 
25
    PageStack {
 
26
        id: stack
 
27
 
 
28
        Component.onCompleted: stack.push(firstPage)
 
29
        Page {
 
30
            id: firstPage
 
31
            title: "Stack"
 
32
            Button {
 
33
                anchors.centerIn: parent
 
34
                text: "Click me"
 
35
                onTriggered: stack.push(pageOnStack)
 
36
            }
 
37
            head {
 
38
                actions: Action {
 
39
                    iconName: "settings"
 
40
                    text: "Settings"
 
41
                }
 
42
            }
 
43
        }
 
44
 
 
45
        Page {
 
46
            id: pageOnStack
 
47
            visible: false
 
48
            title: "Stacked page"
 
49
            Label {
 
50
                anchors.centerIn: parent
 
51
                text: "Use back button to return"
 
52
            }
 
53
            head.actions: Action {
 
54
                iconName: "info"
 
55
                text: "information"
 
56
            }
 
57
        }
 
58
    }
 
59
}