1 // LIGHT : sample (no-corba-engine) SALOME module
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : PVGUI_Module.cxx
23 // Author : Julia DOROVSKIKH
26 #include "PVGUI_Module.h"
27 #include "PVGUI_ProcessModuleHelper.h"
28 #include "PVGUI_ViewModel.h"
29 #include "PVGUI_ViewManager.h"
30 #include "PVGUI_ViewWindow.h"
32 #include <SUIT_MessageBox.h>
33 #include <SUIT_Desktop.h>
34 #include <SUIT_Session.h>
35 #include <LightApp_Application.h>
36 #include <LightApp_SelectionMgr.h>
37 #include <QtxActionMenuMgr.h>
39 #include <QApplication>
40 #include <QDockWidget>
41 #include <QInputDialog>
42 #include <QStringList>
47 #include <pqOptions.h>
48 #include <pqApplicationCore.h>
49 #include <pqActiveServer.h>
50 #include <pqComparativeVisPanel.h>
51 #include <pqMainWindowCore.h>
52 #include <pqObjectBuilder.h>
53 #include <pqPipelineBrowser.h>
54 #include <pqPipelineMenu.h>
56 #include <pqServerManagerModel.h>
57 #include <pqServerResource.h>
58 #include <pqViewManager.h>
59 #include <vtkPVMain.h>
60 #include <vtkProcessModule.h>
63 * Make sure all the kits register their classes with vtkInstantiator.
64 * Since ParaView uses Tcl wrapping, all of VTK is already compiled in
65 * anyway. The instantiators will add no more code for the linker to
69 #include <vtkCommonInstantiator.h>
70 #include <vtkFilteringInstantiator.h>
71 #include <vtkGenericFilteringInstantiator.h>
72 #include <vtkIOInstantiator.h>
73 #include <vtkImagingInstantiator.h>
74 #include <vtkInfovisInstantiator.h>
75 #include <vtkGraphicsInstantiator.h>
77 #include <vtkRenderingInstantiator.h>
78 #include <vtkVolumeRenderingInstantiator.h>
79 #include <vtkHybridInstantiator.h>
80 #include <vtkParallelInstantiator.h>
82 #include <vtkPVServerCommonInstantiator.h>
83 #include <vtkPVFiltersInstantiator.h>
84 #include <vtkPVServerManagerInstantiator.h>
85 #include <vtkClientServerInterpreter.h>
88 //----------------------------------------------------------------------------
89 // ClientServer wrapper initialization functions.
90 // Taken from ParaView sources (file pqMain.cxx)
91 extern "C" void vtkCommonCS_Initialize(vtkClientServerInterpreter*);
92 extern "C" void vtkFilteringCS_Initialize(vtkClientServerInterpreter*);
93 extern "C" void vtkGenericFilteringCS_Initialize(vtkClientServerInterpreter*);
94 extern "C" void vtkImagingCS_Initialize(vtkClientServerInterpreter*);
95 extern "C" void vtkInfovisCS_Initialize(vtkClientServerInterpreter*);
96 extern "C" void vtkGraphicsCS_Initialize(vtkClientServerInterpreter*);
97 extern "C" void vtkIOCS_Initialize(vtkClientServerInterpreter*);
98 extern "C" void vtkRenderingCS_Initialize(vtkClientServerInterpreter*);
99 extern "C" void vtkVolumeRenderingCS_Initialize(vtkClientServerInterpreter*);
100 extern "C" void vtkHybridCS_Initialize(vtkClientServerInterpreter*);
101 extern "C" void vtkWidgetsCS_Initialize(vtkClientServerInterpreter*);
102 extern "C" void vtkParallelCS_Initialize(vtkClientServerInterpreter*);
103 extern "C" void vtkPVServerCommonCS_Initialize(vtkClientServerInterpreter*);
104 extern "C" void vtkPVFiltersCS_Initialize(vtkClientServerInterpreter*);
105 extern "C" void vtkXdmfCS_Initialize(vtkClientServerInterpreter *);
107 //----------------------------------------------------------------------------
108 void ParaViewInitializeInterpreter(vtkProcessModule* pm)
110 // Initialize built-in wrapper modules.
111 vtkCommonCS_Initialize(pm->GetInterpreter());
112 vtkFilteringCS_Initialize(pm->GetInterpreter());
113 vtkGenericFilteringCS_Initialize(pm->GetInterpreter());
114 vtkImagingCS_Initialize(pm->GetInterpreter());
115 vtkInfovisCS_Initialize(pm->GetInterpreter());
116 vtkGraphicsCS_Initialize(pm->GetInterpreter());
117 vtkIOCS_Initialize(pm->GetInterpreter());
118 vtkRenderingCS_Initialize(pm->GetInterpreter());
119 vtkVolumeRenderingCS_Initialize(pm->GetInterpreter());
120 vtkHybridCS_Initialize(pm->GetInterpreter());
121 vtkWidgetsCS_Initialize(pm->GetInterpreter());
122 vtkParallelCS_Initialize(pm->GetInterpreter());
123 vtkPVServerCommonCS_Initialize(pm->GetInterpreter());
124 vtkPVFiltersCS_Initialize(pm->GetInterpreter());
125 vtkXdmfCS_Initialize(pm->GetInterpreter());
128 //////////////////////////////////////////////////////////////////////////////
129 // PVGUI_Module::pqImplementation
131 class PVGUI_Module::pqImplementation
134 pqImplementation(QWidget* parent) :
135 //AssistantClient(0),
137 //RecentFilesMenu(0),
145 //delete this->ViewMenu;
146 //delete this->ToolbarsMenu;
147 //if(this->AssistantClient)
149 // this->AssistantClient->closeAssistant();
150 // delete this->AssistantClient;
154 //QPointer<QAssistantClient> AssistantClient;
156 pqMainWindowCore Core;
157 //pqRecentFilesMenu* RecentFilesMenu;
158 //pqViewMenu* ViewMenu;
159 //pqViewMenu* ToolbarsMenu;
160 //QLineEdit* CurrentTimeWidget;
161 //QSpinBox* CurrentTimeIndexWidget;
162 QPointer<pqServer> ActiveServer;
163 QString DocumentationDir;
165 static vtkPVMain* myPVMain;
166 static pqOptions* myPVOptions;
167 static PVGUI_ProcessModuleHelper* myPVHelper;
171 vtkPVMain* PVGUI_Module::pqImplementation::myPVMain = 0;
172 pqOptions* PVGUI_Module::pqImplementation::myPVOptions = 0;
173 PVGUI_ProcessModuleHelper* PVGUI_Module::pqImplementation::myPVHelper = 0;
177 \brief Implementation of light (no-CORBA-engine)
178 SALOME module wrapping ParaView GUI.
182 \brief Constructor. Sets the default name for the module.
184 PVGUI_Module::PVGUI_Module()
185 : LightApp_Module( "PARAVIS" ),
193 PVGUI_Module::~PVGUI_Module()
198 \brief Initialize module. Creates menus, prepares context menu, etc.
199 \param app application instance
201 void PVGUI_Module::initialize( CAM_Application* app )
203 LightApp_Module::initialize( app );
215 createAction( lgLoadFile, tr( "TOP_LOAD_FILE" ), QIcon(), tr( "MEN_LOAD_FILE" ),
216 tr( "STB_LOAD_FILE" ), 0, desk, false, this, SLOT( onLoadFile() ) );
217 createAction( lgDisplayLine, tr( "TOP_DISPLAY_LINE" ), QIcon(), tr( "MEN_DISPLAY_LINE" ),
218 tr( "STB_DISPLAY_LINE" ), 0, desk, false, this, SLOT( onDisplayLine() ) );
219 createAction( lgEraseLine, tr( "TOP_ERASE_LINE" ), QIcon(), tr( "MEN_ERASE_LINE" ),
220 tr( "STB_ERASE_LINE" ), 0, desk, false, this, SLOT( onEraseLine() ) );
221 createAction( lgSaveFile, tr( "TOP_SAVE_FILE" ), QIcon(), tr( "MEN_SAVE_FILE" ),
222 tr( "STB_SAVE_FILE" ), 0, desk, false, this, SLOT( onSaveFile() ) );
223 createAction( lgEditLine, tr( "TOP_EDIT_LINE" ), QIcon(), tr( "MEN_EDIT_LINE" ),
224 tr( "STB_EDIT_LINE" ), 0, desk, false, this, SLOT( onEditLine() ) );
225 createAction( lgAddLine, tr( "TOP_ADD_LINE" ), QIcon(), tr( "MEN_ADD_LINE" ),
226 tr( "STB_ADD_LINE" ), 0, desk, false, this, SLOT( onAddLine() ) );
227 createAction( lgDelLine, tr( "TOP_DEL_LINE" ), QIcon(), tr( "MEN_DEL_LINE" ),
228 tr( "STB_DEL_LINE" ), 0, desk, false, this, SLOT( onDelLine() ) );
229 createAction( lgClear, tr( "TOP_CLEAR_ALL" ), QIcon(), tr( "MEN_CLEAR_ALL" ),
230 tr( "STB_CLEAR_ALL" ), 0, desk, false, this, SLOT( onClear() ) );
232 int aFileMnu = createMenu( tr( "MEN_FILE" ), -1, -1 );
233 createMenu( separator(), aFileMnu, -1, 10 );
234 createMenu( lgLoadFile, aFileMnu, 10 );
235 createMenu( lgSaveFile, aFileMnu, 10 );
237 int aLightMnu = createMenu( tr( "MEN_LIGHT" ), -1, -1, 50 );
238 createMenu( lgAddLine, aLightMnu, 10 );
239 createMenu( lgEditLine, aLightMnu, 10 );
240 createMenu( lgDelLine, aLightMnu, 10 );
241 createMenu( separator(), aLightMnu, -1, 10 );
242 createMenu( lgClear, aLightMnu, 10 );
244 QString rule = "(client='ObjectBrowser' or client='OCCViewer') and selcount=1 and type='TextLine' and !empty";
246 popupMgr()->insert ( action( lgDisplayLine ), -1, 0 );
247 popupMgr()->setRule( action( lgDisplayLine ), rule + " and !visible" );
249 popupMgr()->insert ( action( lgEraseLine ), -1, 0 );
250 popupMgr()->setRule( action( lgEraseLine ), rule + " and activeView='OCCViewer' and visible" );
252 rule = "client='ObjectBrowser' and selcount=1 and type='TextLine'";
254 popupMgr()->insert ( action( lgEditLine ), -1, 0 );
255 popupMgr()->setRule( action( lgEditLine ), rule );
257 popupMgr()->insert ( action( lgAddLine ), -1, 0 );
258 popupMgr()->setRule( action( lgAddLine ), rule );
260 popupMgr()->insert ( separator(), -1, 0 );
262 popupMgr()->insert ( action( lgDelLine ), -1, 0 );
263 popupMgr()->setRule( action( lgDelLine ), rule );
265 rule = "client='ObjectBrowser'";
267 popupMgr()->insert ( action( lgClear ), -1, 0 );
268 popupMgr()->setRule( action( lgClear ), rule );*/
272 \brief Get list of compliant dockable GUI elements
273 \param m map to be filled in ("type":"default_position")
275 void PVGUI_Module::windows( QMap<int, int>& m ) const
277 m.insert( LightApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
278 // TODO: creation of Python console leads to SIGSEGV on Python initialization...
279 //m.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
280 // ParaView diagnostic output redirected here
281 m.insert( LightApp_Application::WT_LogWindow, Qt::BottomDockWidgetArea );
285 \brief Create custom popup menu selection object.
286 \return new selected object
288 /*LightApp_Selection* PVGUI_Module::createSelection() const
290 return new PVGUI_Selection();
294 \brief Create data model.
295 \return module specific data model
297 /*CAM_DataModel* PVGUI_Module::createDataModel()
299 return new PVGUI_DataModel( this );
303 \brief Static method, performs initialization of ParaView session.
304 \return \c true if ParaView has been initialized successfully, otherwise false
306 bool PVGUI_Module::pvInit()
308 if ( !pqImplementation::myPVMain ){
309 // Obtain command-line arguments
311 QStringList args = QApplication::arguments();
312 char** argv = new char*[args.size()];
313 for ( QStringList::const_iterator it = args.begin(); argc < 1 && it != args.end(); it++, argc++ )
314 argv[argc] = strdup( (*it).toLatin1().constData() );
316 vtkPVMain::SetInitializeMPI(0); // pvClient never runs with MPI.
317 vtkPVMain::Initialize(&argc, &argv); // Perform any initializations.
319 // TODO: Set plugin dir from preferences
320 //QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
322 pqImplementation::myPVMain = vtkPVMain::New();
323 if ( !pqImplementation::myPVOptions )
324 pqImplementation::myPVOptions = pqOptions::New();
325 if ( !pqImplementation::myPVHelper )
326 pqImplementation::myPVHelper = PVGUI_ProcessModuleHelper::New();
328 pqImplementation::myPVOptions->SetProcessType(vtkPVOptions::PVCLIENT);
330 // This creates the Process Module and initializes it.
331 int ret = pqImplementation::myPVMain->Initialize(pqImplementation::myPVOptions,
332 pqImplementation::myPVHelper,
333 ParaViewInitializeInterpreter,
336 // Tell process module that we support Multiple connections.
337 // This must be set before starting the event loop.
338 vtkProcessModule::GetProcessModule()->SupportMultipleConnectionsOn();
339 ret = pqImplementation::myPVHelper->Run(pqImplementation::myPVOptions);
350 \brief Static method, cleans up ParaView session at application exit.
352 void PVGUI_Module::pvShutdown()
358 \brief Shows (toShow = true) or hides ParaView view window
360 void PVGUI_Module::showView( bool toShow )
362 // TODO: check if ParaView view already exists
363 if ( !Implementation ){
364 LightApp_Application* anApp = getApp();
365 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
366 PVGUI_ViewManager* viewMgr = new PVGUI_ViewManager( anApp->activeStudy(), anApp->desktop() );
367 anApp->addViewManager( viewMgr );
368 connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
369 anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) );
370 //connect( viewMgr, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), vm, SLOT( onViewCreated( SUIT_ViewWindow* ) ) );
371 //connect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ), this, SLOT( onViewDeleted( SUIT_ViewWindow* ) ) );
372 SUIT_ViewWindow* wnd = viewMgr->createViewWindow();
374 // Simulate ParaView client main window
375 Implementation = new pqImplementation( anApp->desktop() );
376 PVGUI_ViewWindow* pvWnd = dynamic_cast<PVGUI_ViewWindow*>( wnd );
377 pvWnd->setMultiViewManager( &Implementation->Core.multiViewManager() );
382 // Now that we're ready, initialize everything ...
383 Implementation->Core.initializeStates();
388 \brief Create actions for ParaView GUI operations
389 duplicating menus and toolbars in MainWindow class of
390 the standard ParaView GUI client application.
392 In particular, ParaView is responsible for updating "Sources" and "Filters" menus.
393 For this, specific menu managers created by pqMainWindowCore class are used, and PVGUI_Module
394 is responsible for creation of corresponding QMenu objects only.
396 void PVGUI_Module::pvCreateActions()
399 SUIT_Desktop* desk = application()->desktop();
402 int actionManagePlugins = 999;
403 createAction( actionManagePlugins, tr( "TOP_MANAGE_PLUGINS" ), QIcon(), tr( "MEN_MANAGE_PLUGINS" ),
404 tr( "STB_MANAGE_PLUGINS" ), 0, desk, false, &Implementation->Core, SLOT( onManagePlugins() ) );
405 int aPVMnu = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
406 createMenu( actionManagePlugins, aPVMnu, 10 );
408 // Install ParaView managers for "Sources" and "Filters" menus
410 aPVMnu = createMenu( tr( "Sources" ), -1, -1, 60 );
411 res = getMenu( aPVMnu );
413 Implementation->Core.setSourceMenu( res );
414 connect(&this->Implementation->Core,
415 SIGNAL(enableSourceCreate(bool)),
417 SLOT(setEnabled(bool)));
419 aPVMnu = createMenu( tr( "Filters" ), -1, -1, 70 );
420 res = getMenu( aPVMnu );
422 Implementation->Core.setFilterMenu( res );
423 connect(&this->Implementation->Core,
424 SIGNAL(enableFilterCreate(bool)),
426 SLOT(setEnabled(bool)));
432 \brief Create dock widgets for ParaView widgets such as object inspector, pipeline browser, etc.
433 ParaView pqMainWIndowCore class is fully responsible for these dock widgets' contents.
435 void PVGUI_Module::setupDockWidgets()
437 SUIT_Desktop* desk = application()->desktop();
439 // See ParaView src/Applications/Client/MainWindow.cxx
440 QDockWidget* pipelineBrowserDock = new QDockWidget( tr( "Pipeline Browser" ), desk );
441 pipelineBrowserDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
442 desk->addDockWidget( Qt::LeftDockWidgetArea, pipelineBrowserDock );
443 Implementation->Core.setupPipelineBrowser( pipelineBrowserDock );
444 pqPipelineBrowser *browser = Implementation->Core.pipelineBrowser();
445 Implementation->Core.pipelineMenu().setModels(browser->getModel(), browser->getSelectionModel());
447 /*connect(this->Implementation->UI.actionChangeInput, SIGNAL(triggered()),
448 browser, SLOT(changeInput()));
449 connect(this->Implementation->UI.actionDelete, SIGNAL(triggered()),
450 browser, SLOT(deleteSelected()));
451 pqPipelineBrowserContextMenu *browserMenu =
452 new pqPipelineBrowserContextMenu(browser);
453 browserMenu->setMenuAction(this->Implementation->UI.actionFileOpen);
454 browserMenu->setMenuAction(this->Implementation->UI.actionChangeInput);
455 browserMenu->setMenuAction(this->Implementation->UI.actionDelete);
456 browserMenu->setMenuAction(this->Implementation->UI.actionToolsCreateCustomFilter);*/
458 QDockWidget* objectInspectorDock = new QDockWidget( tr( "Object Inspector" ), desk );
459 objectInspectorDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
460 desk->addDockWidget( Qt::LeftDockWidgetArea, objectInspectorDock );
461 pqProxyTabWidget* const proxyTab = Implementation->Core.setupProxyTabWidget( objectInspectorDock );
464 proxyTab->getObjectInspector(),
465 SIGNAL(helpRequested(QString)),
467 SLOT(showHelpForProxy(QString)));
470 proxyTab->getObjectInspector(),
473 SLOT(onPreAccept()));
476 proxyTab->getObjectInspector(),
477 SIGNAL(postaccept()),
479 SLOT(onPostAccept()));*/
481 QDockWidget* statisticsViewDock = new QDockWidget( tr( "Statistics View" ), desk );
482 statisticsViewDock->setAllowedAreas( Qt::BottomDockWidgetArea|Qt::LeftDockWidgetArea|Qt::NoDockWidgetArea|Qt::RightDockWidgetArea );
483 desk->addDockWidget( Qt::BottomDockWidgetArea, statisticsViewDock );
484 Implementation->Core.setupStatisticsView( statisticsViewDock );
486 QDockWidget* animationPanelDock = new QDockWidget( tr( "Animation Inspector" ), desk );
487 desk->addDockWidget( Qt::LeftDockWidgetArea, animationPanelDock );
488 pqAnimationPanel* animation_panel = Implementation->Core.setupAnimationPanel( animationPanelDock );
490 /* animation_panel->setCurrentTimeToolbar(
491 this->Implementation->UI.currentTimeToolbar);*/
493 QDockWidget* lookmarkBrowserDock = new QDockWidget( tr( "Lookmark Browser" ), desk );
494 QSizePolicy sp( QSizePolicy::Preferred, QSizePolicy::Preferred );
495 sp.setHorizontalStretch( 0 );
496 sp.setVerticalStretch( 0 );
497 lookmarkBrowserDock->setSizePolicy( sp );
498 lookmarkBrowserDock->setFloating( false );
499 desk->addDockWidget( Qt::RightDockWidgetArea, lookmarkBrowserDock );
500 Implementation->Core.setupLookmarkBrowser( lookmarkBrowserDock );
502 QDockWidget* lookmarkInspectorDock = new QDockWidget( tr( "Lookmark Inspector" ), desk );
503 lookmarkInspectorDock->setAllowedAreas( Qt::RightDockWidgetArea );
504 desk->addDockWidget( Qt::RightDockWidgetArea, lookmarkInspectorDock );
505 Implementation->Core.setupLookmarkInspector( lookmarkInspectorDock );
507 QDockWidget* comparativePanelDock = new QDockWidget( tr( "Comparative View Inspector" ), desk );
508 desk->addDockWidget( Qt::LeftDockWidgetArea, comparativePanelDock );
509 pqComparativeVisPanel* cv_panel = new pqComparativeVisPanel( comparativePanelDock );
510 comparativePanelDock->setWidget(cv_panel);
512 QDockWidget* animationViewDock = new QDockWidget( tr( "Animation View" ), desk );
513 desk->addDockWidget( Qt::BottomDockWidgetArea, animationViewDock );
514 Implementation->Core.setupAnimationView( animationViewDock );
516 QDockWidget* selectionInspectorDock = new QDockWidget( tr( "Selection Inspector" ), desk );
517 selectionInspectorDock->setAllowedAreas( Qt::AllDockWidgetAreas );
518 desk->addDockWidget( Qt::LeftDockWidgetArea, selectionInspectorDock );
519 Implementation->Core.setupSelectionInspector( selectionInspectorDock );
521 // Setup the statusbar ...
522 Implementation->Core.setupProgressBar( desk->statusBar() );
524 // Set up the dock window corners to give the vertical docks more room.
525 desk->setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
526 desk->setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
528 // Setup the default dock configuration ...
529 lookmarkBrowserDock->hide();
530 lookmarkInspectorDock->hide();
531 statisticsViewDock->hide();
532 animationPanelDock->hide();
533 comparativePanelDock->hide();
534 animationViewDock->hide();
535 selectionInspectorDock->hide();
539 \brief Returns the ParaView multi-view manager.
541 pqViewManager* PVGUI_Module::getMultiViewManager() const
543 pqViewManager* aMVM = 0;
544 if ( Implementation )
545 aMVM = &Implementation->Core.multiViewManager();
549 QMenu* PVGUI_Module::getMenu( const int id )
552 LightApp_Application* anApp = getApp();
553 SUIT_Desktop* desk = anApp->desktop();
555 QtxActionMenuMgr* menuMgr = desk->menuMgr();
556 res = menuMgr->findMenu( id );
562 \brief Activate module.
563 \param study current study
564 \return \c true if activaion is done successfully or 0 to prevent
567 bool PVGUI_Module::activateModule( SUIT_Study* study )
569 bool isDone = LightApp_Module::activateModule( study );
570 if ( !isDone ) return false;
572 setMenuShown( true );
576 // Make default server connection
577 if ( Implementation )
578 Implementation->Core.makeDefaultConnectionIfNoneExists();
585 \brief Deactivate module.
586 \param study current study
587 \return \c true if deactivaion is done successfully or 0 to prevent
588 deactivation on error
590 bool PVGUI_Module::deactivateModule( SUIT_Study* study )
593 setMenuShown( false );
595 return LightApp_Module::deactivateModule( study );
599 \fn CAM_Module* createModule();
600 \brief Export module instance (factory function).
601 \return new created instance of the module
605 #define PVGUI_EXPORT __declspec(dllexport)
611 PVGUI_EXPORT CAM_Module* createModule() {
612 return new PVGUI_Module();