Refactoring name.

This commit is contained in:
Roman Telezhynskyi 2020-02-27 17:28:20 +02:00
parent 11efba97a8
commit f978db470d
2 changed files with 40 additions and 40 deletions

View File

@ -400,138 +400,138 @@ void VTranslateVars::InitVariables()
void VTranslateVars::InitFunctions() void VTranslateVars::InitFunctions()
{ {
functions.insert(degTorad_F, translate("VTranslateVars", "degTorad", "converts degrees to radian")); functions.insert(degTorad_F, translate("VTranslateVars", "degTorad", "converts degrees to radian"));
functionDescriptions.insert(degTorad_F, translate("VTranslateVars", "converts degrees to radian", functionsDescriptions.insert(degTorad_F, translate("VTranslateVars", "converts degrees to radian",
"functionm degTorad")); "functionm degTorad"));
functions.insert(radTodeg_F, translate("VTranslateVars", "radTodeg", "converts radian to degrees")); functions.insert(radTodeg_F, translate("VTranslateVars", "radTodeg", "converts radian to degrees"));
functionDescriptions.insert(radTodeg_F, translate("VTranslateVars", "converts radian to degrees", functionsDescriptions.insert(radTodeg_F, translate("VTranslateVars", "converts radian to degrees",
"function radTodeg")); "function radTodeg"));
functions.insert(sin_F, translate("VTranslateVars", "sin", "sine function working with radians")); functions.insert(sin_F, translate("VTranslateVars", "sin", "sine function working with radians"));
functionDescriptions.insert(sin_F, translate("VTranslateVars", "sine function working with radians", functionsDescriptions.insert(sin_F, translate("VTranslateVars", "sine function working with radians",
"function sin")); "function sin"));
functions.insert(cos_F, translate("VTranslateVars", "cos", "cosine function working with radians")); functions.insert(cos_F, translate("VTranslateVars", "cos", "cosine function working with radians"));
functionDescriptions.insert(cos_F, translate("VTranslateVars", "cosine function working with radians", functionsDescriptions.insert(cos_F, translate("VTranslateVars", "cosine function working with radians",
"function cos")); "function cos"));
functions.insert(tan_F, translate("VTranslateVars", "tan", "tangens function working with radians")); functions.insert(tan_F, translate("VTranslateVars", "tan", "tangens function working with radians"));
functionDescriptions.insert(tan_F, translate("VTranslateVars", "tangens function working with radians", functionsDescriptions.insert(tan_F, translate("VTranslateVars", "tangens function working with radians",
"function tan")); "function tan"));
functions.insert(asin_F, translate("VTranslateVars", "asin", "arcus sine function working with radians")); functions.insert(asin_F, translate("VTranslateVars", "asin", "arcus sine function working with radians"));
functionDescriptions.insert(asin_F, translate("VTranslateVars", "arcus sine function working with radians", functionsDescriptions.insert(asin_F, translate("VTranslateVars", "arcus sine function working with radians",
"function asin")); "function asin"));
functions.insert(acos_F, translate("VTranslateVars", "acos", "arcus cosine function working with radians")); functions.insert(acos_F, translate("VTranslateVars", "acos", "arcus cosine function working with radians"));
functionDescriptions.insert(acos_F, translate("VTranslateVars", "arcus cosine function working with radians", functionsDescriptions.insert(acos_F, translate("VTranslateVars", "arcus cosine function working with radians",
"function acos")); "function acos"));
functions.insert(atan_F, translate("VTranslateVars", "atan", "arcus tangens function working with radians")); functions.insert(atan_F, translate("VTranslateVars", "atan", "arcus tangens function working with radians"));
functionDescriptions.insert(atan_F, translate("VTranslateVars", "arcus tangens function working with radians", functionsDescriptions.insert(atan_F, translate("VTranslateVars", "arcus tangens function working with radians",
"function atan")); "function atan"));
functions.insert(sinh_F, translate("VTranslateVars", "sinh", "hyperbolic sine function")); functions.insert(sinh_F, translate("VTranslateVars", "sinh", "hyperbolic sine function"));
functionDescriptions.insert(sinh_F, translate("VTranslateVars", "hyperbolic sine function", "function sinh")); functionsDescriptions.insert(sinh_F, translate("VTranslateVars", "hyperbolic sine function", "function sinh"));
functions.insert(cosh_F, translate("VTranslateVars", "cosh", "hyperbolic cosine")); functions.insert(cosh_F, translate("VTranslateVars", "cosh", "hyperbolic cosine"));
functionDescriptions.insert(cosh_F, translate("VTranslateVars", "hyperbolic cosine", "function cosh")); functionsDescriptions.insert(cosh_F, translate("VTranslateVars", "hyperbolic cosine", "function cosh"));
functions.insert(tanh_F, translate("VTranslateVars", "tanh", "hyperbolic tangens function")); functions.insert(tanh_F, translate("VTranslateVars", "tanh", "hyperbolic tangens function"));
functionDescriptions.insert(tanh_F, translate("VTranslateVars", "hyperbolic tangens function", "function tanh")); functionsDescriptions.insert(tanh_F, translate("VTranslateVars", "hyperbolic tangens function", "function tanh"));
functions.insert(asinh_F, translate("VTranslateVars", "asinh", "hyperbolic arcus sine function")); functions.insert(asinh_F, translate("VTranslateVars", "asinh", "hyperbolic arcus sine function"));
functionDescriptions.insert(asinh_F, translate("VTranslateVars", "hyperbolic arcus sine function", functionsDescriptions.insert(asinh_F, translate("VTranslateVars", "hyperbolic arcus sine function",
"function asinh")); "function asinh"));
functions.insert(acosh_F, translate("VTranslateVars", "acosh", "hyperbolic arcus cosine function")); functions.insert(acosh_F, translate("VTranslateVars", "acosh", "hyperbolic arcus cosine function"));
functionDescriptions.insert(acosh_F, translate("VTranslateVars", "hyperbolic arcus cosine function", functionsDescriptions.insert(acosh_F, translate("VTranslateVars", "hyperbolic arcus cosine function",
"function acosh")); "function acosh"));
functions.insert(atanh_F, translate("VTranslateVars", "atanh", "hyperbolic arcur tangens function")); functions.insert(atanh_F, translate("VTranslateVars", "atanh", "hyperbolic arcur tangens function"));
functionDescriptions.insert(atanh_F, translate("VTranslateVars", "hyperbolic arcur tangens function", functionsDescriptions.insert(atanh_F, translate("VTranslateVars", "hyperbolic arcur tangens function",
"function atanh")); "function atanh"));
functions.insert(sinD_F, translate("VTranslateVars", "sinD", "sine function working with degrees")); functions.insert(sinD_F, translate("VTranslateVars", "sinD", "sine function working with degrees"));
functionDescriptions.insert(sinD_F, translate("VTranslateVars", "sine function working with degrees", functionsDescriptions.insert(sinD_F, translate("VTranslateVars", "sine function working with degrees",
"function sinD")); "function sinD"));
functions.insert(cosD_F, translate("VTranslateVars", "cosD", "cosine function working with degrees")); functions.insert(cosD_F, translate("VTranslateVars", "cosD", "cosine function working with degrees"));
functionDescriptions.insert(cosD_F, translate("VTranslateVars", "cosine function working with degrees", functionsDescriptions.insert(cosD_F, translate("VTranslateVars", "cosine function working with degrees",
"function cosD")); "function cosD"));
functions.insert(tanD_F, translate("VTranslateVars", "tanD", "tangens function working with degrees")); functions.insert(tanD_F, translate("VTranslateVars", "tanD", "tangens function working with degrees"));
functionDescriptions.insert(tanD_F, translate("VTranslateVars", "tangens function working with degrees", functionsDescriptions.insert(tanD_F, translate("VTranslateVars", "tangens function working with degrees",
"function tanD")); "function tanD"));
functions.insert(asinD_F, translate("VTranslateVars", "asinD", "arcus sine function working with degrees")); functions.insert(asinD_F, translate("VTranslateVars", "asinD", "arcus sine function working with degrees"));
functionDescriptions.insert(asinD_F, translate("VTranslateVars", "arcus sine function working with degrees", functionsDescriptions.insert(asinD_F, translate("VTranslateVars", "arcus sine function working with degrees",
"function asinD")); "function asinD"));
functions.insert(acosD_F, translate("VTranslateVars", "acosD", "arcus cosine function working with degrees")); functions.insert(acosD_F, translate("VTranslateVars", "acosD", "arcus cosine function working with degrees"));
functionDescriptions.insert(acosD_F, translate("VTranslateVars", "arcus cosine function working with degrees", functionsDescriptions.insert(acosD_F, translate("VTranslateVars", "arcus cosine function working with degrees",
"function acosD")); "function acosD"));
functions.insert(atanD_F, translate("VTranslateVars", "atanD", "arcus tangens function working with degrees")); functions.insert(atanD_F, translate("VTranslateVars", "atanD", "arcus tangens function working with degrees"));
functionDescriptions.insert(atanD_F, translate("VTranslateVars", "arcus tangens function working with degrees", functionsDescriptions.insert(atanD_F, translate("VTranslateVars", "arcus tangens function working with degrees",
"function atanD")); "function atanD"));
functions.insert(log2_F, translate("VTranslateVars", "log2", "logarithm to the base 2")); functions.insert(log2_F, translate("VTranslateVars", "log2", "logarithm to the base 2"));
functionDescriptions.insert(log2_F, translate("VTranslateVars", "logarithm to the base 2", "function log2")); functionsDescriptions.insert(log2_F, translate("VTranslateVars", "logarithm to the base 2", "function log2"));
functions.insert(log10_F, translate("VTranslateVars", "log10", "logarithm to the base 10")); functions.insert(log10_F, translate("VTranslateVars", "log10", "logarithm to the base 10"));
functionDescriptions.insert(log10_F, translate("VTranslateVars", "logarithm to the base 10", "function log10")); functionsDescriptions.insert(log10_F, translate("VTranslateVars", "logarithm to the base 10", "function log10"));
functions.insert(log_F, translate("VTranslateVars", "log", "logarithm to the base 10")); functions.insert(log_F, translate("VTranslateVars", "log", "logarithm to the base 10"));
functionDescriptions.insert(log_F, translate("VTranslateVars", "logarithm to the base 10", "function log")); functionsDescriptions.insert(log_F, translate("VTranslateVars", "logarithm to the base 10", "function log"));
functions.insert(ln_F, translate("VTranslateVars", "ln", "logarithm to base e (2.71828...)")); functions.insert(ln_F, translate("VTranslateVars", "ln", "logarithm to base e (2.71828...)"));
functionDescriptions.insert(ln_F, translate("VTranslateVars", "logarithm to base e (2.71828...)", "function ln")); functionsDescriptions.insert(ln_F, translate("VTranslateVars", "logarithm to base e (2.71828...)", "function ln"));
functions.insert(exp_F, translate("VTranslateVars", "exp", "e raised to the power of x")); functions.insert(exp_F, translate("VTranslateVars", "exp", "e raised to the power of x"));
functionDescriptions.insert(exp_F, translate("VTranslateVars", "e raised to the power of x", "function exp")); functionsDescriptions.insert(exp_F, translate("VTranslateVars", "e raised to the power of x", "function exp"));
functions.insert(sqrt_F, translate("VTranslateVars", "sqrt", "square root of a value")); functions.insert(sqrt_F, translate("VTranslateVars", "sqrt", "square root of a value"));
functionDescriptions.insert(sqrt_F, translate("VTranslateVars", "square root of a value", "function sqrt")); functionsDescriptions.insert(sqrt_F, translate("VTranslateVars", "square root of a value", "function sqrt"));
functions.insert(sign_F, translate("VTranslateVars", "sign", "sign function -1 if x<0; 1 if x>0")); functions.insert(sign_F, translate("VTranslateVars", "sign", "sign function -1 if x<0; 1 if x>0"));
functionDescriptions.insert(sign_F, translate("VTranslateVars", "sign function -1 if x<0; 1 if x>0", functionsDescriptions.insert(sign_F, translate("VTranslateVars", "sign function -1 if x<0; 1 if x>0",
"function sign")); "function sign"));
functions.insert(rint_F, translate("VTranslateVars", "rint", "round to nearest integer")); functions.insert(rint_F, translate("VTranslateVars", "rint", "round to nearest integer"));
functionDescriptions.insert(rint_F, translate("VTranslateVars", "round to nearest integer", "function rint")); functionsDescriptions.insert(rint_F, translate("VTranslateVars", "round to nearest integer", "function rint"));
functions.insert(r2cm_F, translate("VTranslateVars", "r2cm", "round to up to 1 decimal")); functions.insert(r2cm_F, translate("VTranslateVars", "r2cm", "round to up to 1 decimal"));
functionDescriptions.insert(r2cm_F, translate("VTranslateVars", "round to up to 1 decimal", "function r2cm")); functionsDescriptions.insert(r2cm_F, translate("VTranslateVars", "round to up to 1 decimal", "function r2cm"));
functions.insert(csrCm_F, translate("VTranslateVars", "csrCm", "cut, split and rotate modeling operation. Takes" functions.insert(csrCm_F, translate("VTranslateVars", "csrCm", "cut, split and rotate modeling operation. Takes"
" cm units.")); " cm units."));
functionDescriptions.insert(csrCm_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes " functionsDescriptions.insert(csrCm_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes "
"cm units.", "function csrCm")); "cm units.", "function csrCm"));
functions.insert(csrInch_F, translate("VTranslateVars", "csrInch", "cut, split and rotate modeling operation. Takes" functions.insert(csrInch_F, translate("VTranslateVars", "csrInch", "cut, split and rotate modeling operation. Takes"
" inch units.")); " inch units."));
functionDescriptions.insert(csrInch_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes" functionsDescriptions.insert(csrInch_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes"
" inch units.", "function csrInch")); " inch units.", "function csrInch"));
functions.insert(abs_F, translate("VTranslateVars", "abs", "absolute value")); functions.insert(abs_F, translate("VTranslateVars", "abs", "absolute value"));
functionDescriptions.insert(abs_F, translate("VTranslateVars", "absolute value", "function abs")); functionsDescriptions.insert(abs_F, translate("VTranslateVars", "absolute value", "function abs"));
functions.insert(min_F, translate("VTranslateVars", "min", "min of all arguments")); functions.insert(min_F, translate("VTranslateVars", "min", "min of all arguments"));
functionDescriptions.insert(min_F, translate("VTranslateVars", "min of all arguments", "function min")); functionsDescriptions.insert(min_F, translate("VTranslateVars", "min of all arguments", "function min"));
functions.insert(max_F, translate("VTranslateVars", "max", "max of all arguments")); functions.insert(max_F, translate("VTranslateVars", "max", "max of all arguments"));
functionDescriptions.insert(max_F, translate("VTranslateVars", "max of all arguments", "function max")); functionsDescriptions.insert(max_F, translate("VTranslateVars", "max of all arguments", "function max"));
functions.insert(sum_F, translate("VTranslateVars", "sum", "sum of all arguments")); functions.insert(sum_F, translate("VTranslateVars", "sum", "sum of all arguments"));
functionDescriptions.insert(sum_F, translate("VTranslateVars", "sum of all arguments", "function sum")); functionsDescriptions.insert(sum_F, translate("VTranslateVars", "sum of all arguments", "function sum"));
functions.insert(avg_F, translate("VTranslateVars", "avg", "mean value of all arguments")); functions.insert(avg_F, translate("VTranslateVars", "avg", "mean value of all arguments"));
functionDescriptions.insert(avg_F, translate("VTranslateVars", "mean value of all arguments", "function avg")); functionsDescriptions.insert(avg_F, translate("VTranslateVars", "mean value of all arguments", "function avg"));
functions.insert(fmod_F, translate("VTranslateVars", "fmod", functions.insert(fmod_F, translate("VTranslateVars", "fmod",
"Returns the floating-point remainder of numer/denom (rounded towards zero)")); "Returns the floating-point remainder of numer/denom (rounded towards zero)"));
functionDescriptions.insert(fmod_F, translate("VTranslateVars", "Returns the floating-point remainder of " functionsDescriptions.insert(fmod_F, translate("VTranslateVars", "Returns the floating-point remainder of "
"numer/denom (rounded towards zero)", "numer/denom (rounded towards zero)",
"function fmod")); "function fmod"));
} }
@ -1181,7 +1181,7 @@ void VTranslateVars::Retranslate()
PMSystemBooks.clear(); PMSystemBooks.clear();
variables.clear(); variables.clear();
functions.clear(); functions.clear();
functionDescriptions.clear(); functionsDescriptions.clear();
stDescriptions.clear(); stDescriptions.clear();
InitPatternMakingSystems(); InitPatternMakingSystems();
@ -1207,5 +1207,5 @@ QMap<QString, qmu::QmuTranslation> VTranslateVars::GetFunctions() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QMap<QString, qmu::QmuTranslation> VTranslateVars::GetFunctionsDescriptions() const QMap<QString, qmu::QmuTranslation> VTranslateVars::GetFunctionsDescriptions() const
{ {
return functionDescriptions; return functionsDescriptions;
} }

View File

@ -78,7 +78,7 @@ private:
QMap<QString, qmu::QmuTranslation> PMSystemBooks{}; QMap<QString, qmu::QmuTranslation> PMSystemBooks{};
QMap<QString, qmu::QmuTranslation> variables{}; QMap<QString, qmu::QmuTranslation> variables{};
QMap<QString, qmu::QmuTranslation> functions{}; QMap<QString, qmu::QmuTranslation> functions{};
QMap<QString, qmu::QmuTranslation> functionDescriptions{}; QMap<QString, qmu::QmuTranslation> functionsDescriptions{};
QMap<QString, qmu::QmuTranslation> placeholders{}; QMap<QString, qmu::QmuTranslation> placeholders{};
QMap<QString, qmu::QmuTranslation> stDescriptions{}; QMap<QString, qmu::QmuTranslation> stDescriptions{};
QMap<QString, QString> translatedFunctions{}; QMap<QString, QString> translatedFunctions{};