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>
28 #pragma warning( disable:4251 )
31 #include "SALOMEDSClient.hxx"
33 class SALOMEAPP_EXPORT SalomeApp_Study : public LightApp_Study
38 SalomeApp_Study( SUIT_Application* );
39 virtual ~SalomeApp_Study();
41 virtual int id() const;
43 virtual void createDocument();
44 virtual bool openDocument( const QString& );
45 virtual bool loadDocument( const QString& );
47 virtual bool saveDocument();
48 virtual bool saveDocumentAs( const QString& );
50 virtual void closeDocument(bool permanently = true);
52 virtual bool isSaved() const;
53 virtual bool isModified() const;
55 virtual void addComponent ( const CAM_DataModel* dm);
57 _PTR(Study) studyDS() const;
59 virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile);
61 // to delete all references to object, whose have the same component
62 void deleteReferencesTo( _PTR( SObject ) );
64 virtual QString componentDataType( const QString& ) const;
65 virtual QString referencedToEntry( const QString& ) const;
66 virtual bool isComponent( const QString& ) const;
67 virtual void children( const QString&, QStringList& ) const;
68 virtual void components( QStringList& ) const;
70 std::vector<int> getSavePoints();
71 void removeSavePoint(int savePoint);
72 QString getNameOfSavePoint(int savePoint);
73 void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint);
74 virtual std::string getVisualComponentName();
77 virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
78 virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
79 virtual bool saveStudyData ( const QString& theFileName );
80 virtual bool openStudyData ( const QString& theFileName );
82 virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
83 virtual void SetListOfFiles ( const char* theModuleName,
84 const std::vector<std::string> theListOfFiles);
85 virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile) const;
88 virtual void dataModelInserted( const CAM_DataModel* );
89 virtual bool openDataModel( const QString&, CAM_DataModel* );
90 void setStudyDS(const _PTR(Study)& s );
93 virtual void updateModelRoot( const CAM_DataModel* );
96 QString newStudyName() const;
99 _PTR(Study) myStudyDS;
103 #pragma warning( default:4251 )