+/****************************************************************************
+**
+** 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());
log->debug("going to add activity:" + activitySettings->getActivity());
activityMap->setTrack(activitySettings->getXmlFile(),activitySettings->getActivity());
+ activityMap->setWindowTitle(nameFromFile(activitySettings->getXmlFile()));
+
activitySettings->setIsConfigured(true);
log->debug("starting services");
activityMap->startServices();
+ activityMap->changeMapType(activitySettings->getMapType());
+
+
log->debug("done");
//activityMap->startSPositioningTimer();
Track* toDo = readFromXML(activitySettings->getXmlFile());
//Track* toDo = readFromXML("/home/user/MyDocs/FitxersGPXiTCX/PobletLaPena.tcx");
log->debug("XML readed without problem");
+
+
activityMap->setTrackToSimulate(toDo->getGpsPoints());
activityMap->changeUpdateInterval(activitySettings->getGpsInterval());
activityMap->startAutosaveTimer(60000*TIME_MIN_TIMEAUTOSAVE);
}
+ activityMap->setWindowTitle("Activity -> " + (activitySettings->getXmlFile()));
log->debug("accept done");
}else{
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());