mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: add elements to allow editing the GPS coordinates
This isn't hooked up, yet, but provides the UI Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
00ac1c12db
commit
c111c4bb02
3 changed files with 17 additions and 5 deletions
|
@ -20,12 +20,14 @@ Kirigami.Page {
|
||||||
property alias depth: detailsEdit.depthText
|
property alias depth: detailsEdit.depthText
|
||||||
property alias duration: detailsEdit.durationText
|
property alias duration: detailsEdit.durationText
|
||||||
property alias location: detailsEdit.locationText
|
property alias location: detailsEdit.locationText
|
||||||
|
property alias gps: detailsEdit.gpsText
|
||||||
property alias notes: detailsEdit.notesText
|
property alias notes: detailsEdit.notesText
|
||||||
property alias suit: detailsEdit.suitText
|
property alias suit: detailsEdit.suitText
|
||||||
property alias weight: detailsEdit.weightText
|
property alias weight: detailsEdit.weightText
|
||||||
property alias startpressure: detailsEdit.startpressureText
|
property alias startpressure: detailsEdit.startpressureText
|
||||||
property alias endpressure: detailsEdit.endpressureText
|
property alias endpressure: detailsEdit.endpressureText
|
||||||
property alias gasmix: detailsEdit.gasmixText
|
property alias gasmix: detailsEdit.gasmixText
|
||||||
|
property alias gpsCheckbox: detailsEdit.gpsCheckbox
|
||||||
property int updateCurrentIdx: manager.updateSelectedDive
|
property int updateCurrentIdx: manager.updateSelectedDive
|
||||||
|
|
||||||
property bool contentItem: true // HACK to work around Kirigami issue - remove once that's addressed upstream
|
property bool contentItem: true // HACK to work around Kirigami issue - remove once that's addressed upstream
|
||||||
|
@ -144,6 +146,8 @@ Kirigami.Page {
|
||||||
number = diveDetailsListView.currentItem.modelData.dive.number
|
number = diveDetailsListView.currentItem.modelData.dive.number
|
||||||
date = diveDetailsListView.currentItem.modelData.dive.date + " " + diveDetailsListView.currentItem.modelData.dive.time
|
date = diveDetailsListView.currentItem.modelData.dive.date + " " + diveDetailsListView.currentItem.modelData.dive.time
|
||||||
location = diveDetailsListView.currentItem.modelData.dive.location
|
location = diveDetailsListView.currentItem.modelData.dive.location
|
||||||
|
gps = diveDetailsListView.currentItem.modelData.dive.gps
|
||||||
|
gpsCheckbox = false
|
||||||
duration = diveDetailsListView.currentItem.modelData.dive.duration
|
duration = diveDetailsListView.currentItem.modelData.dive.duration
|
||||||
depth = diveDetailsListView.currentItem.modelData.dive.depth
|
depth = diveDetailsListView.currentItem.modelData.dive.depth
|
||||||
airtemp = diveDetailsListView.currentItem.modelData.dive.airTemp
|
airtemp = diveDetailsListView.currentItem.modelData.dive.airTemp
|
||||||
|
|
|
@ -12,7 +12,7 @@ Item {
|
||||||
property int number
|
property int number
|
||||||
property alias dateText: txtDate.text
|
property alias dateText: txtDate.text
|
||||||
property alias locationText: txtLocation.text
|
property alias locationText: txtLocation.text
|
||||||
property string gpsText
|
property alias gpsText: txtGps.text
|
||||||
property alias airtempText: txtAirTemp.text
|
property alias airtempText: txtAirTemp.text
|
||||||
property alias watertempText: txtWaterTemp.text
|
property alias watertempText: txtWaterTemp.text
|
||||||
property alias suitText: txtSuit.text
|
property alias suitText: txtSuit.text
|
||||||
|
@ -25,6 +25,7 @@ Item {
|
||||||
property alias startpressureText: txtStartPressure.text
|
property alias startpressureText: txtStartPressure.text
|
||||||
property alias endpressureText: txtEndPressure.text
|
property alias endpressureText: txtEndPressure.text
|
||||||
property alias gasmixText: txtGasMix.text
|
property alias gasmixText: txtGasMix.text
|
||||||
|
property alias gpsCheckbox: checkboxGPS.checked
|
||||||
|
|
||||||
function saveData() {
|
function saveData() {
|
||||||
// apply the changes to the dive_table
|
// apply the changes to the dive_table
|
||||||
|
@ -89,10 +90,15 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
// we should add a checkbox here that allows the user
|
Kirigami.Label {
|
||||||
// to add the current location as the dive location
|
Layout.alignment: Qt.AlignRight
|
||||||
// (think of someone adding a dive while on the boat or
|
text: "Coordinates:"
|
||||||
// at the dive site)
|
}
|
||||||
|
StyledTextField {
|
||||||
|
id: txtGps
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
text: "Use current\nGPS location:"
|
text: "Use current\nGPS location:"
|
||||||
|
|
|
@ -69,12 +69,14 @@ Kirigami.ApplicationWindow {
|
||||||
detailsWindow.divemaster = ""
|
detailsWindow.divemaster = ""
|
||||||
detailsWindow.notes = ""
|
detailsWindow.notes = ""
|
||||||
detailsWindow.location = ""
|
detailsWindow.location = ""
|
||||||
|
detailsWindow.gps = ""
|
||||||
detailsWindow.duration = ""
|
detailsWindow.duration = ""
|
||||||
detailsWindow.suit = ""
|
detailsWindow.suit = ""
|
||||||
detailsWindow.weight = ""
|
detailsWindow.weight = ""
|
||||||
detailsWindow.gasmix = ""
|
detailsWindow.gasmix = ""
|
||||||
detailsWindow.startpressure = ""
|
detailsWindow.startpressure = ""
|
||||||
detailsWindow.endpressure = ""
|
detailsWindow.endpressure = ""
|
||||||
|
detailsWindow.gpsCheckbox = false
|
||||||
stackView.push(detailsWindow)
|
stackView.push(detailsWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue