]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
access to notebook is implemented
authorasl <asl@opencascade.com>
Fri, 20 Nov 2009 10:14:48 +0000 (10:14 +0000)
committerasl <asl@opencascade.com>
Fri, 20 Nov 2009 10:14:48 +0000 (10:14 +0000)
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index 1c040af7df600b53178b3e251aa82c75a704c05b..25c2669866526bd089584c9da6ba4930ebf24b77 100644 (file)
@@ -28,6 +28,8 @@
 #include "SalomeApp_Engine_i.hxx"
 #include "SalomeApp_VisualState.h"
 
+#include <SALOMEDS_Study.hxx>
+
 // temporary commented
 //#include <OB_Browser.h>
 
@@ -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<SALOMEDS_Study*>( myStudyDS.operator->() );
+  if( aStudy )
+    aRes = aStudy->GetStudy()->GetNotebook();
+
+  return aRes._retn();
+}
+
 /*!
   Create document.
 */
index 217423d1a173ce62d835677b21dbd761fa3460ff..b9638c50d05207df79f6cc0039efedd4082fb883 100644 (file)
@@ -23,8 +23,8 @@
 #define SALOMEAPP_STUDY_H
 
 #include "SalomeApp.h"
-
 #include <LightApp_Study.h>
+#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 );