SHAPER 9.16.0
SHAPERGUI_DataModel.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
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, or (at your option) any later version.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef SHAPERGUI_DATAMODEL_H
21#define SHAPERGUI_DATAMODEL_H
22
23#include "SHAPER_SHAPERGUI.h"
24#include <LightApp_DataModel.h>
25
26class SHAPERGUI;
27
32class SHAPERGUI_EXPORT SHAPERGUI_DataModel : public LightApp_DataModel
33{
34 Q_OBJECT
35 public:
39 virtual ~SHAPERGUI_DataModel();
40
45 virtual bool open(const QString& thePath, CAM_Study* theStudy, QStringList theFiles);
46
49 virtual bool save(QStringList& theFiles);
50
55 virtual bool saveAs(const QString& thePath, CAM_Study* theStudy, QStringList& theFiles);
56
58 virtual bool close();
59
62 virtual bool create(CAM_Study* theStudy);
63
65 virtual bool isModified() const;
66
68 virtual bool isSaved() const;
69
73 virtual void initRootObject() override;
74
78 virtual void update(LightApp_DataObject* theObj = 0, LightApp_Study* theStudy = 0);
79
81 virtual bool dumpPython( const QString&, CAM_Study*, bool, QStringList& );
82
83protected:
88 static void removeDirectory(const QString& theDirectoryName);
89
90 private:
92 QString myStudyPath;
93
95 //QString myTmpDirectory;
96
98 // should be removed after the model document is closed.
99 SHAPERGUI* myModule;
100};
101
102#endif
A Data Model class provides a connection of SALOME data structure and OpenParts application data mode...
Definition: SHAPERGUI_DataModel.h:33
An implementation of SALOME connector class for implementation of XGUI functionality as a module of S...
Definition: SHAPERGUI.h:48