1 // Copyright (C) 2007-2020 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_DATA_H)
21 #define ATOMICGUI_DATA_H
23 #include "ATOMICGUI_ATOMICGUI.hxx"
29 * Class : ATOMICGUI_AtomicMolecule, ATOMICGUI_AtomicMolecule::Atom
30 * Description : Core classes for data of ATOMIC component
32 class ATOMICGUI_EXPORT ATOMICGUI_AtomicMolecule
40 Atom( const QString& name, const double x, const double y, const double z );
41 QString name() const { return myName; }
42 double x() const { return myX; }
43 double y() const { return myY; }
44 double z() const { return myZ; }
46 int id () const { return myId; }
56 friend class ATOMICGUI_AtomicMolecule;
60 ATOMICGUI_AtomicMolecule( const QString& name = QString::null );
61 virtual ~ATOMICGUI_AtomicMolecule();
63 void addAtom( const QString& atom, const double x, const double y, const double z );
64 void deleteAtom( const int index );
66 int id () const { return myId; }
67 QString name () const { return myName; }
68 int count () const { return myAtoms.count(); }
70 int atomId ( const int index ) const;
71 QString atomName ( const int index ) const;
72 double atomX ( const int index ) const;
73 double atomY ( const int index ) const;
74 double atomZ ( const int index ) const;
76 void setName( const QString& name, const int index = -1 );
85 #endif // ATOMICGUI_DATA_H