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 <SalomeApp_DataModel.h>
36 class SalomeApp_Study;
37 class LIGHTGUI_DataObject;
39 class LIGHTGUI_DataModel : public SalomeApp_DataModel
44 LIGHTGUI_DataModel ( CAM_Module* theModule );
45 virtual ~LIGHTGUI_DataModel();
47 virtual bool open ( const QString&, CAM_Study* );
49 virtual bool saveAs ( const QString&, CAM_Study* );
50 virtual bool close ();
51 virtual bool create ( CAM_Study* );
53 virtual bool isModified () const;
54 virtual bool isSaved () const;
56 virtual void update ( SalomeApp_DataObject* = 0, SalomeApp_Study* = 0 );
58 bool loadFile ( const QString&, CAM_Study* study = 0 );
59 bool dumpFile ( const QString& = QString::null );
60 QString fileName () const;
62 QString getLineText ( const int thePosition ) const;
63 bool setLineText ( const int thePosition, const QString& theText );
64 bool insertLineBefore ( const int thePosition, const QString& theText );
65 bool deleteTextLine ( const int thePosition );
70 void buildTree ( SUIT_DataObject*, const QStringList& );
71 LIGHTGUI_DataObject* findObject ( const int ) const;
78 #endif // LIGHTGUI_DATAMODEL_H