1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #if !defined(ATOMICGUI_DATAMODEL_H)
21 #define ATOMICGUI_DATAMODEL_H
23 #include "ATOMICGUI_Data.h"
24 #include <LightApp_DataModel.h>
29 class LightApp_DataObject;
30 class ATOMICGUI_DataObject;
33 * Class : ATOMICGUI_DataModel
34 * Description : Data Model of ATOMIC component
36 class ATOMICGUI_DataModel : public LightApp_DataModel
41 ATOMICGUI_DataModel ( CAM_Module* );
42 virtual ~ATOMICGUI_DataModel();
44 virtual bool open ( const QString&, CAM_Study*, QStringList );
45 virtual bool save ( QStringList& );
46 virtual bool saveAs ( const QString&, CAM_Study*, QStringList& );
47 virtual bool close ();
48 virtual bool create ( CAM_Study* );
50 virtual bool isModified () const;
51 virtual bool isSaved () const;
52 virtual bool dumpPython( const QString&, CAM_Study*, bool, QStringList& );
54 bool importFile ( const QString&, CAM_Study* = 0 );
55 bool exportFile ( const QString& = QString::null );
56 QString createMolecule ();
57 bool addAtom ( const QString&, const QString&,
58 const double, const double, const double );
59 bool renameObj ( const QString&, const QString& );
60 bool deleteObjs ( const QStringList& );
62 ATOMICGUI_DataObject* findObject ( const QString& );
63 ATOMICGUI_DataObject* findMolecule ( const QString& );
70 QList<ATOMICGUI_AtomicMolecule> myMolecules;
73 #endif // ATOMICGUI_DATAMODEL_H