1 // PARAVIS : ParaView wrapper 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_Module_impl.h"
28 #include "PVGUI_ProcessModuleHelper.h"
29 #include "PVGUI_ViewModel.h"
30 #include "PVGUI_ViewManager.h"
31 #include "PVGUI_ViewWindow.h"
33 #include <SUIT_Desktop.h>
34 #include <SUIT_MessageBox.h>
35 #include <SUIT_ResourceMgr.h>
36 #include <SUIT_Session.h>
37 #include <LightApp_Application.h>
38 #include <LightApp_SelectionMgr.h>
39 #include <QtxActionMenuMgr.h>
40 #include <QtxActionToolMgr.h>
43 #include <QApplication>
49 #include <QInputDialog>
52 #include <QStringList>
56 #include <pqApplicationCore.h>
57 #include <pqActiveServer.h>
58 #include <pqActiveView.h>
59 #include <pqClientAboutDialog.h>
60 #include <pqObjectBuilder.h>
61 #include <pqOptions.h>
62 #include <pqRenderView.h>
63 #include <pqRubberBandHelper.h>
65 #include <pqServerManagerModel.h>
66 #include <pqServerResource.h>
67 #include <pqUndoStack.h>
68 #include <pqVCRController.h>
69 #include <pqViewManager.h>
70 #include <vtkPVMain.h>
71 #include <vtkProcessModule.h>
74 * Make sure all the kits register their classes with vtkInstantiator.
75 * Since ParaView uses Tcl wrapping, all of VTK is already compiled in
76 * anyway. The instantiators will add no more code for the linker to
80 #include <vtkCommonInstantiator.h>
81 #include <vtkFilteringInstantiator.h>
82 #include <vtkGenericFilteringInstantiator.h>
83 #include <vtkIOInstantiator.h>
84 #include <vtkImagingInstantiator.h>
85 #include <vtkInfovisInstantiator.h>
86 #include <vtkGraphicsInstantiator.h>
88 #include <vtkRenderingInstantiator.h>
89 #include <vtkVolumeRenderingInstantiator.h>
90 #include <vtkHybridInstantiator.h>
91 #include <vtkParallelInstantiator.h>
93 #include <vtkPVServerCommonInstantiator.h>
94 #include <vtkPVFiltersInstantiator.h>
95 #include <vtkPVServerManagerInstantiator.h>
96 #include <vtkClientServerInterpreter.h>
99 //----------------------------------------------------------------------------
100 // ClientServer wrapper initialization functions.
101 // Taken from ParaView sources (file pqMain.cxx)
102 extern "C" void vtkCommonCS_Initialize(vtkClientServerInterpreter*);
103 extern "C" void vtkFilteringCS_Initialize(vtkClientServerInterpreter*);
104 extern "C" void vtkGenericFilteringCS_Initialize(vtkClientServerInterpreter*);
105 extern "C" void vtkImagingCS_Initialize(vtkClientServerInterpreter*);
106 extern "C" void vtkInfovisCS_Initialize(vtkClientServerInterpreter*);
107 extern "C" void vtkGraphicsCS_Initialize(vtkClientServerInterpreter*);
108 extern "C" void vtkIOCS_Initialize(vtkClientServerInterpreter*);
109 extern "C" void vtkRenderingCS_Initialize(vtkClientServerInterpreter*);
110 extern "C" void vtkVolumeRenderingCS_Initialize(vtkClientServerInterpreter*);
111 extern "C" void vtkHybridCS_Initialize(vtkClientServerInterpreter*);
112 extern "C" void vtkWidgetsCS_Initialize(vtkClientServerInterpreter*);
113 extern "C" void vtkParallelCS_Initialize(vtkClientServerInterpreter*);
114 extern "C" void vtkPVServerCommonCS_Initialize(vtkClientServerInterpreter*);
115 extern "C" void vtkPVFiltersCS_Initialize(vtkClientServerInterpreter*);
116 extern "C" void vtkXdmfCS_Initialize(vtkClientServerInterpreter *);
118 //----------------------------------------------------------------------------
119 void ParaViewInitializeInterpreter(vtkProcessModule* pm)
121 // Initialize built-in wrapper modules.
122 vtkCommonCS_Initialize(pm->GetInterpreter());
123 vtkFilteringCS_Initialize(pm->GetInterpreter());
124 vtkGenericFilteringCS_Initialize(pm->GetInterpreter());
125 vtkImagingCS_Initialize(pm->GetInterpreter());
126 vtkInfovisCS_Initialize(pm->GetInterpreter());
127 vtkGraphicsCS_Initialize(pm->GetInterpreter());
128 vtkIOCS_Initialize(pm->GetInterpreter());
129 vtkRenderingCS_Initialize(pm->GetInterpreter());
130 vtkVolumeRenderingCS_Initialize(pm->GetInterpreter());
131 vtkHybridCS_Initialize(pm->GetInterpreter());
132 vtkWidgetsCS_Initialize(pm->GetInterpreter());
133 vtkParallelCS_Initialize(pm->GetInterpreter());
134 vtkPVServerCommonCS_Initialize(pm->GetInterpreter());
135 vtkPVFiltersCS_Initialize(pm->GetInterpreter());
136 vtkXdmfCS_Initialize(pm->GetInterpreter());
139 vtkPVMain* PVGUI_Module::pqImplementation::myPVMain = 0;
140 pqOptions* PVGUI_Module::pqImplementation::myPVOptions = 0;
141 PVGUI_ProcessModuleHelper* PVGUI_Module::pqImplementation::myPVHelper = 0;
145 \brief Implementation of light (no-CORBA-engine)
146 SALOME module wrapping ParaView GUI.
150 \brief Constructor. Sets the default name for the module.
152 PVGUI_Module::PVGUI_Module()
153 : LightApp_Module( "PARAVIS" ),
155 mySelectionControlsTb( -1 ),
156 mySourcesMenuId( -1 ),
157 myFiltersMenuId( -1 )
164 PVGUI_Module::~PVGUI_Module()
169 \brief Initialize module. Creates menus, prepares context menu, etc.
170 \param app application instance
172 void PVGUI_Module::initialize( CAM_Application* app )
174 LightApp_Module::initialize( app );
176 // Uncomment to debug ParaView initialization
177 // "aa" used instead of "i" as GDB doesn't like "i" variables :)
190 \brief Get list of compliant dockable GUI elements
191 \param m map to be filled in ("type":"default_position")
193 void PVGUI_Module::windows( QMap<int, int>& m ) const
195 m.insert( LightApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
196 m.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
197 // ParaView diagnostic output redirected here
198 m.insert( LightApp_Application::WT_LogWindow, Qt::BottomDockWidgetArea );
202 \brief Create custom popup menu selection object.
203 \return new selected object
205 /*LightApp_Selection* PVGUI_Module::createSelection() const
207 return new PVGUI_Selection();
211 \brief Create data model.
212 \return module specific data model
214 /*CAM_DataModel* PVGUI_Module::createDataModel()
216 return new PVGUI_DataModel( this );
220 \brief Static method, performs initialization of ParaView session.
221 \return \c true if ParaView has been initialized successfully, otherwise false
223 bool PVGUI_Module::pvInit()
225 if ( !pqImplementation::myPVMain ){
226 // Obtain command-line arguments
228 QStringList args = QApplication::arguments();
229 char** argv = new char*[args.size()];
230 for ( QStringList::const_iterator it = args.begin(); argc < 1 && it != args.end(); it++, argc++ )
231 argv[argc] = strdup( (*it).toLatin1().constData() );
233 vtkPVMain::SetInitializeMPI(0); // pvClient never runs with MPI.
234 vtkPVMain::Initialize(&argc, &argv); // Perform any initializations.
236 // TODO: Set plugin dir from preferences
237 //QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
239 pqImplementation::myPVMain = vtkPVMain::New();
240 if ( !pqImplementation::myPVOptions )
241 pqImplementation::myPVOptions = pqOptions::New();
242 if ( !pqImplementation::myPVHelper )
243 pqImplementation::myPVHelper = PVGUI_ProcessModuleHelper::New();
245 pqImplementation::myPVOptions->SetProcessType(vtkPVOptions::PVCLIENT);
247 // This creates the Process Module and initializes it.
248 int ret = pqImplementation::myPVMain->Initialize(pqImplementation::myPVOptions,
249 pqImplementation::myPVHelper,
250 ParaViewInitializeInterpreter,
253 // Tell process module that we support Multiple connections.
254 // This must be set before starting the event loop.
255 vtkProcessModule::GetProcessModule()->SupportMultipleConnectionsOn();
256 ret = pqImplementation::myPVHelper->Run(pqImplementation::myPVOptions);
267 \brief Static method, cleans up ParaView session at application exit.
269 void PVGUI_Module::pvShutdown()
275 \brief Shows (toShow = true) or hides ParaView view window
277 void PVGUI_Module::showView( bool toShow )
279 // TODO: check if ParaView view already exists
280 if ( !Implementation ){
281 LightApp_Application* anApp = getApp();
282 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
283 PVGUI_ViewManager* viewMgr = new PVGUI_ViewManager( anApp->activeStudy(), anApp->desktop() );
284 anApp->addViewManager( viewMgr );
285 connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
286 anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) );
287 //connect( viewMgr, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), vm, SLOT( onViewCreated( SUIT_ViewWindow* ) ) );
288 //connect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ), this, SLOT( onViewDeleted( SUIT_ViewWindow* ) ) );
289 SUIT_ViewWindow* wnd = viewMgr->createViewWindow();
291 // Simulate ParaView client main window
292 Implementation = new pqImplementation( anApp->desktop() );
293 PVGUI_ViewWindow* pvWnd = dynamic_cast<PVGUI_ViewWindow*>( wnd );
294 pvWnd->setMultiViewManager( &Implementation->Core.multiViewManager() );
302 setupDockWidgetsContextMenu();
304 // Now that we're ready, initialize everything ...
305 Implementation->Core.initializeStates();
308 restoreDockWidgetsState();
312 \brief Manage the label of Undo operation.
314 void PVGUI_Module::onUndoLabel( const QString& label )
316 action(UndoId)->setText(
317 label.isEmpty() ? tr("MEN_CANTUNDO") : QString(tr("MEN_UNDO_ACTION")).arg(label));
318 action(UndoId)->setStatusTip(
319 label.isEmpty() ? tr("MEN_CANTUNDO") : QString(tr("MEN_UNDO_ACTION_TIP")).arg(label));
323 \brief Manage the label of Redo operation.
325 void PVGUI_Module::onRedoLabel( const QString& label )
327 action(RedoId)->setText(
328 label.isEmpty() ? tr("MEN_CANTREDO") : QString(tr("MEN_REDO_ACTION")).arg(label));
329 action(RedoId)->setStatusTip(
330 label.isEmpty() ? tr("MEN_CANTREDO") : QString(tr("MEN_REDO_ACTION_TIP")).arg(label));
334 \brief Manage the label of Undo Camera operation.
336 void PVGUI_Module::onCameraUndoLabel( const QString& label )
338 action(CameraUndoId)->setText(
339 label.isEmpty() ? tr("MEN_CANT_CAMERA_UNDO") : QString(tr("MEN_CAMERA_UNDO_ACTION")).arg(label));
340 action(CameraUndoId)->setStatusTip(
341 label.isEmpty() ? tr("MEN_CANT_CAMERA_UNDO") : QString(tr("MEN_CAMERA_UNDO_ACTION_TIP")).arg(label));
345 \brief Manage the label of Redo Camera operation.
347 void PVGUI_Module::onCameraRedoLabel( const QString& label )
349 action(CameraRedoId)->setText(
350 label.isEmpty() ? tr("MEN_CANT_CAMERA_REDO") : QString(tr("MEN_CAMERA_REDO_ACTION")).arg(label));
351 action(CameraRedoId)->setStatusTip(
352 label.isEmpty() ? tr("MEN_CANT_CAMERA_REDO") : QString(tr("MEN_CAMERA_REDO_ACTION_TIP")).arg(label));
356 \brief Slot to delete all objects.
358 void PVGUI_Module::onDeleteAll()
360 pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();
361 Implementation->Core.getApplicationUndoStack()->beginUndoSet("Delete All");
362 builder->destroyPipelineProxies();
363 Implementation->Core.getApplicationUndoStack()->endUndoSet();
367 \brief Slot to check/uncheck the action for corresponding selection mode.
369 void PVGUI_Module::onSelectionModeChanged( int mode )
371 if( toolMgr()->toolBar( mySelectionControlsTb )->isEnabled() ) {
372 if(mode == pqRubberBandHelper::SELECT) //surface selection
373 action(SelectCellsOnId)->setChecked(true);
374 else if(mode == pqRubberBandHelper::SELECT_POINTS) //surface selection
375 action(SelectPointsOnId)->setChecked(true);
376 else if(mode == pqRubberBandHelper::FRUSTUM)
377 action(SelectCellsThroughId)->setChecked(true);
378 else if(mode == pqRubberBandHelper::FRUSTUM_POINTS)
379 action(SelectPointsThroughId)->setChecked(true);
380 else if (mode == pqRubberBandHelper::BLOCKS)
381 action(SelectBlockId)->setChecked(true);
383 action(InteractId)->setChecked(true);
388 \brief Slot to manage the change of axis center.
390 void PVGUI_Module::onShowCenterAxisChanged( bool enabled )
392 action(ShowCenterId)->setEnabled(enabled);
393 action(ShowCenterId)->blockSignals(true);
394 pqRenderView* renView = qobject_cast<pqRenderView*>(
395 pqActiveView::instance().current());
396 action(ShowCenterId)->setChecked( renView ? renView->getCenterAxesVisibility() : false);
397 action(ShowCenterId)->blockSignals(false);
401 \brief Slot to set tooltips for the first anf the last frames, i.e. a time range of animation.
403 void PVGUI_Module::setTimeRanges( double start, double end )
405 action(FirstFrameId)->setToolTip(QString("First Frame (%1)").arg(start, 0, 'g'));
406 action(LastFrameId)->setToolTip(QString("Last Frame (%1)").arg(end, 0, 'g'));
410 \brief Slot to manage the plaing process of animation.
412 void PVGUI_Module::onPlaying( bool playing )
414 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
416 disconnect( action(PlayId), SIGNAL( triggered() ),
417 &Implementation->Core.VCRController(), SLOT( onPlay() ) );
418 connect( action(PlayId), SIGNAL( triggered() ),
419 &Implementation->Core.VCRController(), SLOT( onPause() ) );
420 action(PlayId)->setIcon(QIcon(resMgr->loadPixmap("ParaView",tr("ICON_PAUSE"),false)));
421 action(PlayId)->setText("Pa&use");
424 connect( action(PlayId), SIGNAL( triggered() ),
425 &Implementation->Core.VCRController(), SLOT( onPlay() ) );
426 disconnect( action(PlayId), SIGNAL( triggered() ),
427 &Implementation->Core.VCRController(), SLOT( onPause() ) );
428 action(PlayId)->setIcon(QIcon(resMgr->loadPixmap("ParaView",tr("ICON_PLAY"),false)));
429 action(PlayId)->setText("&Play");
432 Implementation->Core.setSelectiveEnabledState(!playing);
436 \brief Slot to add camera link.
438 void PVGUI_Module::onAddCameraLink()
440 pqView* vm = pqActiveView::instance().current();
441 pqRenderView* rm = qobject_cast<pqRenderView*>(vm);
442 if(rm) rm->linkToOtherView();
443 else SUIT_MessageBox::warning(getApp()->desktop(),
444 tr("WARNING"), tr("WRN_ADD_CAMERA_LINK"));
448 \brief Slot to show information about ParaView.
450 void PVGUI_Module::onHelpAbout()
452 pqClientAboutDialog* const dialog = new pqClientAboutDialog(getApp()->desktop());
453 dialog->setAttribute(Qt::WA_DeleteOnClose);
458 \brief Slot to show help for proxy.
460 void PVGUI_Module::showHelpForProxy( const QString& proxy )
462 // make sure assistant is ready
463 this->makeAssistant();
465 if(this->Implementation->AssistantClient) {
466 this->Implementation->AssistantClient->openAssistant();
467 QString page("%1/Documentation/%2.html");
468 page = page.arg(this->Implementation->DocumentationDir);
469 page = page.arg(proxy);
470 this->Implementation->AssistantClient->showPage(page);
474 QString Locate( const QString& appName )
476 QString app_dir = QCoreApplication::applicationDirPath();
477 const char* inst_dirs[] = {
483 for (const char** dir = inst_dirs; *dir; ++dir) {
484 QString path = app_dir;
487 //cout << "Checking : " << path.toAscii().data() << " ... ";
489 QFileInfo finfo (path);
490 if (finfo.exists()) {
491 //cout << " Success!" << endl;
494 //cout << " Failed" << endl;
496 return app_dir + QDir::separator() + appName;
500 \brief Initialized an assistant client.
502 void PVGUI_Module::makeAssistant()
504 if(this->Implementation->AssistantClient)
507 QString assistantExe;
510 const char* assistantName = "assistant";
512 const char* binDir = "\\";
513 const char* binDir1 = "\\..\\";
515 const char* binDir = "/bin/";
516 const char* binDir1 = "/bin/bin/";
519 QString helper = QString(getenv("PVHOME")) + binDir + QString("pqClientDocFinder.txt");
520 if(!QFile::exists(helper))
521 helper = QString(getenv("PVHOME")) + binDir1 + QString("pqClientDocFinder.txt");
522 if(QFile::exists(helper)) {
524 if(file.open(QIODevice::ReadOnly)) {
525 assistantExe = file.readLine().trimmed();
526 profileFile = file.readLine().trimmed();
527 // CMake escapes spaces, we need to unescape those.
528 assistantExe.replace("\\ ", " ");
529 profileFile.replace("\\ ", " ");
533 if(assistantExe.isEmpty()) {
534 assistantExe = ::Locate(assistantName);//assistantExe = ::Locate(assistantProgName);
536 QString assistant = QCoreApplication::applicationDirPath();
537 assistant += QDir::separator();
538 assistant += assistantName;
539 assistantExe = assistant;
543 this->Implementation->AssistantClient = new QAssistantClient(assistantExe, this);
544 QObject::connect(this->Implementation->AssistantClient, SIGNAL(error(const QString&)),
545 this, SLOT(assistantError(const QString&)));
548 args.append(QString("-profile"));
550 if(profileFile.isEmpty()) {
551 // see if help is bundled up with the application
552 QString profile = ::Locate("pqClient.adp");
553 /*QCoreApplication::applicationDirPath() + QDir::separator()
554 + QString("pqClient.adp");*/
556 if(QFile::exists(profile))
557 profileFile = profile;
560 if(profileFile.isEmpty() && getenv("PARAVIEW_HELP")) {
561 // not bundled, ask for help
562 args.append(getenv("PARAVIEW_HELP"));
564 else if(profileFile.isEmpty()) {
565 // no help, error out
566 SUIT_MessageBox::critical(getApp()->desktop(),"Help error", "Couldn't find"
567 " pqClient.adp.\nTry setting the PARAVIEW_HELP environment variable which"
568 " points to that file");
569 delete this->Implementation->AssistantClient;
573 QFileInfo fi(profileFile);
574 this->Implementation->DocumentationDir = fi.absolutePath();
576 args.append(profileFile);
578 this->Implementation->AssistantClient->setArguments(args);
582 \brief Slot to call the message handler with the critical message.
584 void PVGUI_Module::assistantError( const QString& error )
586 qCritical(error.toAscii().data());
590 \brief Slot to show the waiting state.
592 void PVGUI_Module::onPreAccept()
594 getApp()->desktop()->statusBar()->showMessage(tr("STB_PREACCEPT"));
595 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
599 \brief Slot to show the ready state.
601 void PVGUI_Module::onPostAccept()
603 getApp()->desktop()->statusBar()->showMessage(tr("STB_POSTACCEPT"), 2000);
604 QTimer::singleShot(0, this, SLOT(endWaitCursor()));
608 \brief Slot to switch off wait cursor.
610 void PVGUI_Module::endWaitCursor()
612 QApplication::restoreOverrideCursor();
616 \brief Returns the ParaView multi-view manager.
618 pqViewManager* PVGUI_Module::getMultiViewManager() const
620 pqViewManager* aMVM = 0;
621 if ( Implementation )
622 aMVM = &Implementation->Core.multiViewManager();
627 \brief Processes QEvent::ActionAdded and QEvent::ActionRemoved from Lookmarks toolbar
628 in order to register/unregister this action in/from QtxActionToolMgr.
630 bool PVGUI_Module::eventFilter( QObject* theObject, QEvent* theEvent )
632 QToolBar* aTB = toolMgr()->toolBar(tr("TOOL_LOOKMARKS"));
633 if ( theObject == aTB ) {
635 if ( theEvent->type() == QEvent::ActionAdded ) {
636 QList<QAction*> anActns = aTB->actions();
637 for (int i = 0; i < anActns.size(); ++i)
638 if ( toolMgr()->actionId(anActns.at(i)) == -1 ) {
639 toolMgr()->setUpdatesEnabled(false);
640 createTool( anActns.at(i), tr("TOOL_LOOKMARKS") );
641 toolMgr()->setUpdatesEnabled(true);
645 if ( theEvent->type() == QEvent::ActionRemoved ) {
646 QList<QAction*> anActns = aTB->actions();
647 QIntList aIDL = toolMgr()->idList();
648 for (int i = 0; i < aIDL.size(); ++i) {
649 if ( toolMgr()->action(aIDL.at(i))->parent() == aTB
651 !anActns.contains( toolMgr()->action(aIDL.at(i)) ) ) {
652 toolMgr()->setUpdatesEnabled(false);
653 toolMgr()->unRegisterAction( aIDL.at(i) );
654 toolMgr()->remove( aIDL.at(i), tr("TOOL_LOOKMARKS") );
655 toolMgr()->setUpdatesEnabled(true);
662 return QObject::eventFilter( theObject, theEvent );
666 \brief Activate module.
667 \param study current study
668 \return \c true if activaion is done successfully or 0 to prevent
671 bool PVGUI_Module::activateModule( SUIT_Study* study )
673 bool isDone = LightApp_Module::activateModule( study );
674 if ( !isDone ) return false;
676 if ( mySourcesMenuId != -1 ) menuMgr()->show(mySourcesMenuId);
677 if ( myFiltersMenuId != -1 ) menuMgr()->show(myFiltersMenuId);
678 setMenuShown( true );
679 setToolShown( true );
683 toolMgr()->toolBar(tr("TOOL_LOOKMARKS"))->installEventFilter(this);
685 // Make default server connection
686 if ( Implementation )
687 Implementation->Core.makeDefaultConnectionIfNoneExists();
694 \brief Deactivate module.
695 \param study current study
696 \return \c true if deactivaion is done successfully or 0 to prevent
697 deactivation on error
699 bool PVGUI_Module::deactivateModule( SUIT_Study* study )
701 toolMgr()->toolBar(tr("TOOL_LOOKMARKS"))->removeEventFilter(this);
704 menuMgr()->hide(mySourcesMenuId);
705 menuMgr()->hide(myFiltersMenuId);
706 setMenuShown( false );
707 setToolShown( false );
709 saveDockWidgetsState();
711 return LightApp_Module::deactivateModule( study );
715 \fn CAM_Module* createModule();
716 \brief Export module instance (factory function).
717 \return new created instance of the module
721 #define PVGUI_EXPORT __declspec(dllexport)
727 PVGUI_EXPORT CAM_Module* createModule() {
728 return new PVGUI_Module();