#include CORBA_CLIENT_HEADER(SALOMEDS)
#include "MEDOPFactoryClient.hxx"
-
-#include <LightApp_Application.h>
-#include "PVViewer_ViewManager.h"
-#include "PVViewer_ViewWindow.h"
#include "PVViewer_ViewModel.h"
-#include "SUIT_ViewManager.h"
MEDOPModule::MEDOPModule() :
StandardApp_Module()
_workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *)));
}
-/*!
- \brief Shows (toShow = true) or hides ParaView view window
-*/
-void MEDOPModule::showView( bool toShow )
-{
- LightApp_Application* anApp = getApp();
- PVViewer_ViewManager* viewMgr =
- dynamic_cast<PVViewer_ViewManager*>( anApp->getViewManager( PVViewer_Viewer::Type(), false ) );
- if ( !viewMgr ) {
- viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop(), anApp->logWindow() );
- anApp->addViewManager( viewMgr );
- connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
- anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) );
- }
-
- PVViewer_ViewWindow* pvWnd = dynamic_cast<PVViewer_ViewWindow*>( viewMgr->getActiveView() );
- if ( !pvWnd ) {
- pvWnd = dynamic_cast<PVViewer_ViewWindow*>( viewMgr->createViewWindow() );
- // this also connects to the pvserver and instantiates relevant PV behaviors
- }
-
- pvWnd->setShown( toShow );
- if ( toShow ) pvWnd->setFocus();
-}
-
bool MEDOPModule::activateModule( SUIT_Study* theStudy )
{
bool bOk = StandardApp_Module::activateModule( theStudy );
- showView(true);
_workspaceController->showDockWidgets(true);
this->setDockLayout(StandardApp_Module::DOCKLAYOUT_LEFT_VLARGE);
return bOk;
{
_workspaceController->showDockWidgets(false);
this->unsetDockLayout();
- showView(false);
return StandardApp_Module::deactivateModule( theStudy );
}
// Creating actions concerning the workspace
_workspaceController->createActions();
}
+
+void MEDOPModule::viewManagers( QStringList& list ) const
+{
+ list.append( PVViewer_Viewer::Type() );
+}
public:
MEDOPModule();
+ void viewManagers( QStringList& ) const;
protected:
virtual Engines::EngineComponent_ptr getEngine() const;
virtual bool activateModule( SUIT_Study* theStudy );
virtual bool deactivateModule( SUIT_Study* theStudy );
- private:
- //! Shows or hides ParaView view window
- void showView(bool);
-
private:
DatasourceController * _datasourceController;
WorkspaceController * _workspaceController;