#include <LightApp_Module.h>
Public Slots | |
virtual bool | activateModule (SUIT_Study *) |
virtual bool | deactivateModule (SUIT_Study *) |
virtual void | studyClosed (SUIT_Study *) |
virtual void | onObjectClicked (SUIT_DataObject *, int) |
Virtual public slot. More... | |
void | onOBDestroyed () |
void | MenuItem () |
Public Slots inherited from CAM_Module | |
virtual bool | activateModule (SUIT_Study *) |
Activate module. More... | |
virtual bool | deactivateModule (SUIT_Study *) |
Deactivate module. More... | |
virtual void | connectToStudy (CAM_Study *) |
Connect data model of the module to the active study. More... | |
virtual void | studyClosed (SUIT_Study *) |
Called when study is closed. More... | |
virtual void | studyChanged (SUIT_Study *, SUIT_Study *) |
Called when study is changed (obsolete). More... | |
virtual void | onApplicationClosed (SUIT_Application *) |
Called when application is closed. More... | |
Public Member Functions | |
LightApp_Module (const QString &) | |
virtual | ~LightApp_Module () |
virtual void | initialize (CAM_Application *) |
virtual void | windows (QMap< int, int > &) const |
virtual void | viewManagers (QStringList &) const |
virtual void | contextMenuPopup (const QString &, QMenu *, QString &) |
virtual void | createPreferences () |
LightApp_Application * | getApp () const |
virtual void | update (const int) |
Update something in accordance with update flags. More... | |
virtual void | updateObjBrowser (bool=true, SUIT_DataObject *=0) |
virtual void | selectionChanged () |
virtual void | preferencesChanged (const QString &, const QString &) |
virtual void | message (const QString &) |
virtual void | studyActivated () |
virtual LightApp_Displayer * | displayer () |
virtual LightApp_Selection * | createSelection () const |
virtual bool | canCopy () const |
virtual bool | canPaste () const |
virtual bool | isDraggable (const SUIT_DataObject *) const |
virtual bool | isDropAccepted (const SUIT_DataObject *) const |
virtual void | dropObjects (const DataObjectList &, SUIT_DataObject *, const int, Qt::DropAction) |
virtual void | copy () |
Copies the current selection into clipboard. More... | |
virtual void | paste () |
Pastes the current data in the clipboard. More... | |
virtual bool | renameAllowed (const QString &) const |
Return true if object can be renamed. More... | |
virtual bool | renameObject (const QString &, const QString &) |
Return true if rename operation finished successfully, false otherwise. More... | |
virtual void | updateModuleVisibilityState () |
Public Member Functions inherited from CAM_Module | |
CAM_Module () | |
Default constructor. More... | |
CAM_Module (const QString &) | |
Constructor. More... | |
virtual | ~CAM_Module () |
Destructor. More... | |
QString | name () const |
Get module (internal) name. More... | |
QString | moduleName () const |
Get module title (user name) More... | |
virtual QPixmap | moduleIcon () const |
Get module icon. More... | |
virtual QString | iconName () const |
Get module icon's name. More... | |
CAM_DataModel * | dataModel () const |
Get data model. More... | |
CAM_Application * | application () const |
Get application. More... | |
virtual void | updateCommandsStatus () |
Update menu/toolbar actions. More... | |
virtual void | putInfo (const QString &, const int=-1) |
Put the text message into the status bar of the application main window. More... | |
bool | isActiveModule () const |
Check if the module is active. More... | |
virtual void | setMenuShown (const bool) |
Show/hide all module's menus. More... | |
void | setMenuShown (QAction *, const bool) |
Show/hide specified menu item. More... | |
void | setMenuShown (const int, const bool) |
Show/hide specified menu item. More... | |
virtual void | setToolShown (const bool) |
Show/hide all module's toolbars. More... | |
void | setToolShown (QAction *, const bool) |
Show/hide specified toolbar item. More... | |
void | setToolShown (const int, const bool) |
Show/hide specified toolbar item. More... | |
virtual bool | activateOperation (int actionId) |
Activate GUI operation of module by its ID. This method is called from CAM_Application::startOperation(). More... | |
virtual bool | activateOperation (const QString &actionId) |
Activate GUI operation of module by its ID. This method is called from CAM_Application::startOperation(). More... | |
virtual bool | activateOperation (const QString &actionId, const QString &pluginName) |
Activate GUI operation of module by its ID and pluginName. This method is called from CAM_Application::startOperation(). More... | |
QtxActionMenuMgr * | menuMgr () const |
Get menu manager. More... | |
QtxActionToolMgr * | toolMgr () const |
Get toolbar manager. More... | |
virtual QAction * | action (const int) const |
Get action by specified id. More... | |
virtual int | actionId (const QAction *) const |
Get action ID. More... | |
virtual QAction * | createAction (const int, const QString &, const QIcon &, const QString &, const QString &, const int, QObject *=0, const bool=false, QObject *=0, const char *=0, const QString &=QString()) |
Create new instance of QtxAction and register action with specified id. More... | |
virtual QAction * | createAction (const int, const QString &, const QIcon &, const QString &, const QString &, const QKeySequence &, QObject *=0, const bool=false, QObject *=0, const char *=0, const QString &=QString()) |
Create new instance of QtxAction and register action with specified id. More... | |
QtxActionGroup * | createActionGroup (const int, const bool=true) |
Create new action group. More... | |
int | createTool (const QString &, const QString &=QString()) |
Create toolbar with speicifed name. More... | |
int | createTool (const int, const int, const int=-1) |
Add toolbar item. More... | |
int | createTool (const int, const QString &, const int=-1) |
Add toolbar item. More... | |
int | createTool (QAction *, const int, const int=-1, const int=-1) |
Add toolbar item. More... | |
int | createTool (QAction *, const QString &, const int=-1, const int=-1) |
Add toolbar item. More... | |
int | createMenu (const QString &, const int, const int=-1, const int=-1, const int=-1, QMenu *=0) |
Create menu or submenu. More... | |
int | createMenu (const QString &, const QString &, const int=-1, const int=-1, const int=-1) |
Create menu or submenu. More... | |
int | createMenu (const int, const int, const int=-1, const int=-1) |
Add menu item. More... | |
int | createMenu (const int, const QString &, const int=-1, const int=-1) |
Add menu item. More... | |
int | createMenu (QAction *, const int, const int=-1, const int=-1, const int=-1) |
Add menu item. More... | |
int | createMenu (QAction *, const QString &, const int=-1, const int=-1, const int=-1) |
Add menu item. More... | |
Protected Slots | |
virtual void | onModelSaved () |
virtual void | onModelOpened () |
virtual void | onModelClosed () |
virtual void | onOperationStopped (SUIT_Operation *) |
Virtual protected slot called when operation stopped. More... | |
virtual void | onOperationDestroyed () |
Virtual protected slot called when operation destroyed. More... | |
virtual void | onShowHide () |
virtual void | onViewManagerAdded (SUIT_ViewManager *) |
virtual void | onViewManagerRemoved (SUIT_ViewManager *) |
Protected Member Functions | |
virtual QtxPopupMgr * | popupMgr () |
LightApp_Preferences * | preferences () const |
virtual CAM_DataModel * | createDataModel () |
virtual bool | reusableOperation (const int id) |
int | addPreference (const QString &label) |
int | addPreference (const QString &label, const int pId, const int type=LightApp_Preferences::Auto, const QString §ion=QString(), const QString ¶m=QString()) |
QVariant | preferenceProperty (const int, const QString &) const |
void | setPreferenceProperty (const int, const QString &, const QVariant &) |
void | startOperation (const int) |
Starts operation with given identifier. More... | |
virtual LightApp_Operation * | createOperation (const int) const |
Creates operation with given identifier. More... | |
virtual void | updateControls () |
Updates controls. More... | |
virtual bool | isSelectionCompatible () |
If return false, selection will be cleared at module activation. More... | |
LightApp_Operation * | operation (const int) const |
Returns instance of operation by its id; if there is no operation corresponding to this id, null pointer is returned. More... | |
Protected Member Functions inherited from CAM_Module | |
void | setName (const QString &) |
Set module (internal) name. More... | |
virtual void | setModuleName (const QString &) |
Set module title (user name) More... | |
int | registerAction (const int, QAction *) |
Register action in the internal action map. More... | |
bool | unregisterAction (const int) |
Unregister action from the internal action map. More... | |
bool | unregisterAction (QAction *) |
Unregister action from the internal action map. More... | |
virtual bool | abortAllOperations () |
Protected Attributes | |
int | myDisplay |
int | myErase |
int | myDisplayOnly |
int | myEraseAll |
bool | myIsFirstActivate |
Protected Attributes inherited from CAM_Module | |
QMap< QAction *, QKeySequence > | myActionShortcutMap |
copy actions shortcut map More... | |
Private Types | |
typedef QMap< int, LightApp_Operation * > | MapOfOperation |
Private Attributes | |
QtxPopupMgr * | myPopupMgr |
MapOfOperation | myOperations |
LightApp_SwitchOp * | mySwitchOp |
Additional Inherited Members | |
Static Public Member Functions inherited from CAM_Module | |
static QAction * | separator () |
Create separator action. More... | |
Base class for all light modules
|
private |
LightApp_Module::LightApp_Module | ( | const QString & | name | ) |
Constructor.
|
virtual |
Destructor.
References mySwitchOp.
|
virtualslot |
Activate module.
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
References CAM_Module::action(), CAM_Module::activateModule(), CAM_Module::application(), SUIT_SelectionMgr::clearSelected(), getApp(), isSelectionCompatible(), CAM_Module::moduleName(), myDisplay, myErase, mySwitchOp, CAM_Module::name(), onViewManagerAdded(), onViewManagerRemoved(), QtxResourceMgr::raiseTranslators(), SUIT_Application::resourceMgr(), LightApp_Application::selectionMgr(), SUIT_ShortcutMgr::setSectionEnabled(), and SUIT_Application::shortcutMgr().
|
protected |
Add preference to preferences.
References LightApp_Preferences::addPreference(), CAM_Module::moduleName(), and preferences().
|
protected |
Add preference to preferences.
References LightApp_Preferences::addPreference(), CAM_Module::moduleName(), and preferences().
|
virtual |
virtual method
|
virtual |
virtual method
Context menu popup.
Reimplemented from CAM_Module.
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
References createSelection(), getApp(), LightApp_Selection::init(), popupMgr(), QtxPopupMgr::setMenu(), QtxPopupMgr::setSelection(), and QtxPopupMgr::updateMenu().
|
virtual |
virtual method
|
protectedvirtual |
Create new instance of data model and return it.
Reimplemented from CAM_Module.
Reimplemented in SALOME_PYQT_ModuleLight, and SalomeApp_Module.
|
protectedvirtual |
Create operation by its id. You must not call this method, it will be called automatically by startOperation. Please redefine this method in current module
id | - identifier of operation to be started |
Creates operation with given id. You should not call this method, it will be called automatically from startOperation. You may redefine this method in concrete module to create operations.
References LightApp_ShowHideOp::DISPLAY, LightApp_ShowHideOp::DISPLAY_ONLY, LightApp_ShowHideOp::ERASE, LightApp_ShowHideOp::ERASE_ALL, myDisplay, myDisplayOnly, myErase, and myEraseAll.
|
virtual |
NOT IMPLEMENTED
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
virtual |
Create and return instance of LightApp_Selection.
Reimplemented in SalomeApp_Module.
|
virtualslot |
Deactivate module.
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
References CAM_Module::action(), CAM_Module::application(), CAM_Module::deactivateModule(), CAM_Module::moduleName(), myDisplay, myErase, myOperations, mySwitchOp, onViewManagerAdded(), onViewManagerRemoved(), SUIT_ShortcutMgr::setSectionEnabled(), and SUIT_Application::shortcutMgr().
|
virtual |
Must be redefined in order to use standard displayer mechanism
|
virtual |
virtual method Complete drag-n-drop operation by processing objects what being dragged, dropped to the line row within the object where. The drop action being performed is specified by action.
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
LightApp_Application * LightApp_Module::getApp | ( | ) | const |
Gets application.
References CAM_Module::application().
|
virtual |
Initialize module.
Reimplemented from CAM_Module.
Reimplemented in StandardApp_Module, SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
References CAM_Module::initialize(), CAM_Module::name(), QtxResourceMgr::raiseTranslators(), and SUIT_Application::resourceMgr().
|
virtual |
virtual method
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
virtual |
virtual method
where
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
protectedvirtual |
Reimplemented from CAM_Module.
References SUIT_Application::activeStudy(), LightApp_DataObject::componentDataType(), LightApp_Study::componentDataType(), CAM_Module::dataModel(), getApp(), Handle(), and CAM_DataModel::root().
|
slot |
NOT IMPLEMENTED
|
virtual |
NOT IMPLEMENTED
|
protectedvirtualslot |
NOT IMPLEMENTED
Reimplemented in SALOME_PYQT_ModuleLight.
|
protectedvirtualslot |
NOT IMPLEMENTED
|
protectedvirtualslot |
NOT IMPLEMENTED
|
slot |
References myIsFirstActivate.
|
virtualslot |
This method is called after the object inserted into data view to update their visibility state This is default implementation
References SUIT_Session::activeApplication(), SUIT_Application::activeStudy(), LightApp_DataObject::entry(), Qtx::HiddenState, CAM_Module::isActiveModule(), myDisplay, myErase, SUIT_Session::session(), Qtx::ShownState, startOperation(), SUIT_DataObject::VisibilityId, and LightApp_Study::visibilityState().
|
protectedvirtualslot |
theOp | - destroyed operation |
Virtual protected slot called when operation destroyed. Redefine this slot if you want to perform actions after destroying operation. Base implementation removes pointer on destroyed operation from the map of operations
References myOperations, and s.
|
protectedvirtualslot |
theOp | - stopped operation |
Virtual protected slot called when operation stopped. Redefine this slot if you want to perform actions after stopping operation
|
protectedvirtualslot |
SLOT: called on activating of standard operations show/hide
References CAM_Module::actionId(), popupMgr(), and startOperation().
|
protectedvirtualslot |
virtual SLOT: called on view manager adding
|
protectedvirtualslot |
virtual SLOT: called on view manager removing
|
protected |
|
virtual |
virtual method
|
protectedvirtual |
Gets popup manager.(create if not exist)
References CAM_Module::actionId(), CAM_Module::application(), CAM_Module::createAction(), SUIT_Application::desktop(), QtxActionMenuMgr::insert(), myDisplay, myDisplayOnly, myErase, myEraseAll, myPopupMgr, CAM_Module::name(), onShowHide(), CAM_Module::separator(), QtxPopupMgr::setRule(), Plot2d_Viewer::Type(), SPlot2d_Viewer::Type(), VTKViewer_Viewer::Type(), SVTK_Viewer::Type(), OCCViewer_Viewer::Type(), and QtxPopupMgr::VisibleRule.
Gets property of preferences.
References SUIT_PreferenceMgr::itemProperty(), and preferences().
|
protected |
Gets preferences.
References getApp(), and LightApp_Application::preferences().
NOT IMPLEMENTED
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
virtual |
Rename object by entry.
entry | entry of the object |
name | new name of the object |
|
protectedvirtual |
virtual method called to manage the same operations
|
virtual |
NOT IMPLEMENTED
|
protected |
Set property of preferences.
References preferences(), and SUIT_PreferenceMgr::setItemProperty().
|
protected |
Module stores operations in map. This method starts operation by id. If operation isn't in map, then it will be created by createOperation method and will be inserted to map
id | - identifier of operation to be started |
Module stores operations in map. This method starts operation by id. If operation isn't in map, then it will be created by createOperation method and will be inserted to map
References CAM_Module::application(), createOperation(), myOperations, onOperationDestroyed(), onOperationStopped(), reusableOperation(), LightApp_Operation::setModule(), SUIT_Operation::setStudy(), and SUIT_Operation::start().
|
inlinevirtual |
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
virtualslot |
Redefined to reset internal flags valid for study instance
Reimplemented in SALOME_PYQT_Module.
References app, CAM_Module::application(), OB_Browser::model(), myIsFirstActivate, LightApp_Application::objectBrowser(), onObjectClicked(), and CAM_Module::studyClosed().
|
virtual |
theFlags | - update flags |
Update viewer or/and object browser etc. in accordance with update flags ( see LightApp_UpdateFlags enumeration ). Derived modules can redefine this method for their own purposes
References CAM_Module::dataModel(), getApp(), LightApp_Application::objectBrowser(), UF_Controls, UF_Model, UF_ObjBrowser, UF_Viewer, updateControls(), and SUIT_DataBrowser::updateTree().
|
protectedvirtual |
Updates (i.e. disable/enable) controls states (menus, tool bars etc.). This method is called from update( UF_Controls ). You may redefine it in concrete module.
|
virtual |
Update visibility state for data objects
Reimplemented from CAM_Module.
References SUIT_Session::activeApplication(), STD_Application::activeViewManager(), app, SUIT_DataObject::children(), OB_Browser::model(), myIsFirstActivate, LightApp_Application::objectBrowser(), onOBDestroyed(), onObjectClicked(), SUIT_DataBrowser::root(), SUIT_Session::session(), and LightApp_Application::updateVisibilityState().
|
virtual |
Update object browser. For updating model or whole object browser use update() method can be used.
References SUIT_Application::activeStudy(), SUIT_DataBrowser::autoUpdate(), CAM_Module::dataModel(), getApp(), LightApp_Application::objectBrowser(), SUIT_DataBrowser::setAutoUpdate(), SUIT_Study::update(), and SUIT_DataBrowser::updateTree().
|
virtual |
NOT IMPLEMENTED
Reimplemented in SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
virtual |
NOT IMPLEMENTED
Reimplemented in StandardApp_Module, SALOME_PYQT_ModuleLight, and SALOME_PYQT_Module.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |