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

QFuture<void> future() const
bool hasError() const
void setTitle(const QString &title)
void setWidget(QWidget *widget)
QString title() const
QWidget *widget() const

Signals

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

Detailed Description

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

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

bool FutureProgress::hasError() const

Returns the error state of this progress indicator.

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

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.