aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/StartPage.qml
blob: 8041a678671e75ec0878913bc4799124ee513fda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import QtQuick 2.5
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents

Item {
	ColumnLayout {
		id: startpage
		anchors.fill: parent
		anchors.margins: MobileComponents.Units.largeSpacing

		property int buttonWidth: welcomeText.width * 0.66

		MobileComponents.Label {
			Layout.bottomMargin: MobileComponents.Units.largeSpacing
			text: "Subsurface Divelog"
			font.pointSize: welcomeText.font.pointSize * 2
		}

		MobileComponents.Label {
			id: welcomeText
			Layout.fillWidth: true
			Layout.bottomMargin: MobileComponents.Units.largeSpacing
			text: "No recorded dives found. You can download your dives to this device from the Subsurface cloud storage service, from your dive computer, or add them manually."
			wrapMode: Text.WordWrap
			Layout.columnSpan: 2
		}
		Button {
			id: cloudstorageButton
			Layout.bottomMargin: MobileComponents.Units.largeSpacing
			Layout.preferredWidth: startpage.buttonWidth
			text: "Connect to CloudStorage..."
			onClicked: {
				stackView.push(prefsWindow)
			}
		}
		Button {
			id: computerButton
			Layout.preferredWidth: startpage.buttonWidth
			Layout.bottomMargin: MobileComponents.Units.largeSpacing
			text: "Transfer from dive computer..."
			onClicked: {
				stackView.push(downloadDivesWindow)
			}
		}
		Button {
			id: manualButton
			Layout.preferredWidth: startpage.buttonWidth
			Layout.bottomMargin: MobileComponents.Units.largeSpacing
			text: "Add dive manually..."
			onClicked: {
				manager.addDive();
				stackView.push(detailsWindow)
			}
		}
		Item {
			width: parent.width
			Layout.fillHeight: true
		}
	}
}