mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 14:49:58 +01:00
Add new conductors properties color and section
This commit is contained in:
@@ -1478,6 +1478,8 @@ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool
|
||||
other_properties.text = m_properties.text;
|
||||
other_properties.m_function = m_properties.m_function;
|
||||
other_properties.m_tension_protocol = m_properties.m_tension_protocol;
|
||||
other_properties.m_wire_color = m_properties.m_wire_color;
|
||||
other_properties.m_wire_section = m_properties.m_wire_section;
|
||||
other_conductor->setProperties(other_properties);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1150,6 +1150,10 @@ void DynamicElementTextItem::conductorPropertiesChanged()
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_function : "");
|
||||
else if (m_info_name == "tension-protocol")
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_tension_protocol : "");
|
||||
else if (m_info_name == "couleur-conducteur")
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_color : "");
|
||||
else if (m_info_name == "section-conducteur")
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_section : "");
|
||||
}
|
||||
else if (m_text_from == CompositeText) {
|
||||
setPlainText(reportReplacedCompositeText());
|
||||
@@ -1184,6 +1188,10 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const
|
||||
string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
|
||||
if(string.contains("%{tension-protocol}"))
|
||||
string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
|
||||
if(string.contains("%{}couleur-conducteur"))
|
||||
string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
|
||||
if(string.contains("%{}section-conducteur"))
|
||||
string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user