mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +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:
@@ -24,36 +24,35 @@ class StyleEditor;
|
||||
/**
|
||||
This class provides a widget to edit rectangles within the element editor.
|
||||
*/
|
||||
class RectangleEditor : public ElementItemEditor {
|
||||
class RectangleEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = 0, QWidget * = 0);
|
||||
virtual ~RectangleEditor();
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = 0, QWidget * = 0);
|
||||
virtual ~RectangleEditor();
|
||||
private:
|
||||
RectangleEditor(const RectangleEditor &);
|
||||
RectangleEditor(const RectangleEditor &);
|
||||
|
||||
// attributes
|
||||
// attributes
|
||||
private:
|
||||
PartRectangle *part;
|
||||
StyleEditor *style_;
|
||||
QDoubleSpinBox *x, *y, *w, *h;
|
||||
PartRectangle *part;
|
||||
StyleEditor *style_;
|
||||
QDoubleSpinBox *x, *y, *w, *h;
|
||||
bool m_locked;
|
||||
|
||||
// methods
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
QPointF editedTopLeft () const;
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
QPointF editedTopLeft () const;
|
||||
|
||||
public slots:
|
||||
void updateRectangle();
|
||||
void updateRectangleX();
|
||||
void updateRectangleY();
|
||||
void updateRectangleW();
|
||||
void updateRectangleH();
|
||||
void updateForm();
|
||||
void updateForm();
|
||||
void editingFinished();
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
void activeConnections(bool);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user