From 26da446bb746370b10e4675bfc6a87908a86fb82 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 23 Oct 2005 17:20:18 +0000 Subject: [PATCH] remove implementation from .h svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=473439 --- libscience/element.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++ libscience/element.h | 37 +++++++++------------------------- 2 files changed, 54 insertions(+), 28 deletions(-) diff --git a/libscience/element.cpp b/libscience/element.cpp index 8006dbd..9614552 100644 --- a/libscience/element.cpp +++ b/libscience/element.cpp @@ -76,6 +76,41 @@ Isotope* Element::isotopeByNucleons( int numberOfNucleons ) const return 0; } +QList Element::isotopes() const +{ + return m_isotopeList; +} + +QList Element::spectrumList() const +{ + return m_spectrumList; +} + +void Element::setIsotopeList( const QList &list ) +{ + m_isotopeList = list; +} + +void Element::setSpectrum( Spectrum *spec ) +{ + m_spectrum = spec; +} + +bool Element::hasSpectrum() const +{ + return m_hasSpectrum; +} + +void Element::setHasSepctrum(bool value) +{ + m_hasSpectrum = value; +} + +Spectrum* Element::spectrum() const +{ + return m_spectrum; +} + Element::~Element() { } @@ -233,3 +268,13 @@ const QString Element::adjustUnits( const int type ) return v; } +void Element::addData( ChemicalDataObject*o ) +{ + dataList.append( o ); +} + +void Element::addData( const QVariant& value, ChemicalDataObject::BlueObelisk type ) +{ + ChemicalDataObject* tmp = new ChemicalDataObject( value, type ); + dataList.append( tmp ); +} diff --git a/libscience/element.h b/libscience/element.h index 0bdb3f7..43d2d62 100644 --- a/libscience/element.h +++ b/libscience/element.h @@ -59,47 +59,33 @@ class Element{ COVALENT }; - QList isotopes() const{ - return m_isotopeList; - } + QList isotopes() const; - QList spectrumList() const{ - return m_spectrumList; - } + QList spectrumList() const; - void setIsotopeList( const QList &list ){ - m_isotopeList = list; - } + void setIsotopeList( const QList &list ); /** * sets the Spectrum of the Element * @param spec the Spectrum of the Element */ - void setSpectrum( Spectrum *spec ){ - m_spectrum = spec; - } + void setSpectrum( Spectrum *spec ); /** * @return if the element has information about spectra */ - bool hasSpectrum() const{ - return m_hasSpectrum; - } + bool hasSpectrum() const; /** * define if the element has a known Spectrum * @param value if true, the Element has a Spectrum */ - void setHasSepctrum(bool value){ - m_hasSpectrum = value; - } + void setHasSepctrum(bool value); /** * @return the Spectrum of the element */ - Spectrum* spectrum() const{ - return m_spectrum; - } + Spectrum* spectrum() const; /** * adjusts the units for the data. The user can @@ -151,9 +137,7 @@ class Element{ * Sdd the ChemicalDataObject @p o to this Element * @param o the ChemicalDataObject to be added */ - void addData( ChemicalDataObject*o ){ - dataList.append( o ); - } + void addData( ChemicalDataObject*o ); /** * Sdd a ChemicalDataObject with @p value of @p type to this @@ -161,10 +145,7 @@ class Element{ * @param value the QVariant to be added * @param type the BlueObelisk type to be added */ - void addData( const QVariant& value, ChemicalDataObject::BlueObelisk type ) { - ChemicalDataObject* tmp = new ChemicalDataObject( value, type ); - dataList.append( tmp ); - } + void addData( const QVariant& value, ChemicalDataObject::BlueObelisk type ); /** * @return the ChemicalDataObject which stores the information -- 2.47.3