Salome HOME
Copyright update 2021
[samples/atomic.git] / src / ATOMICGUI / ATOMICGUI_Data.cxx
index 0d02c22ec25cb35321ea363d84402a2fe6bfde93..01933539e2b0beaa4a939dd1b85850b63a941433 100644 (file)
@@ -1,23 +1,21 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 
 #include "ATOMICGUI_Data.h"
 #include <qobject.h>
@@ -66,14 +64,14 @@ void ATOMICGUI_AtomicMolecule::addAtom( const QString& atom,
 /*! Removes an atom from molecule by index */
 void ATOMICGUI_AtomicMolecule::deleteAtom( const int index )
 {
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     myAtoms.removeAt( index );
 }
 
 /*! Gets an atom id by index */
 int ATOMICGUI_AtomicMolecule::atomId( const int index ) const
 {
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     return myAtoms[ index ].id();
   return 0;
 }
@@ -82,7 +80,7 @@ int ATOMICGUI_AtomicMolecule::atomId( const int index ) const
 QString ATOMICGUI_AtomicMolecule::atomName( const int index ) const
 {
   QString n;
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     n = myAtoms[ index ].name();
   return n;
 }
@@ -90,7 +88,7 @@ QString ATOMICGUI_AtomicMolecule::atomName( const int index ) const
 /*! Gets an atom x coordinate by index */
 double ATOMICGUI_AtomicMolecule::atomX( const int index ) const
 {
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     return myAtoms[ index ].x();
   return 0;
 }
@@ -98,7 +96,7 @@ double ATOMICGUI_AtomicMolecule::atomX( const int index ) const
 /*!  Gets an atom y coordinate by index */
 double ATOMICGUI_AtomicMolecule::atomY( const int index ) const
 {
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     return myAtoms[ index ].y();
   return 0;
 }
@@ -106,7 +104,7 @@ double ATOMICGUI_AtomicMolecule::atomY( const int index ) const
 /*! Gets an atom z coordinate by index */
 double ATOMICGUI_AtomicMolecule::atomZ( const int index ) const
 {
-  if ( index >= 0 and index < myAtoms.count() )
+  if ( index >= 0 && index < myAtoms.count() )
     return myAtoms[ index ].z();
   return 0;
 }
@@ -116,6 +114,6 @@ void ATOMICGUI_AtomicMolecule::setName( const QString& name, const int index )
 {
   if ( index < 0 )
     myName = name;
-  else if ( index >= 0 and index < myAtoms.count() )
+  else if ( index >= 0 && index < myAtoms.count() )
     myAtoms[ index ].myName = name;
 }