<< commonToolbar << dataToolbar;
return l;
}
+
+void PVViewer_GUIElements::setToolBarEnabled(bool enabled)
+{
+ mainToolBar ->setEnabled(enabled);
+ vcrToolbar ->setEnabled(enabled);
+ timeToolbar ->setEnabled(enabled);
+ colorToolbar ->setEnabled(enabled);
+ reprToolbar ->setEnabled(enabled);
+ cameraToolbar->setEnabled(enabled);
+ axesToolbar ->setEnabled(enabled);
+ macrosToolbar->setEnabled(enabled);
+ commonToolbar->setEnabled(enabled);
+ dataToolbar ->setEnabled(enabled);
+}
void myBuildToolbars(SUIT_Desktop* desk);
void addToolbars(SUIT_Desktop* desk);
void setToolBarVisible(bool show);
+ void setToolBarEnabled(bool enabled);
QList<QToolBar*> getToolbars();
public slots:
// Initialize minimal paraview stuff (if not already done)
ParaviewInitApp(desk, logWindow);
+ connect( desk, SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
+ this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
// connect(this, SIGNAL(viewCreated(SUIT_ViewWindow*)), this, SLOT(onPVViewCreated(SUIT_ViewWindow*)));
}
PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desktop);
guiElements->onEmulateApply();
}
+
+/*!Enable toolbars if view \a view is ParaView viewer and disable otherwise.
+*/
+void PVViewer_ViewManager::onWindowActivated(SUIT_ViewWindow* view)
+{
+ if (view)
+ {
+ PVViewer_ViewWindow* pvWindow = dynamic_cast<PVViewer_ViewWindow*>(view);
+ PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desktop);
+ guiElements->setToolBarEnabled(pvWindow!=0);
+ }
+}
public slots:
void onEmulateApply();
+protected slots:
+ void onWindowActivated(SUIT_ViewWindow*);
+
private:
static pqPVApplicationCore* MyCoreApp;
static bool ConfigLoaded;