mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: enable edit of cylinder pressures
First cylinder only, show warning if there are more than one cylinder defined. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f3b35d175a
commit
8c9883cfcf
5 changed files with 53 additions and 3 deletions
|
|
@ -22,6 +22,8 @@ Item {
|
|||
property alias durationText: txtDuration.text
|
||||
property alias depthText: txtDepth.text
|
||||
property alias weightText: txtWeight.text
|
||||
property alias startpressureText: txtStartPressure.text
|
||||
property alias endpressureText: txtEndPressure.text
|
||||
|
||||
height: editArea.height
|
||||
ColumnLayout {
|
||||
|
|
@ -143,6 +145,27 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MobileComponents.Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: "Start Pressure:"
|
||||
}
|
||||
TextField {
|
||||
id: txtStartPressure
|
||||
readOnly: (text == "cannot edit multiple cylinders" ? true : false)
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MobileComponents.Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: "End Pressure:"
|
||||
}
|
||||
TextField {
|
||||
id: txtEndPressure
|
||||
readOnly: (text == "cannot edit multiple cylinders" ? true : false)
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
|
||||
MobileComponents.Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
|
|
@ -168,7 +191,8 @@ Item {
|
|||
// apply the changes to the dive_table
|
||||
manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText,
|
||||
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.suitText,
|
||||
detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.weightText, detailsEdit.notesText)
|
||||
detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.weightText, detailsEdit.notesText,
|
||||
detailsEdit.startpressureText, detailsEdit.endpressureText)
|
||||
// apply the changes to the dive detail view - since the edit could have changed the order
|
||||
// first make sure that we are looking at the correct dive - our model allows us to look
|
||||
// up the index based on the unique dive_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue