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/
19 #ifndef SALOMEAPP_STUDY_H
20 #define SALOMEAPP_STUDY_H
22 #include "SalomeApp.h"
24 #include <LightApp_Study.h>
27 #pragma warning( disable:4251 )
30 #include "SALOMEDSClient.hxx"
32 class SALOMEAPP_EXPORT SalomeApp_Study : public LightApp_Study
37 SalomeApp_Study( SUIT_Application* );
38 virtual ~SalomeApp_Study();
40 virtual int id() const;
42 virtual void createDocument();
43 virtual bool openDocument( const QString& );
44 virtual bool loadDocument( const QString& );
46 virtual bool saveDocument();
47 virtual bool saveDocumentAs( const QString& );
49 virtual void closeDocument(bool permanently = true);
51 virtual bool isSaved() const;
52 virtual bool isModified() const;
54 virtual void addComponent ( const CAM_DataModel* dm);
56 _PTR(Study) studyDS() const;
58 virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile);
60 // to delete all references to object, whose have the same component
61 void deleteReferencesTo( _PTR( SObject ) );
63 virtual QString componentDataType( const QString& ) const;
64 virtual QString referencedToEntry( const QString& ) const;
65 virtual bool isComponent( const QString& ) const;
66 virtual void children( const QString&, QStringList& ) const;
67 virtual void components( QStringList& ) const;
70 virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
71 virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
72 virtual bool saveStudyData ( const QString& theFileName );
73 virtual bool openStudyData ( const QString& theFileName );
75 virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
76 virtual void SetListOfFiles ( const char* theModuleName,
77 const std::vector<std::string> theListOfFiles);
78 virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile) const;
81 virtual void dataModelInserted( const CAM_DataModel* );
82 virtual bool openDataModel( const QString&, CAM_DataModel* );
83 void setStudyDS(const _PTR(Study)& s );
86 QString newStudyName() const;
89 _PTR(Study) myStudyDS;
93 #pragma warning( default:4251 )