From: Carsten Niehaus Date: Sun, 17 Jul 2005 20:20:10 +0000 (+0000) Subject: make the spectrum reappear X-Git-Tag: v3.80.2~300^2~59 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=230c8689a25223804915817855d925409d099d27;p=libqmvoc.git make the spectrum reappear svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=435677 --- diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 5c1993c..8061664 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -626,9 +626,10 @@ EList KalziumDataObject::readData( QDomDocument &dataDocument ) QDomNodeList spectrumList = domElement.namedItem( "spectra" ).toElement().elementsByTagName( "spectrum" ); - Spectrum *spectrum = new Spectrum(); + Spectrum *spectrum; for( uint i = 0; i < spectrumList.length(); i++ ) { + spectrum = new Spectrum(); Spectrum::band b; QDomElement spec = spectrumList.item( i ).toElement(); diff --git a/kalzium/src/element.h b/kalzium/src/element.h index 60e68f5..ddc6108 100644 --- a/kalzium/src/element.h +++ b/kalzium/src/element.h @@ -217,7 +217,6 @@ class Element{ COVALENT }; - /** * @return the number of the element */ @@ -291,6 +290,14 @@ class Element{ m_spectrum = spec; } + bool hasSpectrum() const{ + return m_spectrum; + } + + Spectrum* spectrum() const{ + return m_spectrum; + } + doubleList ionisationList() const{ return m_ionenergies; }