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/
24 #include "SUIT_Study.h"
28 #include <TDocStd_Document.hxx>
29 #include <TDocStd_Application.hxx>
31 class CAF_Application;
34 #pragma warning ( disable: 4251 )
37 class CAF_EXPORT CAF_Study : public SUIT_Study
42 CAF_Study( SUIT_Application* theApp );
43 CAF_Study( SUIT_Application* theApp, Handle(TDocStd_Document)& aStdDoc );
46 virtual void createDocument();
47 virtual void closeDocument( bool = true );
48 virtual bool openDocument( const QString& );
50 virtual bool saveDocumentAs( const QString& );
53 bool isModified() const;
54 void doModified( bool = true );
62 QStringList undoNames() const;
63 QStringList redoNames() const;
65 Handle(TDocStd_Document) stdDoc() const;
68 Handle(TDocStd_Application) stdApp() const;
69 CAF_Application* cafApplication() const;
71 virtual bool openTransaction();
72 virtual bool abortTransaction();
73 virtual bool hasTransaction() const;
74 virtual bool commitTransaction( const QString& = QString::null );
76 virtual void setStdDoc( Handle(TDocStd_Document)& );
79 Handle(TDocStd_Document) myStdDoc;
82 friend class CAF_Operation;
86 #pragma warning ( default: 4251 )