diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-04-08 15:02:30 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-04-10 14:21:25 +0200 |
commit | 920e7ca1f113f1f4ecc204adff51e7254e87a56b (patch) | |
tree | 2aeef98ad892193112675a83287fde71ec223990 /src/plugins/projectexplorer/buildprogress.cpp | |
parent | 9e714006eece70447679ed740958ecf5290deb4b (diff) |
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>
Diffstat (limited to 'src/plugins/projectexplorer/buildprogress.cpp')
-rw-r--r-- | src/plugins/projectexplorer/buildprogress.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp index 1f83cbe0c9..9a6a673a0f 100644 --- a/src/plugins/projectexplorer/buildprogress.cpp +++ b/src/plugins/projectexplorer/buildprogress.cpp @@ -42,17 +42,27 @@ using namespace ProjectExplorer; using namespace ProjectExplorer::Internal; -BuildProgress::BuildProgress(TaskWindow *taskWindow) - : m_errorIcon(new QLabel), +BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation) + : m_contentWidget(new QWidget), + m_errorIcon(new QLabel), m_warningIcon(new QLabel), m_errorLabel(new QLabel), m_warningLabel(new QLabel), m_taskWindow(taskWindow) { - QVBoxLayout *layout = new QVBoxLayout; + QHBoxLayout *contentLayout = new QHBoxLayout; + contentLayout->setContentsMargins(0, 0, 0, 0); + contentLayout->setSpacing(0); + setLayout(contentLayout); + contentLayout->addWidget(m_contentWidget); + QBoxLayout *layout; + if (orientation == Qt::Horizontal) + layout = new QHBoxLayout; + else + layout = new QVBoxLayout; layout->setContentsMargins(8, 2, 0, 2); layout->setSpacing(2); - setLayout(layout); + m_contentWidget->setLayout(layout); QHBoxLayout *errorLayout = new QHBoxLayout; errorLayout->setSpacing(2); layout->addLayout(errorLayout); @@ -78,7 +88,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow) m_errorIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_error.png"))); m_warningIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); - hide(); + m_contentWidget->hide(); connect(m_taskWindow, SIGNAL(tasksChanged()), this, SLOT(updateState())); } @@ -105,5 +115,5 @@ void BuildProgress::updateState() m_warningLabel->setVisible(haveWarnings); m_errorIcon->setVisible(haveErrors); m_errorLabel->setVisible(haveErrors); - setVisible(haveWarnings || haveErrors); + m_contentWidget->setVisible(haveWarnings || haveErrors); } |