mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-24 16:04:16 +02:00
Reapply "Feature: Terminal potential grouping"
This reverts commit 1793dcb9a8.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user