mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Mod get elementInfo from elementInfoKeys
This commit is contained in:
@@ -409,29 +409,12 @@ QString QETApp::elementTranslatedInfoKey(const QString &info)
|
|||||||
@return var in form %{my-var} corresponding to the info,
|
@return var in form %{my-var} corresponding to the info,
|
||||||
if there is not available var for the given info
|
if there is not available var for the given info
|
||||||
the returned var is %{void}
|
the returned var is %{void}
|
||||||
|
@see QETApp::elementInfoKeys for list
|
||||||
*/
|
*/
|
||||||
QString QETApp::elementInfoToVar(const QString &info)
|
QString QETApp::elementInfoToVar(const QString &info)
|
||||||
{
|
{
|
||||||
if (info == "formula") return QString("%{formula}");
|
if (elementInfoKeys().contains(info))
|
||||||
else if (info == "label") return QString("%{label}");
|
return QString("%{")+info+QString("}");
|
||||||
else if (info == "plant") return QString("%{plant}");
|
|
||||||
else if (info == "comment") return QString("%{comment}");
|
|
||||||
else if (info == "description") return QString("%{description}");
|
|
||||||
else if (info == "designation") return QString("%{designation}");
|
|
||||||
else if (info == "manufacturer") return QString("%{manufacturer}");
|
|
||||||
else if (info == "manufacturer_reference") return QString("%{manufacturer_reference}");
|
|
||||||
else if (info == "supplier") return QString("%{supplier}");
|
|
||||||
else if (info == "quantity") return QString("%{quantity}");
|
|
||||||
else if (info == "unity") return QString("%{unity}");
|
|
||||||
else if (info == "auxiliary1") return QString("%{auxiliary1}");
|
|
||||||
else if (info == "auxiliary2") return QString("%{auxiliary2}");
|
|
||||||
else if (info == "machine_manufacturer_reference") return QString("%{machine_manufacturer_reference}");
|
|
||||||
else if (info == "location") return QString("%{location}");
|
|
||||||
else if (info == "function") return QString("%{function}");
|
|
||||||
else if (info == "tension_protocol") return QString("%{tension_protocol}");
|
|
||||||
else if (info == "conductor_color") return QString("%{conductor_color}");
|
|
||||||
else if (info == "conductor_section") return QString("%{conductor_section}");
|
|
||||||
|
|
||||||
return (QString ("%{void}"));
|
return (QString ("%{void}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user