return ProcessEvent( new TDumpViewEvent( filename ) );
}
+/*!
+ SalomePyQt::defaultMenuGroup
+ Returns default menu group
+*/
+class TDefMenuGroupEvent: public SALOME_Event {
+public:
+ typedef int TResult;
+ TResult myResult;
+ TDefMenuGroupEvent() : myResult( -1 ) {}
+ virtual void Execute() {
+ myResult = SALOME_PYQT_Module::defaultMenuGroup();
+ }
+};
+int SalomePyQt::defaultMenuGroup()
+{
+ return ProcessEvent( new TDefMenuGroupEvent() );
+}
+
/*!
SalomePyQt::createTool
These methods allow operating with the toolbars:
{
return ProcessEvent( new TActionIdEvent( a ) );
}
+
+/*!
+ SalomePyQt::clearMenu
+ Clears given menu (recursively if necessary)
+*/
+class TClearMenuEvent: public SALOME_Event {
+public:
+ typedef bool TResult;
+ TResult myResult;
+ int myId;
+ int myMenu;
+ bool myRemoveActions;
+ TClearMenuEvent( const int id, const int menu, const bool removeActions )
+ : myResult( false ), myId( id ), myMenu( menu ), myRemoveActions( removeActions ) {}
+ virtual void Execute() {
+ if ( SalomeApp_Application* anApp = getApplication() ) {
+ SALOME_PYQT_Module* module = SALOME_PYQT_Module::getInitModule();
+ if ( !module )
+ module = dynamic_cast<SALOME_PYQT_Module*>( anApp->activeModule() );
+ if ( module )
+ myResult = module->clearMenu( myId, myMenu, myRemoveActions );
+ }
+ }
+};
+bool SalomePyQt::clearMenu( const int id, const int menu, const bool removeActions )
+{
+ return ProcessEvent( new TClearMenuEvent( id, menu, removeActions ) );
+}
+
static bool dumpView( const QString& );
+ static int defaultMenuGroup();
+
static int createTool( const QString& );
static int createTool( const int, const int, const int = -1 );
static int createTool( const int, const QString&, const int = -1 );
static QtxAction* action( const int );
static int actionId( const QtxAction* );
+ static bool clearMenu( const int = 0, const int = 0,
+ const bool = true );
+
static void addSetting ( const QString&, const QString&, const double );
static void addSetting ( const QString&, const QString&, const int );
static void addSetting ( const QString&, const QString&, const QString& );
static bool dumpView( const QString& );
+ static int defaultMenuGroup();
+
static int createTool( const QString& );
static int createTool( const int, const int, int = -1 );
static int createTool( const int, const QString&, int = -1 );
static QtxAction* action( const int );
static int actionId( const QtxAction* );
+ static bool clearMenu( int = 0, int = 0,
+ bool = true );
+
static void addSetting ( const QString&, const QString&, const double );
static void addSetting ( const QString&, const QString&, const int /Constrained/ );
static void addSetting ( const QString&, const QString&, const QString& );
static void addSetting ( const QString&, const QString&, const QColor& );
static int integerSetting( const QString&, const QString&, int = 0 );
static double doubleSetting ( const QString&, const QString&, int = 0 );
- static bool boolSetting ( const QString&, const QString&, bool = 0 );
+ static bool boolSetting ( const QString&, const QString&, bool = false );
static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
static void removeSetting ( const QString&, const QString& );
static bool dumpView( const QString& );
+ static int defaultMenuGroup();
+
static int createTool( const QString& );
static int createTool( const int, const int, const int = -1 );
static int createTool( const int, const QString&, const int = -1 );
const int = -1, const int = -1 );
static int createMenu( QtxAction*, const QString&, const int = -1,
const int = -1, const int = -1 );
-
static QtxAction* createSeparator();
static QtxAction* createAction( const int, const QString&,
static QtxAction* action( const int );
static int actionId( const QtxAction* );
+ static bool clearMenu( const int = 0, const int = 0,
+ const bool = true );
+
static void addSetting ( const QString&, const QString&, const double );
static void addSetting ( const QString&, const QString&, const int /Constrained/ );
static void addSetting ( const QString&, const QString&, const QString& );
static void addSetting ( const QString&, const QString&, const QColor& );
static int integerSetting( const QString&, const QString&, const int = 0 );
static double doubleSetting ( const QString&, const QString&, const int = 0 );
- static bool boolSetting ( const QString&, const QString&, const bool = 0 );
+ static bool boolSetting ( const QString&, const QString&, const bool = false );
static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
static void removeSetting ( const QString&, const QString& );