mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: add feature to add current position when editing dive
This isn't quite perfect yet. If it takes too long to get the GPS fix (i.e., if you save it before you get the fix), this will simply fail and not store a position. But in normal conditions (you check the box, you edit the data, you save), especially when outside on a dive boat, this should work fine. For the other cases we need to implement some kind of callback to still collect the data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14a09689a4
commit
fa338a26b8
3 changed files with 37 additions and 6 deletions
|
@ -49,6 +49,17 @@ Item {
|
|||
// to add the current location as the dive location
|
||||
// (think of someone adding a dive while on the boat or
|
||||
// at the dive site)
|
||||
MobileComponents.Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: "Use current\nGPS location:"
|
||||
}
|
||||
CheckBox {
|
||||
id: checkboxGPS
|
||||
onCheckedChanged: {
|
||||
if (checked)
|
||||
gpsText = manager.getCurrentPosition()
|
||||
}
|
||||
}
|
||||
|
||||
MobileComponents.Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue