1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #include "SUIT_Study.h"
28 #include <TDocStd_Document.hxx>
29 #include <TDocStd_Application.hxx>
31 class CAF_Application;
34 #pragma warning ( disable: 4251 )
39 Represents study for using in CAF, contains reference
40 to OCAF std document and allows to use OCAF services.
41 Provides necessary functionality for OCC transactions management.
43 class CAF_EXPORT CAF_Study : public SUIT_Study
48 CAF_Study( SUIT_Application* theApp );
49 CAF_Study( SUIT_Application* theApp, Handle(TDocStd_Document)& aStdDoc );
52 virtual void createDocument();
53 virtual void closeDocument( bool = true );
54 virtual bool openDocument( const QString& );
56 virtual bool saveDocumentAs( const QString& );
59 bool isModified() const;
60 void doModified( bool = true );
68 QStringList undoNames() const;
69 QStringList redoNames() const;
71 Handle(TDocStd_Document) stdDoc() const;
74 Handle(TDocStd_Application) stdApp() const;
75 CAF_Application* cafApplication() const;
77 virtual bool openTransaction();
78 virtual bool abortTransaction();
79 virtual bool hasTransaction() const;
80 virtual bool commitTransaction( const QString& = QString::null );
82 virtual void setStdDoc( Handle(TDocStd_Document)& );
85 Handle(TDocStd_Document) myStdDoc;
88 friend class CAF_Operation;
92 #pragma warning ( default: 4251 )