diff --git a/src/app/widgets/vapplication.cpp b/src/app/widgets/vapplication.cpp index abf18de97..973cb8055 100644 --- a/src/app/widgets/vapplication.cpp +++ b/src/app/widgets/vapplication.cpp @@ -46,12 +46,14 @@ VApplication::VApplication(int &argc, char **argv) : QApplication(argc, argv), _patternUnit(Valentina::Cm), _patternType(Pattern::Individual), _widthMainLine(DefWidth), _widthHairLine(DefWidth/3.0), measurements(QMap()), guiTexts(QMap()), descriptions(QMap()), - variables(QMap()), functions(QMap()) + variables(QMap()), functions(QMap()), + postfixOperators(QMap()) { InitLineWidth(); InitMeasurements(); InitVariables(); InitFunctions(); + InitPostfixOperators(); } //--------------------------------------------------------------------------------------------------------------------- @@ -630,6 +632,15 @@ void VApplication::InitFunctions() 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) { diff --git a/src/app/widgets/vapplication.h b/src/app/widgets/vapplication.h index 63d2e763b..cfcf73487 100644 --- a/src/app/widgets/vapplication.h +++ b/src/app/widgets/vapplication.h @@ -87,12 +87,13 @@ private: QMap descriptions; QMap variables; QMap functions; + QMap postfixOperators; void InitLineWidth(); void InitMeasurements(); void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc); void InitVariables(); void InitFunctions(); - + void InitPostfixOperators(); }; inline Valentina::Units VApplication::patternUnit() const