From: vsr Date: Thu, 25 Sep 2008 03:54:10 +0000 (+0000) Subject: 0013946: Implement QActionGroup functionality for SALOME series 5x X-Git-Tag: V5_1_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3837291a06c8a8ba2bf53c0ac154dc164d6e782b;p=modules%2Fgui.git 0013946: Implement QActionGroup functionality for SALOME series 5x --- 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 b9867a0fe..39b570b2b 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -50,7 +51,6 @@ #include #include #include -#include #include "sipAPISalomePyQtGUI.h" @@ -1669,18 +1669,17 @@ QAction* SALOME_PYQT_Module::createAction( const int id, const QString& text, co \param toggle \c true for checkable action \return created action */ -/* -QActionGroup* SALOME_PYQT_Module::createActionGroup(const int id, const bool exclusive) +QtxActionGroup* SALOME_PYQT_Module::createActionGroup(const int id, const bool exclusive) { - QActionGroup* a = action( id ); - if ( !a || !a->inherits( "QActionGroup" ) ) { - a = new QActionGroup( this ); + QtxActionGroup* a = qobject_cast( action( id ) ); + if ( !a ) { + a = new QtxActionGroup( this ); SalomeApp_Module::registerAction( id, a ); } a->setExclusive( exclusive ); - return (QActionGroup*)a; + return a; } -*/ + /*! \brief Load icon from resource file. \param fileName icon file name 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 510fcabb9..6af84654d 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h @@ -39,7 +39,7 @@ class SALOME_PYQT_PyInterp; class SUIT_ViewWindow; class QAction; -class QActionGroup; +class QtxActionGroup; class QMenu; class SALOME_PYQT_EXPORT SALOME_PYQT_Module: public SalomeApp_Module @@ -109,7 +109,7 @@ public: QAction* createAction( const int, const QString&, const QString&, const QString&, const QString&, const int, const bool = false, QObject* = 0 ); - // QActionGroup* createActionGroup( const int, const bool ); + QtxActionGroup* createActionGroup( const int, const bool ); QIcon loadIcon( const QString& fileName );