X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_PYQT%2FSALOME_PYQT_GUI%2FSALOME_PYQT_Module.h;h=9474fb0acadf6bceca0651dde151ff1685cdf9a8;hb=0e6b3ef503c54ff17d20ca997eec23e75eda8b87;hp=8509bf79c4bdc37363d6708c539fa60440091cc4;hpb=eeaa79f6453284d3822b4a8393d520a2da6f9ae5;p=modules%2Fgui.git diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h index 8509bf79c..9474fb0ac 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h @@ -42,6 +42,8 @@ private: SALOME_PYQT_PyInterp* myInterp; /* Python GUI module loaded */ PyObjWrapper myModule; + /* Pytho GUI being initialized (not zero only during the initialization)*/ + static SALOME_PYQT_Module* myInitModule; typedef QPtrList ActionList; @@ -75,10 +77,15 @@ public: Engines::Component_var getEngine() const; /****************************** - * Inherited from CAM_Module + * Inherited from SalomeApp_Module ******************************/ public: + /* little trick : provide an access to being activated Python module from outside; + needed by the SalomePyQt library :( + */ + static SALOME_PYQT_Module* getInitModule(); + /* initialization */ void initialize ( CAM_Application* ); @@ -93,9 +100,32 @@ public: /* get module engine IOR */ virtual QString engineIOR() const; -protected: - /* data model creation */ - CAM_DataModel* createDataModel(); + /* called when study desktop is activated */ + virtual void studyActivated(); + + /* working with toolbars : open protected methods */ + int createTool( const QString& ); + int createTool( const int, const int, const int = -1 ); + int createTool( const int, const QString&, const int = -1 ); + int createTool( QAction*, const int, const int = -1, const int = -1 ); + int createTool( QAction*, const QString&, const int = -1, const int = -1 ); + + /* working with menus : open protected methods */ + int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 ); + int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 ); + int createMenu( const int, const int, const int = -1, const int = -1 ); + int createMenu( const int, const QString&, const int = -1, const int = -1 ); + int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 ); + int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 ); + + /* create separator : open protected method */ + QAction* createSeparator(); + + /* working with actions : open protected methods */ + QAction* action( const int ) const; + int actionId( const QAction* ) const; + QAction* createAction( const int, const QString&, const QString&, const QString&, + const QString&, const int, const bool = false ); public slots: /* activation */