Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SALOME_PYQT_Module Class Reference

This class implements GUI module for CORBA engine-based Python SALOME modules.

#include <SALOME_PYQT_Module.h>

Inheritance diagram for SALOME_PYQT_Module:
Inheritance graph

Public Member Functions

 SALOME_PYQT_Module ()
 Constructor. More...
 
 ~SALOME_PYQT_Module ()
 Destructor. More...
 
QString engineIOR () const
 Get module engine IOR. More...
 
void initialize (CAM_Application *)
 Initialization of the module. More...
 
bool activateModule (SUIT_Study *)
 Activation of the module. More...
 
bool deactivateModule (SUIT_Study *)
 Deactivation of the module. More...
 
void windows (QMap< int, int > &) const
 Get the dockable windows associated with the module. More...
 
void viewManagers (QStringList &) const
 Define the compatible view windows associated with the module. More...
 
void studyActivated ()
 Process study activation. More...
 
void contextMenuPopup (const QString &, QMenu *, QString &)
 Process context popup menu request. More...
 
void createPreferences ()
 Export preferences for the Python module. More...
 
void preferencesChanged (const QString &, const QString &)
 Process module's preferences changing. More...
 
void studyClosed (SUIT_Study *)
 Called when study is closed. More...
 
bool isDraggable (const SUIT_DataObject *) const
 Test if object what can be dragged by the user. More...
 
bool isDropAccepted (const SUIT_DataObject *) const
 Test if drop operation can be done on the where object. More...
 
void dropObjects (const DataObjectList &, SUIT_DataObject *, const int, Qt::DropAction)
 Perform drop operation. More...
 
- Public Member Functions inherited from SalomeApp_Module
 SalomeApp_Module (const QString &)
 
virtual ~SalomeApp_Module ()
 
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 ()
 
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 message (const QString &)
 
virtual LightApp_Displayerdisplayer ()
 
virtual bool canCopy () const
 
virtual bool canPaste () const
 
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...
 
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...
 
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...
 

Private Attributes

PyModuleHelpermyHelper
 

Additional Inherited Members

- Public Slots inherited from LightApp_Module
virtual void onObjectClicked (SUIT_DataObject *, int)
 Virtual public slot. More...
 
void onOBDestroyed ()
 
void MenuItem ()
 
- 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 Member Functions inherited from SalomeApp_Module
virtual CAM_DataModelcreateDataModel ()
 
virtual void extractContainers (const SALOME_ListIO &, SALOME_ListIO &) const
 
- Protected Attributes inherited from LightApp_Module
int myDisplay
 
int myErase
 
int myDisplayOnly
 
int myEraseAll
 
bool myIsFirstActivate
 

Constructor & Destructor Documentation

SALOME_PYQT_Module::SALOME_PYQT_Module ( )

References myHelper.

SALOME_PYQT_Module::~SALOME_PYQT_Module ( )

Member Function Documentation

bool SALOME_PYQT_Module::activateModule ( SUIT_Study study)
virtual
Parameters
studyparent study
Returns
true if activation is successful and false otherwise
See Also
PyModuleHelper::activate()

Reimplemented from LightApp_Module.

References PyModuleHelper::activate(), LightApp_Module::activateModule(), and myHelper.

void SALOME_PYQT_Module::contextMenuPopup ( const QString &  context,
QMenu menu,
QString &   
)
virtual
Parameters
contextpopup menu context (e.g. "ObjectBrowser")
menupopup menu
titlepopup menu title (not used)
See Also
PyModuleHelper::contextMenu()

Reimplemented from LightApp_Module.

References PyModuleHelper::contextMenu(), and myHelper.

void SALOME_PYQT_Module::createPreferences ( )
virtual
bool SALOME_PYQT_Module::deactivateModule ( SUIT_Study study)
virtual
Parameters
studyparent study
Returns
true if deactivation is successful and false otherwise
See Also
PyModuleHelper::deactivate()

Reimplemented from LightApp_Module.

References PyModuleHelper::deactivate(), LightApp_Module::deactivateModule(), and myHelper.

void SALOME_PYQT_Module::dropObjects ( const DataObjectList what,
SUIT_DataObject where,
const int  row,
Qt::DropAction  action 
)
virtual
Parameters
whatlist of data objects being dropped
wheretarget data object for drop operation
rowline (child item index) where drop operation is performed to
actioncurrent drop action (copy or move)
See Also
PyModuleHelper::dropObjects()

Reimplemented from LightApp_Module.

References PyModuleHelper::dropObjects(), and myHelper.

QString SALOME_PYQT_Module::engineIOR ( ) const
virtual

This function tries to get engine IOR from the Python module using engineIOR() function. That function can load module engine using appropriate container if required. If this function is not available in Python module, the default implementation is used which loads engine to the default FactoryServer container.

Implements SalomeApp_Module.

References PyModuleHelper::engineIOR(), SalomeApp_Module::getApp(), SalomeApp_Application::lcc(), myHelper, and CAM_Module::name().

void SALOME_PYQT_Module::initialize ( CAM_Application app)
virtual
Parameters
appparent application object
See Also
PyModuleHelper::initialize()

Reimplemented from LightApp_Module.

References LightApp_Module::initialize(), PyModuleHelper::initialize(), and myHelper.

bool SALOME_PYQT_Module::isDraggable ( const SUIT_DataObject what) const
virtual
Parameters
whatdata object being tested
Returns
true if object can be dragged or false otherwise
See Also
PyModuleHelper::isDraggable()

Reimplemented from LightApp_Module.

References PyModuleHelper::isDraggable(), and myHelper.

bool SALOME_PYQT_Module::isDropAccepted ( const SUIT_DataObject where) const
virtual
Parameters
wheredata object being tested
Returns
true if if drop operation is supported by object or false otherwise
See Also
PyModuleHelper::isDropAccepted()

Reimplemented from LightApp_Module.

References PyModuleHelper::isDropAccepted(), and myHelper.

void SALOME_PYQT_Module::preferencesChanged ( const QString &  section,
const QString &  parameter 
)
virtual
Parameters
sectionpreference resources section
parameterpreference resources parameter name
See Also
PyModuleHelper::preferencesChanged()

Reimplemented from LightApp_Module.

References myHelper, and PyModuleHelper::preferencesChanged().

void SALOME_PYQT_Module::studyActivated ( )
virtual
void SALOME_PYQT_Module::studyClosed ( SUIT_Study study)
virtual
Parameters
studystudy being closed
See Also
PyModuleHelper::studyClosed()

Reimplemented from LightApp_Module.

References PyModuleHelper::modelClosed(), myHelper, and LightApp_Module::studyClosed().

void SALOME_PYQT_Module::viewManagers ( QStringList &  viewList) const
virtual
Parameters
viewListoutput list of view windows types
See Also
PyModuleHelper::viewManagers()

Reimplemented from LightApp_Module.

References myHelper, and PyModuleHelper::viewManagers().

void SALOME_PYQT_Module::windows ( QMap< int, int > &  winMap) const
virtual
Parameters
winMapoutput map of dockable windows in form { <window_type> : <dock_area> }
See Also
PyModuleHelper::windows()

Reimplemented from LightApp_Module.

References myHelper, and PyModuleHelper::windows().

Member Data Documentation

PyModuleHelper* SALOME_PYQT_Module::myHelper
private

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