mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9d7eb33a33
commit
6a47af2d16
3 changed files with 38 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
@ -244,6 +247,30 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue