ProcessVoidEvent( new TEvent( section, name ) );
}
+/*!
+ SalomePyQt::hasSetting
+ Returns True if the settings exists
+*/
+class THasColorSettingEvent: public SALOME_Event {
+public:
+ typedef bool TResult;
+ TResult myResult;
+ QString mySection;
+ QString myName;
+ THasColorSettingEvent( const QString& section, const QString& name )
+ : mySection( section ), myName( name ) {}
+ virtual void Execute() {
+ if ( SUIT_Session::session() ) {
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ myResult = resMgr->hasValue( mySection, myName );
+ }
+ }
+};
+bool SalomePyQt::hasSetting( const QString& section, const QString& name )
+{
+ return ProcessEvent( new THasColorSettingEvent( section, name ) );
+}
+
/*!
SalomePyQt::getFileName
Displays 'Open/Save file' dialog box and returns a user's choice (file name)
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 hasSetting ( const QString&, const QString& );
// obsolete
static void addStringSetting( const QString&, const QString&, bool = true );
static void addIntSetting ( const QString&, const int, bool = true );
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 hasSetting ( const QString&, const QString& );
// obsolete
static void addStringSetting( const QString&, const QString&, bool = true );
static QString stringSetting ( const QString&, const QString&, const QString& = QString("") ) /ReleaseGIL/ ;
static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() ) /ReleaseGIL/ ;
static void removeSetting ( const QString&, const QString& ) /ReleaseGIL/ ;
+ static bool hasSetting ( const QString&, const QString& ) /ReleaseGIL/ ;
// obsolete
static void addStringSetting( const QString&, const QString&, bool = true ) /ReleaseGIL/ ;