summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsEdit.qml
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2017-07-28 19:28:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-08-02 18:49:47 -0700
commit6a47af2d16c522575c79828f6a3e71e59de76d78 (patch)
treea187215959b518aa7d602ea4c8ddb286dee826d0 /mobile-widgets/qml/DiveDetailsEdit.qml
parent9d7eb33a33d6e7c21806057e700f0a00a43cbba5 (diff)
downloadsubsurface-6a47af2d16c522575c79828f6a3e71e59de76d78.tar.gz
QML UI: enable modification of ratings
This enables editing of visibility and ratings for a dive. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml29
1 files changed, 28 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index 3ad2cd500..57f18dfb8 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -43,7 +43,8 @@ Item {
manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText,
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, suitBox.text, buddyBox.text,
divemasterBox.text, detailsEdit.weightText, detailsEdit.notesText, detailsEdit.startpressureText,
- detailsEdit.endpressureText, detailsEdit.gasmixText, cylinderBox.text)
+ detailsEdit.endpressureText, detailsEdit.gasmixText, cylinderBox.text, detailsEdit.rating,
+ detailsEdit.visibility)
// trigger the profile to be redrawn
QMLProfile.diveId = dive_id
@@ -63,6 +64,8 @@ Item {
diveDetailsListView.currentItem.modelData.divemaster = divemasterBox.currentText
diveDetailsListView.currentItem.modelData.cylinder = cylinderBox.currentText
diveDetailsListView.currentItem.modelData.notes = detailsEdit.notesText
+ diveDetailsListView.currentItem.modelData.rating = detailsEdit.rating
+ diveDetailsListView.currentItem.modelData.visibility = detailsEdit.visibility
diveDetailsPage.state = "view"
Qt.inputMethod.hide()
// now make sure we directly show the saved dive (this may be a new dive, or it may have moved)
@@ -245,6 +248,30 @@ Item {
}
Kirigami.Label {
+ Layout.alignment: Qt.AlignRight
+ text: qsTr("Rating:")
+ }
+ SpinBox {
+ id: ratingPicker
+ from: 0
+ to: 5
+ value: rating
+ onValueChanged: rating = value
+ }
+
+ Kirigami.Label {
+ Layout.alignment: Qt.AlignRight
+ text: qsTr("Visibility:")
+ }
+ SpinBox {
+ id: visibilityPicker
+ from: 0
+ to: 5
+ value: visibility
+ onValueChanged: visibility = value
+ }
+
+ Kirigami.Label {
Layout.columnSpan: 2
Layout.alignment: Qt.AlignLeft
text: qsTr("Notes:")