Location service: toggle the service from the main menu

That way we don't track the user's location until explicitly asked to do
so.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-11 12:34:56 -08:00
parent a29e74e2e9
commit cd7d6ae6e5
5 changed files with 46 additions and 0 deletions

View file

@ -19,6 +19,7 @@ QMLManager::QMLManager()
{
// create location manager service
locationProvider = new GpsLocation(this);
setLocationServiceEnabled(false);
// Initialize cloud credentials.
setCloudUserName(prefs.cloud_storage_email);
@ -174,6 +175,16 @@ void QMLManager::setSaveCloudPassword(bool saveCloudPassword)
m_saveCloudPassword = saveCloudPassword;
}
bool QMLManager::locationServiceEnabled() const
{
return m_locationServiceEnabled;
}
void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled)
{
m_locationServiceEnabled = locationServiceEnabled;
locationProvider->serviceEnable(m_locationServiceEnabled);
}
QString QMLManager::cloudPassword() const
{