mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-01 00:54:13 +02:00
Implement slave contact groups — label transfer, terminal assignment and UI fixes
This commit is contained in:
@@ -460,6 +460,22 @@ void PartTerminal::setLabelColor(QColor color)
|
||||
emit labelColorChanged();
|
||||
}
|
||||
|
||||
void PartTerminal::setUseMasterLabel(bool use)
|
||||
{
|
||||
if (d->m_use_master_label == use) return;
|
||||
d->m_use_master_label = use;
|
||||
update();
|
||||
emit useMasterLabelChanged();
|
||||
}
|
||||
|
||||
void PartTerminal::setMasterLabelIndex(int index)
|
||||
{
|
||||
if (d->m_master_label_index == index) return;
|
||||
d->m_master_label_index = index;
|
||||
update();
|
||||
emit masterLabelIndexChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
Updates the position of the second point according to the position
|
||||
and orientation of the terminal.
|
||||
|
||||
@@ -42,6 +42,8 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
Q_PROPERTY(Qt::Alignment label_valignment READ labelVAlignment WRITE setLabelVAlignment)
|
||||
Q_PROPERTY(bool label_frame READ labelFrame WRITE setLabelFrame)
|
||||
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)
|
||||
|
||||
public:
|
||||
// constructors, destructor
|
||||
@@ -62,6 +64,8 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
void labelVAlignmentChanged();
|
||||
void labelFrameChanged();
|
||||
void labelColorChanged();
|
||||
void useMasterLabelChanged();
|
||||
void masterLabelIndexChanged();
|
||||
|
||||
// methods
|
||||
public:
|
||||
@@ -130,6 +134,12 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
QColor labelColor() const { return d->m_label_color; }
|
||||
void setLabelColor(QColor color);
|
||||
|
||||
bool useMasterLabel() const { return d->m_use_master_label; }
|
||||
void setUseMasterLabel(bool use);
|
||||
|
||||
int masterLabelIndex() const { return d->m_master_label_index; }
|
||||
void setMasterLabelIndex(int index);
|
||||
|
||||
void setNewUuid();
|
||||
|
||||
QRectF labelRect() const;
|
||||
|
||||
Reference in New Issue
Block a user