mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
Replace minus (-) by underscore (_)
This commit is contained in:
parent
59ba3d24af
commit
8ac8ff5384
@ -503,8 +503,8 @@ ConductorProperties SearchAndReplaceWorker::replaceAdvanced(Conductor *conductor
|
|||||||
else if (what == "text") {properties.text.replace(rx, replace);}
|
else if (what == "text") {properties.text.replace(rx, replace);}
|
||||||
else if (what == "function") {properties.m_function.replace(rx, replace);}
|
else if (what == "function") {properties.m_function.replace(rx, replace);}
|
||||||
else if (what == "tension/protocol") {properties.m_tension_protocol.replace(rx, replace);}
|
else if (what == "tension/protocol") {properties.m_tension_protocol.replace(rx, replace);}
|
||||||
else if (what == "couleur-conducteur") {properties.m_wire_color.replace(rx, replace);}
|
else if (what == "conductor_color") {properties.m_wire_color.replace(rx, replace);}
|
||||||
else if (what == "section-conducteur") {properties.m_wire_section.replace(rx, replace);}
|
else if (what == "conductor_section") {properties.m_wire_section.replace(rx, replace);}
|
||||||
}
|
}
|
||||||
|
|
||||||
return properties;
|
return properties;
|
||||||
|
@ -263,9 +263,9 @@ void ConductorProperties::toXml(QDomElement &e) const
|
|||||||
e.setAttribute("text_color", text_color.name());
|
e.setAttribute("text_color", text_color.name());
|
||||||
e.setAttribute("formula", m_formula);
|
e.setAttribute("formula", m_formula);
|
||||||
e.setAttribute("function", m_function);
|
e.setAttribute("function", m_function);
|
||||||
e.setAttribute("tension-protocol", m_tension_protocol);
|
e.setAttribute("tension_protocol", m_tension_protocol);
|
||||||
e.setAttribute("couleur-conducteur", m_wire_color);
|
e.setAttribute("conductor_color", m_wire_color);
|
||||||
e.setAttribute("section-conducteur", m_wire_section);
|
e.setAttribute("conductor_section", m_wire_section);
|
||||||
e.setAttribute("numsize", QString::number(text_size));
|
e.setAttribute("numsize", QString::number(text_size));
|
||||||
e.setAttribute("condsize", QString::number(cond_size));
|
e.setAttribute("condsize", QString::number(cond_size));
|
||||||
e.setAttribute("displaytext", m_show_text);
|
e.setAttribute("displaytext", m_show_text);
|
||||||
@ -320,9 +320,9 @@ void ConductorProperties::fromXml(QDomElement &e)
|
|||||||
text_color = (xml_text_color.isValid()? xml_text_color : QColor(Qt::black));
|
text_color = (xml_text_color.isValid()? xml_text_color : QColor(Qt::black));
|
||||||
m_formula = e.attribute("formula");
|
m_formula = e.attribute("formula");
|
||||||
m_function = e.attribute("function");
|
m_function = e.attribute("function");
|
||||||
m_tension_protocol = e.attribute("tension-protocol");
|
m_tension_protocol = e.attribute("tension_protocol");
|
||||||
m_wire_color = e.attribute("couleur-conducteur");
|
m_wire_color = e.attribute("conductor_color");
|
||||||
m_wire_section = e.attribute("section-conducteur");
|
m_wire_section = e.attribute("conductor_section");
|
||||||
text_size = e.attribute("numsize", QString::number(9)).toInt();
|
text_size = e.attribute("numsize", QString::number(9)).toInt();
|
||||||
cond_size = e.attribute("condsize", QString::number(1)).toDouble();
|
cond_size = e.attribute("condsize", QString::number(1)).toDouble();
|
||||||
m_show_text = e.attribute("displaytext", QString::number(1)).toInt();
|
m_show_text = e.attribute("displaytext", QString::number(1)).toInt();
|
||||||
@ -356,9 +356,9 @@ void ConductorProperties::toSettings(QSettings &settings, const QString &prefix)
|
|||||||
settings.setValue(prefix + "text_color", text_color.name());
|
settings.setValue(prefix + "text_color", text_color.name());
|
||||||
settings.setValue(prefix + "formula", m_formula);
|
settings.setValue(prefix + "formula", m_formula);
|
||||||
settings.setValue(prefix + "function", m_function);
|
settings.setValue(prefix + "function", m_function);
|
||||||
settings.setValue(prefix + "tension-protocol", m_tension_protocol);
|
settings.setValue(prefix + "tension_protocol", m_tension_protocol);
|
||||||
settings.setValue(prefix + "couleur-conducteur", m_wire_color);
|
settings.setValue(prefix + "conductor_color", m_wire_color);
|
||||||
settings.setValue(prefix + "section-conducteur", m_wire_section);
|
settings.setValue(prefix + "conductor_section", m_wire_section);
|
||||||
settings.setValue(prefix + "textsize", QString::number(text_size));
|
settings.setValue(prefix + "textsize", QString::number(text_size));
|
||||||
settings.setValue(prefix + "size", QString::number(cond_size));
|
settings.setValue(prefix + "size", QString::number(cond_size));
|
||||||
settings.setValue(prefix + "displaytext", m_show_text);
|
settings.setValue(prefix + "displaytext", m_show_text);
|
||||||
@ -398,9 +398,9 @@ void ConductorProperties::fromSettings(QSettings &settings, const QString &prefi
|
|||||||
text_color = (settings_text_color.isValid()? settings_text_color : QColor(Qt::black));
|
text_color = (settings_text_color.isValid()? settings_text_color : QColor(Qt::black));
|
||||||
m_formula = settings.value(prefix + "formula", "").toString();
|
m_formula = settings.value(prefix + "formula", "").toString();
|
||||||
m_function = settings.value(prefix + "function", "").toString();
|
m_function = settings.value(prefix + "function", "").toString();
|
||||||
m_tension_protocol = settings.value(prefix + "tension-protocol", "").toString();
|
m_tension_protocol = settings.value(prefix + "tension_protocol", "").toString();
|
||||||
m_wire_color = settings.value(prefix + "couleur-conducteur", "").toString();
|
m_wire_color = settings.value(prefix + "conductor_color", "").toString();
|
||||||
m_wire_section = settings.value(prefix + "section-conducteur", "").toString();
|
m_wire_section = settings.value(prefix + "conductor_section", "").toString();
|
||||||
text_size = settings.value(prefix + "textsize", "7").toInt();
|
text_size = settings.value(prefix + "textsize", "7").toInt();
|
||||||
cond_size = settings.value(prefix + "size", "1").toInt();
|
cond_size = settings.value(prefix + "size", "1").toInt();
|
||||||
m_show_text = settings.value(prefix + "displaytext", true).toBool();
|
m_show_text = settings.value(prefix + "displaytext", true).toBool();
|
||||||
@ -574,7 +574,7 @@ void ConductorProperties::applyForEqualAttributes(QList<ConductorProperties> lis
|
|||||||
m_tension_protocol = s_value;
|
m_tension_protocol = s_value;
|
||||||
equal = true;
|
equal = true;
|
||||||
|
|
||||||
//couleur-conducteur
|
//conductor_color
|
||||||
s_value = clist.first().m_wire_color;
|
s_value = clist.first().m_wire_color;
|
||||||
for(ConductorProperties cp : clist)
|
for(ConductorProperties cp : clist)
|
||||||
{
|
{
|
||||||
@ -585,7 +585,7 @@ void ConductorProperties::applyForEqualAttributes(QList<ConductorProperties> lis
|
|||||||
m_wire_color = s_value;
|
m_wire_color = s_value;
|
||||||
equal = true;
|
equal = true;
|
||||||
|
|
||||||
//section-conducteur
|
//conductor_section
|
||||||
s_value = clist.first().m_wire_section;
|
s_value = clist.first().m_wire_section;
|
||||||
for(ConductorProperties cp : clist)
|
for(ConductorProperties cp : clist)
|
||||||
{
|
{
|
||||||
|
@ -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";
|
||||||
else
|
else
|
||||||
strl = QETApp::elementInfoKeys();
|
strl = QETApp::elementInfoKeys();
|
||||||
|
|
||||||
|
@ -1148,11 +1148,11 @@ void DynamicElementTextItem::conductorPropertiesChanged()
|
|||||||
{
|
{
|
||||||
if(m_info_name == "function")
|
if(m_info_name == "function")
|
||||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_function : "");
|
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_function : "");
|
||||||
else if (m_info_name == "tension-protocol")
|
else if (m_info_name == "tension_protocol")
|
||||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_tension_protocol : "");
|
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_tension_protocol : "");
|
||||||
else if (m_info_name == "couleur-conducteur")
|
else if (m_info_name == "conductor_color")
|
||||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_color : "");
|
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_color : "");
|
||||||
else if (m_info_name == "section-conducteur")
|
else if (m_info_name == "conductor_section")
|
||||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_section : "");
|
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_section : "");
|
||||||
}
|
}
|
||||||
else if (m_text_from == CompositeText) {
|
else if (m_text_from == CompositeText) {
|
||||||
@ -1186,12 +1186,12 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const
|
|||||||
{
|
{
|
||||||
if(string.contains("%{function}"))
|
if(string.contains("%{function}"))
|
||||||
string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
|
string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
|
||||||
if(string.contains("%{tension-protocol}"))
|
if(string.contains("%{tension_protocol}"))
|
||||||
string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
|
string.replace("%{tension_protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
|
||||||
if(string.contains("%{}couleur-conducteur"))
|
if(string.contains("%{conductor_color}"))
|
||||||
string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
|
string.replace("%{conductor_color}", m_watched_conductor.data()->properties().m_wire_color);
|
||||||
if(string.contains("%{}section-conducteur"))
|
if(string.contains("%{conductor_section}"))
|
||||||
string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
|
string.replace("%{conductor_section}", m_watched_conductor.data()->properties().m_wire_section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1781,11 +1781,11 @@ QStringList DynamicTextItemDelegate::availableInfo(DynamicElementTextItem *deti)
|
|||||||
if (!cond->properties().m_function.isEmpty())
|
if (!cond->properties().m_function.isEmpty())
|
||||||
qstrl << "function";
|
qstrl << "function";
|
||||||
if(!cond->properties().m_tension_protocol.isEmpty())
|
if(!cond->properties().m_tension_protocol.isEmpty())
|
||||||
qstrl << "tension-protocol";
|
qstrl << "tension_protocol";
|
||||||
if(!cond->properties().m_wire_color.isEmpty())
|
if(!cond->properties().m_wire_color.isEmpty())
|
||||||
qstrl << "couleur-conducteur";
|
qstrl << "conductor_color";
|
||||||
if(!cond->properties().m_wire_section.isEmpty())
|
if(!cond->properties().m_wire_section.isEmpty())
|
||||||
qstrl << "section-conducteur";
|
qstrl << "conductor_section";
|
||||||
}
|
}
|
||||||
|
|
||||||
return qstrl;
|
return qstrl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user