From: Carsten Niehaus Date: Thu, 13 Oct 2005 14:20:31 +0000 (+0000) Subject: * Make Kalzium compile. It *did* compile here last time I checked... Strange. Pino... X-Git-Tag: v3.80.2~106^2~2 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=6dd825df0a95500ef877ebdf6024a8df98606eda;p=libqmvoc.git * Make Kalzium compile. It *did* compile here last time I checked... Strange. Pino: please test svn path=/trunk/KDE/kdeedu/kalzium/src/spectrummanager/spectrumparser.h; revision=470267 --- diff --git a/kalzium/src/spectrummanager/spectrumparser.cpp b/kalzium/src/spectrummanager/spectrumparser.cpp deleted file mode 100644 index e4ef408..0000000 --- a/kalzium/src/spectrummanager/spectrumparser.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/*************************************************************************** -copyright : (C) 2005 by Carsten Niehaus -email : cniehaus@kde.org - ***************************************************************************/ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ -#include "spectrumparser.h" -#include "../spectrum.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -SpectrumParser::SpectrumParser(const QString& filename) -{ -// m_file = QFile(filename); -} - -SpectrumParser::SpectrumParser(const QFile& file) -{ -// m_file = file; -} - -void SpectrumParser::saveSpectrum( Spectrum *spectrum ) -{ - if ( !spectrum ) return; - - QDomDocument doc( "SpectrumDocument" ); - - QFile docfile( "/home/carsten/test.xml" ); -// QTextStream stream( m_file ); - - QList blist = spectrum->bandlist(); - - QDomElement docelem = doc.createElement( "spectrum" ); - doc.appendChild( docelem ); - - foreach( Spectrum::band* band, blist ) - { - QDomElement bandelem = doc.createElement( "band" ); - bandelem.setAttribute( "wavelength", band->wavelength ); - bandelem.setAttribute( "intensity", band->intensity ); - bandelem.setAttribute( "aki", band->aki ); - bandelem.setAttribute( "energy1", band->energy1 ); - bandelem.setAttribute( "energy2", band->energy2 ); - bandelem.setAttribute( "term1", band->term1 ); - bandelem.setAttribute( "term2", band->term2 ); - bandelem.setAttribute( "electronconfig1", band->electronconfig1 ); - bandelem.setAttribute( "electronconfig2", band->electronconfig2 ); - bandelem.setAttribute( "J1", band->J1 ); - bandelem.setAttribute( "J2", band->J2 ); - docelem.appendChild( bandelem ); - } - - - - kdDebug() << "Text: " << doc.toString() << endl; -} diff --git a/kalzium/src/spectrummanager/spectrumparser.h b/kalzium/src/spectrummanager/spectrumparser.h deleted file mode 100644 index 776c005..0000000 --- a/kalzium/src/spectrummanager/spectrumparser.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef SPECTRUMPARSER_H -#define SPECTRUMPARSER_H -/*************************************************************************** - copyright : (C) 2005 by Carsten Niehaus - email : cniehaus@kde.org - ***************************************************************************/ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include - -class Spectrum; - -/** - * @author Carsten Niehaus - */ -class SpectrumParser -{ - public: - /** - * public contructor - * @param file The file which to read or write - */ - SpectrumParser(const QFile& file); - - /** - * public contructor - * @param filename the filename of the xml-file - */ - SpectrumParser(const QString& filename); - - void saveSpectrum( Spectrum *spectrum ); - - Spectrum* loadSpectrum( QFile *file ); - -// private: - QFile m_file; -}; -#endif // SPECTRUMPARSER_H -