mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 17:44:13 +02:00
Reapply "Feature: Terminal potential grouping"
This reverts commit 1793dcb9a8.
This commit is contained in:
@@ -129,6 +129,9 @@ QDomElement TerminalData::toXml(QDomDocument &xml_document) const
|
||||
xml_element.setAttribute("label_color", m_label_color.name());
|
||||
}
|
||||
|
||||
if (!m_potential.isEmpty())
|
||||
xml_element.setAttribute("potential", m_potential);
|
||||
|
||||
// Save master label override settings
|
||||
if (m_use_master_label) {
|
||||
xml_element.setAttribute("use_master_label", "true");
|
||||
@@ -207,6 +210,8 @@ bool TerminalData::fromXml (const QDomElement &xml_element)
|
||||
m_label_color = QColor(color_str);
|
||||
}
|
||||
|
||||
m_potential = xml_element.attribute("potential");
|
||||
|
||||
// Read master label override settings
|
||||
m_use_master_label = (xml_element.attribute("use_master_label") == QLatin1String("true"));
|
||||
m_master_label_index = xml_element.attribute("master_label_index", "0").toInt();
|
||||
|
||||
@@ -103,6 +103,18 @@ class TerminalData : public PropertiesInterface
|
||||
*/
|
||||
QString m_name;
|
||||
|
||||
/**
|
||||
@brief m_potential
|
||||
An optional, symbol-author-chosen grouping identifier shared by
|
||||
terminals that belong to the same physical terminal within
|
||||
a multi-terminal block. When potential_isolating is enabled
|
||||
on the parent element, terminals sharing a non-empty,
|
||||
matching m_potential stay linked to each other; terminals
|
||||
with different (or empty) values become isolated from each
|
||||
other. Empty by default.
|
||||
*/
|
||||
QString m_potential;
|
||||
|
||||
/**
|
||||
@brief m_pos
|
||||
Position of the terminal. The second point is calculated
|
||||
|
||||
Reference in New Issue
Block a user