+/****************************************************************************
+**
+** Copyright (C) 2011 Tito Eritja Real <jtitoo@gmail.com>
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
#include "settingsWindow.h"
#include "windowMap.h"
#include "ui_settingsWindow.h"
log->debug(QString("---- ONLINE:%1").arg(ui->onlineButton->isChecked()));
activitySettings->setIsOnline(ui->onlineButton->isChecked());
+ activitySettings->setIsCache(ui->tileCacheOn->isChecked());
+ activityMap->setIsCacheEnabled(ui->tileCacheOn->isChecked());
+
activitySettings->setXmlFile(ui->fileCombo->currentText());
activitySettings->setMapType((MapType)ui->mapsType->currentIndex());
activityMap->setTrack(activitySettings->getXmlFile(),activitySettings->getActivity());
+
activitySettings->setIsConfigured(true);
log->debug("starting services");
activityMap->startServices();
+ activityMap->changeMapType(activitySettings->getMapType());
log->debug("done");
//activityMap->startSPositioningTimer();
activityMap->startNetworking();
}
}
+ if(activitySettings->getIsCache()!=ui->tileCacheOn->isChecked()){
+ activitySettings->setIsCache(ui->tileCacheOn->isChecked());
+ activityMap->setIsCacheEnabled(activitySettings->getIsCache());
+ }
if(activitySettings->getMapType()!=(MapType)ui->mapsType->currentIndex()){
activitySettings->setMapType((MapType)ui->mapsType->currentIndex());