QElectroTech
0.70
|
#include <texteditor.h>
Public Member Functions | |
TextEditor (QETElementEditor *editor, PartText *text=nullptr, QWidget *parent=nullptr) | |
TextEditor::TextEditor Default constructor. More... | |
~TextEditor () override | |
TextEditor::~TextEditor. More... | |
void | updateForm () override |
TextEditor::updateForm Update the gui. More... | |
bool | setPart (CustomElementPart *part) override |
TextEditor::setPart Set the current text to edit. Set to nullptr to clear the current text. More... | |
CustomElementPart * | currentPart () const override |
TextEditor::currentPart. More... | |
![]() | |
ElementItemEditor (QETElementEditor *, QWidget *=nullptr) | |
~ElementItemEditor () override | |
virtual QETElementEditor * | elementEditor () const |
virtual ElementScene * | elementScene () const |
virtual QUndoStack & | undoStack () const |
virtual QString | elementTypeName () const |
virtual void | setElementTypeName (const QString &) |
virtual void | detach () |
virtual bool | setParts (QList< CustomElementPart *>) |
Private Slots | |
void | on_m_font_pb_clicked () |
TextEditor::on_m_font_pb_clicked. More... | |
void | on_m_color_pb_changed (const QColor &newColor) |
TextEditor::on_m_color_pb_changed. More... | |
Private Member Functions | |
void | setUpEditConnection () |
TextEditor::setUpEditConnection Setup the connection between the widgets of this editor and the undo command use to apply the change to the edited text. More... | |
Private Attributes | |
Ui::TextEditor * | ui |
QPointer< PartText > | m_text |
QList< QMetaObject::Connection > | m_edit_connection |
QList< QMetaObject::Connection > | m_change_connection |
Definition at line 32 of file texteditor.h.
|
explicit |
TextEditor::TextEditor Default constructor.
editor | : the element editor who use this editor |
text | : the text to edit |
parent | : the parent widget |
Definition at line 30 of file texteditor.cpp.
References setPart(), setUpEditConnection(), ui, and updateForm().
|
override |
|
overridevirtual |
Implements ElementItemEditor.
Definition at line 120 of file texteditor.cpp.
References m_text.
|
privateslot |
TextEditor::on_m_color_pb_changed.
newColor |
Definition at line 216 of file texteditor.cpp.
References m_text, QET::Icons::tr, and ElementItemEditor::undoStack().
|
privateslot |
TextEditor::on_m_font_pb_clicked.
Definition at line 194 of file texteditor.cpp.
References m_text, QET::Icons::tr, ui, and ElementItemEditor::undoStack().
|
overridevirtual |
TextEditor::setPart Set the current text to edit. Set to nullptr to clear the current text.
part | : part to edit |
Implements ElementItemEditor.
Definition at line 83 of file texteditor.cpp.
References PartText::colorChanged(), PartText::fontChanged(), m_change_connection, m_text, PartText::plainTextChanged(), and updateForm().
Referenced by TextEditor().
|
private |
TextEditor::setUpEditConnection Setup the connection between the widgets of this editor and the undo command use to apply the change to the edited text.
Definition at line 129 of file texteditor.cpp.
References m_edit_connection, and ui.
Referenced by TextEditor(), and updateForm().
|
overridevirtual |
TextEditor::updateForm Update the gui.
Implements ElementItemEditor.
Definition at line 54 of file texteditor.cpp.
References m_edit_connection, m_text, setUpEditConnection(), and ui.
Referenced by setPart(), and TextEditor().
|
private |
Definition at line 55 of file texteditor.h.
Referenced by setPart().
|
private |
Definition at line 54 of file texteditor.h.
Referenced by setUpEditConnection(), and updateForm().
|
private |
Definition at line 53 of file texteditor.h.
Referenced by currentPart(), on_m_color_pb_changed(), on_m_font_pb_clicked(), setPart(), and updateForm().
|
private |
Definition at line 51 of file texteditor.h.
Referenced by on_m_font_pb_clicked(), setUpEditConnection(), TextEditor(), updateForm(), and ~TextEditor().