Version: 9.12.0
SalomeApp_Module Class Referenceabstract

Base class for all salome modules. More...

#include <SalomeApp_Module.h>

Inheritance diagram for SalomeApp_Module:
Inheritance graph

Public Member Functions

 SalomeApp_Module (const QString &)
 
virtual ~SalomeApp_Module ()
 
virtual QString engineIOR () const =0
 
SalomeApp_ApplicationgetApp () const
 
virtual void storeVisualParameters (int savePoint)
 Virtual public. More...
 
virtual void restoreVisualParameters (int savePoint)
 Virtual public. More...
 
virtual LightApp_SelectioncreateSelection () const
 
- Public Member Functions inherited from LightApp_Module
 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_ApplicationgetApp () 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_Displayerdisplayer ()
 
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_DataModeldataModel () const
 Get data model. More...
 
CAM_Applicationapplication () 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...
 
int showNotification (const QString &message, const QString &title, int timeout=-1)
 Shows the notifications with spectified text, title and automatic close timeout. Notification will be automatically closed after specified timeout in msec. If timeout is zero then automatic closing doesn't performed. More...
 
void hideNotification (const QString &message)
 Closes the notifications with spectified text. More...
 
void hideNotification (int id)
 Closes the notifications with spectified identifier. 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...
 
QtxActionMenuMgrmenuMgr () const
 Get menu manager. More...
 
QtxActionToolMgrtoolMgr () const
 Get toolbar manager. More...
 
virtual QActionaction (const int) const
 Get action by specified id. More...
 
virtual int actionId (const QAction *) const
 Get action ID. More...
 
virtual QActioncreateAction (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 QActioncreateAction (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...
 
QtxActionGroupcreateActionGroup (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...
 
void clearTool (const QString &title)
 
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...
 
virtual void logAction (QAction *)
 Log given action. More...
 
bool isActionLoggingEnabled () const
 Return true if action logging is enabled. More...
 
void setActionLoggingEnabled (bool)
 Enable / disable action logging. More...
 

Protected Member Functions

virtual CAM_DataModelcreateDataModel ()
 
virtual void extractContainers (const SALOME_ListIO &, SALOME_ListIO &) const
 
- Protected Member Functions inherited from LightApp_Module
virtual QtxPopupMgrpopupMgr ()
 
LightApp_Preferencespreferences () const
 
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 &section=QString(), const QString &param=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_OperationcreateOperation (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_Operationoperation (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 ()
 

Additional Inherited Members

- Public Slots inherited from LightApp_Module
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 ()
 
virtual void updateInfoPanel ()
 
- 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...
 
virtual void moduleActionActivated ()
 Called when an action is triggered. More...
 
- Static Public Member Functions inherited from CAM_Module
static QActionseparator ()
 Create separator action. More...
 
- Protected Slots inherited from LightApp_Module
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 Attributes inherited from LightApp_Module
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...
 

Detailed Description

Base class for all salome modules.

Constructor & Destructor Documentation

◆ SalomeApp_Module()

SalomeApp_Module::SalomeApp_Module ( const QString &  name)

Constructor.

◆ ~SalomeApp_Module()

SalomeApp_Module::~SalomeApp_Module ( )
virtual

Destructor.

Member Function Documentation

◆ createDataModel()

CAM_DataModel * SalomeApp_Module::createDataModel ( )
protectedvirtual

Create new instance of data model and return it.

Reimplemented from LightApp_Module.

◆ createSelection()

LightApp_Selection * SalomeApp_Module::createSelection ( ) const
virtual

Create and return instance of LightApp_Selection.

Reimplemented from LightApp_Module.

References LightApp_Module::createSelection().

◆ engineIOR()

virtual QString SalomeApp_Module::engineIOR ( ) const
pure virtual

engineIOR() should be a pure virtual method, to avoid logical errors!
Implementation in derived classes can return the following values:
module`s engine IOR - means that this is a standard SALOME module with a CORBA engine

  • "" (empty string) - means that this not correct SALOME module

Implemented in SALOME_PYQT_Module, and StandardApp_Module.

◆ extractContainers()

void SalomeApp_Module::extractContainers ( const SALOME_ListIO source,
SALOME_ListIO dest 
) const
protectedvirtual

Converts objects-containers to list of objects, those are contained Other objects must be added without conversion

Parameters
source- source list of objects
dest- list of converted objects

References _PTR(), SUIT_Session::activeApplication(), SUIT_Application::activeStudy(), Handle(), and SUIT_Session::session().

◆ getApp()

SalomeApp_Application * SalomeApp_Module::getApp ( ) const

Convenient shortcuts

Gets application.

References CAM_Module::application().

◆ restoreVisualParameters()

void SalomeApp_Module::restoreVisualParameters ( int  savePoint)
virtual

Virtual public.

This method is called after the study document is opened, so the module has a possibility to restore visual parameters

◆ storeVisualParameters()

void SalomeApp_Module::storeVisualParameters ( int  savePoint)
virtual

Virtual public.

This method is called just before the study document is saved, so the module has a possibility to store visual parameters in AttributeParameter attribut


The documentation for this class was generated from the following files: