svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=419944
{
}
-QString Element::parsedOrbits()
+QString Element::parsedOrbits( bool canBeEmpty )
{
- if ( m_orbits == "0" )
- return i18n( "structure means orbital configuration in this case", "Unknown structure" );
+ if ( m_orbits.isEmpty() )
+ if ( !canBeEmpty )
+ return i18n( "structure means orbital configuration in this case", "Unknown structure" );
+ else
+ return "";
QString orbits = m_orbits;
QRegExp rxs("([a-z])([0-9]+)");
* @return the orbits of the element. The QString is already
* parsed so that the numbers are superscripts and the first
* block is bold.
+ * @param canBeEmpty specifies if the string returned can be
+ * empty instead of a "Unknown structure" one.
*/
- QString parsedOrbits();
+ QString parsedOrbits( bool canBeEmpty = false );
/**
* @return the boiling point of the element in Kelvin