mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:13:24 +00:00
QML UI: switch editing back to comboBox
The HintsTextEdit just doesn't feel natural and intuitive. Edit, fixed rebase issues. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
a2111a4198
commit
9755650b3c
1 changed files with 34 additions and 18 deletions
|
@ -11,18 +11,18 @@ Item {
|
|||
property int dive_id
|
||||
property int number
|
||||
property alias dateText: txtDate.text
|
||||
property alias locationText: txtLocation.text
|
||||
property alias locationText: txtLocation.editText
|
||||
property alias gpsText: txtGps.text
|
||||
property alias airtempText: txtAirTemp.text
|
||||
property alias watertempText: txtWaterTemp.text
|
||||
property alias suitIndex: suitBox.currentIndex
|
||||
property alias suitText: suitBox.text
|
||||
property alias suitText: suitBox.editText
|
||||
property alias buddyIndex: buddyBox.currentIndex
|
||||
property alias buddyText: buddyBox.text
|
||||
property alias buddyText: buddyBox.editText
|
||||
property alias divemasterIndex: divemasterBox.currentIndex
|
||||
property alias divemasterText: divemasterBox.text
|
||||
property alias divemasterText: divemasterBox.editText
|
||||
property alias cylinderIndex: cylinderBox.currentIndex
|
||||
property alias cylinderText: cylinderBox.text
|
||||
property alias cylinderText: cylinderBox.editText
|
||||
property alias notesText: txtNotes.text
|
||||
property alias durationText: txtDuration.text
|
||||
property alias depthText: txtDepth.text
|
||||
|
@ -63,9 +63,14 @@ Item {
|
|||
diveDetailsPage.state = "view" // run the transition
|
||||
// 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, suitBox.text, buddyBox.text,
|
||||
divemasterBox.text, detailsEdit.weightText, detailsEdit.notesText, detailsEdit.startpressureText,
|
||||
detailsEdit.endpressureText, detailsEdit.gasmixText, cylinderBox.text, detailsEdit.rating,
|
||||
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText,
|
||||
suitBox.currentText != "" ? suitBox.currentText : suitBox.editText,
|
||||
buddyBox.currentText != "" ? buddyBox.currentText : buddyBox.editText,
|
||||
divemasterBox.currentText != "" ? divemasterBox.currentText : divemasterBox.editText,
|
||||
detailsEdit.weightText, detailsEdit.notesText, detailsEdit.startpressureText,
|
||||
detailsEdit.endpressureText, detailsEdit.gasmixText,
|
||||
cylinderBox.currentText != "" ? cylinderBox.currentText : cylinderBox.editText,
|
||||
detailsEdit.rating,
|
||||
detailsEdit.visibility)
|
||||
// trigger the profile to be redrawn
|
||||
QMLProfile.diveId = dive_id
|
||||
|
@ -127,12 +132,15 @@ Item {
|
|||
text: qsTr("Location:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
HintsTextEdit {
|
||||
Controls.ComboBox {
|
||||
id: txtLocation
|
||||
model: manager.locationList
|
||||
editable: true
|
||||
flat: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.locationList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
onEditingFinished: {
|
||||
onAccepted: {
|
||||
gpsText = manager.getGpsFromSiteName(text)
|
||||
}
|
||||
}
|
||||
|
@ -223,9 +231,12 @@ Item {
|
|||
text: qsTr("Suit:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
HintsTextEdit {
|
||||
Controls.ComboBox {
|
||||
id: suitBox
|
||||
model: manager.suitList
|
||||
editable: true
|
||||
flat: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.suitList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -235,9 +246,11 @@ Item {
|
|||
text: qsTr("Buddy:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
HintsTextEdit {
|
||||
Controls.ComboBox {
|
||||
id: buddyBox
|
||||
model: manager.buddyList
|
||||
editable: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.buddyList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -247,9 +260,11 @@ Item {
|
|||
text: qsTr("Divemaster:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
HintsTextEdit {
|
||||
Controls.ComboBox {
|
||||
id: divemasterBox
|
||||
model: manager.divemasterList
|
||||
editable: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.divemasterList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -273,8 +288,9 @@ Item {
|
|||
text: qsTr("Cylinder:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
HintsTextEdit {
|
||||
Controls.ComboBox {
|
||||
id: cylinderBox
|
||||
editable: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.cylinderList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
|
|
Loading…
Add table
Reference in a new issue