]> Git trees. - libqmvoc.git/commitdiff
some more const
authorAlbert Astals Cid <tsdgeos@terra.es>
Sun, 23 Oct 2005 16:33:12 +0000 (16:33 +0000)
committerAlbert Astals Cid <tsdgeos@terra.es>
Sun, 23 Oct 2005 16:33:12 +0000 (16:33 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=473420

libscience/element.cpp
libscience/element.h

index e69b84bd82fc41b751d5ef33cc6db8179b55424a..8006dbd7633180de7b2ec6e5a5ada6774f721d3e 100644 (file)
@@ -35,7 +35,7 @@ Element::Element()
 {
 }
 
-ChemicalDataObject& Element::data(ChemicalDataObject::BlueObelisk type)
+ChemicalDataObject& Element::data(ChemicalDataObject::BlueObelisk type) const
 {
        foreach( ChemicalDataObject*o, dataList ) {
                if ( o->type() == type )
@@ -45,7 +45,7 @@ ChemicalDataObject& Element::data(ChemicalDataObject::BlueObelisk type)
        return cdo;
 }
 
-QVariant Element::dataAsVariant( ChemicalDataObject::BlueObelisk type )
+QVariant Element::dataAsVariant( ChemicalDataObject::BlueObelisk type ) const
 {
        foreach( ChemicalDataObject* o, dataList ) {
                if ( o->type() == type )
@@ -54,7 +54,7 @@ QVariant Element::dataAsVariant( ChemicalDataObject::BlueObelisk type )
        return QVariant();
 }
 
-QString Element::dataAsString(ChemicalDataObject::BlueObelisk type)
+QString Element::dataAsString(ChemicalDataObject::BlueObelisk type) const
 {
        foreach( ChemicalDataObject*o, dataList ) {
                if ( o->type() == type )
@@ -63,7 +63,7 @@ QString Element::dataAsString(ChemicalDataObject::BlueObelisk type)
        return "";
 }
 
-Isotope* Element::isotopeByNucleons( int numberOfNucleons )
+Isotope* Element::isotopeByNucleons( int numberOfNucleons ) const
 {
        QList<Isotope*>::ConstIterator it = m_isotopeList.begin();
        const QList<Isotope*>::ConstIterator itEnd = m_isotopeList.end();
index 7bb9528b684e823d03a7f7e65542ffd06a0a043d..0bdb3f7ff747cbc3c8c101fdf4a01284261eb296 100644 (file)
@@ -49,7 +49,7 @@ class Element{
                 * @returns a pointer to the istope with @p numberOfNucleons
                 * nucleons
                 */
-               Isotope* isotopeByNucleons( int numberOfNucleons );
+               Isotope* isotopeByNucleons( int numberOfNucleons ) const;
                
                enum RADIUSTYPE
                {
@@ -67,7 +67,7 @@ class Element{
                        return m_spectrumList;
                }
 
-               void setIsotopeList( QList<Isotope*> list ){
+               void setIsotopeList( const QList<Isotope*> &list ){
                        m_isotopeList = list;
                }
 
@@ -171,17 +171,17 @@ class Element{
                 * of the type @p type
                 * @param type the type of the requested data
                 */
-               ChemicalDataObject& data( ChemicalDataObject::BlueObelisk type );
+               ChemicalDataObject& data( ChemicalDataObject::BlueObelisk type ) const;
 
                /**
                 * @return the requested data of the type @p type as a QVariant
                 */
-               QVariant dataAsVariant( ChemicalDataObject::BlueObelisk type );
+               QVariant dataAsVariant( ChemicalDataObject::BlueObelisk type ) const;
                
                /**
                 * @return the requested data of the type @p type as a QString
                 */
-               QString dataAsString( ChemicalDataObject::BlueObelisk type );
+               QString dataAsString( ChemicalDataObject::BlueObelisk type ) const;
                
                /**
                 * @return the data of the Element