mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Location service: add ability to delete all stored GPS fixes
This may need an "are you sure" confirmation dialog... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fcbc013cb4
commit
577da54454
4 changed files with 19 additions and 0 deletions
|
@ -209,3 +209,9 @@ bool GpsLocation::applyLocations()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GpsLocation::clearGpsData()
|
||||||
|
{
|
||||||
|
geoSettings->clear();
|
||||||
|
geoSettings->sync();
|
||||||
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public slots:
|
||||||
void serviceEnable(bool toggle);
|
void serviceEnable(bool toggle);
|
||||||
void newPosition(QGeoPositionInfo pos);
|
void newPosition(QGeoPositionInfo pos);
|
||||||
void updateTimeout();
|
void updateTimeout();
|
||||||
|
void clearGpsData();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GPSLOCATION_H
|
#endif // GPSLOCATION_H
|
||||||
|
|
|
@ -86,6 +86,13 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: "Clear stored GPS data"
|
||||||
|
onTriggered: {
|
||||||
|
manager.clearGpsData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "View Log"
|
text: "View Log"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
|
|
@ -158,6 +158,11 @@ void QMLManager::applyGpsData()
|
||||||
locationProvider->applyLocations();
|
locationProvider->applyLocations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMLManager::clearGpsData()
|
||||||
|
{
|
||||||
|
locationProvider->clearGpsData();
|
||||||
|
}
|
||||||
|
|
||||||
QString QMLManager::logText() const
|
QString QMLManager::logText() const
|
||||||
{
|
{
|
||||||
QString logText = m_logText + QString("\nNumer of GPS fixes: %1").arg(locationProvider->getGpsNum());
|
QString logText = m_logText + QString("\nNumer of GPS fixes: %1").arg(locationProvider->getGpsNum());
|
||||||
|
|
Loading…
Reference in a new issue