]> Git trees. - libqmvoc.git/commitdiff
* Albert had a look at this file, I moved things around. Thanks :-)
authorCarsten Niehaus <cniehaus@gmx.de>
Sun, 23 Oct 2005 16:11:58 +0000 (16:11 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sun, 23 Oct 2005 16:11:58 +0000 (16:11 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=473411

libscience/Makefile.am
libscience/chemicaldataobject.cpp
libscience/chemicaldataobject.h

index 879fdd7df1090f9d834d5e333a286ad0740fdcc8..a79ce232f57fcac6dfb6372f2d43575963d0208f 100644 (file)
@@ -17,3 +17,6 @@ libscience_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 4:0:0
 libscience_la_LIBADD = $(LIB_KDEUI) 
 
 METASOURCES = AUTO
+
+include $(top_srcdir)/admin/Doxyfile.am
+
index 34c27755a4edee5288928158a767a3e54cc5ac47..afb9089f55b4c35e4e203660d48ae071f177c7e3 100644 (file)
@@ -34,12 +34,7 @@ ChemicalDataObject::ChemicalDataObject()
        m_unit = ChemicalDataObject::noUnit;
 }
 
-QString ChemicalDataObject::valueAsString()
-{
-       return m_value.toString();
-}
-
-bool ChemicalDataObject::operator==( const int v )
+bool ChemicalDataObject::operator==( const int v ) const
 {
        kdDebug() << "ChemicalDataObject::operator==() with int" << endl;
        if ( m_value.type() != QVariant::Int )  
@@ -48,7 +43,7 @@ bool ChemicalDataObject::operator==( const int v )
        return m_value.toInt() == v;
 }
 
-bool ChemicalDataObject::operator==( const bool v )
+bool ChemicalDataObject::operator==( const bool v ) const
 {
        kdDebug() << "ChemicalDataObject::operator==() with bool" << endl;
        if ( m_value.type() != QVariant::Bool ) 
@@ -57,7 +52,7 @@ bool ChemicalDataObject::operator==( const bool v )
        return m_value.toBool() == v;
 }
 
-bool ChemicalDataObject::operator==( const double v )
+bool ChemicalDataObject::operator==( const double v ) const
 {
        kdDebug() << "ChemicalDataObject::operator==() with double" << endl;
        if ( m_value.type() != QVariant::Double )       
@@ -66,7 +61,7 @@ bool ChemicalDataObject::operator==( const double v )
        return m_value.toDouble() == v;
 }
 
-bool ChemicalDataObject::operator==( const QString& v )
+bool ChemicalDataObject::operator==( const QString& v ) const
 {
        kdDebug() << "ChemicalDataObject::operator==() with QString" << endl;
        if ( m_value.type() != QVariant::String )       
@@ -78,6 +73,46 @@ bool ChemicalDataObject::operator==( const QString& v )
 ChemicalDataObject::~ChemicalDataObject()
 {}
 
+QString ChemicalDataObject::valueAsString() const
+{
+       return m_value.toString();
+}
+
+ChemicalDataObject::BlueObelisk ChemicalDataObject::type() const
+{
+       return m_type;
+}
+
+QVariant ChemicalDataObject::value() const
+{
+       return m_value;
+}
+
+void ChemicalDataObject::setUnit( ChemicalDataObject::BlueObeliskUnit unit )
+{
+       m_unit = unit;
+}
+
+ChemicalDataObject::BlueObeliskUnit ChemicalDataObject::unit() const
+{
+       return m_unit;
+}
+
+void ChemicalDataObject::setData( QVariant v )
+{
+       m_value = v;
+}
+
+void ChemicalDataObject::setType( BlueObelisk type )
+{
+       m_type = type;
+}
+
+void ChemicalDataObject::setType( int type )
+{
+       m_type = ( ChemicalDataObject::BlueObelisk ) type;
+}
+
 QString ChemicalDataObject::dictRef()
 {
        QString botype;
index b5b442cc9597fb90532dca0a06397f5d94b822d0..823bf67eee79d719067beb2d9973295f8592897e 100644 (file)
@@ -92,9 +92,7 @@ class ChemicalDataObject
                 * Set the data of this object to @p v
                 * @param v the value of the object
                 */
-               void setData( QVariant v ){
-                       m_value = v;
-               }
+               void setData( QVariant v );
                
                /**
                 * Destructor.
@@ -112,7 +110,7 @@ class ChemicalDataObject
                 *
                 * @return the value as a QString
                 */
-               QString valueAsString();
+               QString valueAsString() const;
                
                /**
                 * Every ChemicalDataObject contains one data. For example a
@@ -121,50 +119,42 @@ class ChemicalDataObject
                 *
                 * @return the value as a QVariant
                 */
-               QVariant value() const{
-                       return m_value;
-               }
+               QVariant value() const;
 
                /**
                 * @return the type of dataset of this object
                 */
-               BlueObelisk type() const{
-                       return m_type;
-               }
+               BlueObelisk type() const;
 
                /**
                 * @param type the type of this object
                 */
-               void setType( BlueObelisk type ){
-                       m_type = type;
-               }
+               void setType( BlueObelisk type );
 
                /**
                 * @overload
                 */
-               void setType( int type ){
-                       m_type = ( BlueObelisk ) type;
-               }
+               void setType( int type );
                
                /**
                 * Compare the value @p v with the data of this object
                 */
-               bool operator== ( const int v );
+               bool operator== ( const int v ) const;
                
                /**
                 * Compare the value @p v with the data of this object
                 */
-               bool operator== ( const double v );
+               bool operator== ( const double v ) const;
                
                /**
                 * Compare the value @p v with the data of this object
                 */
-               bool operator== ( const bool v );
+               bool operator== ( const bool v ) const;
                
                /**
                 * Compare the value @p v with the data of this object
                 */
-               bool operator== ( const QString& v );
+               bool operator== ( const QString& v ) const;
 
                /**
                 * @return the dictRef attribute of the XML. This is an
@@ -181,17 +171,13 @@ class ChemicalDataObject
                /**
                 * @return the unit of the object
                 */
-               BlueObeliskUnit unit() const{
-                       return m_unit;
-               }
+               BlueObeliskUnit unit() const;
 
                /**
                 * set the unit of this object to @p unit
                 * @param the BlueObeliskUnit of this object
                 */
-               void setUnit( BlueObeliskUnit unit ){
-                       m_unit = unit;
-               }
+               void setUnit( BlueObeliskUnit unit );
 
                /**
                 * @return the BlueObeliskUnit of a ChemicalDataObject corresponding to @p text