AvogadroLibs 2.1.0-20261111
Loading...
Searching...
No Matches
ConformerQuantityTranslator Class Reference

Internationalization of the names of per-conformer quantities. More...

#include <conformerquantitytranslator.h>

Inheritance diagram for ConformerQuantityTranslator:

Static Public Member Functions

static QString name (const Core::ConformerQuantity &quantity)
static QString label (const Core::ConformerQuantity &quantity, const QString &unit=QString())

Detailed Description

<avogadro/qtgui/conformerquantitytranslator.h>

Core enumerates what a molecule can be measured for and works out the values; this is the one place those quantities are given names a reader sees, so a plot axis and a table heading cannot drift apart or be translated twice. Following ElementTranslator.

#include <avogadro/qtgui/conformerquantitytranslator.h>
...
// "Dihedral 1-2-3-4"
ConformerQuantityTranslator::name(quantity);
// "Dihedral (°)"
static QString label(const Core::ConformerQuantity &quantity, const QString &unit=QString())

Member Function Documentation

◆ name()

QString name ( const Core::ConformerQuantity & quantity)
static
Returns
what to call quantity: a short name naming the thing itself, for a combo box entry or a column heading.

A coordinate is named by the atoms it measures, numbered from one to match the constraints dialog and the property tables.

◆ label()

QString label ( const Core::ConformerQuantity & quantity,
const QString & unit = QString() )
static
Returns
what to call quantity when the unit has to come with it, as on an axis title or a column heading: the name from name(), with the unit in parentheses after it.

A quantity whose unit comes from the file rather than from Avogadro – Energy, Forces – has none to add unless unit says otherwise, so pass whatever the caller converted to.


The documentation for this class was generated from the following file: