mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 02:10:52 +01:00
text editor and textfield editor : use QPropertyUndoCommand instead of ChangePartCommand
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4072 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -17,49 +17,57 @@
|
||||
*/
|
||||
#ifndef TEXT_EDITOR_H
|
||||
#define TEXT_EDITOR_H
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "elementitemeditor.h"
|
||||
|
||||
class PartText;
|
||||
class QTextOrientationSpinBoxWidget;
|
||||
class QLineEdit;
|
||||
class QDoubleSpinBox;
|
||||
class QSpinBox;
|
||||
class QButtonGroup;
|
||||
class QRadioButton;
|
||||
|
||||
/**
|
||||
This class provides a widget to edit static texts within the element
|
||||
editor.
|
||||
*/
|
||||
class TextEditor : public ElementItemEditor {
|
||||
class TextEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
// Constructors, destructor
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextEditor(QETElementEditor *, PartText * = 0, QWidget * = 0);
|
||||
virtual ~TextEditor();
|
||||
TextEditor(QETElementEditor *, PartText * = 0, QWidget * = 0);
|
||||
virtual ~TextEditor();
|
||||
private:
|
||||
TextEditor(const TextEditor &);
|
||||
TextEditor(const TextEditor &);
|
||||
|
||||
// attributes
|
||||
// attributes
|
||||
private:
|
||||
PartText *part;
|
||||
QLineEdit *qle_text;
|
||||
QDoubleSpinBox *qle_x, *qle_y;
|
||||
QSpinBox *font_size;
|
||||
QButtonGroup *color_;
|
||||
QRadioButton *black_color_, *white_color_;
|
||||
QTextOrientationSpinBoxWidget *rotation_angle_;
|
||||
PartText *part;
|
||||
QLineEdit *qle_text;
|
||||
QDoubleSpinBox *qle_x, *qle_y;
|
||||
QSpinBox *font_size;
|
||||
QButtonGroup *color_;
|
||||
QRadioButton *black_color_, *white_color_;
|
||||
QTextOrientationSpinBoxWidget *rotation_angle_;
|
||||
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 updateText();
|
||||
void updateTextX();
|
||||
void updateTextY();
|
||||
void updateTextT();
|
||||
void updateTextS();
|
||||
void updateTextC();
|
||||
void updateTextRotationAngle();
|
||||
void updateForm();
|
||||
void updateTextT();
|
||||
void updateTextS();
|
||||
void updateTextC();
|
||||
void updateTextRotationAngle();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
void activeConnections(bool);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user