QElectroTech  0.70
dialogwaiting.cpp
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "dialogwaiting.h"
20 #include "ui_dialogwaiting.h"
21 #include <QPushButton>
22 
23 
29 DialogWaiting::DialogWaiting(QWidget *parent) :
30  QDialog(parent),
31  ui(new Ui::DialogWaiting)
32 {
33  ui->setupUi(this);
34  setTitle( "..." );
35  setDetail( "..." );
36 }
37 
42  delete ui;
43 }
44 
50  ui->progressBar->setValue(val);
51  qApp->processEvents();
52 }
53 
58  ui->progressBar->reset();
59 }
60 
66 void DialogWaiting::setProgressBarRange(int min, int max){
67  ui->progressBar->setRange(min,max);
68  ui->progressBar->setFormat(QObject::tr("%p% effectuĂ© (%v sur %m)"));
69 }
70 
75 void DialogWaiting::setTitle(const QString& val){
76  ui->labelTitle->setText(val);
77 }
78 
83 void DialogWaiting::setDetail(const QString& val){
84  ui->label_detail->setText(val);
85 }
86 
92 {
93  return ui->progressBar->value();
94 }
95 
void setProgressBar(int val)
DialogWaiting::setProgressBar.
void setTitle(const QString &val)
DialogWaiting::setTitle of action.
static DialogWaiting * m_static_dialog
Definition: dialogwaiting.h:66
void setDetail(const QString &val)
DialogWaiting::setDetail of action.
~DialogWaiting() override
DialogWaiting::~DialogWaiting.
Ui::DialogWaiting * ui
Definition: dialogwaiting.h:81
void setProgressBarRange(int min, int max)
DialogWaiting::setProgressBarRange.
QIcon tr
Definition: qeticons.cpp:204
int progressBarValue() const
DialogWaiting::progressBarValue.
void setProgressReset()
DialogWaiting::setProgressReset, clear progressBar and reset.
DialogWaiting(QWidget *parent=nullptr)
DialogWaiting::DialogWaiting.