mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-17 15:49:59 +01:00
Add and move terminal strip item are now managed by undo command
This commit is contained in:
@@ -47,3 +47,11 @@ QRectF TerminalStripItem::boundingRect() const
|
||||
|
||||
return br_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripItem::name
|
||||
* @return usual name of this item
|
||||
*/
|
||||
QString TerminalStripItem::name() const {
|
||||
return tr("plan de bornes");
|
||||
}
|
||||
|
||||
@@ -32,8 +32,12 @@ class TerminalStripItem : public QetGraphicsItem
|
||||
public:
|
||||
TerminalStripItem(QPointer<TerminalStrip> strip, QGraphicsItem *parent = nullptr);
|
||||
|
||||
enum {Type = UserType + 1011};
|
||||
int type() const override {return Type;}
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
QRectF boundingRect() const override;
|
||||
QString name() const override;
|
||||
|
||||
private:
|
||||
QPointer<TerminalStrip> m_strip;
|
||||
|
||||
Reference in New Issue
Block a user