1 // LIGHT : sample (no-corba-engine) SALOME module
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // Author : Julia DOROVSKIKH
26 #ifndef LIGHTGUI_DATAMODEL_H
27 #define LIGHTGUI_DATAMODEL_H
31 #endif // _MSC_VER > 1000
33 #include <LightApp_DataModel.h>
37 class LightApp_DataObject;
38 class LIGHTGUI_DataObject;
40 class LIGHTGUI_DataModel : public LightApp_DataModel
45 LIGHTGUI_DataModel ( CAM_Module* theModule );
46 virtual ~LIGHTGUI_DataModel();
48 virtual bool open ( const QString&, CAM_Study*, QStringList );
49 virtual bool save ( QStringList& );
50 virtual bool saveAs ( const QString&, CAM_Study*, QStringList& );
51 virtual bool close ();
52 virtual bool create ( CAM_Study* );
54 virtual bool isModified () const;
55 virtual bool isSaved () const;
57 virtual void update ( LightApp_DataObject* = 0, LightApp_Study* = 0 );
59 bool loadFile ( const QString&, CAM_Study* study = 0 );
60 bool dumpFile ( const QString& = QString::null );
61 QString fileName () const;
63 QString getLineText ( const int thePosition ) const;
64 bool setLineText ( const int thePosition, const QString& theText );
65 bool insertLineBefore ( const int thePosition, const QString& theText );
66 bool deleteTextLine ( const int thePosition );
71 void buildTree ( SUIT_DataObject*, const QStringList& );
72 LIGHTGUI_DataObject* findObject ( const int ) const;
79 #endif // LIGHTGUI_DATAMODEL_H