1 // Copyright (C) 2007-2022 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, or (at your option) any later version.
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_ATOMICGUI.hxx"
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_EXPORT 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;
54 virtual bool dumpPython( const QString&, CAM_Study*, bool, QStringList& );
56 bool importFile ( const QString&, CAM_Study* = 0 );
57 bool exportFile ( const QString& = QString::null );
58 QString createMolecule ();
59 bool addAtom ( const QString&, const QString&,
60 const double, const double, const double );
61 bool renameObj ( const QString&, const QString& );
62 bool deleteObjs ( const QStringList& );
64 ATOMICGUI_DataObject* findObject ( const QString& );
65 ATOMICGUI_DataObject* findMolecule ( const QString& );
72 QList<ATOMICGUI_AtomicMolecule> myMolecules;
75 #endif // ATOMICGUI_DATAMODEL_H