X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNewGeom%2FNewGeom_DataModel.h;h=1024f275d6526488dff58f37acee2f9a42fcec8c;hb=9cea92b08d17ed1cb784b7ed774b947d03a348e1;hp=66c6bf84d0f93578bc1bff4aa975bd18ff5b7db8;hpb=18b02d3f18f6db1fb45d8510fdcdf064c17164d3;p=modules%2Fshaper.git diff --git a/src/NewGeom/NewGeom_DataModel.h b/src/NewGeom/NewGeom_DataModel.h index 66c6bf84d..1024f275d 100644 --- a/src/NewGeom/NewGeom_DataModel.h +++ b/src/NewGeom/NewGeom_DataModel.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D #ifndef NEWGEOM_DATAMODEL_H @@ -6,27 +7,39 @@ #include "NewGeom.h" #include +class NewGeom_Module; + class NewGeom_EXPORT NewGeom_DataModel : public LightApp_DataModel { Q_OBJECT -public: - NewGeom_DataModel( CAM_Module* theModule ); + public: + NewGeom_DataModel(NewGeom_Module* theModule); virtual ~NewGeom_DataModel(); - virtual bool open( const QString& thePath, CAM_Study* theStudy, QStringList theFiles ); - virtual bool save( QStringList& theFiles ); - virtual bool saveAs( const QString& thePath, CAM_Study* theStudy, QStringList& theFiles ); + virtual bool open(const QString& thePath, CAM_Study* theStudy, QStringList theFiles); + virtual bool save(QStringList& theFiles); + virtual bool saveAs(const QString& thePath, CAM_Study* theStudy, QStringList& theFiles); virtual bool close(); - virtual bool create( CAM_Study* theStudy ); + virtual bool create(CAM_Study* theStudy); virtual bool isModified() const; virtual bool isSaved() const; - virtual void update( LightApp_DataObject* theObj = 0, LightApp_Study* theStudy = 0 ); + virtual void update(LightApp_DataObject* theObj = 0, LightApp_Study* theStudy = 0); -private: - QString myStudyPath; +protected: + /** + * Removes the directory with content if it exists + * \param theDirectoryName a directory name + */ + static void removeDirectory(const QString& theDirectoryName); + private: + QString myStudyPath; + QString myTmpDirectory; /// a path to the temporary directory, created by opening a document file + /// it should be created because the files reading is postponed in the module. The directory + // should be removed after the model document is closed. + NewGeom_Module* myModule; }; -#endif \ No newline at end of file +#endif