From 9e6cb2cd9c4ca2b8f16686e9a1ad132655836bcb Mon Sep 17 00:00:00 2001 From: Carsten Niehaus Date: Sat, 15 Oct 2005 12:47:00 +0000 Subject: [PATCH] * APIDOCs. No need to backport svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=470851 --- libscience/element.h | 9 +-------- libscience/elementparser.h | 19 +++++++++++++++---- libscience/spectrumparser.cpp | 8 +------- libscience/spectrumparser.h | 22 ++++++++-------------- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/libscience/element.h b/libscience/element.h index 35268e0..d0bb65f 100644 --- a/libscience/element.h +++ b/libscience/element.h @@ -258,14 +258,10 @@ class Element{ QString crystalstructure() const{ return m_crystalstructure; } - + /** * @return the name of the element */ - QString elname() const KDE_DEPRECATED{ - return elementName(); - } - QString elementName() const{ return m_name; } @@ -421,9 +417,6 @@ class Element{ IONICRADIUS }; - QPoint pos() const; - QPoint coords() const; - /** * accessor for the element's color */ diff --git a/libscience/elementparser.h b/libscience/elementparser.h index d0caa76..dcffb82 100644 --- a/libscience/elementparser.h +++ b/libscience/elementparser.h @@ -19,6 +19,7 @@ class Element; /** + * This class gives access to the elements which are listed in a CML-file * @author Carsten Niehaus */ class ElementParser @@ -26,19 +27,29 @@ class ElementParser public: /** * @return the Element with the symbol symbol + * @param dataDocument the document to parse + * @param symbol the symbol of the Element which is looked for */ static Element* loadElement( const QString& symbol, const QDomDocument& dataDocument ); - static Element* loadElement( const QDomElement& element ); - /** - * @return a QStringList with the symbols of all known elements + * @return the element represented in the QDomeElement @p element + * @param element the XML-representation of the Element */ - static QStringList loadElementSymbols(const QDomDocument& dataDocument); + static Element* loadElement( const QDomElement& element ); /** * @return all chemical elements in the xml-file + * @param dataDocument the document to parse */ static QList loadAllElements(const QDomDocument& dataDocument); + + private: + /** + * @return a QStringList with the symbols of all known elements + * @param dataDocument the document to parse + */ + static QStringList loadElementSymbols(const QDomDocument& dataDocument); + }; diff --git a/libscience/spectrumparser.cpp b/libscience/spectrumparser.cpp index 5e6ca45..8a526a6 100644 --- a/libscience/spectrumparser.cpp +++ b/libscience/spectrumparser.cpp @@ -22,14 +22,8 @@ email : cniehaus@kde.org #include -SpectrumParser::SpectrumParser(const QString& filename) +Spectrum* SpectrumParser::loadSpectrum( QFile*file, const QString& id ) { -// m_file = QFile(filename); -} - -SpectrumParser::SpectrumParser(const QFile& file) -{ -// m_file = file; } void SpectrumParser::saveSpectrum( Spectrum *spectrum ) diff --git a/libscience/spectrumparser.h b/libscience/spectrumparser.h index e3e4e73..f5bbcfe 100644 --- a/libscience/spectrumparser.h +++ b/libscience/spectrumparser.h @@ -24,23 +24,17 @@ class SpectrumParser { public: /** - * public contructor - * @param file The file which to read or write + * Save the Spectrum @p spectrum + * @param spectrum the Spectrum to save */ - SpectrumParser(const QFile& file); - + static void saveSpectrum( Spectrum *spectrum ); + /** - * public contructor - * @param filename the filename of the xml-file + * @return the Spectrum specified by the @p id + * @param file the file from which the data will be loaded + * @param id The id of the Spectrum */ - SpectrumParser(const QString& filename); - - void saveSpectrum( Spectrum *spectrum ); - - Spectrum* loadSpectrum( QFile *file, int elementnumber ); - -// private: - QFile m_file; + static Spectrum* loadSpectrum( QFile *file, const QString& id ); }; #endif // SPECTRUMPARSER_H -- 2.47.3