aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsEdit.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-08-15 19:55:17 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-08-18 19:09:59 -0700
commit9b669d91e0cf4e7f09e399704a2052705e165be0 (patch)
treef1185acc3e78c9c464d5b5b475b1f61db1ee9e51 /mobile-widgets/qml/DiveDetailsEdit.qml
parent454207cd80f1159e9596c236893eba786ff3b918 (diff)
downloadsubsurface-9b669d91e0cf4e7f09e399704a2052705e165be0.tar.gz
mobile: add ability to edit tags
We already showed the tags, but we didn't allow the user to edit them. This tries hard not to create inconsistent or illogical tags by trimming white space and being careful with how the tags are added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml17
1 files changed, 15 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index 6f5690bae..5c9b99b02 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -22,6 +22,7 @@ Item {
property alias buddyText: buddyBox.editText
property alias divemasterIndex: divemasterBox.currentIndex
property alias divemasterText: divemasterBox.editText
+ property alias tagText: txtTag.text
property alias cylinderIndex0: cylinderBox0.currentIndex
property alias cylinderIndex1: cylinderBox1.currentIndex
property alias cylinderIndex2: cylinderBox2.currentIndex
@@ -118,7 +119,7 @@ Item {
// apply the changes to the dive_table
manager.commitChanges(dive_id, detailsEdit.number, detailsEdit.dateText, locationBox.editText, detailsEdit.gpsText, detailsEdit.durationText,
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText,
- suitBox.editText, buddyBox.editText, divemasterBox.editText,
+ suitBox.editText, buddyBox.editText, divemasterBox.editText, detailsEdit.tagText,
detailsEdit.weightText, detailsEdit.notesText, startpressure,
endpressure, usedGas, usedCyl,
detailsEdit.rating,
@@ -331,7 +332,19 @@ Item {
manager.divemasterList : null
}
}
-
+ RowLayout {
+ width: Kirigami.Units.gridUnit * 20
+ TemplateLabelSmall {
+ Layout.preferredWidth: Kirigami.Units.gridUnit * 4
+ horizontalAlignment: Text.AlignRight
+ text: qsTr("Tags:")
+ }
+ SsrfTextField {
+ Layout.preferredWidth: Kirigami.Units.gridUnit * 16
+ id: txtTag
+ flickable: detailsEditFlickable
+ }
+ }
RowLayout {
width: Kirigami.Units.gridUnit * 16