mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-15 06:09:58 +01:00
Rectangle editor widget : use QPropertyUndoCommand instead of ChangePartCommand
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4064 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -32,10 +32,7 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QPointF rectTopLeft READ rectTopLeft WRITE setRectTopLeft)
|
||||
Q_PROPERTY(qreal width READ width WRITE setWidth)
|
||||
Q_PROPERTY(qreal height READ height WRITE setHeight)
|
||||
Q_PROPERTY(QRectF rect READ rect WRITE setRect)
|
||||
Q_PROPERTY(QRectF rect READ rect WRITE setRect)
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
@@ -44,6 +41,9 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
|
||||
private:
|
||||
PartRectangle(const PartRectangle &);
|
||||
|
||||
signals:
|
||||
void rectChanged();
|
||||
|
||||
// methods
|
||||
public:
|
||||
@@ -63,15 +63,6 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
|
||||
QPointF rectTopLeft () const;
|
||||
void setRectTopLeft (const QPointF &point);
|
||||
|
||||
qreal width () const {return rect().width();}
|
||||
void setWidth (qreal w);
|
||||
|
||||
qreal height () const { return rect().height();}
|
||||
void setHeight (qreal h);
|
||||
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual QPointF sceneTopLeft() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user