X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=downloadingStatus.cpp;fp=downloadingStatus.cpp;h=96ac3a67732d14af6fd12cf2babf3f32e9f248fb;hb=d83d54cbe39ffa872c360c017fccfafc3520e392;hp=bff11cdb1fae44e2fc13fa6a249c8208ea443b64;hpb=562d093bd082a53636e18d4f07d842310984ceb4;p=gpssportsniffer diff --git a/downloadingStatus.cpp b/downloadingStatus.cpp index bff11cd..96ac3a6 100644 --- a/downloadingStatus.cpp +++ b/downloadingStatus.cpp @@ -1,6 +1,28 @@ +/**************************************************************************** +** +** 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 "downloadingStatus.h" #include "ui_downloadingStatus.h" +#include +#include + DownloadingStatus::DownloadingStatus(QWidget *parent) : QDialog(parent), ui(new Ui::DownloadingStatus) @@ -20,3 +42,25 @@ QProgressBar* DownloadingStatus::getProgressBar(){ void DownloadingStatus::setText(QString text){ ui->label->setText(text); } + +void DownloadingStatus::closeEvent(QCloseEvent *event){ + /* + //event->ignore(); + log->debug("CLOSE EVENT OF LOADTRACKS!!!!!!!!!!!!!!!!!!!"); + QMessageBox::warning(this, tr("GPSSniffer"),QString(tr("No file selected!"))); + this->hide(); + */ + QMessageBox msgBox(this); + msgBox.setText(tr("Are you sure to cancel maps downloading?.")); + msgBox.setIcon(QMessageBox::Warning); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Cancel); + + int ret = msgBox.exec(); + if (ret == QMessageBox::Cancel) { + event->ignore(); + }else{ + + } + +}