]> Git trees. - libqmvoc.git/commitdiff
* APIDOCs. No need to backport
authorCarsten Niehaus <cniehaus@gmx.de>
Sat, 15 Oct 2005 12:47:00 +0000 (12:47 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sat, 15 Oct 2005 12:47:00 +0000 (12:47 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=470851

libscience/element.h
libscience/elementparser.h
libscience/spectrumparser.cpp
libscience/spectrumparser.h

index 35268e067b89469b1b03f8688eaa4a2c17b59104..d0bb65f1619e54c1d990679d35a090b0ed13a89b 100644 (file)
@@ -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
                 */
index d0caa76ef40579fff4e0d823d57929a2a968d562..dcffb825d86cf59eb6f0b2a67deb37fb570bdba3 100644 (file)
@@ -19,6 +19,7 @@
 class Element;
 
 /**
+ * This class gives access to the elements which are listed in a CML-file
  * @author Carsten Niehaus <cniehaus@kde.org>
  */
 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<Element*> 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);
+
 };
 
index 5e6ca45703fbc6ebe36d872987abc5cc20db2c52..8a526a64953975853e1efa3ae5efd2f679d2fe5e 100644 (file)
@@ -22,14 +22,8 @@ email                : cniehaus@kde.org
 
 #include <kdebug.h>
 
-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 )
index e3e4e73656dd9c0002b3748adf8ba4a20f95865d..f5bbcfe0aea4742af7d21b2c03b615dfbb868a6b 100644 (file)
@@ -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