1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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 #if !defined(ATOMICGUI_DATAMODEL_H)
23 #define ATOMICGUI_DATAMODEL_H
25 #include "ATOMICGUI_Data.h"
26 #include <LightApp_DataModel.h>
31 class LightApp_DataObject;
32 class ATOMICGUI_DataObject;
35 * Class : ATOMICGUI_DataModel
36 * Description : Data Model of ATOMIC component
38 class ATOMICGUI_DataModel : public LightApp_DataModel
43 ATOMICGUI_DataModel ( CAM_Module* );
44 virtual ~ATOMICGUI_DataModel();
46 virtual bool open ( const QString&, CAM_Study*, QStringList );
47 virtual bool save ( QStringList& );
48 virtual bool saveAs ( const QString&, CAM_Study*, QStringList& );
49 virtual bool close ();
50 virtual bool create ( CAM_Study* );
52 virtual bool isModified () const;
53 virtual bool isSaved () const;
55 bool importFile ( const QString&, CAM_Study* = 0 );
56 bool exportFile ( const QString& = QString::null );
57 bool createMolecule ();
58 bool addAtom ( const QString&, const QString&,
59 const double, const double, const double );
60 bool renameObj ( const QString&, const QString& );
61 bool deleteObjs ( const QStringList& );
63 ATOMICGUI_DataObject* findObject ( const QString& );
64 ATOMICGUI_DataObject* findMolecule ( const QString& );
71 QList<ATOMICGUI_AtomicMolecule> myMolecules;
74 #endif // ATOMICGUI_DATAMODEL_H