+/****************************************************************************
+**
+** 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 "downloadingStatus.h"
#include "ui_downloadingStatus.h"
+#include <QMessageBox>
+#include <QCloseEvent>
+
DownloadingStatus::DownloadingStatus(QWidget *parent) :
QDialog(parent),
ui(new Ui::DownloadingStatus)
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{
+
+ }
+
+}