Extending Qt Creator Manual | FutureProgress

Extending Qt Creator Manual 4.5.2

# 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>

- List of all members, including inherited members

## 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)
QSize | sizeHint() const
QWidget * | statusBarWidget() const
QString | title() const
Id | type() const
QWidget * | widget() const

## Signals

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

## Protected Functions

void | paintEvent(QPaintEvent *)

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

### `[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().

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