Core::FutureProgress Class
class Core::FutureProgressFutureProgress 类用于调整通过ProgressManager 类创建的进度指示器的外观。更多内容...
| Header: | #include <coreplugin/progressmanager/futureprogress.h> |
| Inherits: | QWidget |
公共函数
| QFuture<void> | future() const |
| bool | hasError() const |
| void | setTitle(const QString &title) |
| void | setWidget(QWidget *widget) |
| QString | title() const |
| QWidget * | widget() const |
信号
详细说明
使用ProgressManager::addTask() 返回的该类的实例,可定义应显示在进度条下方的控件,或更改进度标题。此外,还可利用它响应用户点击进度指示器的事件(例如,可用于打开更详细的视图或显示任务结果)。
成员函数文档
[signal] void FutureProgress::canceled()
订阅此信号,以便在操作被取消时收到通知。
[signal] void FutureProgress::clicked()
订阅此信号,以便在用户点击进度指示器时收到通知。
[signal] void FutureProgress::finished()
另一种在任务完成时获知通知的方法。
QFuture<void> FutureProgress::future() const
返回一个表示此正在运行任务的QFuture 对象。
bool FutureProgress::hasError() const
返回此进度指示器的错误状态。
void FutureProgress::setTitle(const QString &title)
更改进度指示器的title 属性。
另请参阅 title()。
void FutureProgress::setWidget(QWidget *widget)
将widget 设置为显示在进度条下方。当进度指示器被销毁时,该控件也将被销毁。默认情况下,进度指示器下方不显示任何控件。
另请参阅 widget()。
QString FutureProgress::title() const
返回进度指示器的标题。
另请参阅 setTitle()。
QWidget *FutureProgress::widget() const
返回显示在进度指示器下方的自定义控件。
另请参阅 setWidget()。
Copyright © The Qt Company Ltd. and other contributors. 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.