Salome HOME
e9cac640166fc66323c5f7a754dcea4b2720813a
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_DataModel.cxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/
19 //
20 #include "SUPERVGUI_DataModel.h"
21 #include <SalomeApp_Study.h>
22
23 //=======================================================================
24 // name    : SUPERVGUI_DataModel::SUPERVGUI_DataModel
25 // Purpose : Constructor
26 //=======================================================================
27 SUPERVGUI_DataModel::SUPERVGUI_DataModel( CAM_Module* theModule )
28 : SalomeApp_DataModel( theModule )
29 {
30 }
31
32 //=======================================================================
33 // name    : SUPERVGUI_DataModel::~SUPERVGUI_DataModel
34 // Purpose : Destructor
35 //=======================================================================
36 SUPERVGUI_DataModel::~SUPERVGUI_DataModel()
37 {
38 }
39
40 //================================================================
41 // Function : open
42 // Purpose  : 
43 //================================================================
44 bool SUPERVGUI_DataModel::open( const QString& str, CAM_Study* study, QStringList list )
45 {
46   return SalomeApp_DataModel::open( str, study, list );
47 }
48
49 //================================================================
50 // Function : save
51 // Purpose  : 
52 //================================================================
53 bool SUPERVGUI_DataModel::save(QStringList& list)
54 {
55   return SalomeApp_DataModel::save(list);
56 }
57
58 //================================================================
59 // Function : saveAs
60 // Purpose  : 
61 //================================================================
62 bool SUPERVGUI_DataModel::saveAs( const QString& str, CAM_Study* study, QStringList& list )
63 {
64   return SalomeApp_DataModel::saveAs( str, study, list );
65 }
66
67 //================================================================
68 // Function : close
69 // Purpose  : 
70 //================================================================
71 bool SUPERVGUI_DataModel::close()
72 {
73   return SalomeApp_DataModel::close();
74 }
75
76 //================================================================
77 // Function : close
78 // Purpose  : 
79 //================================================================
80 bool SUPERVGUI_DataModel::isModified() const
81 {
82   SalomeApp_Study* study = getStudy();
83   if(study) return study->studyDS()->IsModified();
84   return false; 
85 }
86
87 //================================================================
88 // Function : isSaved
89 // Purpose  : 
90 //================================================================
91 bool SUPERVGUI_DataModel::isSaved() const
92 {
93   return true; //SRN: BugID IPAL9377, changed from false till the more sophisticated code is implemented 
94 }