1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
23 #include "CAM_Module.h"
25 #include "CAM_DataModel.h"
26 #include "CAM_Application.h"
27 #include "CAM_Study.h"
29 #include <QtxAction.h>
30 #include <QtxActionGroup.h>
31 #include <QtxActionMenuMgr.h>
32 #include <QtxActionToolMgr.h>
34 #include <SUIT_Desktop.h>
35 #include <SUIT_Session.h>
36 #include <SUIT_ResourceMgr.h>
42 \brief Base implementation of the module in the CAM application architecture.
44 Provides support of menu/toolbars management.
50 ActionMgrLocker( QtxActionMgr* m, bool use ) : myMgr( m ), myUseLock( use )
53 myUpdEnabled = myMgr->isUpdatesEnabled();
54 myMgr->setUpdatesEnabled( false );
60 myMgr->setUpdatesEnabled( myUpdEnabled );
71 \brief Default constructor.
73 Creates unnamed module.
75 CAM_Module::CAM_Module()
85 Creates module with the specified \a name.
87 \param name module name
89 CAM_Module::CAM_Module( const QString& name )
104 CAM_Module::~CAM_Module()
111 \brief Initialize module.
113 This method is usually called when the module is created (for example,
114 on the module library loading).
115 Successor classes can use this method to create menu/toolbar actions
116 and perform other module initialization.
118 \param app parent application object
119 \sa activateModule(), deactivateModule()
121 void CAM_Module::initialize( CAM_Application* app )
126 SUIT_Session* aSession = SUIT_Session::session();
127 connect( aSession, SIGNAL( applicationClosed( SUIT_Application* ) ),
128 this, SLOT( onApplicationClosed( SUIT_Application* ) ) );
130 connect( myApp, SIGNAL( infoChanged( QString ) ), this, SLOT( onInfoChanged( QString ) ) );
135 \brief Get module icon.
136 \return module icon pixmap
139 QPixmap CAM_Module::moduleIcon() const
141 if ( myIcon.isNull() ) {
142 QString iname = iconName();
143 if ( !iname.isEmpty() ) {
144 CAM_Module* that = (CAM_Module*)this;
145 that->myIcon = application()->resourceMgr()->loadPixmap( name(), iname, false );
152 \brief Get module icon's name.
154 This function is used to get module icon's file name.
155 Default implementation returns empty string.
157 \return module icon's name.
160 QString CAM_Module::iconName() const
162 return application()->moduleIcon( name() );
166 \brief Get module (internal) name
168 \sa setName(), moduleName(), setModuleName()
170 QString CAM_Module::name() const
176 \brief Get module title (user name)
178 \sa setModuleName(), name(), setName()
180 QString CAM_Module::moduleName() const
186 \brief Get data model.
188 Creates data model, if it is not yet created.
190 \return data model pointer
191 \sa createDataModel()
193 CAM_DataModel* CAM_Module::dataModel() const
197 CAM_Module* that = (CAM_Module*)this;
198 that->myDataModel = that->createDataModel();
199 that->myDataModel->initialize();
205 \brief Get application.
206 \return application pointer
208 CAM_Application* CAM_Module::application() const
214 \brief If return false, selection will be cleared at module activation
216 bool CAM_Module::isSelectionCompatible()
222 \brief Activate module.
224 This method is called when the user activates module.
225 Successor classes can use this method to customize module activation process,
226 for example, to show own menus, toolbars, etc.
228 Default implementation always returns \c true.
230 \return \c true if module is activated successfully.
231 \sa initialize(), deactivateModule()
233 bool CAM_Module::activateModule( SUIT_Study* /*study*/ )
239 \brief Deactivate module.
241 This method is called when the user deactivates module.
242 Successor classes can use this method to customize module deactivation process,
243 for example, to hide own menus, toolbars, etc.
245 Default implementation always returns \c true.
247 \return \c true if module is deactivated successfully.
248 \sa initialize(), activateModule()
250 bool CAM_Module::deactivateModule( SUIT_Study* )
256 \brief Called when study is closed.
258 Removes data model from the \a study.
260 \param study study being closed
262 void CAM_Module::studyClosed( SUIT_Study* study )
264 CAM_Study* camDoc = dynamic_cast<CAM_Study*>( study );
268 CAM_DataModel* dm = dataModel();
269 if ( dm && camDoc->containsDataModel( dm ) ) {
271 camDoc->removeDataModel( dm );
276 \brief Called when study is changed (obsolete).
278 Default implementation does nothing.
280 \param oldStudy old study
281 \param newStudy new study
283 void CAM_Module::studyChanged( SUIT_Study* /*oldStudy*/, SUIT_Study* /*newStudy*/ )
288 \brief Check if the module is active.
289 \return \c true if module is active.
291 bool CAM_Module::isActiveModule() const
293 return application() ? application()->activeModule() == this : false;
297 \brief Put the text message into the status bar of the application main window.
299 If \a msec > 0, the message will be shown \a msec milliseconds.
300 If \a msec < 0, the message will be constantly displayed until module is active.
302 \param msg text message
303 \param msec message displaying duration in milliseconds
305 void CAM_Module::putInfo( const QString& msg, const int msec )
308 application()->putInfo( msg, msec );
315 \brief Restore message info.
317 Restores constant text message when previous information status message is removed.
319 \param txt previous message (being removed)
322 void CAM_Module::onInfoChanged( QString txt )
324 if ( txt.isEmpty() && isActiveModule() && !myInfo.isEmpty() && application() )
325 application()->putInfo( myInfo );
329 \brief Called when application is closed.
331 Nullify application pointer if the application is being closed.
333 \param theApp application
335 void CAM_Module::onApplicationClosed( SUIT_Application* theApp )
342 \brief Create data model.
343 \return created data model object or 0 if it could not be created
345 CAM_DataModel* CAM_Module::createDataModel()
347 return new CAM_DataModel( this );
351 \brief Set module (internal) name
352 \param name new module name
353 \sa name(), moduleName(), setModuleName()
355 void CAM_Module::setName( const QString& name )
357 setObjectName( name );
361 \brief Set module title (user name)
362 \param name new module title
363 \sa moduleName(), name(), setName()
365 void CAM_Module::setModuleName( const QString& name )
371 \brief Get menu manager.
372 \return menu manager pointer
374 QtxActionMenuMgr* CAM_Module::menuMgr() const
376 QtxActionMenuMgr* mgr = 0;
377 if ( application() && application()->desktop() )
378 mgr = application()->desktop()->menuMgr();
383 \brief Get toolbar manager.
384 \return toolbar manager pointer
386 QtxActionToolMgr* CAM_Module::toolMgr() const
388 QtxActionToolMgr* mgr = 0;
389 if ( application() && application()->desktop() )
390 mgr = application()->desktop()->toolMgr();
395 \brief Create toolbar with speicifed \a name.
397 If the toolbar has been already created, its ID is just returned.
399 \param name toolbar name
400 \return toolbar ID or -1 if toolbar could not be created
402 int CAM_Module::createTool( const QString& name )
407 ActionMgrLocker lock( toolMgr(), !myToolShown );
409 return toolMgr()->createToolBar( name, myToolShown );
413 \brief Add toolbar item.
415 Insert action \a to the toolbar manager and register it with specified \a id.
416 Resulting action ID may differ from the requested one. This can happen if
417 requested ID is already in use.
419 If action has been already added previously, its ID is just returned.
421 If \a id < 0, the action ID is generated automatically.
423 If \a idx < 0, the action is added to the end of the toolbar.
426 \param tBar toolbar ID
427 \param id requested action ID
428 \param idx action index (desired position in the toolbar)
429 \return action ID or -1 if toolbar item could not be added
431 int CAM_Module::createTool( QAction* a, const int tBar, const int id, const int idx )
436 ActionMgrLocker lock( toolMgr(), !myToolShown );
438 int regId = registerAction( id, a );
439 int intId = toolMgr()->insert( a, tBar, idx );
442 setToolShown( a, false );
444 return intId != -1 ? regId : -1;
448 \brief Add toolbar item.
450 Insert action \a to the toolbar manager and register it with specified \a id.
451 Resulting action ID may differ from the requested one. This can happen if
452 requested ID is already in use.
454 If action has been already added previously, its ID is just returned.
456 If \a id < 0, the action ID is generated automatically.
458 If \a idx < 0, the action is added to the end of the toolbar.
461 \param tBar toolbar name
462 \param id requested action ID
463 \param idx action index (desired position in the toolbar)
464 \return action ID or -1 if toolbar item could not be added
466 int CAM_Module::createTool( QAction* a, const QString& tBar, const int id, const int idx )
471 ActionMgrLocker lock( toolMgr(), !myToolShown );
473 int regId = registerAction( id, a );
474 int intId = toolMgr()->insert( a, tBar, idx );
477 setToolShown( a, false );
479 return intId != -1 ? regId : -1;
483 \brief Add toolbar item.
485 Insert action with \a id identifier to the toolbar manager.
486 It is assumed that action has been already registered.
488 Resulting action ID may differ from the requested one. This can happen if
489 requested ID is already in use.
491 If action has been already added previously, its ID is just returned.
493 If \a idx < 0, the action is added to the end of the toolbar.
496 \param tBar toolbar ID
497 \param idx action index (desired position in the toolbar)
498 \return action ID or -1 if toolbar item could not be added
500 int CAM_Module::createTool( const int id, const int tBar, const int idx )
505 ActionMgrLocker lock( toolMgr(), !myToolShown );
507 int intId = toolMgr()->insert( action( id ), tBar, idx );
510 setToolShown( action( id ), false );
512 return intId != -1 ? id : -1;
516 \brief Add toolbar item.
518 Insert action with \a id identifier to the toolbar manager.
519 It is assumed that action has been already registered.
521 Resulting action ID may differ from the requested one. This can happen if
522 requested ID is already in use.
524 If action has been already added previously, its ID is just returned.
526 If \a idx < 0, the action is added to the end of the toolbar.
529 \param tBar toolbar name
530 \param idx action index (desired position in the toolbar)
531 \return action ID or -1 if toolbar item could not be added
533 int CAM_Module::createTool( const int id, const QString& tBar, const int idx )
538 ActionMgrLocker lock( toolMgr(), !myToolShown );
540 int intId = toolMgr()->insert( action( id ), tBar, idx );
543 setToolShown( action( id ), false );
545 return intId != -1 ? id : -1;
549 \brief Create menu or submenu.
551 Create main menu or popup submenu and register it with specified \a id.
552 Resulting action ID may differ from the requested one. This can happen if
553 requested ID is already in use.
555 If \a id < 0, the menu ID is generated automatically.
556 If menu has been already created previously, its ID is just returned.
558 The \a menu parameter represents the menu name - it could be a sequence
559 of strings, separated by '|' symbol. For example, "File|Edit" means
560 File->Edit submenu. If menu doesn't exist, it is created automatically.
562 Parameter \a idx defines the index of the menu item in the menu group which
563 is defined by the \a group. If \a idx < 0, the menu/submenu is added to the
564 end of the menu group.
566 \param subMenu subMenu name
567 \param menu parent menu ID
568 \param id requested menu ID
569 \param group menu group ID
570 \param idx menu item index (desired position in the menu group)
571 \return menu item ID or -1 if menu item could not be added
573 int CAM_Module::createMenu( const QString& subMenu, const int menu,
574 const int id, const int group, const int idx )
579 return menuMgr()->insert( subMenu, menu, group, id, idx );
583 \brief Create menu or submenu.
585 Create main menu or popup submenu and register it with specified \a id.
586 Resulting action ID may differ from the requested one. This can happen if
587 requested ID is already in use.
589 If \a id < 0, the menu ID is generated automatically.
590 If menu has been already created previously, its ID is just returned.
592 The \a menu parameter represents the menu name - it could be a sequence
593 of strings, separated by '|' symbol. For example, "File|Edit" means
594 File->Edit submenu. If menu doesn't exist, it is created automatically.
596 Parameter \a idx defines the index of the menu item in the menu group which
597 is defined by the \a group. If \a idx < 0, the menu/submenu is added to the
598 end of the menu group.
600 \param subMenu subMenu name
601 \param menu parent menu name(s)
602 \param id requested menu ID
603 \param group menu group ID
604 \param idx menu item index (desired position in the menu group)
605 \return menu item ID or -1 if menu item could not be added
607 int CAM_Module::createMenu( const QString& subMenu, const QString& menu,
608 const int id, const int group, const int idx )
613 return menuMgr()->insert( subMenu, menu, group, id, idx );
617 \brief Add menu item.
619 Insert action \a to the menu manager and register it with specified \a id.
620 Resulting action ID may differ from the requested one. This can happen if
621 requested ID is already in use.
623 If \a id < 0, the action ID is generated automatically.
625 If action has been already added previously, its ID is just returned.
627 Parameter \a idx defines the index of the menu item in the menu group which
628 is defined by the \a group. If \a idx < 0, the action is added to the
629 end of the menu group.
633 \param id requested action ID
634 \param group menu group ID
635 \param idx action index (desired position in the menu group)
636 \return action ID or -1 if menu item could not be added
638 int CAM_Module::createMenu( QAction* a, const int menu, const int id, const int group, const int idx )
640 if ( !a || !menuMgr() )
643 ActionMgrLocker lock( menuMgr(), !myMenuShown );
645 int regId = registerAction( id, a );
646 int intId = menuMgr()->insert( a, menu, group, idx );
649 setMenuShown( a, false );
651 return intId != -1 ? regId : -1;
655 \brief Add menu item.
657 Insert action \a to the menu manager and register it with specified \a id.
658 Resulting action ID may differ from the requested one. This can happen if
659 requested ID is already in use.
661 If \a id < 0, the action ID is generated automatically.
663 If action has been already added previously, its ID is just returned.
665 The \a menu parameter represents the menu name - it could be a sequence
666 of strings, separated by '|' symbol. For example, "File|Edit" means
667 File->Edit submenu. If menu doesn't exist, it is created automatically.
669 Parameter \a idx defines the index of the menu item in the menu group which
670 is defined by the \a group. If \a idx < 0, the action is added to the
671 end of the menu group.
674 \param menu menu name(s)
675 \param id requested action ID
676 \param group menu group ID
677 \param idx action index (desired position in the menu group)
678 \return action ID or -1 if menu item could not be added
680 int CAM_Module::createMenu( QAction* a, const QString& menu, const int id, const int group, const int idx )
682 if ( !a || !menuMgr() )
685 ActionMgrLocker lock( menuMgr(), !myMenuShown );
687 int regId = registerAction( id, a );
688 int intId = menuMgr()->insert( a, menu, group, idx );
691 setMenuShown( a, false );
693 return intId != -1 ? regId : -1;
697 \brief Add menu item.
699 Insert action with \a id identifier to the menu manager.
700 It is assumed that action has been already registered.
702 Resulting action ID may differ from the requested one. This can happen if
703 requested ID is already in use.
705 If action has been already added previously, its ID is just returned.
707 Parameter \a idx defines the index of the menu item in the menu group which
708 is defined by the \a group. If \a idx < 0, the action is added to the
709 end of the menu group.
713 \param group menu group ID
714 \param idx action index (desired position in the menu group)
715 \return action ID or -1 if menu item could not be added
717 int CAM_Module::createMenu( const int id, const int menu, const int group, const int idx )
722 ActionMgrLocker lock( menuMgr(), !myMenuShown );
724 int intId = menuMgr()->insert( action( id ), menu, group, idx );
727 setMenuShown( action( id ), false );
729 return intId != -1 ? id : -1;
733 \brief Add menu item.
735 Insert action with \a id identifier to the menu manager.
736 It is assumed that action has been already registered.
738 Resulting action ID may differ from the requested one. This can happen if
739 requested ID is already in use.
741 If action has been already added previously, its ID is just returned.
743 The \a menu parameter represents the menu name - it could be a sequence
744 of strings, separated by '|' symbol. For example, "File|Edit" means
745 File->Edit submenu. If menu doesn't exist, it is created automatically.
747 Parameter \a idx defines the index of the menu item in the menu group which
748 is defined by the \a group. If \a idx < 0, the action is added to the
749 end of the menu group.
752 \param menu menu name(s)
753 \param group menu group ID
754 \param idx action index (desired position in the menu group)
755 \return action ID or -1 if menu item could not be added
757 int CAM_Module::createMenu( const int id, const QString& menu, const int group, const int idx )
762 ActionMgrLocker lock( menuMgr(), !myMenuShown );
764 int intId = menuMgr()->insert( action( id ), menu, group, idx );
767 setMenuShown( action( id ), false );
769 return intId != -1 ? id : -1;
773 \brief Show/hide all module's menus.
774 \param on if \c true, show menus, otherwise, hide all menus
777 void CAM_Module::setMenuShown( const bool on )
781 QtxActionMenuMgr* mMgr = menuMgr();
785 bool upd = mMgr->isUpdatesEnabled();
786 mMgr->setUpdatesEnabled( false );
788 QAction* sep = separator();
789 for ( QMap<int, QAction*>::Iterator it = myActionMap.begin(); it != myActionMap.end(); ++it )
791 if ( it.value() != sep )
792 mMgr->setShown( mMgr->actionId( it.value() ), on );
795 mMgr->setUpdatesEnabled( upd );
801 \brief Show/hide specified menu item.
803 \param on if \c true, show menu item, otherwise, hide it
805 void CAM_Module::setMenuShown( QAction* a, const bool on )
808 menuMgr()->setShown( menuMgr()->actionId( a ), on );
812 \brief Show/hide specified menu item.
813 \param id menu item ID
814 \param on if \c true, show menu item, otherwise, hide it
816 void CAM_Module::setMenuShown( const int id, const bool on )
818 setMenuShown( action( id ), on );
822 \brief Show/hide all module's toolbars.
823 \param on if \c true, show toolbars, otherwise, hide all toolbars
826 void CAM_Module::setToolShown( const bool on )
830 QtxActionToolMgr* tMgr = toolMgr();
834 bool upd = tMgr->isUpdatesEnabled();
835 tMgr->setUpdatesEnabled( false );
837 QAction* sep = separator();
838 for ( QMap<int, QAction*>::Iterator it = myActionMap.begin(); it != myActionMap.end(); ++it )
840 if ( it.value() != sep )
841 tMgr->setShown( tMgr->actionId( it.value() ), on );
844 tMgr->setUpdatesEnabled( upd );
850 \brief Show/hide specified toolbar item.
852 \param on if \c true, show toolbar item, otherwise, hide it
854 void CAM_Module::setToolShown( QAction* a, const bool on )
857 toolMgr()->setShown( toolMgr()->actionId( a ), on );
861 \brief Show/hide specified toolbar item.
862 \param id toolbar item ID
863 \param on if \c true, show toolbar item, otherwise, hide it
865 void CAM_Module::setToolShown( const int id, const bool on )
867 setToolShown( action( id ), on );
871 \brief Get action by specified \a id.
873 \return action or 0 if not found
875 QAction* CAM_Module::action( const int id ) const
878 if ( myActionMap.contains( id ) )
880 else if ( menuMgr() ) {
881 QMenu* m = menuMgr()->findMenu( id );
882 if ( m ) a = m->menuAction();
888 \brief Get action ID.
890 \return action ID or -1 if not found
892 int CAM_Module::actionId( const QAction* a ) const
895 for ( QMap<int, QAction*>::ConstIterator it = myActionMap.begin(); it != myActionMap.end() && id == -1; ++it )
897 if ( it.value() == a )
904 \brief Create new instance of QtxAction and register action with specified \a id.
906 Resulting action ID may differ from the requested one. This can happen if
907 requested ID is already in use.
909 If \a id < 0, the action ID is generated automatically.
911 \param id required action ID
912 \param text tooltip text
913 \param icon action icon
914 \param menu menu text
915 \param tip status bar tip
916 \param key keyboard accelerator
917 \param parent parent object
918 \param toggle if \c true, the action will be toggled
919 \param reciever action activation signal receiver object
920 \param member action activation signal receiver slot
922 QAction* CAM_Module::createAction( const int id, const QString& text, const QIcon& icon,
923 const QString& menu, const QString& tip, const int key,
924 QObject* parent, const bool toggle, QObject* reciever,
925 const char* member, const QString& shortcutAction )
927 QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction );
928 a->setStatusTip( tip );
930 if ( reciever && member )
931 connect( a, SIGNAL( triggered( bool ) ), reciever, member );
933 registerAction( id, a );
939 \brief Create new action group.
940 \param id action group ID
941 \param exclusive \c true for exclusive action group
942 \return created action group
944 QtxActionGroup* CAM_Module::createActionGroup( const int id, const bool exclusive )
946 QtxActionGroup* a = qobject_cast<QtxActionGroup*>( action( id ) );
948 a = new QtxActionGroup( this );
949 registerAction( id, a );
951 a->setExclusive( exclusive );
956 \brief Register action in the internal action map.
958 If action has been already added previously, its ID is just returned.
959 If \a id < 0, the action ID is generated automatically.
961 \param id action required ID
965 int CAM_Module::registerAction( const int id, QAction* a )
968 for ( QMap<int, QAction*>::ConstIterator it = myActionMap.begin(); it != myActionMap.end() && ident == -1; ++it )
969 if ( it.value() == a )
975 static int generatedId = -1;
976 ident = id < 0 ? --generatedId : id;
978 myActionMap.insert( ident, a );
981 menuMgr()->registerAction( a );
984 toolMgr()->registerAction( a );
986 if ( application() && application()->desktop() )
987 application()->desktop()->addAction( a );
993 \brief Unregister action from the internal action map.
996 \return \c true on success or \c false if action is in use
998 bool CAM_Module::unregisterAction( const int id )
1000 return unregisterAction( action( id ) );
1004 \brief Unregister action from the internal action map.
1007 \return \c true on success or \c false if action is in use
1009 bool CAM_Module::unregisterAction( QAction* a )
1014 int id = menuMgr()->actionId( a );
1015 if ( id != -1 && menuMgr()->containsMenu( id, -1 ) )
1019 int id = toolMgr()->actionId( a );
1020 if ( id != -1 && toolMgr()->containsAction( id ) )
1024 menuMgr()->unRegisterAction( menuMgr()->actionId( a ) );
1026 toolMgr()->unRegisterAction( toolMgr()->actionId( a ) );
1031 \brief Create separator action.
1033 Separator action can be used in menus or toolbars.
1035 \return new separator action
1037 QAction* CAM_Module::separator()
1039 return QtxActionMgr::separator();
1043 \brief Update visibility state of the module objects.
1045 void CAM_Module::updateModuleVisibilityState() {
1050 \brief Activate GUI operation of module by its ID.
1051 This method is called from CAM_Application::startOperation().
1052 \param actionId is a numerical unique operation id.
1054 bool CAM_Module::activateOperation( int actionId )
1060 \brief Activate GUI operation of module by its ID.
1061 This method is called from CAM_Application::startOperation().
1062 \param actionId is a string unique operation id.
1064 bool CAM_Module::activateOperation( const QString& actionId )
1070 \brief Activate GUI operation of module by its ID and \a pluginName.
1071 This method is called from CAM_Application::startOperation().
1072 \param actionId is a string unique operation id.
1073 \param pluginName is a name of a plugin where the operation is implemented.
1075 bool CAM_Module::activateOperation( const QString& actionId, const QString& pluginName )
1082 \brief Connect data model of the module to the active study
1083 \param camStudy CAM study object
1085 void CAM_Module::connectToStudy( CAM_Study* camStudy )
1087 CAM_Application* app = camStudy ? dynamic_cast<CAM_Application*>( camStudy->application() ) : 0;
1091 CAM_DataModel* prev = 0;
1092 CAM_Application::ModuleList mods = app->modules();
1093 for( QList<CAM_Module*>::const_iterator it = mods.begin(); it != mods.end(); ++it )
1095 CAM_DataModel* dm = (*it)->dataModel();
1096 if( (*it) == this && !camStudy->containsDataModel( dm ) )
1099 camStudy->insertDataModel( (*it)->dataModel(), prev );
1101 camStudy->insertDataModel( (*it)->dataModel(), 0 );
1108 \fn void CAM_Module::contextMenuPopup( const QString& type, QMenu* menu, QString& title );
1109 \brief Create context popup menu.
1110 \param type popup menu context
1111 \param menu popup menu
1112 \param title popup menu title, which can be set by the module if required
1116 \fn void CAM_Module::updateCommandsStatus();
1117 \brief Update menu/toolbar actions.