From c39a5c5d4f82dbfba946c7d190b0bf0c3a92bce7 Mon Sep 17 00:00:00 2001 From: Carsten Niehaus Date: Sun, 24 Sep 2006 15:57:19 +0000 Subject: [PATCH] =?utf8?q?J=C3=B6rg,=20please=20try=20to=20compile=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=587981 --- libscience/element.cpp | 13 ++----------- libscience/element.h | 14 +++++++------- libscience/spectrum.h | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/libscience/element.cpp b/libscience/element.cpp index 55b3e6b..111d0a7 100644 --- a/libscience/element.cpp +++ b/libscience/element.cpp @@ -18,22 +18,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "spectrum.h" #include "element.h" #include 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 diff --git a/libscience/element.h b/libscience/element.h index 96ed593..6397c4c 100644 --- a/libscience/element.h +++ b/libscience/element.h @@ -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 data()const{ return dataList; } + + Spectrum * spectrum() const{ + return m_spectrum; + } + private: /** * this QList stores all information about an element */ QList dataList; + + Spectrum *m_spectrum; }; #endif diff --git a/libscience/spectrum.h b/libscience/spectrum.h index 02ef5af..bdd4420 100644 --- a/libscience/spectrum.h +++ b/libscience/spectrum.h @@ -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 * * * * -- 2.47.3