mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge branch 'mergeKirigamiPort'
This commit is contained in:
commit
3aa219c689
17 changed files with 467 additions and 437 deletions
|
@ -1,60 +1,59 @@
|
||||||
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.smallSpacing
|
property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.smallSpacing
|
||||||
|
title: "About Subsurface-mobile"
|
||||||
|
|
||||||
ScrollView {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
spacing: Kirigami.Units.largeSpacing
|
||||||
|
width: aboutPage.width
|
||||||
|
Layout.margins: Kirigami.Units.gridUnit / 2
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: MobileComponents.Units.largeSpacing
|
|
||||||
width: aboutPage.width
|
|
||||||
Layout.margins: MobileComponents.Units.gridUnit / 2
|
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "About Subsurface-mobile"
|
text: "About Subsurface-mobile"
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.topMargin: Kirigami.Units.gridUnit
|
||||||
Layout.maximumWidth: pageWidth
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: MobileComponents.Units.gridUnit
|
Layout.maximumWidth: pageWidth
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
source: "qrc:/qml/subsurface-mobile-icon.png"
|
source: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
width: pageWidth / 2
|
width: pageWidth / 2
|
||||||
height: width
|
height: width
|
||||||
fillMode: Image.Stretch
|
fillMode: Image.Stretch
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
horizontalAlignment: Image.AlignHCenter
|
horizontalAlignment: Image.AlignHCenter
|
||||||
}
|
}
|
||||||
MobileComponents.Heading {
|
|
||||||
text: "A mobile version of the free Subsurface divelog software.\n" +
|
|
||||||
"View your dive logs while on the go."
|
|
||||||
level: 4
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.topMargin: MobileComponents.Units.largeSpacing * 3
|
|
||||||
Layout.maximumWidth: pageWidth
|
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
|
||||||
anchors.horizontalCenter: parent.Center
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
text: "Version: " + manager.getVersion() + "\n\n© Subsurface developer team\n2011-2016"
|
text: "A mobile version of the free Subsurface divelog software.\n" +
|
||||||
level: 5
|
"View your dive logs while on the go."
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize + 1
|
level: 4
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: MobileComponents.Units.largeSpacing
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kirigami.Heading {
|
||||||
|
text: "Version: " + manager.getVersion() + "\n\n© Subsurface developer team\n2011-2016"
|
||||||
|
level: 5
|
||||||
|
font.pointSize: subsurfaceTheme.smallPointSize + 1
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
Layout.maximumWidth: pageWidth
|
||||||
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
anchors.horizontalCenter: parent.Center
|
||||||
|
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;
|
||||||
|
@ -21,10 +21,10 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: outerLayout
|
id: outerLayout
|
||||||
width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
|
width: subsurfaceTheme.columnWidth - 2 * Kirigami.Units.gridUnit
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible && !manager.accessingCloud) {
|
||||||
manager.appendTextToLog("Credential scrn: show kbd was: " + (Qt.inputMethod.isVisible ? "visible" : "invisible"))
|
manager.appendTextToLog("Credential scrn: show kbd was: " + (Qt.inputMethod.isVisible ? "visible" : "invisible"))
|
||||||
Qt.inputMethod.show()
|
Qt.inputMethod.show()
|
||||||
login.forceActiveFocus()
|
login.forceActiveFocus()
|
||||||
|
@ -34,13 +34,13 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ Item {
|
||||||
Qt.ImhNoAutoUppercase
|
Qt.ImhNoAutoUppercase
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "Password"
|
text: "Password"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ 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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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,25 +26,29 @@ 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: Qt.platform.os == "ios" ? [ deleteAction, backAction ] : [ deleteAction ] }
|
PropertyChanges { target: diveDetailsPage; contextualActions: Qt.platform.os == "ios" ? [ deleteAction, backAction ] : [ deleteAction ] }
|
||||||
PropertyChanges { target: diveDetailList; visible: true }
|
|
||||||
PropertyChanges { target: detailsEditScroll; visible: false }
|
PropertyChanges { target: detailsEditScroll; visible: false }
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "edit"
|
name: "edit"
|
||||||
PropertyChanges { target: diveDetailsPage; contextualActions: Qt.platform.os == "ios" ? [ cancelAction ] : null }
|
PropertyChanges { target: diveDetailsPage; contextualActions: Qt.platform.os == "ios" ? [ cancelAction ] : null }
|
||||||
PropertyChanges { target: diveDetailList; visible: false }
|
|
||||||
PropertyChanges { target: detailsEditScroll; visible: true }
|
PropertyChanges { target: detailsEditScroll; visible: true }
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "add"
|
name: "add"
|
||||||
PropertyChanges { target: diveDetailsPage; contextualActions: Qt.platform.os == "ios" ? [ cancelAction ] : null }
|
PropertyChanges { target: diveDetailsPage; contextualActions: Qt.platform.os == "ios" ? [ cancelAction ] : null }
|
||||||
PropertyChanges { target: diveDetailList; visible: false }
|
|
||||||
PropertyChanges { target: detailsEditScroll; visible: true }
|
PropertyChanges { target: detailsEditScroll; visible: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +69,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject cancelAction: Action {
|
property QtObject cancelAction: Kirigami.Action {
|
||||||
text: state === "edit" ? "Cancel edit" : "Cancel dive add"
|
text: state === "edit" ? "Cancel edit" : "Cancel dive add"
|
||||||
iconName: "dialog-cancel"
|
iconName: "dialog-cancel"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
@ -161,50 +165,53 @@ MobileComponents.Page {
|
||||||
|
|
||||||
onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
|
onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
|
||||||
|
|
||||||
ScrollView {
|
Item {
|
||||||
id: diveDetailList
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ListView {
|
ScrollView {
|
||||||
id: diveDetailsListView
|
id: diveDetailList
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
model: diveModel
|
ListView {
|
||||||
currentIndex: -1
|
id: diveDetailsListView
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
anchors.fill: parent
|
||||||
maximumFlickVelocity: parent.width * 5
|
model: diveModel
|
||||||
orientation: ListView.Horizontal
|
currentIndex: -1
|
||||||
focus: true
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
clip: true
|
maximumFlickVelocity: parent.width * 5
|
||||||
snapMode: ListView.SnapOneItem
|
orientation: ListView.Horizontal
|
||||||
onMovementEnded: {
|
focus: true
|
||||||
currentIndex = indexAt(contentX+1, 1);
|
clip: true
|
||||||
}
|
snapMode: ListView.SnapOneItem
|
||||||
delegate: ScrollView {
|
onMovementEnded: {
|
||||||
id: internalScrollView
|
currentIndex = indexAt(contentX+1, 1);
|
||||||
width: diveDetailsListView.width
|
}
|
||||||
height: diveDetailsListView.height
|
delegate: ScrollView {
|
||||||
property var modelData: model
|
id: internalScrollView
|
||||||
Flickable {
|
width: diveDetailsListView.width
|
||||||
//contentWidth: parent.width
|
height: diveDetailsListView.height
|
||||||
contentHeight: diveDetails.height
|
property var modelData: model
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
Flickable {
|
||||||
DiveDetailsView {
|
//contentWidth: parent.width
|
||||||
id: diveDetails
|
contentHeight: diveDetails.height
|
||||||
width: internalScrollView.width
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
DiveDetailsView {
|
||||||
|
id: diveDetails
|
||||||
|
width: internalScrollView.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
Kirigami.OverlaySheet {
|
||||||
Flickable {
|
id: detailsEditScroll
|
||||||
id: detailsEditScroll
|
anchors.fill: parent
|
||||||
anchors.fill: parent
|
onOpenedChanged: {
|
||||||
anchors.margins: MobileComponents.Units.gridUnit
|
if (!opened) {
|
||||||
contentWidth: contentItem.childrenRect.width;
|
diveDetailsPage.state = "view"
|
||||||
contentHeight: contentItem.childrenRect.height
|
}
|
||||||
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
|
||||||
}
|
}
|
||||||
|
@ -108,16 +108,16 @@ Item {
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
@ -128,13 +128,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"
|
||||||
|
@ -142,7 +142,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
|
||||||
|
@ -150,7 +150,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
|
||||||
|
@ -158,7 +158,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
|
||||||
|
@ -166,7 +166,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
|
||||||
|
@ -174,7 +174,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
|
||||||
|
@ -182,7 +182,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
|
||||||
|
@ -190,7 +190,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
|
||||||
|
@ -198,7 +198,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
|
||||||
|
@ -206,7 +206,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
|
||||||
|
@ -214,7 +214,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
|
||||||
|
@ -222,7 +222,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
|
||||||
|
@ -230,7 +230,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
|
||||||
|
@ -238,7 +238,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
|
||||||
|
@ -246,7 +246,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
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -254,7 +254,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col2Width
|
Layout.preferredWidth: detailsView.col2Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: "SAC:"
|
text: "SAC:"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -262,7 +262,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col3Width
|
Layout.preferredWidth: detailsView.col3Width
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: txtSAC
|
id: txtSAC
|
||||||
text: dive.sac
|
text: dive.sac
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
|
@ -270,7 +270,7 @@ Item {
|
||||||
Layout.preferredWidth: detailsView.col4Width
|
Layout.preferredWidth: detailsView.col4Width
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Heading {
|
Kirigami.Heading {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
level: 3
|
level: 3
|
||||||
text: "Notes"
|
text: "Notes"
|
||||||
|
@ -278,7 +278,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
|
||||||
|
@ -291,10 +291,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,13 +3,16 @@ 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
|
||||||
|
@ -21,13 +24,14 @@ MobileComponents.Page {
|
||||||
|
|
||||||
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: {
|
||||||
|
@ -39,10 +43,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
|
||||||
|
@ -56,7 +60,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
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
|
@ -72,31 +76,32 @@ MobileComponents.Page {
|
||||||
leftMargin: horizontalPadding
|
leftMargin: horizontalPadding
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: horizontalPadding
|
rightMargin: horizontalPadding
|
||||||
|
topMargin: - Kirigami.Units.smallSpacing * 2
|
||||||
bottom: numberText.bottom
|
bottom: numberText.bottom
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Depth: '
|
text: 'Depth: '
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: textColor
|
color: textColor
|
||||||
}
|
}
|
||||||
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
|
||||||
color: textColor
|
color: textColor
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: 'Duration: '
|
text: 'Duration: '
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: textColor
|
color: textColor
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
text: dive.duration
|
text: dive.duration
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: textColor
|
color: textColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MobileComponents.Label {
|
Kirigami.Label {
|
||||||
id: numberText
|
id: numberText
|
||||||
text: "#" + dive.number
|
text: "#" + dive.number
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
|
@ -104,6 +109,7 @@ MobileComponents.Page {
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: locationText.bottom
|
top: locationText.bottom
|
||||||
|
topMargin: - Kirigami.Units.smallSpacing * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,10 +119,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
|
||||||
|
@ -134,20 +140,20 @@ 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
|
||||||
}
|
}
|
||||||
color: textColor
|
color: textColor
|
||||||
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
|
||||||
|
@ -155,46 +161,60 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
ScrollView {
|
||||||
target: stackView
|
id: startPageWrapper
|
||||||
onDepthChanged: {
|
anchors.fill: parent
|
||||||
if (stackView.depth === 1) {
|
opacity: (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
|
||||||
diveListView.currentIndex = -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 {
|
||||||
|
target: stackView
|
||||||
|
onDepthChanged: {
|
||||||
|
if (stackView.depth === 1) {
|
||||||
|
diveListView.currentIndex = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
|
||||||
color: textColor
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: detailsWindow
|
|
||||||
onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property QtObject saveAction: Action {
|
property QtObject saveAction: Action {
|
||||||
iconName: "document-save"
|
iconName: "document-save"
|
||||||
|
@ -209,25 +229,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
|
|
||||||
showingDiveList = false
|
|
||||||
} else {
|
|
||||||
page.mainAction = null
|
|
||||||
showingDiveList = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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.SwipeListItem {
|
||||||
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,25 +108,22 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
ListView {
|
||||||
|
id: gpsListView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ListView {
|
model: gpsModel
|
||||||
id: gpsListView
|
currentIndex: -1
|
||||||
anchors.fill: parent
|
delegate: gpsDelegate
|
||||||
model: gpsModel
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
currentIndex: -1
|
maximumFlickVelocity: parent.height * 5
|
||||||
delegate: gpsDelegate
|
cacheBuffer: Math.max(5000, parent.height * 5)
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
focus: true
|
||||||
maximumFlickVelocity: parent.height * 5
|
clip: true
|
||||||
cacheBuffer: Math.max(5000, parent.height * 5)
|
header: Kirigami.Heading {
|
||||||
focus: true
|
x: Kirigami.Units.gridUnit / 2
|
||||||
clip: true
|
height: paintedHeight + Kirigami.Units.gridUnit / 2
|
||||||
header: MobileComponents.Heading {
|
verticalAlignment: Text.AlignBottom
|
||||||
x: MobileComponents.Units.gridUnit / 2
|
text: "List of stored GPS fixes"
|
||||||
height: paintedHeight + MobileComponents.Units.gridUnit / 2
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
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,26 +27,24 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
ScrollView {
|
|
||||||
|
Flickable {
|
||||||
|
id: logFlick
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Flickable {
|
contentHeight: logContent.height
|
||||||
id: logFlick
|
clip: true
|
||||||
anchors.fill: parent
|
ColumnLayout {
|
||||||
contentHeight: logContent.height
|
width: logFlick.width
|
||||||
clip: true
|
spacing: Kirigami.Units.smallSpacing
|
||||||
ColumnLayout {
|
Kirigami.Heading {
|
||||||
width: logFlick.width
|
text: "Application Log"
|
||||||
spacing: MobileComponents.Units.smallSpacing
|
}
|
||||||
MobileComponents.Heading {
|
Kirigami.Label {
|
||||||
text: "Application Log"
|
id: logContent
|
||||||
}
|
Layout.preferredWidth: parent.width
|
||||||
MobileComponents.Label {
|
Layout.maximumWidth: parent.width
|
||||||
id: logContent
|
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||||
Layout.preferredWidth: parent.width
|
text: manager.logText
|
||||||
Layout.maximumWidth: parent.width
|
|
||||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
|
||||||
text: manager.logText
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
@ -11,23 +11,23 @@ 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
|
||||||
Layout.topMargin: 0
|
Layout.topMargin: 0
|
||||||
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
|
||||||
Layout.topMargin: 0
|
Layout.topMargin: 0
|
||||||
text: manager.startPageText
|
text: manager.startPageText
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
@ -35,7 +35,7 @@ ColumnLayout {
|
||||||
CloudCredentials {
|
CloudCredentials {
|
||||||
id: cloudCredentials
|
id: cloudCredentials
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: MobileComponents.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
Layout.topMargin: 0
|
Layout.topMargin: 0
|
||||||
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
|
||||||
|
|
|
@ -2,10 +2,11 @@ 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 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
|
||||||
|
|
||||||
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 {
|
||||||
|
@ -21,14 +22,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
|
||||||
|
@ -37,76 +38,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: Screen.devicePixelRatio
|
text: Screen.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,11 +6,15 @@ 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")
|
||||||
|
|
||||||
|
header.minimumHeight: 0
|
||||||
|
header.preferredHeight: Kirigami.Units.gridUnit
|
||||||
|
header.maximumHeight: Kirigami.Units.gridUnit * 2
|
||||||
property bool fullscreen: true
|
property bool fullscreen: true
|
||||||
property int oldStatus: -1
|
property int oldStatus: -1
|
||||||
property alias accessingCloud: manager.accessingCloud
|
property alias accessingCloud: manager.accessingCloud
|
||||||
|
@ -42,13 +46,13 @@ MobileComponents.ApplicationWindow {
|
||||||
diveList.scrollToTop()
|
diveList.scrollToTop()
|
||||||
}
|
}
|
||||||
|
|
||||||
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: {
|
||||||
manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus)
|
manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus)
|
||||||
|
@ -63,7 +67,7 @@ MobileComponents.ApplicationWindow {
|
||||||
globalDrawer.close()
|
globalDrawer.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Cloud credentials"
|
text: "Cloud credentials"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
returnTopPage()
|
returnTopPage()
|
||||||
|
@ -77,7 +81,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
|
||||||
/*
|
/*
|
||||||
|
@ -90,7 +94,7 @@ MobileComponents.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Add dive manually"
|
text: "Add dive manually"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
detailsWindow.state = "add"
|
detailsWindow.state = "add"
|
||||||
|
@ -113,7 +117,7 @@ MobileComponents.ApplicationWindow {
|
||||||
stackView.push(detailsWindow)
|
stackView.push(detailsWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "Refresh"
|
text: "Refresh"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
globalDrawer.close()
|
globalDrawer.close()
|
||||||
|
@ -131,31 +135,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();
|
||||||
|
@ -163,13 +167,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)
|
||||||
|
@ -178,29 +182,29 @@ 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 {
|
||||||
text: "User manual"
|
text: "User manual"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
manager.showUserManual()
|
manager.showUserManual()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Kirigami.Action {
|
||||||
text: "About"
|
text: "About"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(aboutWindow)
|
stackView.push(aboutWindow)
|
||||||
|
@ -211,7 +215,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
|
||||||
|
@ -224,8 +228,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
|
||||||
|
@ -240,7 +244,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"
|
||||||
|
@ -253,17 +257,19 @@ 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 color diveListTextColor: Qt.rgba(0,0,0,0.76) // the Kirigami theme text color is too light
|
property color diveListTextColor: "#000000" // the Kirigami theme text color is too light
|
||||||
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 {
|
toolBar: TopBar {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Layout.minimumHeight
|
height: Layout.minimumHeight
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
property Item stackView: pageStack
|
property Item stackView: pageStack
|
||||||
initialPage: DiveList {
|
pageStack.initialPage: DiveList {
|
||||||
|
anchors.fill: detailsPage
|
||||||
id: diveList
|
id: diveList
|
||||||
opacity: 0
|
opacity: 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
|
@ -308,6 +314,7 @@ MobileComponents.ApplicationWindow {
|
||||||
|
|
||||||
GpsList {
|
GpsList {
|
||||||
id: gpsWindow
|
id: gpsWindow
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeTest {
|
ThemeTest {
|
||||||
|
@ -316,6 +323,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
|
||||||
|
|
|
@ -24,36 +24,41 @@
|
||||||
<file alias="menu-back.png">icons/menu-back.png</file>
|
<file alias="menu-back.png">icons/menu-back.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/imports">
|
<qresource prefix="/imports">
|
||||||
<file alias="org/kde/plasma/mobilecomponents/qmldir">mobilecomponents/qmldir</file>
|
<file alias="org/kde/kirigami/qmldir">kirigami/qmldir</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/ActionGroup.qml">mobilecomponents/ActionGroup.qml</file>
|
<file alias="org/kde/kirigami/Action.qml">kirigami/Action.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/ApplicationWindow.qml">mobilecomponents/ApplicationWindow.qml</file>
|
<file alias="org/kde/kirigami/ApplicationWindow.qml">kirigami/ApplicationWindow.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/BasicListItem.qml">mobilecomponents/BasicListItem.qml</file>
|
<file alias="org/kde/kirigami/BasicListItem.qml">kirigami/BasicListItem.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/GlobalDrawer.qml">mobilecomponents/GlobalDrawer.qml</file>
|
<file alias="org/kde/kirigami/GlobalDrawer.qml">kirigami/GlobalDrawer.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/ContextDrawer.qml">mobilecomponents/ContextDrawer.qml</file>
|
<file alias="org/kde/kirigami/ContextDrawer.qml">kirigami/ContextDrawer.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Page.qml">mobilecomponents/Page.qml</file>
|
<file alias="org/kde/kirigami/Page.qml">kirigami/Page.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Icon.qml">mobilecomponents/Icon.qml</file>
|
<file alias="org/kde/kirigami/ScrollablePage.qml">kirigami/ScrollablePage.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Heading.qml">mobilecomponents/Heading.qml</file>
|
<file alias="org/kde/kirigami/Icon.qml">kirigami/Icon.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/PageRow.qml">mobilecomponents/PageRow.qml</file>
|
<file alias="org/kde/kirigami/Heading.qml">kirigami/Heading.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Label.qml">mobilecomponents/Label.qml</file>
|
<file alias="org/kde/kirigami/OverlaySheet.qml">kirigami/OverlaySheet.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/ListItem.qml">mobilecomponents/ListItem.qml</file>
|
<file alias="org/kde/kirigami/ApplicationHeader.qml">kirigami/ApplicationHeader.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/ListItemWithActions.qml">mobilecomponents/ListItemWithActions.qml</file>
|
<file alias="org/kde/kirigami/private/PageRow.qml">kirigami/private/PageRow.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/OverlayDrawer.qml">mobilecomponents/OverlayDrawer.qml</file>
|
<file alias="org/kde/kirigami/Label.qml">kirigami/Label.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Theme.qml">mobilecomponents/Theme.qml</file>
|
<file alias="org/kde/kirigami/AbstractListItem.qml">kirigami/AbstractListItem.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/Units.qml">mobilecomponents/Units.qml</file>
|
<file alias="org/kde/kirigami/SwipeListItem.qml">kirigami/SwipeListItem.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/private/ActionButton.qml">mobilecomponents/private/ActionButton.qml</file>
|
<file alias="org/kde/kirigami/OverlayDrawer.qml">kirigami/OverlayDrawer.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/private/ActionButtonArrow.qml">mobilecomponents/private/ActionButtonArrow.qml</file>
|
<file alias="org/kde/kirigami/Theme.qml">kirigami/Theme.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/private/AbstractDrawer.qml">mobilecomponents/private/AbstractDrawer.qml</file>
|
<file alias="org/kde/kirigami/Units.qml">kirigami/Units.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/private/PageStack.js">mobilecomponents/private/PageStack.js</file>
|
<file alias="org/kde/kirigami/private/RefreshableScrollView.qml">kirigami/private/RefreshableScrollView.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/private/PassiveNotification.qml">mobilecomponents/private/PassiveNotification.qml</file>
|
<file alias="org/kde/kirigami/private/ActionButton.qml">kirigami/private/ActionButton.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/go-next.svg">mobilecomponents/icons/go-next.svg</file>
|
<file alias="org/kde/kirigami/private/MenuIcon.qml">kirigami/private/MenuIcon.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/go-previous.svg">mobilecomponents/icons/go-previous.svg</file>
|
<file alias="org/kde/kirigami/private/ContextIcon.qml">kirigami/private/ContextIcon.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/distribute-horizontal-x.svg">mobilecomponents/icons/distribute-horizontal-x.svg</file>
|
<file alias="org/kde/kirigami/private/AbstractDrawer.qml">kirigami/private/AbstractDrawer.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/document-edit.svg">mobilecomponents/icons/document-edit.svg</file>
|
<file alias="org/kde/kirigami/private/PageStack.js">kirigami/private/PageStack.js</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/document-save.svg">mobilecomponents/icons/document-save.svg</file>
|
<file alias="org/kde/kirigami/private/PassiveNotification.qml">kirigami/private/PassiveNotification.qml</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/view-readermode.svg">mobilecomponents/icons/view-readermode.svg</file>
|
<file alias="org/kde/kirigami/icons/go-next.svg">kirigami/icons/go-next.svg</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/dialog-cancel.svg">mobilecomponents/icons/dialog-cancel.svg</file>
|
<file alias="org/kde/kirigami/icons/go-previous.svg">kirigami/icons/go-previous.svg</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/application-menu.svg">mobilecomponents/icons/application-menu.svg</file>
|
<file alias="org/kde/kirigami/icons/distribute-horizontal-x.svg">kirigami/icons/distribute-horizontal-x.svg</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/gps.svg">mobilecomponents/icons/gps.svg</file>
|
<file alias="org/kde/kirigami/icons/document-edit.svg">kirigami/icons/document-edit.svg</file>
|
||||||
<file alias="org/kde/plasma/mobilecomponents/icons/trash-empty.svg">mobilecomponents/icons/trash-empty.svg</file>
|
<file alias="org/kde/kirigami/icons/document-save.svg">kirigami/icons/document-save.svg</file>
|
||||||
|
<file alias="org/kde/kirigami/icons/view-readermode.svg">kirigami/icons/view-readermode.svg</file>
|
||||||
|
<file alias="org/kde/kirigami/icons/dialog-cancel.svg">kirigami/icons/dialog-cancel.svg</file>
|
||||||
|
<file alias="org/kde/kirigami/icons/application-menu.svg">kirigami/icons/application-menu.svg</file>
|
||||||
|
<file alias="org/kde/kirigami/icons/gps.svg">kirigami/icons/gps.svg</file>
|
||||||
|
<file alias="org/kde/kirigami/icons/trash-empty.svg">kirigami/icons/trash-empty.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -14,35 +14,46 @@ if [ ! -d "$SRC/subsurface" ] || [ ! -d "qt-mobile" ] || [ ! -d "subsurface-core
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# now bring in the latest Plasma-mobile mobile components plus a couple of icons that we need
|
if [ "$1" = "-nopull" ] ; then
|
||||||
|
NOPULL=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# now bring in the latest Kirigami mobile components plus a couple of icons that we need
|
||||||
# first, get the latest from upstream
|
# first, get the latest from upstream
|
||||||
# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
|
# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
|
||||||
# we stop having to manually merge our code with upstream all the time
|
# we stop having to manually merge our code with upstream all the time
|
||||||
# as we get closer to shipping a production version we'll likely check out specific tags
|
# as we get closer to shipping a production version we'll likely check out specific tags
|
||||||
# or SHAs from upstream
|
# or SHAs from upstream
|
||||||
cd $SRC
|
cd $SRC
|
||||||
if [ ! -d plasma-mobile ] ; then
|
if [ ! -d kirigami ] ; then
|
||||||
git clone git://github.com/KDE/plasma-mobile
|
git clone git://github.com/KDE/kirigami
|
||||||
|
fi
|
||||||
|
if [ "$NOPULL" = "" ] ; then
|
||||||
|
pushd kirigami
|
||||||
|
git pull
|
||||||
|
popd
|
||||||
fi
|
fi
|
||||||
pushd plasma-mobile
|
|
||||||
git pull
|
|
||||||
popd
|
|
||||||
if [ ! -d breeze-icons ] ; then
|
if [ ! -d breeze-icons ] ; then
|
||||||
git clone git://anongit.kde.org/breeze-icons
|
git clone git://anongit.kde.org/breeze-icons
|
||||||
fi
|
fi
|
||||||
pushd breeze-icons
|
if [ "$NOPULL" = "" ] ; then
|
||||||
git pull
|
pushd breeze-icons
|
||||||
popd
|
git pull
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
# now copy the components and a couple of icons into plae
|
# now copy the components and a couple of icons into plae
|
||||||
MC=$SRC/subsurface/qt-mobile/qml/mobilecomponents
|
MC=$SRC/subsurface/qt-mobile/qml/kirigami
|
||||||
PMMC=plasma-mobile/components/mobilecomponents
|
PMMC=kirigami/src/qml
|
||||||
BREEZE=breeze-icons
|
BREEZE=breeze-icons
|
||||||
|
|
||||||
rm -rf $MC
|
rm -rf $MC
|
||||||
mkdir -p $MC/icons
|
mkdir -p $MC/icons
|
||||||
cp -R $PMMC/qml/* $MC/
|
cp -R $PMMC/* $MC/
|
||||||
cp $PMMC/fallbacktheme/*qml $MC/
|
cp $PMMC/../fallbacktheme/*qml $MC/
|
||||||
|
|
||||||
|
# fix plugin requirement
|
||||||
|
sed -i -e 's/^plugin kirigamiplugin/# plugin kirigamiplugin/' $MC/qmldir
|
||||||
|
|
||||||
cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
|
cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
|
||||||
cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
|
cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
|
||||||
|
@ -55,4 +66,4 @@ cp $BREEZE/icons/actions/24/application-menu.svg $MC/icons
|
||||||
cp $BREEZE/icons/actions/22/gps.svg $MC/icons
|
cp $BREEZE/icons/actions/22/gps.svg $MC/icons
|
||||||
cp $BREEZE/icons/actions/24/trash-empty.svg $MC/icons
|
cp $BREEZE/icons/actions/24/trash-empty.svg $MC/icons
|
||||||
|
|
||||||
echo org.kde.plasma.mobilecomponents synced from upstream
|
echo org.kde.plasma.kirigami synced from upstream
|
||||||
|
|
Loading…
Add table
Reference in a new issue