mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
port to Kirigami imports and new api
first quick and dirty port of the imports to Kirigami 1.0 (using system installed for now) adapt to api changes and try out some of the proposed ui changes from the HIG Signed-off-by: Marco Martin <notmart@gmail.com>
This commit is contained in:
parent
c6c3967dd9
commit
c780cfd7ce
15 changed files with 403 additions and 401 deletions
|
@ -1,24 +1,22 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.ScrollablePage {
|
||||||
id: aboutPage
|
id: aboutPage
|
||||||
property int pageWidth: subsurfaceTheme.columnWidth - MobileComponents.Units.gridUnit
|
property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.gridUnit
|
||||||
|
title: "About Subsurface-mobile"
|
||||||
ScrollView {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: MobileComponents.Units.largeSpacing
|
spacing: Kirigami.Units.largeSpacing
|
||||||
width: aboutPage.width
|
width: aboutPage.width
|
||||||
Layout.margins: MobileComponents.Units.gridUnit / 2
|
Layout.margins: Kirigami.Units.gridUnit / 2
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "About Subsurface-mobile"
|
text: "About Subsurface-mobile"
|
||||||
Layout.margins: MobileComponents.Units.largeSpacing / 2
|
Layout.margins: Kirigami.Units.largeSpacing / 2
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.maximumWidth: pageWidth
|
Layout.maximumWidth: pageWidth
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -26,41 +24,40 @@ MobileComponents.Page {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
Layout.margins: MobileComponents.Units.largeSpacing
|
Layout.margins: Kirigami.Units.largeSpacing
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: childrenRect.height
|
Layout.minimumHeight: childrenRect.height
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
source: "qrc:/qml/subsurface-mobile-icon.png"
|
source: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
width: parent.width - MobileComponents.Units.largeSpacing
|
width: parent.width - Kirigami.Units.largeSpacing
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
horizontalAlignment: Image.AlignHCenter
|
horizontalAlignment: Image.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "A mobile version of the free Subsurface divelog software.\n" +
|
text: "A mobile version of the free Subsurface divelog software.\n" +
|
||||||
"View your dive logs while on the go."
|
"View your dive logs while on the go."
|
||||||
level: 4
|
level: 4
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: MobileComponents.Units.largeSpacing * 3
|
Layout.topMargin: Kirigami.Units.largeSpacing * 3
|
||||||
Layout.maximumWidth: pageWidth
|
Layout.maximumWidth: pageWidth
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
anchors.horizontalCenter: parent.Center
|
anchors.horizontalCenter: parent.Center
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Version: " + manager.getVersion() + "\n\n© Subsurface developer team\n2011-2016"
|
text: "Version: " + manager.getVersion() + "\n\n© Subsurface developer team\n2011-2016"
|
||||||
level: 5
|
level: 5
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize + 1
|
font.pointSize: subsurfaceTheme.smallPointSize + 1
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: MobileComponents.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
Layout.maximumWidth: pageWidth
|
Layout.maximumWidth: pageWidth
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
anchors.horizontalCenter: parent.Center
|
anchors.horizontalCenter: parent.Center
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,12 @@ import QtQuick.Controls 1.2
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: loginWindow
|
id: loginWindow
|
||||||
height: outerLayout.height + 2 * MobileComponents.Units.gridUnit
|
height: outerLayout.height + 2 * Kirigami.Units.gridUnit
|
||||||
|
|
||||||
property string username: login.text;
|
property string username: login.text;
|
||||||
property string password: password.text;
|
property string password: password.text;
|
||||||
|
@ -23,14 +23,14 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: outerLayout
|
id: outerLayout
|
||||||
width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
|
width: subsurfaceTheme.columnWidth - 2 * Kirigami.Units.gridUnit
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Cloud credentials"
|
text: "Cloud credentials"
|
||||||
level: headingLevel
|
level: headingLevel
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Email"
|
text: "Email"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ Item {
|
||||||
Qt.ImhNoAutoUppercase
|
Qt.ImhNoAutoUppercase
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Password"
|
text: "Password"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ Item {
|
||||||
password.echoMode = checked ? TextInput.Normal : TextInput.Password
|
password.echoMode = checked ? TextInput.Normal : TextInput.Password
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Show password"
|
text: "Show password"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,10 +73,10 @@ Item {
|
||||||
checked: manager.saveCloudPassword
|
checked: manager.saveCloudPassword
|
||||||
id: savePassword
|
id: savePassword
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Remember"
|
text: "Remember"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item { width: MobileComponents.Units.gridUnit; height: width }
|
Item { width: Kirigami.Units.gridUnit; height: width }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.Page {
|
||||||
id: diveDetailsPage
|
id: diveDetailsPage
|
||||||
property alias currentIndex: diveDetailsListView.currentIndex
|
property alias currentIndex: diveDetailsListView.currentIndex
|
||||||
property alias dive_id: detailsEdit.dive_id
|
property alias dive_id: detailsEdit.dive_id
|
||||||
|
@ -26,26 +26,30 @@ MobileComponents.Page {
|
||||||
property alias endpressure: detailsEdit.endpressureText
|
property alias endpressure: detailsEdit.endpressureText
|
||||||
property alias gasmix: detailsEdit.gasmixText
|
property alias gasmix: detailsEdit.gasmixText
|
||||||
|
|
||||||
|
topPadding: applicationWindow().header.Layout.preferredHeight
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: 0
|
||||||
|
bottomPadding: 0
|
||||||
|
|
||||||
|
title: diveDetailsListView.currentItem.modelData.dive.location
|
||||||
state: "view"
|
state: "view"
|
||||||
|
flickable: diveDetailsListView.currentItem
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "view"
|
name: "view"
|
||||||
PropertyChanges { target: diveDetailsPage; contextualActions: deleteAction }
|
PropertyChanges { target: diveDetailsPage; contextualActions: deleteAction }
|
||||||
PropertyChanges { target: diveDetailList; visible: true }
|
PropertyChanges { target: detailsEditScroll; opened: false }
|
||||||
PropertyChanges { target: detailsEditScroll; visible: false }
|
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "edit"
|
name: "edit"
|
||||||
PropertyChanges { target: diveDetailsPage; contextualActions: null }
|
PropertyChanges { target: diveDetailsPage; contextualActions: null }
|
||||||
PropertyChanges { target: diveDetailList; visible: false }
|
PropertyChanges { target: detailsEditScroll; opened: true }
|
||||||
PropertyChanges { target: detailsEditScroll; visible: true }
|
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "add"
|
name: "add"
|
||||||
PropertyChanges { target: diveDetailsPage; contextualActions: null }
|
PropertyChanges { target: diveDetailsPage; contextualActions: null }
|
||||||
PropertyChanges { target: diveDetailList; visible: false }
|
PropertyChanges { target: detailsEditScroll; opened: true }
|
||||||
PropertyChanges { target: detailsEditScroll; visible: true }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -58,7 +62,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
property list<QtObject> deleteAction: [
|
property list<QtObject> deleteAction: [
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Delete dive"
|
text: "Delete dive"
|
||||||
iconName: "trash-empty"
|
iconName: "trash-empty"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
@ -146,6 +150,8 @@ MobileComponents.Page {
|
||||||
|
|
||||||
onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
|
onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
ScrollView {
|
ScrollView {
|
||||||
id: diveDetailList
|
id: diveDetailList
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -180,16 +186,17 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Flickable {
|
Kirigami.OverlaySheet {
|
||||||
id: detailsEditScroll
|
id: detailsEditScroll
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: MobileComponents.Units.gridUnit
|
onOpenedChanged: {
|
||||||
contentWidth: contentItem.childrenRect.width;
|
if (!opened) {
|
||||||
contentHeight: contentItem.childrenRect.height
|
diveDetailsPage.state = "view"
|
||||||
clip: true
|
}
|
||||||
bottomMargin: MobileComponents.Units.gridUnit * 3
|
}
|
||||||
DiveDetailsEdit {
|
DiveDetailsEdit {
|
||||||
id: detailsEdit
|
id: detailsEdit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls.Styles 1.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: detailsEdit
|
id: detailsEdit
|
||||||
|
@ -59,19 +59,19 @@ Item {
|
||||||
height: editArea.height
|
height: editArea.height
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: editArea
|
id: editArea
|
||||||
spacing: MobileComponents.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
|
width: subsurfaceTheme.columnWidth - 2 * Kirigami.Units.gridUnit
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: editorDetails
|
id: editorDetails
|
||||||
width: parent.width
|
width: parent.width
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
text: "Dive " + number
|
text: "Dive " + number
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Date:"
|
text: "Date:"
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ Item {
|
||||||
id: txtDate;
|
id: txtDate;
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Location:"
|
text: "Location:"
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ Item {
|
||||||
// to add the current location as the dive location
|
// to add the current location as the dive location
|
||||||
// (think of someone adding a dive while on the boat or
|
// (think of someone adding a dive while on the boat or
|
||||||
// at the dive site)
|
// at the dive site)
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Use current\nGPS location:"
|
text: "Use current\nGPS location:"
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Depth:"
|
text: "Depth:"
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
validator: RegExpValidator { regExp: /[^-]*/ }
|
validator: RegExpValidator { regExp: /[^-]*/ }
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Duration:"
|
text: "Duration:"
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ Item {
|
||||||
validator: RegExpValidator { regExp: /[^-]*/ }
|
validator: RegExpValidator { regExp: /[^-]*/ }
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Air Temp:"
|
text: "Air Temp:"
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Water Temp:"
|
text: "Water Temp:"
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Suit:"
|
text: "Suit:"
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Buddy:"
|
text: "Buddy:"
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Dive Master:"
|
text: "Dive Master:"
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Weight:"
|
text: "Weight:"
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Gas mix:"
|
text: "Gas mix:"
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ Item {
|
||||||
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/ }
|
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/ }
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Start Pressure:"
|
text: "Start Pressure:"
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "End Pressure:"
|
text: "End Pressure:"
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
text: "Notes:"
|
text: "Notes:"
|
||||||
|
@ -223,13 +223,13 @@ Item {
|
||||||
focus: true
|
focus: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.minimumHeight: MobileComponents.Units.gridUnit * 6
|
Layout.minimumHeight: Kirigami.Units.gridUnit * 6
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
height: MobileComponents.Units.gridUnit * 3
|
height: Kirigami.Units.gridUnit * 3
|
||||||
width: height // just to make sure the spacer doesn't produce scrollbars, but also isn't null
|
width: height // just to make sure the spacer doesn't produce scrollbars, but also isn't null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,23 +7,23 @@ import QtQuick.Controls.Styles 1.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: detailsView
|
id: detailsView
|
||||||
property real gridWidth: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
|
property real gridWidth: subsurfaceTheme.columnWidth - 2 * Kirigami.Units.gridUnit
|
||||||
property real col1Width: gridWidth * 0.23
|
property real col1Width: gridWidth * 0.23
|
||||||
property real col2Width: gridWidth * 0.37
|
property real col2Width: gridWidth * 0.37
|
||||||
property real col3Width: gridWidth * 0.20
|
property real col3Width: gridWidth * 0.20
|
||||||
property real col4Width: gridWidth * 0.20
|
property real col4Width: gridWidth * 0.20
|
||||||
|
|
||||||
width: SubsurfaceTheme.columnWidth
|
width: SubsurfaceTheme.columnWidth
|
||||||
height: mainLayout.implicitHeight + bottomLayout.implicitHeight + MobileComponents.Units.iconSizes.large
|
height: mainLayout.implicitHeight + bottomLayout.implicitHeight + Kirigami.Units.iconSizes.large
|
||||||
Rectangle {
|
Rectangle {
|
||||||
z: 99
|
z: 99
|
||||||
color: MobileComponents.Theme.textColor
|
color: Kirigami.Theme.textColor
|
||||||
opacity: 0.3
|
opacity: 0.3
|
||||||
width: MobileComponents.Units.smallSpacing/4
|
width: Kirigami.Units.smallSpacing/4
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
@ -36,13 +36,13 @@ Item {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
margins: Math.round(MobileComponents.Units.gridUnit / 2)
|
margins: Math.round(Kirigami.Units.gridUnit / 2)
|
||||||
}
|
}
|
||||||
columns: 4
|
columns: 4
|
||||||
rowSpacing: MobileComponents.Units.smallSpacing * 2
|
rowSpacing: Kirigami.Units.smallSpacing * 2
|
||||||
columnSpacing: MobileComponents.Units.smallSpacing
|
columnSpacing: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
id: detailsViewHeading
|
id: detailsViewHeading
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: dive.location
|
text: dive.location
|
||||||
|
@ -57,41 +57,41 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: dateLabel
|
id: dateLabel
|
||||||
text: "Date: "
|
text: "Date: "
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.date + " " + dive.time
|
text: dive.date + " " + dive.time
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: numberText
|
id: numberText
|
||||||
text: "#" + dive.number
|
text: "#" + dive.number
|
||||||
color: MobileComponents.Theme.textColor
|
color: Kirigami.Theme.textColor
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: depthLabel
|
id: depthLabel
|
||||||
text: "Depth: "
|
text: "Depth: "
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.depth
|
text: dive.depth
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Duration: "
|
text: "Duration: "
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.duration
|
text: dive.duration
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
|
@ -104,21 +104,21 @@ Item {
|
||||||
Layout.minimumHeight: width * 0.75
|
Layout.minimumHeight: width * 0.75
|
||||||
Layout.columnSpan: 4
|
Layout.columnSpan: 4
|
||||||
clip: false
|
clip: false
|
||||||
devicePixelRatio: MobileComponents.Units.devicePixelRatio
|
devicePixelRatio: Kirigami.Units.devicePixelRatio
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: MobileComponents.Theme.textColor;
|
border.color: Kirigami.Theme.textColor;
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: noProfile
|
id: noProfile
|
||||||
visible: dive.noDive
|
visible: dive.noDive
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.columnSpan: 4
|
Layout.columnSpan: 4
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: "No profile to show"
|
text: "No profile to show"
|
||||||
}
|
}
|
||||||
|
@ -129,13 +129,13 @@ Item {
|
||||||
top: mainLayout.bottom
|
top: mainLayout.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
margins: Math.round(MobileComponents.Units.gridUnit / 2)
|
margins: Math.round(Kirigami.Units.gridUnit / 2)
|
||||||
}
|
}
|
||||||
columns: 4
|
columns: 4
|
||||||
rowSpacing: MobileComponents.Units.smallSpacing * 2
|
rowSpacing: Kirigami.Units.smallSpacing * 2
|
||||||
columnSpacing: MobileComponents.Units.smallSpacing
|
columnSpacing: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
level: 3
|
level: 3
|
||||||
text: "Dive Details"
|
text: "Dive Details"
|
||||||
|
@ -143,7 +143,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// first row - here we set up the column widths - total is 90% of width
|
// first row - here we set up the column widths - total is 90% of width
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Suit:"
|
text: "Suit:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -151,7 +151,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col1Width
|
Layout.preferredWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtSuit
|
id: txtSuit
|
||||||
text: dive.suit
|
text: dive.suit
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -159,7 +159,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col2Width
|
Layout.preferredWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Air Temp:"
|
text: "Air Temp:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -167,7 +167,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col3Width
|
Layout.preferredWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtAirTemp
|
id: txtAirTemp
|
||||||
text: dive.airTemp
|
text: dive.airTemp
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -175,7 +175,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col4Width
|
Layout.preferredWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Cylinder:"
|
text: "Cylinder:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -183,7 +183,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col1Width
|
Layout.preferredWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtCylinder
|
id: txtCylinder
|
||||||
text: dive.getCylinder
|
text: dive.getCylinder
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -191,7 +191,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col2Width
|
Layout.preferredWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Water Temp:"
|
text: "Water Temp:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -199,7 +199,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col3Width
|
Layout.preferredWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtWaterTemp
|
id: txtWaterTemp
|
||||||
text: dive.waterTemp
|
text: dive.waterTemp
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -207,7 +207,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col4Width
|
Layout.preferredWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Dive Master:"
|
text: "Dive Master:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -215,7 +215,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col1Width
|
Layout.preferredWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtDiveMaster
|
id: txtDiveMaster
|
||||||
text: dive.divemaster
|
text: dive.divemaster
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -223,7 +223,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col2Width
|
Layout.preferredWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Weight:"
|
text: "Weight:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -231,7 +231,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col3Width
|
Layout.preferredWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtWeight
|
id: txtWeight
|
||||||
text: dive.sumWeight
|
text: dive.sumWeight
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -239,7 +239,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col4Width
|
Layout.preferredWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Buddy:"
|
text: "Buddy:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -247,7 +247,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col1Width
|
Layout.preferredWidth: detailsView.col1Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtBuddy
|
id: txtBuddy
|
||||||
text: dive.buddy
|
text: dive.buddy
|
||||||
Layout.columnSpan: 3
|
Layout.columnSpan: 3
|
||||||
|
@ -256,7 +256,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col2Width + detailsView.col3Width + detailsView.col4Width
|
Layout.preferredWidth: detailsView.col2Width + detailsView.col3Width + detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
level: 3
|
level: 3
|
||||||
text: "Notes"
|
text: "Notes"
|
||||||
|
@ -264,7 +264,7 @@ Item {
|
||||||
Layout.columnSpan: 4
|
Layout.columnSpan: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtNotes
|
id: txtNotes
|
||||||
text: dive.notes
|
text: dive.notes
|
||||||
focus: true
|
focus: true
|
||||||
|
@ -277,10 +277,10 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
Layout.columnSpan: 4
|
Layout.columnSpan: 4
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: MobileComponents.Units.gridUnit * 3
|
Layout.minimumHeight: Kirigami.Units.gridUnit * 3
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
qmlProfile.setMargin(MobileComponents.Units.smallSpacing)
|
qmlProfile.setMargin(Kirigami.Units.smallSpacing)
|
||||||
qmlProfile.diveId = model.dive.id;
|
qmlProfile.diveId = model.dive.id;
|
||||||
qmlProfile.update();
|
qmlProfile.update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,26 +3,30 @@ import QtQuick.Controls 1.2
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.ScrollablePage {
|
||||||
id: page
|
id: page
|
||||||
objectName: "DiveList"
|
objectName: "DiveList"
|
||||||
color: MobileComponents.Theme.viewBackgroundColor
|
title: "Subsurface-mobile"
|
||||||
|
background: Rectangle {
|
||||||
|
color: Kirigami.Theme.viewBackgroundColor
|
||||||
|
}
|
||||||
|
|
||||||
property int credentialStatus: manager.credentialStatus
|
property int credentialStatus: manager.credentialStatus
|
||||||
property int numDives: diveListView.count
|
property int numDives: diveListView.count
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: diveDelegate
|
id: diveDelegate
|
||||||
MobileComponents.ListItem {
|
Kirigami.AbstractListItem {
|
||||||
enabled: true
|
enabled: true
|
||||||
|
supportsMouseEvents: true
|
||||||
checked: diveListView.currentIndex === model.index
|
checked: diveListView.currentIndex === model.index
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
property real detailsOpacity : 0
|
property real detailsOpacity : 0
|
||||||
property int horizontalPadding: MobileComponents.Units.gridUnit / 2 - MobileComponents.Units.smallSpacing + 1
|
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
||||||
|
|
||||||
// When clicked, the mode changes to details view
|
// When clicked, the mode changes to details view
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -34,10 +38,10 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width - MobileComponents.Units.gridUnit
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
height: childrenRect.height - MobileComponents.Units.smallSpacing
|
height: childrenRect.height - Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: locationText
|
id: locationText
|
||||||
text: dive.location
|
text: dive.location
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
|
@ -50,7 +54,7 @@ MobileComponents.Page {
|
||||||
right: dateLabel.left
|
right: dateLabel.left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: dateLabel
|
id: dateLabel
|
||||||
text: dive.date + " " + dive.time
|
text: dive.date + " " + dive.time
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -68,30 +72,30 @@ MobileComponents.Page {
|
||||||
rightMargin: horizontalPadding
|
rightMargin: horizontalPadding
|
||||||
bottom: numberText.bottom
|
bottom: numberText.bottom
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Depth: '
|
text: 'Depth: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.depth
|
text: dive.depth
|
||||||
width: Math.max(MobileComponents.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
|
width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Duration: '
|
text: 'Duration: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.duration
|
text: dive.duration
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: numberText
|
id: numberText
|
||||||
text: "#" + dive.number
|
text: "#" + dive.number
|
||||||
color: MobileComponents.Theme.textColor
|
color: Kirigami.Theme.textColor
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -106,10 +110,10 @@ MobileComponents.Page {
|
||||||
Component {
|
Component {
|
||||||
id: tripHeading
|
id: tripHeading
|
||||||
Item {
|
Item {
|
||||||
width: page.width - MobileComponents.Units.gridUnit
|
width: page.width - Kirigami.Units.gridUnit
|
||||||
height: childrenRect.height + MobileComponents.Units.smallSpacing * 2 + Math.max(2, MobileComponents.Units.gridUnit / 2)
|
height: childrenRect.height + Kirigami.Units.smallSpacing * 2 + Math.max(2, Kirigami.Units.gridUnit / 2)
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
id: sectionText
|
id: sectionText
|
||||||
text: {
|
text: {
|
||||||
// if the tripMeta (which we get as "section") ends in ::-- we know
|
// if the tripMeta (which we get as "section") ends in ::-- we know
|
||||||
|
@ -127,19 +131,19 @@ MobileComponents.Page {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
topMargin: Math.max(2, MobileComponents.Units.gridUnit / 2)
|
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
|
||||||
leftMargin: MobileComponents.Units.gridUnit / 2
|
leftMargin: Kirigami.Units.gridUnit / 2
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
level: 2
|
level: 2
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: Math.max(2, MobileComponents.Units.gridUnit / 12) // we want a thicker line
|
height: Math.max(2, Kirigami.Units.gridUnit / 12) // we want a thicker line
|
||||||
anchors {
|
anchors {
|
||||||
top: sectionText.bottom
|
top: sectionText.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: MobileComponents.Units.gridUnit * -2
|
leftMargin: Kirigami.Units.gridUnit * -2
|
||||||
rightMargin: MobileComponents.Units.gridUnit * -2
|
rightMargin: Kirigami.Units.gridUnit * -2
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
color: subsurfaceTheme.accentColor
|
color: subsurfaceTheme.accentColor
|
||||||
|
@ -147,6 +151,50 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
id: startPageWrapper
|
||||||
|
anchors.fill: parent
|
||||||
|
opacity: (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
|
||||||
|
visible: opacity > 0
|
||||||
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (visible) {
|
||||||
|
page.mainAction = page.saveAction
|
||||||
|
} else {
|
||||||
|
page.mainAction = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StartPage {
|
||||||
|
id: startPage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
id: diveListView
|
||||||
|
anchors.fill: parent
|
||||||
|
opacity: 0.8 - startPageWrapper.opacity
|
||||||
|
visible: opacity > 0
|
||||||
|
model: diveModel
|
||||||
|
currentIndex: -1
|
||||||
|
delegate: diveDelegate
|
||||||
|
//boundsBehavior: Flickable.StopAtBounds
|
||||||
|
maximumFlickVelocity: parent.height * 5
|
||||||
|
bottomMargin: Kirigami.Units.iconSizes.medium + Kirigami.Units.gridUnit
|
||||||
|
cacheBuffer: 0 // seems to avoid empty rendered profiles
|
||||||
|
section.property: "dive.tripMeta"
|
||||||
|
section.criteria: ViewSection.FullString
|
||||||
|
section.delegate: tripHeading
|
||||||
|
header: Kirigami.Heading {
|
||||||
|
x: Kirigami.Units.gridUnit / 2
|
||||||
|
height: paintedHeight + Kirigami.Units.gridUnit / 2
|
||||||
|
verticalAlignment: Text.AlignBottom
|
||||||
|
text: "Dive Log"
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: detailsWindow
|
||||||
|
onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex
|
||||||
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: stackView
|
target: stackView
|
||||||
onDepthChanged: {
|
onDepthChanged: {
|
||||||
|
@ -155,37 +203,8 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
id: outerScrollView
|
|
||||||
anchors.fill: parent
|
|
||||||
opacity: 0.8 - startPageWrapper.opacity
|
|
||||||
visible: opacity > 0
|
|
||||||
ListView {
|
|
||||||
id: diveListView
|
|
||||||
anchors.fill: parent
|
|
||||||
model: diveModel
|
|
||||||
currentIndex: -1
|
|
||||||
delegate: diveDelegate
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
|
||||||
maximumFlickVelocity: parent.height * 5
|
|
||||||
bottomMargin: MobileComponents.Units.iconSizes.medium + MobileComponents.Units.gridUnit
|
|
||||||
cacheBuffer: 0 // seems to avoid empty rendered profiles
|
|
||||||
section.property: "dive.tripMeta"
|
|
||||||
section.criteria: ViewSection.FullString
|
|
||||||
section.delegate: tripHeading
|
|
||||||
header: MobileComponents.Heading {
|
|
||||||
x: MobileComponents.Units.gridUnit / 2
|
|
||||||
height: paintedHeight + MobileComponents.Units.gridUnit / 2
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
text: "Dive Log"
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: detailsWindow
|
|
||||||
onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property QtObject saveAction: Action {
|
property QtObject saveAction: Action {
|
||||||
iconName: "document-save"
|
iconName: "document-save"
|
||||||
|
@ -200,23 +219,4 @@ MobileComponents.Page {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
id: startPageWrapper
|
|
||||||
anchors.fill: parent
|
|
||||||
opacity: (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
|
|
||||||
visible: opacity > 0
|
|
||||||
Behavior on opacity { NumberAnimation { duration: MobileComponents.Units.shortDuration } }
|
|
||||||
onVisibleChanged: {
|
|
||||||
if (visible) {
|
|
||||||
page.mainAction = page.saveAction
|
|
||||||
} else {
|
|
||||||
page.mainAction = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StartPage {
|
|
||||||
id: startPage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,15 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.Page {
|
||||||
id: diveComputerDownloadWindow
|
id: diveComputerDownloadWindow
|
||||||
anchors.top:parent.top
|
anchors.top:parent.top
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
title: "Dive Computer"
|
||||||
|
|
||||||
/* this can be done by hitting the back key
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
|
|
|
@ -6,13 +6,14 @@ import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.ScrollablePage {
|
||||||
id: gpsListWindow
|
id: gpsListWindow
|
||||||
width: parent.width - MobileComponents.Units.gridUnit
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: Kirigami.Units.gridUnit / 2
|
||||||
objectName: "gpsList"
|
objectName: "gpsList"
|
||||||
|
title: "GPS Fixes"
|
||||||
|
|
||||||
/* this can be done by hitting the back key
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
|
@ -28,15 +29,16 @@ MobileComponents.Page {
|
||||||
*/
|
*/
|
||||||
Component {
|
Component {
|
||||||
id: gpsDelegate
|
id: gpsDelegate
|
||||||
MobileComponents.ListItemWithActions {
|
Kirigami.ActionsForListItem {
|
||||||
id: gpsFix
|
id: gpsFix
|
||||||
enabled: true
|
enabled: true
|
||||||
width: parent.width
|
width: parent.width
|
||||||
property int horizontalPadding: MobileComponents.Units.gridUnit / 2 - MobileComponents.Units.smallSpacing + 1
|
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
||||||
|
|
||||||
Item {
|
Kirigami.BasicListItem {
|
||||||
width: parent.width - MobileComponents.Units.gridUnit
|
supportsMouseEvents: true
|
||||||
height: childrenRect.height - MobileComponents.Units.smallSpacing
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
|
height: childrenRect.height - Kirigami.Units.smallSpacing
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 4
|
columns: 4
|
||||||
id: timeAndName
|
id: timeAndName
|
||||||
|
@ -46,55 +48,55 @@ MobileComponents.Page {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: horizontalPadding
|
rightMargin: horizontalPadding
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Date: '
|
text: 'Date: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: date
|
text: date
|
||||||
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
|
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Name: '
|
text: 'Name: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: name
|
text: name
|
||||||
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
|
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Latitude: '
|
text: 'Latitude: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: latitude
|
text: latitude
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Longitude: '
|
text: 'Longitude: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: longitude
|
text: longitude
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actions: [
|
actions: [
|
||||||
Action {
|
Kirigami.Action {
|
||||||
iconName: "trash-empty"
|
iconName: "trash-empty"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
print("delete this!")
|
print("delete this!")
|
||||||
manager.deleteGpsFix(when)
|
manager.deleteGpsFix(when)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Kirigami.Action {
|
||||||
iconName: "gps"
|
iconName: "gps"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
print("show map")
|
print("show map")
|
||||||
|
@ -106,8 +108,6 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
anchors.fill: parent
|
|
||||||
ListView {
|
ListView {
|
||||||
id: gpsListView
|
id: gpsListView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -119,12 +119,11 @@ MobileComponents.Page {
|
||||||
cacheBuffer: Math.max(5000, parent.height * 5)
|
cacheBuffer: Math.max(5000, parent.height * 5)
|
||||||
focus: true
|
focus: true
|
||||||
clip: true
|
clip: true
|
||||||
header: MobileComponents.Heading {
|
header: Kirigami.Heading {
|
||||||
x: MobileComponents.Units.gridUnit / 2
|
x: Kirigami.Units.gridUnit / 2
|
||||||
height: paintedHeight + MobileComponents.Units.gridUnit / 2
|
height: paintedHeight + Kirigami.Units.gridUnit / 2
|
||||||
verticalAlignment: Text.AlignBottom
|
verticalAlignment: Text.AlignBottom
|
||||||
text: "List of stored GPS fixes"
|
text: "List of stored GPS fixes"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,14 @@ import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.ScrollablePage {
|
||||||
id: logWindow
|
id: logWindow
|
||||||
width: parent.width - MobileComponents.Units.gridUnit
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: Kirigami.Units.gridUnit / 2
|
||||||
objectName: "Log"
|
objectName: "Log"
|
||||||
|
title: "Application Log"
|
||||||
|
|
||||||
/* this can be done by hitting the back key
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
|
@ -26,8 +27,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
ScrollView {
|
|
||||||
anchors.fill: parent
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: logFlick
|
id: logFlick
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -35,11 +35,11 @@ MobileComponents.Page {
|
||||||
clip: true
|
clip: true
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
width: logFlick.width
|
width: logFlick.width
|
||||||
spacing: MobileComponents.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Application Log"
|
text: "Application Log"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: logContent
|
id: logContent
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
|
@ -48,5 +48,4 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,12 @@ import QtQuick.Controls 1.2
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.Page {
|
||||||
|
|
||||||
|
title: "Preferences"
|
||||||
mainAction: Action {
|
mainAction: Action {
|
||||||
text: "Save"
|
text: "Save"
|
||||||
iconName: "document-save"
|
iconName: "document-save"
|
||||||
|
@ -24,27 +25,27 @@ MobileComponents.Page {
|
||||||
signal accept
|
signal accept
|
||||||
|
|
||||||
columns: 2
|
columns: 2
|
||||||
width: parent.width - MobileComponents.Units.gridUnit
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
margins: MobileComponents.Units.gridUnit / 2
|
margins: Kirigami.Units.gridUnit / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Preferences"
|
text: "Preferences"
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Subsurface GPS data webservice"
|
text: "Subsurface GPS data webservice"
|
||||||
level: 3
|
level: 3
|
||||||
Layout.topMargin: MobileComponents.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Distance threshold (meters)"
|
text: "Distance threshold (meters)"
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
|
@ -55,7 +56,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Time threshold (minutes)"
|
text: "Time threshold (minutes)"
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -13,30 +13,30 @@ ColumnLayout {
|
||||||
|
|
||||||
function saveCredentials() { cloudCredentials.saveCredentials() }
|
function saveCredentials() { cloudCredentials.saveCredentials() }
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
text: "Subsurface-mobile"
|
text: "Subsurface-mobile"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: explanationText
|
id: explanationText
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
text: "In order to use Subsurface-mobile you need to have a Subsurface cloud storage account " +
|
text: "In order to use Subsurface-mobile you need to have a Subsurface cloud storage account " +
|
||||||
"(which can be created with the Subsurface desktop application)."
|
"(which can be created with the Subsurface desktop application)."
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: messageArea
|
id: messageArea
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
text: manager.startPageText
|
text: manager.startPageText
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
CloudCredentials {
|
CloudCredentials {
|
||||||
id: cloudCredentials
|
id: cloudCredentials
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
Layout.topMargin: MobileComponents.Units.gridUnit * 2
|
Layout.topMargin: Kirigami.Units.gridUnit * 2
|
||||||
property int headingLevel: 3
|
property int headingLevel: 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
padding {
|
padding {
|
||||||
top: MobileComponents.Units.smallSpacing * 2
|
top: Kirigami.Units.smallSpacing * 2
|
||||||
left: MobileComponents.Units.smallSpacing * 4
|
left: Kirigami.Units.smallSpacing * 4
|
||||||
right: MobileComponents.Units.smallSpacing * 4
|
right: Kirigami.Units.smallSpacing * 4
|
||||||
bottom: MobileComponents.Units.smallSpacing * 2
|
bottom: Kirigami.Units.smallSpacing * 2
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.Page {
|
Kirigami.Page {
|
||||||
|
|
||||||
|
title: "Theme Information"
|
||||||
/* this can be done by hitting the back key
|
/* this can be done by hitting the back key
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Action {
|
Action {
|
||||||
|
@ -20,14 +21,14 @@ MobileComponents.Page {
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: themetest
|
id: themetest
|
||||||
columns: 2
|
columns: 2
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: Kirigami.Units.gridUnit / 2
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
text: "Theme Information"
|
text: "Theme Information"
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Screen"
|
text: "Screen"
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
level: 3
|
level: 3
|
||||||
|
@ -36,76 +37,76 @@ MobileComponents.Page {
|
||||||
id: fm
|
id: fm
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Geometry (pixels):"
|
text: "Geometry (pixels):"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: rootItem.width + "x" + rootItem.height
|
text: rootItem.width + "x" + rootItem.height
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Geometry (gridUnits):"
|
text: "Geometry (gridUnits):"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: Math.round(rootItem.width / MobileComponents.Units.gridUnit) + "x" + Math.round(rootItem.height / MobileComponents.Units.gridUnit)
|
text: Math.round(rootItem.width / Kirigami.Units.gridUnit) + "x" + Math.round(rootItem.height / Kirigami.Units.gridUnit)
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Units.gridUnit:"
|
text: "Units.gridUnit:"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: MobileComponents.Units.gridUnit
|
text: Kirigami.Units.gridUnit
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Units.devicePixelRatio:"
|
text: "Units.devicePixelRatio:"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: MobileComponents.Units.devicePixelRatio
|
text: Kirigami.Units.devicePixelRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Font Metrics"
|
text: "Font Metrics"
|
||||||
level: 3
|
level: 3
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "FontMetrics pointSize:"
|
text: "FontMetrics pointSize:"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: fm.font.pointSize
|
text: fm.font.pointSize
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "FontMetrics pixelSize:"
|
text: "FontMetrics pixelSize:"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: fm.height
|
text: fm.height
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "FontMetrics devicePixelRatio:"
|
text: "FontMetrics devicePixelRatio:"
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: fm.height / fm.font.pointSize
|
text: fm.height / fm.font.pointSize
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Text item pixelSize:"
|
text: "Text item pixelSize:"
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: font.pixelSize
|
text: font.pixelSize
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Text item pointSize:"
|
text: "Text item pointSize:"
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: font.pointSize
|
text: font.pointSize
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,21 +5,21 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: topPart
|
id: topPart
|
||||||
|
|
||||||
color: subsurfaceTheme.accentColor
|
color: subsurfaceTheme.accentColor
|
||||||
Layout.minimumHeight: Math.round(MobileComponents.Units.gridUnit * 1.5)
|
Layout.minimumHeight: Math.round(Kirigami.Units.gridUnit * 1.5)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: 0
|
Layout.margins: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.verticalCenter: topPart.verticalCenter
|
anchors.verticalCenter: topPart.verticalCenter
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: subsurfaceLogo.height
|
Layout.preferredHeight: subsurfaceLogo.height
|
||||||
Layout.leftMargin: MobileComponents.Units.gridUnit / 4
|
Layout.leftMargin: Kirigami.Units.gridUnit / 4
|
||||||
Image {
|
Image {
|
||||||
id: subsurfaceLogo
|
id: subsurfaceLogo
|
||||||
source: "qrc:/qml/subsurface-mobile-icon.png"
|
source: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
|
@ -27,16 +27,16 @@ Rectangle {
|
||||||
verticalCenter: parent.Center
|
verticalCenter: parent.Center
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
width: Math.round(MobileComponents.Units.gridUnit)
|
width: Math.round(Kirigami.Units.gridUnit)
|
||||||
height: width
|
height: width
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: qsTr("Subsurface-mobile")
|
text: qsTr("Subsurface-mobile")
|
||||||
font.pointSize: Math.round(MobileComponents.Theme.defaultFont.pointSize)
|
font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize)
|
||||||
height: subsurfaceLogo.height
|
height: subsurfaceLogo.height
|
||||||
anchors {
|
anchors {
|
||||||
left: subsurfaceLogo.right
|
left: subsurfaceLogo.right
|
||||||
leftMargin: Math.round(MobileComponents.Units.gridUnit / 2)
|
leftMargin: Math.round(Kirigami.Units.gridUnit / 2)
|
||||||
}
|
}
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
|
@ -6,9 +6,9 @@ import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
import org.kde.kirigami 1.0 as Kirigami
|
||||||
|
|
||||||
MobileComponents.ApplicationWindow {
|
Kirigami.ApplicationWindow {
|
||||||
id: rootItem
|
id: rootItem
|
||||||
title: qsTr("Subsurface-mobile")
|
title: qsTr("Subsurface-mobile")
|
||||||
property bool fullscreen: true
|
property bool fullscreen: true
|
||||||
|
@ -37,20 +37,20 @@ MobileComponents.ApplicationWindow {
|
||||||
detailsWindow.endEditMode()
|
detailsWindow.endEditMode()
|
||||||
}
|
}
|
||||||
|
|
||||||
globalDrawer: MobileComponents.GlobalDrawer {
|
globalDrawer: Kirigami.GlobalDrawer {
|
||||||
title: "Subsurface"
|
title: "Subsurface"
|
||||||
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
|
|
||||||
bannerImageSource: "dive.jpg"
|
bannerImageSource: "dive.jpg"
|
||||||
actions: [
|
actions: [
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Dive list"
|
text: "Dive list"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
returnTopPage()
|
returnTopPage()
|
||||||
globalDrawer.close()
|
globalDrawer.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Cloud credentials"
|
text: "Cloud credentials"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
returnTopPage()
|
returnTopPage()
|
||||||
|
@ -64,7 +64,7 @@ MobileComponents.ApplicationWindow {
|
||||||
manager.credentialStatus = QMLManager.UNKNOWN
|
manager.credentialStatus = QMLManager.UNKNOWN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MobileComponents.ActionGroup {
|
Kirigami.Action {
|
||||||
text: "Manage dives"
|
text: "Manage dives"
|
||||||
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
|
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
|
||||||
/*
|
/*
|
||||||
|
@ -77,7 +77,7 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Add dive manually"
|
text: "Add dive manually"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
detailsWindow.state = "add"
|
detailsWindow.state = "add"
|
||||||
|
@ -100,7 +100,7 @@ MobileComponents.ApplicationWindow {
|
||||||
stackView.push(detailsWindow)
|
stackView.push(detailsWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Refresh"
|
text: "Refresh"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
detailsWindow.endEditMode()
|
detailsWindow.endEditMode()
|
||||||
|
@ -116,31 +116,31 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
MobileComponents.ActionGroup {
|
Kirigami.Action {
|
||||||
text: "GPS"
|
text: "GPS"
|
||||||
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
|
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "GPS-tag dives"
|
text: "GPS-tag dives"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.applyGpsData();
|
manager.applyGpsData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Upload GPS data"
|
text: "Upload GPS data"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.sendGpsData();
|
manager.sendGpsData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Download GPS data"
|
text: "Download GPS data"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.downloadGpsData();
|
manager.downloadGpsData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Show GPS fixes"
|
text: "Show GPS fixes"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.populateGpsData();
|
manager.populateGpsData();
|
||||||
|
@ -148,13 +148,13 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Clear GPS cache"
|
text: "Clear GPS cache"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.clearGpsData();
|
manager.clearGpsData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Preferences"
|
text: "Preferences"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(prefsWindow)
|
stackView.push(prefsWindow)
|
||||||
|
@ -163,22 +163,22 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
MobileComponents.ActionGroup {
|
Kirigami.Action {
|
||||||
text: "Developer"
|
text: "Developer"
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "App log"
|
text: "App log"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(logWindow)
|
stackView.push(logWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Theme information"
|
text: "Theme information"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(themetest)
|
stackView.push(themetest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Kirigami.Action {
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: manager.verboseEnabled
|
checked: manager.verboseEnabled
|
||||||
text: checked ? "Disable verbose (for adb logcat)" : "Enable verbose (for adb logcat)"
|
text: checked ? "Disable verbose (for adb logcat)" : "Enable verbose (for adb logcat)"
|
||||||
|
@ -187,7 +187,7 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "About"
|
text: "About"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(aboutWindow)
|
stackView.push(aboutWindow)
|
||||||
|
@ -198,7 +198,7 @@ MobileComponents.ApplicationWindow {
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: MobileComponents.Units.gridUnit * 10
|
width: Kirigami.Units.gridUnit * 10
|
||||||
CheckBox {
|
CheckBox {
|
||||||
//text: "Run location service"
|
//text: "Run location service"
|
||||||
id: locationCheckbox
|
id: locationCheckbox
|
||||||
|
@ -211,8 +211,8 @@ MobileComponents.ApplicationWindow {
|
||||||
manager.locationServiceEnabled = checked;
|
manager.locationServiceEnabled = checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
x: MobileComponents.Units.gridUnit * 1.5
|
x: Kirigami.Units.gridUnit * 1.5
|
||||||
anchors {
|
anchors {
|
||||||
left: locationCheckbox.right
|
left: locationCheckbox.right
|
||||||
//leftMargin: units.smallSpacing
|
//leftMargin: units.smallSpacing
|
||||||
|
@ -227,7 +227,7 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contextDrawer: MobileComponents.ContextDrawer {
|
contextDrawer: Kirigami.ContextDrawer {
|
||||||
id: contextDrawer
|
id: contextDrawer
|
||||||
actions: rootItem.pageStack.currentPage ? rootItem.pageStack.currentPage.contextualActions : null
|
actions: rootItem.pageStack.currentPage ? rootItem.pageStack.currentPage.contextualActions : null
|
||||||
title: "Actions"
|
title: "Actions"
|
||||||
|
@ -240,16 +240,11 @@ MobileComponents.ApplicationWindow {
|
||||||
property color accentColor: "#2d5b9a"
|
property color accentColor: "#2d5b9a"
|
||||||
property color shadedColor: "#132744"
|
property color shadedColor: "#132744"
|
||||||
property color accentTextColor: "#ececec"
|
property color accentTextColor: "#ececec"
|
||||||
property int columnWidth: Math.round(rootItem.width/(MobileComponents.Units.gridUnit*30)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(MobileComponents.Units.gridUnit*30))) : rootItem.width
|
property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*30)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*30))) : rootItem.width
|
||||||
}
|
|
||||||
|
|
||||||
toolBar: TopBar {
|
|
||||||
width: parent.width
|
|
||||||
height: Layout.minimumHeight
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property Item stackView: pageStack
|
property Item stackView: pageStack
|
||||||
initialPage: DiveList {
|
pageStack.initialPage: DiveList {
|
||||||
anchors.fill: detailsPage
|
anchors.fill: detailsPage
|
||||||
id: diveList
|
id: diveList
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
@ -295,6 +290,7 @@ MobileComponents.ApplicationWindow {
|
||||||
|
|
||||||
GpsList {
|
GpsList {
|
||||||
id: gpsWindow
|
id: gpsWindow
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeTest {
|
ThemeTest {
|
||||||
|
@ -303,6 +299,7 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
Kirigami.Theme.highlightColor = subsurfaceTheme.accentColor
|
||||||
manager.finishSetup();
|
manager.finishSetup();
|
||||||
rootItem.visible = true
|
rootItem.visible = true
|
||||||
diveList.opacity = 1
|
diveList.opacity = 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue