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;
}
IONICRADIUS
};
- QPoint pos() const;
- QPoint coords() const;
-
/**
* accessor for the element's color
*/
class Element;
/**
+ * This class gives access to the elements which are listed in a CML-file
* @author Carsten Niehaus <cniehaus@kde.org>
*/
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);
+
};
#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 )
{
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