Show build and search progress detail also in status bar.

A widget specifically layouted for the status bar can now be registered
with the progress information. The newest one is made visible next to
the summary progress bar. If a newer one vanishes, the older becomes
visible again.

Change-Id: Iedf0e88a542ea442ae86fa51c792c68fbc6eef3c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2013-04-08 15:02:30 +02:00
parent 9e714006ee
commit 920e7ca1f1
8 changed files with 98 additions and 13 deletions

View File

@@ -65,6 +65,7 @@ public:
Internal::ProgressBar *m_progress;
QWidget *m_widget;
QHBoxLayout *m_widgetLayout;
QWidget *m_statusBarWidget;
QString m_type;
FutureProgress::KeepOnFinishType m_keep;
bool m_waitingForUserInteraction;
@@ -75,6 +76,7 @@ public:
FutureProgressPrivate::FutureProgressPrivate(FutureProgress *q) :
m_progress(new Internal::ProgressBar), m_widget(0), m_widgetLayout(new QHBoxLayout),
m_statusBarWidget(0),
m_keep(FutureProgress::HideOnFinish), m_waitingForUserInteraction(false),
m_q(q), m_fadeStarting(false), m_isFading(false)
{
@@ -341,6 +343,20 @@ QWidget *FutureProgress::widget() const
return d->m_widget;
}
void FutureProgress::setStatusBarWidget(QWidget *widget)
{
if (widget == d->m_statusBarWidget)
return;
delete d->m_statusBarWidget;
d->m_statusBarWidget = widget;
emit statusBarWidgetChanged();
}
QWidget *FutureProgress::statusBarWidget() const
{
return d->m_statusBarWidget;
}
bool FutureProgress::isFading() const
{
return d->m_isFading;