2 * Copyright (C) 2013,2015 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.3
21 readonly property real buttonMargin: units.gu(2)
22 readonly property real buttonWidth: (width - buttonMargin * 2) / 2 -
24 readonly property real topMargin: units.gu(8)
25 readonly property real leftMargin: units.gu(2)
26 readonly property real rightMargin: units.gu(2)
28 // If you want to skip a page, mark skipValid false while you figure out
29 // whether to skip, then set it to true once you've determined the value
30 // of the skip property.
31 property bool skipValid: true
32 property bool skip: false
34 property bool hasBackButton: true
35 property bool customBack: false
36 property alias forwardButtonSourceComponent: forwardButton.sourceComponent
37 property alias content: contentHolder
39 property string title: ""
46 // We want larger than even fontSize: "x-large", so we use a Text instead
55 leftMargin: leftMargin
56 rightMargin: rightMargin
60 color: theme.palette.normal.baseText
61 font.pixelSize: units.gu(4)
67 top: titleLabel.bottom
70 bottom: backButton.top
71 topMargin: units.gu(4)
72 leftMargin: leftMargin
73 rightMargin: rightMargin
74 bottomMargin: buttonMargin
80 objectName: "backButton"
85 leftMargin: buttonMargin
86 bottomMargin: buttonMargin
89 text: i18n.ctr("Button: Go back one page in the Wizard", "Back")
90 visible: pageStack.depth > 1 && hasBackButton
93 onClicked: customBack ? backClicked() : pageStack.prev()
98 objectName: "forwardButton"
102 bottom: parent.bottom
103 rightMargin: buttonMargin
104 bottomMargin: buttonMargin