kalzium/libscience
#include <element.h>
Public Member Functions | |
Element () | |
virtual | ~Element () |
void | addData (const ChemicalDataObject &o) |
void | addData (const QVariant &value, ChemicalDataObject::BlueObelisk type) |
QList< ChemicalDataObject > | data () const |
QString | dataAsString (ChemicalDataObject::BlueObelisk type) const |
QString | dataAsString (ChemicalDataObject::BlueObelisk type, int unit) const |
QString | dataAsStringWithUnit (ChemicalDataObject::BlueObelisk type, int unit) const |
QVariant | dataAsVariant (ChemicalDataObject::BlueObelisk type) const |
QVariant | dataAsVariant (ChemicalDataObject::BlueObelisk type, int unit) const |
Detailed Description
In this class all information about an element are stored.
This means that both the chemical date and the data about the position are stored in this class. This class is the represention of a chemical element
Constructor & Destructor Documentation
Element::Element | ( | ) |
Definition at line 26 of file element.cpp.
|
virtual |
Definition at line 74 of file element.cpp.
Member Function Documentation
void Element::addData | ( | const ChemicalDataObject & | o | ) |
Add the ChemicalDataObject o
to this Element.
- Parameters
-
o the ChemicalDataObject to be added
Definition at line 78 of file element.cpp.
void Element::addData | ( | const QVariant & | value, |
ChemicalDataObject::BlueObelisk | type | ||
) |
Add a ChemicalDataObject with value
of type
to this Element.
- Parameters
-
value the QVariant to be added type the BlueObelisk type to be added
Definition at line 83 of file element.cpp.
|
inline |
QString Element::dataAsString | ( | ChemicalDataObject::BlueObelisk | type | ) | const |
- Returns
- the requested data of the type
type
as a QString
Definition at line 52 of file element.cpp.
QString Element::dataAsString | ( | ChemicalDataObject::BlueObelisk | type, |
int | unit | ||
) | const |
- Returns
- the requested data of the type
type
with the given unitunit
as a QString
Definition at line 57 of file element.cpp.
QString Element::dataAsStringWithUnit | ( | ChemicalDataObject::BlueObelisk | type, |
int | unit | ||
) | const |
- Returns
- the requested data of the type
type
with the unitunit
as a QString The unit symbol is appended to the value. The value is round to show 4 significant decimals.
Definition at line 62 of file element.cpp.
QVariant Element::dataAsVariant | ( | ChemicalDataObject::BlueObelisk | type | ) | const |
- Returns
- the requested data of the type
type
as a QVariant
Definition at line 30 of file element.cpp.
QVariant Element::dataAsVariant | ( | ChemicalDataObject::BlueObelisk | type, |
int | unit | ||
) | const |
- Returns
- the requested data of the type
type
with the unitunit
as a QVariant
Definition at line 39 of file element.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.