Reapply "Feature: Terminal potential grouping"

This reverts commit 1793dcb9a8.
This commit is contained in:
Levi Jetzer
2026-10-08 15:00:13 +02:00
parent 7c6a0411d4
commit aba7a3d8b5
9 changed files with 99 additions and 6 deletions
@@ -481,6 +481,13 @@ void PartTerminal::setMasterLabelIndex(int index)
emit masterLabelIndexChanged();
}
void PartTerminal::setPotential(const QString &potential)
{
if (d->m_potential == potential) return;
d->m_potential = potential;
emit potentialChanged();
}
/**
Updates the position of the second point according to the position
and orientation of the terminal.
@@ -44,6 +44,7 @@ class PartTerminal : public CustomElementGraphicPart
Q_PROPERTY(QColor label_color READ labelColor WRITE setLabelColor)
Q_PROPERTY(bool use_master_label READ useMasterLabel WRITE setUseMasterLabel)
Q_PROPERTY(int master_label_index READ masterLabelIndex WRITE setMasterLabelIndex)
Q_PROPERTY(QString potential READ potential WRITE setPotential)
public:
// constructors, destructor
@@ -56,6 +57,7 @@ class PartTerminal : public CustomElementGraphicPart
void orientationChanged();
void nameChanged();
void terminalTypeChanged();
void potentialChanged();
void showNameChanged();
void labelPosChanged();
void labelFontChanged();
@@ -140,6 +142,9 @@ class PartTerminal : public CustomElementGraphicPart
int masterLabelIndex() const { return d->m_master_label_index; }
void setMasterLabelIndex(int index);
QString potential() const { return d->m_potential; }
void setPotential(const QString &potential);
void setNewUuid();
//The terminal's own uuid, the one saved on <terminal>: hides
//CustomElementGraphicPart::uuid(), which a terminal never saves.