mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/UI: add template for editable combo box
This makes the code easier to read and manage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
48c3e017d6
commit
d6456d490f
3 changed files with 31 additions and 40 deletions
|
@ -154,14 +154,10 @@ Item {
|
|||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Location:")
|
||||
}
|
||||
TemplateComboBox {
|
||||
TemplateEditComboBox {
|
||||
id: locationBox
|
||||
editable: true
|
||||
flat: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.locationList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
manager.locationList : null
|
||||
onAccepted: {
|
||||
focus = false
|
||||
gpsText = manager.getGpsFromSiteName(editText)
|
||||
|
@ -261,20 +257,10 @@ Item {
|
|||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
color: subsurfaceTheme.textColor
|
||||
}
|
||||
TemplateComboBox {
|
||||
TemplateEditComboBox {
|
||||
id: suitBox
|
||||
editable: true
|
||||
flat: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.suitList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
onActivated: {
|
||||
focus = false
|
||||
}
|
||||
onAccepted: {
|
||||
focus = false
|
||||
}
|
||||
manager.suitList : null
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
|
@ -283,19 +269,10 @@ Item {
|
|||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
color: subsurfaceTheme.textColor
|
||||
}
|
||||
TemplateComboBox {
|
||||
TemplateEditComboBox {
|
||||
id: buddyBox
|
||||
editable: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.buddyList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
onActivated: {
|
||||
focus = false
|
||||
}
|
||||
onAccepted: {
|
||||
focus = false
|
||||
}
|
||||
manager.buddyList : null
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
|
@ -304,19 +281,10 @@ Item {
|
|||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
color: subsurfaceTheme.textColor
|
||||
}
|
||||
TemplateComboBox {
|
||||
TemplateEditComboBox {
|
||||
id: divemasterBox
|
||||
editable: true
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
manager.divemasterList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
onActivated: {
|
||||
focus = false
|
||||
}
|
||||
onAccepted: {
|
||||
focus = false
|
||||
}
|
||||
manager.divemasterList : null
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue