JKQtExtras
a library of useful Qt widgets and tools
|
18 #ifndef JKQTEPROGRESSLISTWIDGET_H
19 #define JKQTEPROGRESSLISTWIDGET_H
22 #include <QStringList>
26 #include "jkqtextras_imexport.h"
28 #include <QGridLayout>
29 #include <QPushButton>
31 #include <QProgressBar>
81 void addItem(
const QString& text,
int status=statusNotStarted);
141 JKQTEProgressListDialog(
const QString & labelText,
const QString & cancelButtonText,
int minimum,
int maximum, QWidget * parent = 0, Qt::WindowFlags f = 0);
202 #endif // JKQTEPROGRESSLISTWIDGET_H
JKQTEProgressListDialog(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
bool m_wasCanceled
Definition: jkqteprogresslistwidget.h:190
void addItem(const QString &text, int status=JKQTEProgressListWidget::statusNotStarted)
add an item to the list
void canceled()
emitted when the dialog is canceled
void setItemText(int item, const QString &text)
set the text of the item -th item
bool wasCanceled() const
indicates whether the dialog was canceled (via the cancel button or calling cancel() )
void setValue(int value)
set the value of the progress indicator
JKQTEProgressListWidget * getProgressList() const
void setMinimum(int min)
set the range minimum of the progress indicator
void defineIcon(int status, QIcon icon)
define an icon to be used for a given status.
void setLabelText(const QString &text)
set the text on the label
void setRange(int min, int max)
set the range of the progress indicator
JKQTEProgressListDialog(const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, QWidget *parent=0, Qt::WindowFlags f=0)
JKQTEProgressListWidget * list
Definition: jkqteprogresslistwidget.h:188
void cancel()
cancel the dialog
void setCancelButtonText(const QString &text)
set the text on the cancel button
void setProgressText(const QString &text)
set the text on the progress indicator
void setHasCancelButton(bool hasCancel, bool cancelRejects=false)
switch visibility of cancel button (hasCancel =true ) and whether pressing it causes the dialog to be...
void setMaximum(int max)
set the range maximum of the progress indicator
virtual void showEvent(QShowEvent *event)
QLabel * labProgress
Definition: jkqteprogresslistwidget.h:193
void start()
searched for the first item with status statusNotStarted and sets it to statusInProgress
int count() const
returns the number of items in the list
QFrame * progressLine
Definition: jkqteprogresslistwidget.h:195
QProgressBar * progress
Definition: jkqteprogresslistwidget.h:194
void nextItem(int newStatusLast=JKQTEProgressListWidget::statusDone)
searches for the first item with status statusInProgress and switches it's status to newStatusLast Th...
void setHasProgressBar(bool hasProg=true)
switch additional progress indicator on or off
void setItemStatus(int item, int status)
set the status of the item -th item (allowed values: JKQTEProgressListWidget::statusNone,...
QPushButton * btnCancel
Definition: jkqteprogresslistwidget.h:189
bool m_hasProgressBar
Definition: jkqteprogresslistwidget.h:192
void reset()
reset the list, i.e. set all items to JKQTEProgressListWidget::statusNotStarted
bool m_cancelRejects
Definition: jkqteprogresslistwidget.h:191
a dialog with a JKQTEProgressListWidget and a cancel button (optional)
Definition: jkqteprogresslistwidget.h:137