]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PAL13946 Improvment of SalomePyQt interface
authoreap <eap@opencascade.com>
Thu, 13 Mar 2008 14:29:42 +0000 (14:29 +0000)
committereap <eap@opencascade.com>
Thu, 13 Mar 2008 14:29:42 +0000 (14:29 +0000)
+  QActionGroup*          createActionGroup(const int id, const bool exclusive);

src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h

index d7f8dc59c1d7a1314f3dc8ec3ca809c33b997942..32d0467e147a09fadc982c95817ca5ac8e2c17e1 100644 (file)
@@ -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
  */
index 65def75f6289f823e55621a67a1bf4259b9b107a..dff8f973e96b1b03d7f22b25d2408c21170774ad 100644 (file)
@@ -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 );