]> Git trees. - libqmvoc.git/commitdiff
Jörg, please try to compile now
authorCarsten Niehaus <cniehaus@gmx.de>
Sun, 24 Sep 2006 15:57:19 +0000 (15:57 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sun, 24 Sep 2006 15:57:19 +0000 (15:57 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=587981

libscience/element.cpp
libscience/element.h
libscience/spectrum.h

index 55b3e6bd984121710b6164714bea2b6a5271494e..111d0a70c63e93c0391c85311f7c430ed6c96aec 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
  ***************************************************************************/
 
+#include "spectrum.h"
 #include "element.h"
 #include <kdebug.h>
 
 Element::Element()
 {
-}
-
-ChemicalDataObject& Element::data(ChemicalDataObject::BlueObelisk type) const
-{
-       foreach( ChemicalDataObject*o, dataList ) {
-               if ( o->type() == type )
-                       return *o;
-       }
-        kFatal() << "No such object\n";
-        ChemicalDataObject *crashme = 0;
-       return *crashme;
+    m_spectrum = 0;
 }
 
 QVariant Element::dataAsVariant( ChemicalDataObject::BlueObelisk type ) const
index 96ed59374842da682fb8637d95ceb9de9b7ea863..6397c4c58a0b100824d389d9e4c70f7da7c0a3e0 100644 (file)
@@ -59,13 +59,6 @@ class EDUSCIENCE_EXPORT Element
                 */
                void addData( const QVariant& value, ChemicalDataObject::BlueObelisk type );
 
-               /**
-                * @return the ChemicalDataObject which stores the information
-                * of the type @p type
-                * @param type the type of the requested data
-                */
-               ChemicalDataObject& data( ChemicalDataObject::BlueObelisk type ) const;
-
                /**
                 * @return the requested data of the type @p type as a QVariant
                 */
@@ -82,11 +75,18 @@ class EDUSCIENCE_EXPORT Element
                QList<ChemicalDataObject*> data()const{
                        return dataList;
                }
+
+    Spectrum * spectrum() const{
+        return m_spectrum;
+    }
+
        private:
                /**
                 * this QList stores all information about an element
                 */
                QList<ChemicalDataObject*> dataList;
+
+    Spectrum *m_spectrum;
 };
 
 #endif
index 02ef5af8fdf638b521ff136086e5954093d8d4e9..bdd44208595fe968dc2feb0d4cbaedb04bb01f47 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SPECTRUM_H
 #define SPECTRUM_H
 /***************************************************************************
- *   Copyright (C) 2005 by Carsten Niehaus                                 *
+ *   Copyright (C) 2005, 2006 by Carsten Niehaus                           *
  *   cniehaus@kde.org                                                      *
  *   
  *                                                                         *