X-Git-Url: http://git.maemo.org/git/?p=gpssportsniffer;a=blobdiff_plain;f=loadtracksWindow.cpp;h=3584500c49f3ccfcdabd9ffc1b348b23536d77d1;hp=7db2e25782a2d5ca14a7ef2661023ea738723a53;hb=d83d54cbe39ffa872c360c017fccfafc3520e392;hpb=562d093bd082a53636e18d4f07d842310984ceb4 diff --git a/loadtracksWindow.cpp b/loadtracksWindow.cpp index 7db2e25..3584500 100755 --- a/loadtracksWindow.cpp +++ b/loadtracksWindow.cpp @@ -1,3 +1,22 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Tito Eritja Real +** +** 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 . +** +****************************************************************************/ + #include "loadTracksWindow.h" #include "ui_loadtracksWindow.h" @@ -71,10 +90,16 @@ void LoadTracksWindow::browse(){ 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 *){ @@ -91,6 +116,7 @@ void LoadTracksWindow::accept(){ 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!"))); @@ -98,6 +124,8 @@ void LoadTracksWindow::accept(){ 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()); @@ -109,6 +137,7 @@ void LoadTracksWindow::accept(){ windowMap->desactivatePossitionPaint(); } } + windowMap->setIsCacheEnabled(ui->mapCacheOn->isChecked()); windowMap->updateSummary(); windowMap->drawFullTrackMaps(toSniff); settings->setIsConfigured(true);