From: eap Date: Thu, 13 Mar 2008 14:29:42 +0000 (+0000) Subject: PAL13946 Improvment of SalomePyQt interface X-Git-Tag: TG_start_ELNO_visualization~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e3566faa67ad2c323fa77b045f54a9c8ecbf09c;p=modules%2Fgui.git PAL13946 Improvment of SalomePyQt interface + QActionGroup* createActionGroup(const int id, const bool exclusive); --- diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx index d7f8dc59c..32d0467e1 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -1432,6 +1432,16 @@ QAction* SALOME_PYQT_Module::createAction( const int id, const QString& text, co return a; } +QActionGroup* SALOME_PYQT_Module::createActionGroup(const int id, const bool exclusive) +{ + QAction* a = action( id ); + if ( !a || !a->inherits("QActionGroup")) { + a = new QActionGroup(0,0,exclusive); + SalomeApp_Module::registerAction( id, a ); + } + return (QActionGroup*)a; +} + /*! * Load icon from resource file */ 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 65def75f6..dff8f973e 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h @@ -150,6 +150,8 @@ public: int actionId( const QAction* ) const; QAction* createAction( const int, const QString&, const QString&, const QString&, const QString&, const int, const bool = false ); + QActionGroup* createActionGroup(const int id, const bool exclusive); + /* load icon from resource file */ QIconSet loadIcon( const QString& fileName );