QML UI: partial, slow and incomplete implementation of delete GPS fix

This only deletes the fix on the mobile device, not on the server.
And it is really really slow. Re-reading the data from the settings just isn't
a smart way to do this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-01-08 23:18:41 -08:00
parent 038cfcba91
commit b1f90b6aa0
5 changed files with 50 additions and 2 deletions

View file

@ -91,6 +91,7 @@ MobileComponents.Page {
iconName: "trash-empty"
onTriggered: {
print("delete this!")
manager.deleteGpsFix(when)
}
},
Action {

View file

@ -528,6 +528,13 @@ void QMLManager::clearGpsData()
populateGpsData();
}
void QMLManager::deleteGpsFix(quint64 when)
{
locationProvider->deleteGpsFix(when);
populateGpsData();
}
QString QMLManager::logText() const
{
QString logText = m_logText + QString("\nNumer of GPS fixes: %1").arg(locationProvider->getGpsNum());

View file

@ -85,6 +85,7 @@ public slots:
QString getNumber(QString diveId);
QString getDate(QString diveId);
QString getCurrentPosition();
void deleteGpsFix(quint64 when);
private:
QString m_cloudUserName;