From 4c69cd4610f91b3f47f9a5e60e3ff962b0f45912 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 23 Nov 2009 06:38:12 +0000 Subject: [PATCH] new method isParameter() --- src/SalomeApp/SalomeApp_Notebook.cxx | 7 +++++++ src/SalomeApp/SalomeApp_Notebook.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/SalomeApp/SalomeApp_Notebook.cxx b/src/SalomeApp/SalomeApp_Notebook.cxx index 44c73237c..f2681ea69 100644 --- a/src/SalomeApp/SalomeApp_Notebook.cxx +++ b/src/SalomeApp/SalomeApp_Notebook.cxx @@ -45,6 +45,13 @@ SalomeApp_Notebook::~SalomeApp_Notebook() { } +bool SalomeApp_Notebook::isParameter( const QString& theName ) const +{ + const char* aName = theName.toLatin1().constData(); + SALOME::Parameter_ptr aParam = myNotebook->GetParameter( aName ); + return !CORBA::is_nil( aParam ); +} + void SalomeApp_Notebook::set( const QString& theName, const QVariant& theValue ) { const char* aName = theName.toLatin1().constData(); diff --git a/src/SalomeApp/SalomeApp_Notebook.h b/src/SalomeApp/SalomeApp_Notebook.h index d5951280f..08a45ba18 100644 --- a/src/SalomeApp/SalomeApp_Notebook.h +++ b/src/SalomeApp/SalomeApp_Notebook.h @@ -46,6 +46,7 @@ public: SalomeApp_Notebook( SalomeApp_Study* theStudy ); virtual ~SalomeApp_Notebook(); + bool isParameter( const QString& theName ) const; void set( const QString& theName, const QVariant& theValue ); QVariant get( const QString& theName ) const; -- 2.39.2