mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-25 15:34:13 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user