30 #include <QProgressBar> 33 #include <QPushButton> 34 #include <QtGui/QCloseEvent> 36 #include <QtCore/QTimer> 37 #include <QtCore/QTime> 44 QDialog(parent, flags),
45 _delayedClosingTime(1),
48 _text =
new QLabel(
this);
49 _text->setWordWrap(
true);
65 connect(
_closeButton, SIGNAL(clicked()),
this, SLOT(close()));
68 QVBoxLayout * layout =
new QVBoxLayout(
this);
69 layout->addWidget(
_text);
72 QHBoxLayout * hLayout =
new QHBoxLayout();
73 layout->addLayout(hLayout);
75 hLayout->addStretch();
78 this->setLayout(layout);
90 if(delayedClosingTimeSec >= 0)
104 UDEBUG(text.toStdString().c_str());
105 _text->setText(text);
106 QString html = tr(
"<html><font color=\"#999999\">%1 </font><font color=\"%2\">%3</font></html>").arg(QTime::currentTime().toString(
"HH:mm:ss")).arg(color.name()).arg(text);
void setAutoClose(bool on, int delayedClosingTimeMsec=-1)
void incrementStep(int steps=1)
QPushButton * _cancelButton
void setCancelButtonVisible(bool visible)
ProgressDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
QTextEdit * _detailedText
QProgressBar * _progressBar
virtual ~ProgressDialog()
QCheckBox * _closeWhenDoneCheckBox
void setMaximumSteps(int steps)
virtual void closeEvent(QCloseEvent *event)
ULogger class and convenient macros.
void appendText(const QString &text, const QColor &color=Qt::black)
QPushButton * _closeButton