mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-26 14:59:58 +02:00
ellipse editor : use QPropertyUndoCommand instead of ChangePartCommand
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4067 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -17,42 +17,44 @@
|
||||
*/
|
||||
#ifndef ELLIPSE_EDITOR_H
|
||||
#define ELLIPSE_EDITOR_H
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "elementitemeditor.h"
|
||||
|
||||
class PartEllipse;
|
||||
class StyleEditor;
|
||||
class QDoubleSpinBox;
|
||||
|
||||
/**
|
||||
This class provides a widget to edit ellipses within the element editor.
|
||||
*/
|
||||
class EllipseEditor : public ElementItemEditor {
|
||||
class EllipseEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = 0, QWidget * = 0);
|
||||
virtual ~EllipseEditor();
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = 0, QWidget * = 0);
|
||||
virtual ~EllipseEditor();
|
||||
private:
|
||||
EllipseEditor(const EllipseEditor &);
|
||||
EllipseEditor(const EllipseEditor &);
|
||||
|
||||
// attributes
|
||||
// attributes
|
||||
private:
|
||||
PartEllipse *part;
|
||||
StyleEditor *style_;
|
||||
QDoubleSpinBox *x, *y, *h, *v;
|
||||
PartEllipse *part;
|
||||
StyleEditor *style_;
|
||||
QDoubleSpinBox *x, *y, *h, *v;
|
||||
bool m_locked;
|
||||
|
||||
// methods
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
|
||||
public slots:
|
||||
void updateEllipse();
|
||||
void updateEllipseX();
|
||||
void updateEllipseY();
|
||||
void updateEllipseH();
|
||||
void updateEllipseV();
|
||||
void updateForm();
|
||||
void editingFinished();
|
||||
void updateForm();
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
void activeConnections(bool);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user