From 0e3566faa67ad2c323fa77b045f54a9c8ecbf09c Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 13 Mar 2008 14:29:42 +0000 Subject: [PATCH] PAL13946 Improvment of SalomePyQt interface + QActionGroup* createActionGroup(const int id, const bool exclusive); --- src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx | 10 ++++++++++ src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h | 2 ++ 2 files changed, 12 insertions(+) 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 ); -- 2.39.2