Class Avogadro::QtGui::ElementTranslator#
-
class ElementTranslator : public QObject#
Internationalization of element names.
<avogadro/qtgui/elementtranslator.h>
This class provides for translation of element names: e.g., tr(“Carbon”) To use the global translator:
#include <avogadro/elementtranslator.h> ... Avogadro::elementTranslator.name(6); // Return "carbon" in English
- Author
Geoff Hutchison
Public Functions
-
ElementTranslator()#
Public Static Functions
-
static QString name(int element)#
Translate element names.
- Parameters:
element – The atomic number of the element to be translated.
- Returns:
a QString with the appropriate translation for the current locale.
-
static int numberOfElements()#
- Returns:
The highest atomic number supported by this class.