a dialog with a JKQTEProgressListWidget and a cancel button (optional)
More...
#include <jkqteprogresslistwidget.h>
a dialog with a JKQTEProgressListWidget and a cancel button (optional)
Usage example:
dialog.setWindowTitle(tr("Window Title of JKQTEProgressListDialog"));
timJKQTEProgressListDialog=
new QTimer(
progress);
stateJKQTEProgressListDialog=0;
timJKQTEProgressListDialog->setInterval(500);
connect(timJKQTEProgressListDialog, &QTimer::timeout, std::bind([&dialog](int& state){
if (state==1) {
for (
int i=0; i<dialog.
count(); i++) {
}
} else if (state>10) {
state=0;
} else {
}
state++;
}, std::ref(stateJKQTEProgressListDialog)));
timJKQTEProgressListDialog->start();
dialog.exec();
- See also
- JKQTEProgressListWidget
◆ JKQTEProgressListDialog() [1/2]
JKQTEProgressListDialog::JKQTEProgressListDialog |
( |
QWidget * |
parent = nullptr , |
|
|
Qt::WindowFlags |
f = nullptr |
|
) |
| |
◆ JKQTEProgressListDialog() [2/2]
JKQTEProgressListDialog::JKQTEProgressListDialog |
( |
const QString & |
labelText, |
|
|
const QString & |
cancelButtonText, |
|
|
int |
minimum, |
|
|
int |
maximum, |
|
|
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
f = 0 |
|
) |
| |
◆ addItem()
◆ cancel
void JKQTEProgressListDialog::cancel |
( |
| ) |
|
|
slot |
◆ canceled
void JKQTEProgressListDialog::canceled |
( |
| ) |
|
|
signal |
emitted when the dialog is canceled
◆ count()
int JKQTEProgressListDialog::count |
( |
| ) |
const |
returns the number of items in the list
◆ createWidgets()
void JKQTEProgressListDialog::createWidgets |
( |
| ) |
|
|
protected |
◆ defineIcon()
void JKQTEProgressListDialog::defineIcon |
( |
int |
status, |
|
|
QIcon |
icon |
|
) |
| |
◆ getProgressList()
◆ nextItem
searches for the first item with status statusInProgress and switches it's status to newStatusLast The next item with status statusNotStarted is switched to statusInProgress
◆ reset
void JKQTEProgressListDialog::reset |
( |
| ) |
|
|
slot |
◆ setCancelButtonText
void JKQTEProgressListDialog::setCancelButtonText |
( |
const QString & |
text | ) |
|
|
slot |
set the text on the cancel button
◆ setHasCancelButton()
void JKQTEProgressListDialog::setHasCancelButton |
( |
bool |
hasCancel, |
|
|
bool |
cancelRejects = false |
|
) |
| |
switch visibility of cancel button (hasCancel =true
) and whether pressing it causes the dialog to be rejected.
◆ setHasProgressBar()
void JKQTEProgressListDialog::setHasProgressBar |
( |
bool |
hasProg = true | ) |
|
switch additional progress indicator on or off
◆ setItemStatus
void JKQTEProgressListDialog::setItemStatus |
( |
int |
item, |
|
|
int |
status |
|
) |
| |
|
slot |
◆ setItemText
void JKQTEProgressListDialog::setItemText |
( |
int |
item, |
|
|
const QString & |
text |
|
) |
| |
|
slot |
set the text of the item -th item
◆ setLabelText
void JKQTEProgressListDialog::setLabelText |
( |
const QString & |
text | ) |
|
|
slot |
set the text on the label
◆ setMaximum
void JKQTEProgressListDialog::setMaximum |
( |
int |
max | ) |
|
|
slot |
set the range maximum of the progress indicator
◆ setMinimum
void JKQTEProgressListDialog::setMinimum |
( |
int |
min | ) |
|
|
slot |
set the range minimum of the progress indicator
◆ setProgressText
void JKQTEProgressListDialog::setProgressText |
( |
const QString & |
text | ) |
|
|
slot |
set the text on the progress indicator
◆ setRange
void JKQTEProgressListDialog::setRange |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
|
slot |
set the range of the progress indicator
◆ setValue
void JKQTEProgressListDialog::setValue |
( |
int |
value | ) |
|
|
slot |
set the value of the progress indicator
◆ showEvent()
virtual void JKQTEProgressListDialog::showEvent |
( |
QShowEvent * |
event | ) |
|
|
protectedvirtual |
◆ start
void JKQTEProgressListDialog::start |
( |
| ) |
|
|
slot |
searched for the first item with status statusNotStarted and sets it to statusInProgress
◆ wasCanceled()
bool JKQTEProgressListDialog::wasCanceled |
( |
| ) |
const |
indicates whether the dialog was canceled (via the cancel button or calling cancel() )
◆ btnCancel
QPushButton* JKQTEProgressListDialog::btnCancel |
|
protected |
◆ labProgress
QLabel* JKQTEProgressListDialog::labProgress |
|
protected |
◆ list
◆ m_cancelRejects
bool JKQTEProgressListDialog::m_cancelRejects |
|
protected |
◆ m_hasProgressBar
bool JKQTEProgressListDialog::m_hasProgressBar |
|
protected |
◆ m_wasCanceled
bool JKQTEProgressListDialog::m_wasCanceled |
|
protected |
◆ progress
QProgressBar* JKQTEProgressListDialog::progress |
|
protected |
◆ progressLine
QFrame* JKQTEProgressListDialog::progressLine |
|
protected |
The documentation for this class was generated from the following file: