Add "Potentiel" field to the terminal editor (element editor)

New QLineEdit (m_potential_le) between Type and Nom: an optional,
symbol-author-chosen grouping identifier shared by terminals that
belong to the same physical terminal within a multi-terminal block.

Stored as TerminalData::m_potential (new field, persisted as the
"potential" XML attribute, empty by default).
Used by relatedPotentialTerminal() in terminal.cpp: when
potential_isolating is enabled on a Terminal-type element, terminals
sharing a non-empty, matching potential value now stay electrically
linked to each other instead of every terminal in the block being
isolated from every other one.

Tooltip on the field for explanation
This commit is contained in:
Levi Jetzer
2026-09-02 18:24:47 +02:00
parent 899f10533d
commit 10bf0411bb
9 changed files with 108 additions and 13 deletions
@@ -476,6 +476,15 @@ void PartTerminal::setMasterLabelIndex(int index)
emit masterLabelIndexChanged();
}
void PartTerminal::setPotential(const QString &potential)
{
if (d->m_potential == potential) return;
prepareGeometryChange();
d->m_potential = potential;
update();
emit potentialChanged();
}
/**
Updates the position of the second point according to the position
and orientation of the terminal.