2015-11-07 01:45:40 +01:00
|
|
|
import QtQuick 2.5
|
|
|
|
import QtQuick.Controls 1.2
|
2016-01-19 22:32:37 -08:00
|
|
|
import QtQuick.Controls.Styles 1.2
|
2015-11-07 01:45:40 +01:00
|
|
|
import QtQuick.Layouts 1.1
|
2015-11-29 17:27:20 +01:00
|
|
|
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
2016-01-19 22:32:37 -08:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
2015-11-07 01:45:40 +01:00
|
|
|
|
|
|
|
Item {
|
2016-01-19 22:32:37 -08:00
|
|
|
property var subsurfaceButton: Component {
|
|
|
|
ButtonStyle {
|
|
|
|
background: Rectangle {
|
|
|
|
border.width: 1
|
|
|
|
radius: height / 3
|
|
|
|
color: subsurfaceTheme.accentColor
|
|
|
|
}
|
|
|
|
label: Text{
|
|
|
|
text: control.text
|
|
|
|
color: subsurfaceTheme.accentTextColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-07 01:45:40 +01:00
|
|
|
ColumnLayout {
|
|
|
|
id: startpage
|
|
|
|
anchors.fill: parent
|
2015-12-08 02:08:37 +01:00
|
|
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
2015-11-07 01:45:40 +01:00
|
|
|
|
2016-01-19 22:32:37 -08:00
|
|
|
property int buttonWidth: width * 0.9
|
2015-11-07 01:45:40 +01:00
|
|
|
|
2015-12-04 01:19:11 +01:00
|
|
|
MobileComponents.Heading {
|
2015-11-29 17:27:20 +01:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
2015-11-07 01:45:40 +01:00
|
|
|
text: "Subsurface Divelog"
|
|
|
|
}
|
|
|
|
|
2015-11-29 17:27:20 +01:00
|
|
|
MobileComponents.Label {
|
2015-11-07 01:45:40 +01:00
|
|
|
id: welcomeText
|
|
|
|
Layout.fillWidth: true
|
2015-11-29 17:27:20 +01:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
2015-12-14 23:00:19 -08:00
|
|
|
text: manager.startPageText
|
2015-11-07 01:45:40 +01:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
|
|
|
Button {
|
2016-01-19 22:32:37 -08:00
|
|
|
style: subsurfaceButton
|
2015-11-07 01:45:40 +01:00
|
|
|
id: cloudstorageButton
|
2015-11-29 17:27:20 +01:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
2015-11-07 01:45:40 +01:00
|
|
|
Layout.preferredWidth: startpage.buttonWidth
|
2016-01-19 22:32:37 -08:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2015-11-07 01:45:40 +01:00
|
|
|
text: "Connect to CloudStorage..."
|
|
|
|
onClicked: {
|
2015-12-03 14:06:52 -08:00
|
|
|
stackView.push(cloudCredWindow)
|
2015-11-07 01:45:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Button {
|
2016-01-19 22:32:37 -08:00
|
|
|
style: subsurfaceButton
|
2015-11-07 01:45:40 +01:00
|
|
|
id: computerButton
|
|
|
|
Layout.preferredWidth: startpage.buttonWidth
|
2015-11-29 17:27:20 +01:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
2016-01-19 22:32:37 -08:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2015-11-07 01:45:40 +01:00
|
|
|
text: "Transfer from dive computer..."
|
|
|
|
onClicked: {
|
|
|
|
stackView.push(downloadDivesWindow)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Button {
|
2016-01-19 22:32:37 -08:00
|
|
|
style: subsurfaceButton
|
2015-11-07 01:45:40 +01:00
|
|
|
id: manualButton
|
|
|
|
Layout.preferredWidth: startpage.buttonWidth
|
2015-11-29 17:27:20 +01:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
2016-01-19 22:32:37 -08:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2015-11-07 01:45:40 +01:00
|
|
|
text: "Add dive manually..."
|
|
|
|
onClicked: {
|
|
|
|
manager.addDive();
|
|
|
|
stackView.push(detailsWindow)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Item {
|
|
|
|
width: parent.width
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
2015-12-03 14:06:52 -08:00
|
|
|
}
|