FutureProgress Class

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 <coreplugin/progressmanager/futureprogress.h>
Inherits: QWidget

Public Functions

FutureProgress(QWidget *parent = nullptr)
virtual ~FutureProgress() override
QFuture<void> future() const
bool hasError() const
void setFuture(const QFuture<void> &future)
void setTitle(const QString &title)
void setWidget(QWidget *widget)
QString title() const
QWidget *widget() const

Signals

void canceled()
void clicked()
void finished()

Reimplemented Protected Functions

virtual void mouseReleaseEvent(QMouseEvent *event) override

Detailed Description

\ingroupmainclasses \inmodule QtCreator

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 Function Documentation

[explicit] FutureProgress::FutureProgress(QWidget *parent = nullptr)

\internal

[override virtual noexcept] FutureProgress::~FutureProgress()

\internal

[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.

[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.

See also setFuture().

bool FutureProgress::hasError() const

Returns the error state of this progress indicator.

[override virtual protected] void FutureProgress::mouseReleaseEvent(QMouseEvent *event)

Reimplements: QWidget::mouseReleaseEvent(QMouseEvent *event).

\internal

void FutureProgress::setFuture(const QFuture<void> &future)

\internal

See also future().

void FutureProgress::setTitle(const QString &title)

Changes the title of the progress indicator.

See also title().

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

QString FutureProgress::title() const

Returns the title of the progress indicator.

See also setTitle().

QWidget *FutureProgress::widget() const

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

See also setWidget().