File indexing completed on 2024-04-28 16:26:32
0001 /* 0002 * Copyright 2015 Andreas Cord-Landwehr <cordlandwehr@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU General Public License as 0006 * published by the Free Software Foundation; either version 2 of 0007 * the License, or (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU General Public License 0015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 #include "progressdialog.h" 0019 0020 #include <QCloseEvent> 0021 0022 KileWidget::ProgressDialog::ProgressDialog(QWidget* parent) 0023 : QProgressDialog(parent) 0024 { 0025 setCancelButtonText(QString()); // empty string disables cancel button 0026 } 0027 0028 KileWidget::ProgressDialog::~ProgressDialog() 0029 { 0030 } 0031 0032 void KileWidget::ProgressDialog::closeEvent(QCloseEvent *event) 0033 { 0034 // only allow closing the dialog if progressbar is full 0035 if (value() >= maximum()) { 0036 QProgressDialog::closeEvent(event); 0037 } 0038 event->ignore(); 0039 }