]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
no message
authorstv <stv@opencascade.com>
Thu, 24 Nov 2005 13:17:30 +0000 (13:17 +0000)
committerstv <stv@opencascade.com>
Thu, 24 Nov 2005 13:17:30 +0000 (13:17 +0000)
src/CAF/CAF_Operation.cxx
src/CAF/CAF_Operation.h

index f5a1e51cc95e6310211c5e2e7e67284554aca34f..83cd7b16f17ee2553f1ba74ecf3ce7c4efcc1770 100755 (executable)
@@ -3,6 +3,8 @@
 #include "CAF_Study.h"
 #include "CAF_Application.h"
 
+#include <TDocStd_Document.hxx>
+
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
@@ -15,3 +17,12 @@ CAF_Operation::CAF_Operation(SUIT_Application* theApp)
 CAF_Operation::~CAF_Operation()
 {
 }
+
+Handle(TDocStd_Document) CAF_Operation::stdDoc() const
+{
+  Handle(TDocStd_Document) doc;
+  CAF_Study* s = ::qt_cast<CAF_Study*>( study() );
+  if ( s )
+    doc = s->stdDoc();
+  return doc;
+}
index b9715c41aa772506d4cf1f4bd69f5eafd6a7de03..0991bad652ca4bb2b3f5dc90625c2b27de1bb9d2 100755 (executable)
@@ -8,7 +8,10 @@
 #include <qobject.h>
 #include <qstring.h>
 
+#include <Standard.hxx>
+
 class CAF_Study;
+class Handle(TDocStd_Document);
 
 class CAF_EXPORT CAF_Operation : public SUIT_Operation
 {
@@ -17,6 +20,9 @@ class CAF_EXPORT CAF_Operation : public SUIT_Operation
 public:
        CAF_Operation( SUIT_Application* );
        virtual ~CAF_Operation();
+
+protected:
+  Handle(TDocStd_Document) stdDoc() const;
 };
 
 #endif