34 lines
544 B
C++
Executable File
34 lines
544 B
C++
Executable File
#include "WaitWnd.h"
|
|
|
|
#include "ui_WaitWndUi.h"
|
|
|
|
|
|
WaitWnd::WaitWnd(QWidget* parent)
|
|
: QDialog(parent)
|
|
, m_ui(new Ui::WaitWnd)
|
|
{
|
|
m_ui->setupUi(this);
|
|
}
|
|
|
|
WaitWnd::~WaitWnd()
|
|
{
|
|
delete m_ui;
|
|
}
|
|
|
|
void WaitWnd::wait(const QString &text)
|
|
{
|
|
m_ui->progressBar->setMinimum(0);
|
|
m_ui->progressBar->setMaximum(0);
|
|
m_ui->progressBar->setValue(-1);
|
|
|
|
m_ui->label->setText(text);
|
|
show();
|
|
}
|
|
|
|
void WaitWnd::setStatus(int status)
|
|
{
|
|
m_ui->progressBar->setMinimum(0);
|
|
m_ui->progressBar->setMaximum(100);
|
|
m_ui->progressBar->setValue(status);
|
|
}
|