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_DATA_H)
23 #define ATOMICGUI_DATA_H
29 * Class : ATOMICGUI_AtomicMolecule, ATOMICGUI_AtomicMolecule::Atom
30 * Description : Core classes for data of ATOMIC component
32 class 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