QElectroTech  0.8-dev
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
TextEditor Class Reference

#include <texteditor.h>

Inheritance diagram for TextEditor:
Inheritance graph
Collaboration diagram for TextEditor:
Collaboration graph

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 part to nullptr to clear the current text. More...
 
bool setParts (QList< CustomElementPart * >) override
 
CustomElementPartcurrentPart () const override
 TextEditor::currentPart. More...
 
QList< CustomElementPart * > currentParts () const override
 
- Public Member Functions inherited from ElementItemEditor
 ElementItemEditor (QETElementEditor *, QWidget *=nullptr)
 
 ~ElementItemEditor () override
 
virtual QETElementEditorelementEditor () const
 
virtual ElementSceneelementScene () const
 
virtual QUndoStack & undoStack () const
 
virtual QString elementTypeName () const
 
virtual void setElementTypeName (const QString &)
 
virtual void detach ()
 

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...
 
void setUpChangeConnection (QPointer< PartText > part)
 
void disconnectChangeConnection ()
 
void disconnectEditConnection ()
 

Private Attributes

Ui::TextEditor * ui
 
QPointer< PartTextm_text
 
QList< PartText * > m_parts
 
QList< QMetaObject::Connection > m_edit_connection
 
QList< QMetaObject::Connection > m_change_connection
 

Constructor & Destructor Documentation

◆ TextEditor()

TextEditor::TextEditor ( QETElementEditor editor,
PartText text = nullptr,
QWidget *  parent = nullptr 
)
explicit

TextEditor::TextEditor Default constructor.

Parameters
editor: the element editor who use this editor
text: the text to edit
parent: the parent widget
Here is the call graph for this function:

◆ ~TextEditor()

TextEditor::~TextEditor ( )
override

Member Function Documentation

◆ currentPart()

CustomElementPart * TextEditor::currentPart ( ) const
overridevirtual

TextEditor::currentPart.

Returns
The current part

Implements ElementItemEditor.

◆ currentParts()

QList< CustomElementPart * > TextEditor::currentParts ( ) const
overridevirtual

Implements ElementItemEditor.

◆ disconnectChangeConnection()

void TextEditor::disconnectChangeConnection ( )
private
Here is the caller graph for this function:

◆ disconnectEditConnection()

void TextEditor::disconnectEditConnection ( )
private
Here is the caller graph for this function:

◆ on_m_color_pb_changed

void TextEditor::on_m_color_pb_changed ( const QColor &  newColor)
privateslot

TextEditor::on_m_color_pb_changed.

Parameters
newColor
Here is the call graph for this function:

◆ on_m_font_pb_clicked

void TextEditor::on_m_font_pb_clicked ( )
privateslot

TextEditor::on_m_font_pb_clicked.

Here is the call graph for this function:

◆ setPart()

bool TextEditor::setPart ( CustomElementPart part)
overridevirtual

TextEditor::setPart Set the current text to edit. Set part to nullptr to clear the current text.

Parameters
part: part to edit
Returns
if part is a partext or nullptr, else return false

Implements ElementItemEditor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParts()

bool TextEditor::setParts ( QList< CustomElementPart * >  parts)
overridevirtual

Reimplemented from ElementItemEditor.

Here is the call graph for this function:

◆ setUpChangeConnection()

void TextEditor::setUpChangeConnection ( QPointer< PartText part)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUpEditConnection()

void TextEditor::setUpEditConnection ( )
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateForm()

void TextEditor::updateForm ( )
overridevirtual

TextEditor::updateForm Update the gui.

Implements ElementItemEditor.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_change_connection

QList<QMetaObject::Connection> TextEditor::m_change_connection
private

◆ m_edit_connection

QList<QMetaObject::Connection> TextEditor::m_edit_connection
private

◆ m_parts

QList<PartText*> TextEditor::m_parts
private

◆ m_text

QPointer<PartText> TextEditor::m_text
private

◆ ui

Ui::TextEditor* TextEditor::ui
private

The documentation for this class was generated from the following files: