From: vtn Date: Mon, 11 Mar 2013 11:32:19 +0000 (+0000) Subject: #22153: Progress bar missing X-Git-Tag: V7_1_0~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fcfcc8acb86c97dd2e94b2df11b26ace167c6b9c;p=modules%2Fparavis.git #22153: Progress bar missing --- 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);