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;
35 class LIGHTAPP_EXPORT LightApp_Study : public CAM_Study
40 LightApp_Study( SUIT_Application* );
41 virtual ~LightApp_Study();
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 virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile );
59 virtual QString componentDataType( const QString& ) const;
60 virtual QString referencedToEntry( const QString& ) const;
61 virtual bool isComponent( const QString& ) const;
62 virtual void children( const QString&, QStringList& ) const;
63 virtual void components( QStringList& ) const;
66 virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
67 virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
68 virtual bool saveStudyData ( const QString& theFileName );
69 virtual bool openStudyData ( const QString& theFileName );
71 virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
72 virtual void SetListOfFiles ( const char* theModuleName,
73 const std::vector<std::string> theListOfFiles );
75 virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile ) const;
78 virtual bool openDataModel ( const QString&, CAM_DataModel* );
81 void saved ( SUIT_Study* );
82 void opened ( SUIT_Study* );
83 void closed ( SUIT_Study* );
84 void created( SUIT_Study* );
88 LightApp_Driver* myDriver;
90 friend class LightApp_Application;