FutureProgress Class

(Core::FutureProgress)

The FutureProgress class is used to adapt the appearance of progress indicators that were created through the ProgressManager class. More...

Header: #include <FutureProgress>
Inherits: QWidget

Public Types

enum KeepOnFinishType { HideOnFinish, KeepOnFinishTillUserInteraction, KeepOnFinish }

Public Functions

virtual bool eventFilter(QObject *object, QEvent *)
QFuture<void> future() const
bool hasError() const
bool isFading() const
bool keepOnFinish() const
void setKeepOnFinish(KeepOnFinishType keepType)
void setStatusBarWidget(QWidget *widget)
void setTitle(const QString &title)
void setType(Id type)
void setWidget(QWidget *widget)
QWidget *statusBarWidget() const
QString title() const
Id type() const
QWidget *widget() const

Reimplemented Public Functions

virtual QSize sizeHint() const
  • 216 public functions inherited from QWidget

Signals

void canceled()
void clicked()
void fadeStarted()
void finished()
void hasErrorChanged()
void removeMe()
void statusBarWidgetChanged()

Reimplemented Protected Functions

virtual void paintEvent(QPaintEvent *)
  • 35 protected functions inherited from QWidget

Additional Inherited Members

  • 59 properties inherited from QWidget
  • 19 public slots inherited from QWidget
  • 5 static public members inherited from QWidget
  • 35 protected functions inherited from QWidget
  • 1 protected slot inherited from QWidget

Detailed Description

The FutureProgress class is used to adapt the appearance of progress indicators that were created through the ProgressManager class.

Use the instance of this class that was returned by ProgressManager::addTask() to define a widget that should be shown below the progress bar, or to change the progress title. Also use it to react on the event that the user clicks on the progress indicator (which can be used to e.g. open a more detailed view, or the results of the task).

Member Type Documentation

enum FutureProgress::KeepOnFinishType

Member Function Documentation

[signal] void FutureProgress::canceled()

Connect to this signal to get informed when the operation is canceled.

[signal] void FutureProgress::clicked()

Connect to this signal to get informed when the user clicks on the progress indicator.

[virtual] bool FutureProgress::eventFilter(QObject *object, QEvent *)

[signal] void FutureProgress::fadeStarted()

[signal] void FutureProgress::finished()

Another way to get informed when the task has finished.

QFuture<void> FutureProgress::future() const

Returns a QFuture object that represents this running task.

bool FutureProgress::hasError() const

Returns the error state of this progress indicator.

[signal] void FutureProgress::hasErrorChanged()

bool FutureProgress::isFading() const

bool FutureProgress::keepOnFinish() const

See also setKeepOnFinish().

[virtual protected] void FutureProgress::paintEvent(QPaintEvent *)

[signal] void FutureProgress::removeMe()

void FutureProgress::setKeepOnFinish(KeepOnFinishType keepType)

See also keepOnFinish().

void FutureProgress::setStatusBarWidget(QWidget *widget)

See also statusBarWidget().

void FutureProgress::setTitle(const QString &title)

Changes the title of the progress indicator.

See also title().

void FutureProgress::setType(Id type)

See also type().

void FutureProgress::setWidget(QWidget *widget)

Sets the widget to show below the progress bar. This will be destroyed when the progress indicator is destroyed. Default is to show no widget below the progress indicator.

See also widget().

[virtual] QSize FutureProgress::sizeHint() const

QWidget *FutureProgress::statusBarWidget() const

See also setStatusBarWidget().

[signal] void FutureProgress::statusBarWidgetChanged()

QString FutureProgress::title() const

Returns the title of the progress indicator.

See also setTitle().

Id FutureProgress::type() const

See also setType().

QWidget *FutureProgress::widget() const

Returns the custom widget that is shown below the progress indicator.

See also setWidget().