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>

Public Types

enum KeepOnFinishType { HideOnFinish, KeepOnFinishTillUserInteraction, KeepOnFinish }

Public Functions

QFuture<void> future() const
bool hasError() const
bool isFading() const
bool isSubtitleVisibleInStatusBar() const
bool keepOnFinish() const
void setKeepOnFinish(Core::FutureProgress::KeepOnFinishType keepType)
void setStatusBarWidget(QWidget *widget)
void setSubtitle(const QString &subtitle)
void setSubtitleVisibleInStatusBar(bool visible)
void setTitle(const QString &title)
void setType(Core::Id type)
void setWidget(QWidget *widget)
QWidget *statusBarWidget() const
QString subtitle() const
QString title() const
Core::Id type() const
QWidget *widget() const

Reimplemented Public Functions

virtual bool eventFilter(QObject *object, QEvent *) override
virtual QSize sizeHint() const override

Signals

Reimplemented Protected Functions

virtual void paintEvent(QPaintEvent *) override

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()

[signal] void FutureProgress::clicked()

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

[signal] void FutureProgress::fadeStarted()

[signal] void FutureProgress::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::isSubtitleVisibleInStatusBar() const

bool FutureProgress::keepOnFinish() const

See also setKeepOnFinish().

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

[signal] void FutureProgress::removeMe()

void FutureProgress::setKeepOnFinish(Core::FutureProgress::KeepOnFinishType keepType)

See also keepOnFinish().

void FutureProgress::setStatusBarWidget(QWidget *widget)

See also statusBarWidget().

void FutureProgress::setSubtitle(const QString &subtitle)

See also subtitle().

void FutureProgress::setSubtitleVisibleInStatusBar(bool visible)

See also isSubtitleVisibleInStatusBar().

void FutureProgress::setTitle(const QString &title)

Changes the title of the progress indicator.

See also title().

void FutureProgress::setType(Core::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().

[override virtual] QSize FutureProgress::sizeHint() const

QWidget *FutureProgress::statusBarWidget() const

See also setStatusBarWidget().

[signal] void FutureProgress::statusBarWidgetChanged()

QString FutureProgress::subtitle() const

See also setSubtitle().

[signal] void FutureProgress::subtitleInStatusBarChanged()

QString FutureProgress::title() const

Returns the title of the progress indicator.

See also setTitle().

Core::Id FutureProgress::type() const

See also setType().

QWidget *FutureProgress::widget() const

See also setWidget().