From 2550b0883957e45815a496283b60d3d4eb0d4d06 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 20 Nov 2009 10:14:48 +0000 Subject: [PATCH] access to notebook is implemented --- src/SalomeApp/SalomeApp_Study.cxx | 15 +++++++++++++++ src/SalomeApp/SalomeApp_Study.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 1c040af7d..25c266986 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -28,6 +28,8 @@ #include "SalomeApp_Engine_i.hxx" #include "SalomeApp_VisualState.h" +#include + // temporary commented //#include @@ -78,6 +80,19 @@ _PTR(Study) SalomeApp_Study::studyDS() const return myStudyDS; } +/*! + Return instance of notebook +*/ +SALOME::Notebook_ptr SalomeApp_Study::notebook() const +{ + SALOME::Notebook_var aRes; + SALOMEDS_Study* aStudy = dynamic_cast( myStudyDS.operator->() ); + if( aStudy ) + aRes = aStudy->GetStudy()->GetNotebook(); + + return aRes._retn(); +} + /*! Create document. */ diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index 217423d1a..b9638c50d 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -23,8 +23,8 @@ #define SALOMEAPP_STUDY_H #include "SalomeApp.h" - #include +#include CORBA_CLIENT_HEADER( SALOME_Notebook ) #ifdef WIN32 #pragma warning( disable:4251 ) @@ -79,6 +79,8 @@ public: virtual void restoreState(int savePoint); void markAsSavedIn(QString theFileName); + SALOME::Notebook_ptr notebook() const; + protected: virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles ); virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles ); -- 2.39.2