Initialization translation for postfix operators.
--HG-- branch : feature
This commit is contained in:
parent
ccde48e3bf
commit
b94ab9bda6
|
@ -46,12 +46,14 @@ VApplication::VApplication(int &argc, char **argv)
|
||||||
: QApplication(argc, argv), _patternUnit(Valentina::Cm), _patternType(Pattern::Individual),
|
: QApplication(argc, argv), _patternUnit(Valentina::Cm), _patternType(Pattern::Individual),
|
||||||
_widthMainLine(DefWidth), _widthHairLine(DefWidth/3.0), measurements(QMap<QString, VTranslation>()),
|
_widthMainLine(DefWidth), _widthHairLine(DefWidth/3.0), measurements(QMap<QString, VTranslation>()),
|
||||||
guiTexts(QMap<QString, VTranslation>()), descriptions(QMap<QString, VTranslation>()),
|
guiTexts(QMap<QString, VTranslation>()), descriptions(QMap<QString, VTranslation>()),
|
||||||
variables(QMap<QString, VTranslation>()), functions(QMap<QString, VTranslation>())
|
variables(QMap<QString, VTranslation>()), functions(QMap<QString, VTranslation>()),
|
||||||
|
postfixOperators(QMap<QString, VTranslation>())
|
||||||
{
|
{
|
||||||
InitLineWidth();
|
InitLineWidth();
|
||||||
InitMeasurements();
|
InitMeasurements();
|
||||||
InitVariables();
|
InitVariables();
|
||||||
InitFunctions();
|
InitFunctions();
|
||||||
|
InitPostfixOperators();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -630,6 +632,15 @@ void VApplication::InitFunctions()
|
||||||
functions.insert(avg_F, VTranslation::translate(context, avg_F, QStringLiteral("mean value of all arguments")));
|
functions.insert(avg_F, VTranslation::translate(context, avg_F, QStringLiteral("mean value of all arguments")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VApplication::InitPostfixOperators()
|
||||||
|
{
|
||||||
|
const QString context = QStringLiteral("PostfixOperators");
|
||||||
|
|
||||||
|
postfixOperators.insert(cm_Oprt, VTranslation::translate(context, cm_Oprt, QStringLiteral("centimeter")));
|
||||||
|
postfixOperators.insert(mm_Oprt, VTranslation::translate(context, mm_Oprt, QStringLiteral("millimeter")));
|
||||||
|
postfixOperators.insert(in_Oprt, VTranslation::translate(context, in_Oprt, QStringLiteral("inch")));
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VApplication::setPatternUnit(const Valentina::Units &patternUnit)
|
void VApplication::setPatternUnit(const Valentina::Units &patternUnit)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,12 +87,13 @@ private:
|
||||||
QMap<QString, VTranslation> descriptions;
|
QMap<QString, VTranslation> descriptions;
|
||||||
QMap<QString, VTranslation> variables;
|
QMap<QString, VTranslation> variables;
|
||||||
QMap<QString, VTranslation> functions;
|
QMap<QString, VTranslation> functions;
|
||||||
|
QMap<QString, VTranslation> postfixOperators;
|
||||||
void InitLineWidth();
|
void InitLineWidth();
|
||||||
void InitMeasurements();
|
void InitMeasurements();
|
||||||
void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc);
|
void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc);
|
||||||
void InitVariables();
|
void InitVariables();
|
||||||
void InitFunctions();
|
void InitFunctions();
|
||||||
|
void InitPostfixOperators();
|
||||||
};
|
};
|
||||||
|
|
||||||
inline Valentina::Units VApplication::patternUnit() const
|
inline Valentina::Units VApplication::patternUnit() const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user