mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Add new variables for report folio and can be added in a composite text
{conductor_color}
{conductor_section}
This commit is contained in:
@@ -190,7 +190,7 @@ void DynamicTextFieldEditor::fillInfoComboBox()
|
|||||||
QString type = elementEditor()->elementScene()->elementType();
|
QString type = elementEditor()->elementScene()->elementType();
|
||||||
|
|
||||||
if(type.contains("report"))
|
if(type.contains("report"))
|
||||||
strl << "function" << "tension_protocol";
|
strl << "function" << "tension_protocol" << "conductor_color" << "conductor_section";
|
||||||
else
|
else
|
||||||
strl = QETApp::elementInfoKeys();
|
strl = QETApp::elementInfoKeys();
|
||||||
|
|
||||||
|
|||||||
@@ -298,6 +298,8 @@ QStringList QETApp::elementInfoKeys()
|
|||||||
<< "comment"
|
<< "comment"
|
||||||
<< "function"
|
<< "function"
|
||||||
<< "tension_protocol"
|
<< "tension_protocol"
|
||||||
|
<< "conductor_color"
|
||||||
|
<< "conductor_section"
|
||||||
<< "auxiliary1"
|
<< "auxiliary1"
|
||||||
<< "auxiliary2"
|
<< "auxiliary2"
|
||||||
|
|
||||||
@@ -329,6 +331,8 @@ QString QETApp::elementTranslatedInfoKey(const QString &info)
|
|||||||
else if (info == "comment") return tr("Commentaire");
|
else if (info == "comment") return tr("Commentaire");
|
||||||
else if (info == "function") return tr("Fonction");
|
else if (info == "function") return tr("Fonction");
|
||||||
else if (info == "tension_protocol") return tr("Tension / Protocole");
|
else if (info == "tension_protocol") return tr("Tension / Protocole");
|
||||||
|
else if (info == "conductor_color") return tr("conductor_color");
|
||||||
|
else if (info == "conductor_section") return tr("conductor_section");
|
||||||
else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
|
else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
|
||||||
else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
|
else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
|
||||||
|
|
||||||
@@ -369,6 +373,8 @@ QString QETApp::elementInfoToVar(const QString &info)
|
|||||||
else if (info == "location") return QString("%{location}");
|
else if (info == "location") return QString("%{location}");
|
||||||
else if (info == "function") return QString("%{function}");
|
else if (info == "function") return QString("%{function}");
|
||||||
else if (info == "tension_protocol") return QString("%{tension_protocol}");
|
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}"));
|
||||||
}
|
}
|
||||||
@@ -384,6 +390,8 @@ QStringList QETApp::conductorInfoKeys()
|
|||||||
keys.append("text");
|
keys.append("text");
|
||||||
keys.append("function");
|
keys.append("function");
|
||||||
keys.append("tension/protocol");
|
keys.append("tension/protocol");
|
||||||
|
keys.append("conductor_color");
|
||||||
|
keys.append("conductor_section");
|
||||||
|
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
@@ -400,6 +408,8 @@ QString QETApp::conductorTranslatedInfoKey(const QString &key)
|
|||||||
else if (key == "text") return tr("Texte");
|
else if (key == "text") return tr("Texte");
|
||||||
else if (key == "function") return tr("Fonction");
|
else if (key == "function") return tr("Fonction");
|
||||||
else if (key == "tension/protocol") return tr("Tension / Protocole");
|
else if (key == "tension/protocol") return tr("Tension / Protocole");
|
||||||
|
else if (key == "conductor_color") return tr("conductor_color");
|
||||||
|
else if (key == "conductor_section")return tr("conductor_section");
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ void CompositeTextEditDialog::setUpComboBox()
|
|||||||
|
|
||||||
if(m_text && (m_text->parentElement()->linkType() & Element::AllReport)) //Special treatment for text owned by a folio report
|
if(m_text && (m_text->parentElement()->linkType() & Element::AllReport)) //Special treatment for text owned by a folio report
|
||||||
{
|
{
|
||||||
qstrl << "label" << "function" << "tension_protocol";
|
qstrl << "label" << "function" << "tension_protocol" << "conductor_color" << "conductor_section";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user