* 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
*/
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
*/
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
#ifndef SPECTRUM_H
#define SPECTRUM_H
/***************************************************************************
- * Copyright (C) 2005 by Carsten Niehaus *
+ * Copyright (C) 2005, 2006 by Carsten Niehaus *
* cniehaus@kde.org *
*
* *