mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Line editor : use QPropertyUndoCommand instead of ChangePartCommand
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4068 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -17,32 +17,37 @@
|
||||
*/
|
||||
#ifndef LINE_EDITOR_H
|
||||
#define LINE_EDITOR_H
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "elementitemeditor.h"
|
||||
|
||||
class PartLine;
|
||||
class StyleEditor;
|
||||
class QComboBox;
|
||||
class QDoubleSpinBox;
|
||||
|
||||
/**
|
||||
This class provides a widget to edit lines within the element editor.
|
||||
*/
|
||||
class LineEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
// constructors, destructor
|
||||
public:
|
||||
LineEditor(QETElementEditor *, PartLine * = 0, QWidget * = 0);
|
||||
virtual ~LineEditor();
|
||||
private:
|
||||
LineEditor(const LineEditor &);
|
||||
|
||||
// attributes
|
||||
// attributes
|
||||
private:
|
||||
PartLine *part;
|
||||
StyleEditor *style_;
|
||||
QDoubleSpinBox *x1, *y1, *x2, *y2;
|
||||
QComboBox *end1_type, *end2_type;
|
||||
QDoubleSpinBox*end1_length, *end2_length;
|
||||
bool m_locked;
|
||||
|
||||
// methods
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
@@ -50,15 +55,11 @@ class LineEditor : public ElementItemEditor
|
||||
QPointF editedP2() const;
|
||||
|
||||
public slots:
|
||||
void updateLine();
|
||||
void updateLineX1();
|
||||
void updateLineY1();
|
||||
void updateLineX2();
|
||||
void updateLineY2();
|
||||
void updateLineEndType1();
|
||||
void updateLineEndLength1();
|
||||
void updateLineEndType2();
|
||||
void updateLineEndLength2();
|
||||
void lineEditingFinished();
|
||||
void updateForm();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user