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 LIGHTAPP_STUDY_H
20 #define LIGHTAPP_STUDY_H
23 #include <LightApp_Driver.h>
25 #include <CAM_Study.h>
26 #include <CAM_DataModel.h>
27 #include <SUIT_Study.h>
32 class SUIT_Application;
36 Custom study, using for open/close of documents HDF format.
37 Data of each module can be saved to different files, those
38 after that are combined into one HDF file
40 class LIGHTAPP_EXPORT LightApp_Study : public CAM_Study
45 LightApp_Study( SUIT_Application* );
46 virtual ~LightApp_Study();
48 virtual void createDocument();
49 virtual bool openDocument( const QString& );
50 virtual bool loadDocument( const QString& );
52 virtual bool saveDocument();
53 virtual bool saveDocumentAs( const QString& );
55 virtual void closeDocument(bool permanently = true);
57 virtual bool isSaved() const;
58 virtual bool isModified() const;
60 virtual void addComponent ( const CAM_DataModel* dm);
62 virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile );
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;
71 virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
72 virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
73 virtual bool saveStudyData ( const QString& theFileName );
74 virtual bool openStudyData ( const QString& theFileName );
76 virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
77 virtual void SetListOfFiles ( const char* theModuleName,
78 const std::vector<std::string> theListOfFiles );
80 virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile ) const;
83 virtual bool openDataModel ( const QString&, CAM_DataModel* );
86 void saved ( SUIT_Study* );
87 void opened ( SUIT_Study* );
88 void closed ( SUIT_Study* );
89 void created( SUIT_Study* );
93 LightApp_Driver* myDriver;
95 friend class LightApp_Application;