+/****************************************************************************
+**
+** 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 "loadTracksWindow.h"
#include "ui_loadtracksWindow.h"
void LoadTracksWindow::closeEvent(QCloseEvent *event){
+ /*
//event->ignore();
log->debug("CLOSE EVENT OF LOADTRACKS!!!!!!!!!!!!!!!!!!!");
QMessageBox::warning(this, tr("GPSSniffer"),QString(tr("No file selected!")));
this->hide();
+ */
+
+ this->parentWidget()->hide();
+ this->parentWidget()->parentWidget()->show();
+ this->hide();
}
void LoadTracksWindow::showEvent(QShowEvent *){
QString fileName = ui->fileCombo->currentText();
//QString fileName=QString("/home/user/MyDocs/FitxersGPXiTCX/VallDelRiuLac.tcx");
+ //QString fileName=QString("/home/user/MyDocs/GPSSniffer/12-07-2011_09-09-16_Cycling.tcx");
if(!fileName.endsWith(".gpx",Qt::CaseInsensitive) && !fileName.endsWith(".tcx",Qt::CaseInsensitive) ){
QMessageBox::warning(this, tr("GPSSniffer"),QString(tr("No file selected!")));
Track* toSniff = readFromXML(fileName);
log->debug("XML readed without problem");
windowMap->setTrackToSniff(toSniff);
+ settings->setIsCache(ui->mapCacheOn->isChecked());
+
if(windowMap->getMode()==Mode_LoadTracksWindow){
settings->setMapType((MapType)ui->mapsType->currentIndex());
windowMap->desactivatePossitionPaint();
}
}
+ windowMap->setIsCacheEnabled(ui->mapCacheOn->isChecked());
windowMap->updateSummary();
windowMap->drawFullTrackMaps(toSniff);
settings->setIsConfigured(true);