From fcfcc8acb86c97dd2e94b2df11b26ace167c6b9c Mon Sep 17 00:00:00 2001 From: vtn Date: Mon, 11 Mar 2013 11:32:19 +0000 Subject: [PATCH] #22153: Progress bar missing --- src/PVGUI/PVGUI_Module_widgets.cxx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/PVGUI/PVGUI_Module_widgets.cxx b/src/PVGUI/PVGUI_Module_widgets.cxx index 168766a9..3f526563 100644 --- a/src/PVGUI/PVGUI_Module_widgets.cxx +++ b/src/PVGUI/PVGUI_Module_widgets.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,7 @@ #include #include #include +#include #include #include @@ -247,9 +249,29 @@ void PVGUI_Module::setupDockWidgets() myDockWidgets[memoryInspectorDock] = false; // hidden by default // Setup the statusbar ... + pqProgressManager* progress_manager = + pqApplicationCore::instance()->getProgressManager(); + + // Progress bar/button management pqProgressWidget* aProgress = new pqProgressWidget(desk->statusBar()); - desk->statusBar()->addPermanentWidget(aProgress); + progress_manager->addNonBlockableObject(aProgress); + progress_manager->addNonBlockableObject(aProgress->getAbortButton()); + QObject::connect( progress_manager, SIGNAL(enableProgress(bool)), + aProgress, SLOT(enableProgress(bool))); + + QObject::connect( progress_manager, SIGNAL(progress(const QString&, int)), + aProgress, SLOT(setProgress(const QString&, int))); + + QObject::connect( progress_manager, SIGNAL(enableAbort(bool)), + aProgress, SLOT(enableAbort(bool))); + + QObject::connect( aProgress, SIGNAL(abortPressed()), + progress_manager, SLOT(triggerAbort())); + + desk->statusBar()->addPermanentWidget(aProgress); + aProgress->setEnabled(true); + // Set up the dock window corners to give the vertical docks more room. desk->setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); desk->setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); -- 2.39.2