QElectroTech  0.70
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
DynamicElementTextItemEditor Class Reference

#include <dynamicelementtextitemeditor.h>

Public Member Functions

 DynamicElementTextItemEditor (Element *element, QWidget *parent=nullptr)
 
 ~DynamicElementTextItemEditor () override
 
void setElement (Element *element) override
 
QString title () const override
 PropertiesEditorWidget::title. More...
 
bool setLiveEdit (bool live_edit) override
 PropertiesEditorWidget::setLiveEdit Set the editor in live edit mode. When an editor is in live edit mode, every change is applied immediately (no need to call apply). If live edit can be enable, return true, else false. By default this method do nothing and return false (live edit is disable). Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode. More...
 
void apply () override
 
void setCurrentText (DynamicElementTextItem *text)
 DynamicElementTextItemEditor::setCurrentText Expand and select the item for text . More...
 
void setCurrentGroup (ElementTextItemGroup *group)
 DynamicElementTextItemEditor::setCurrentGroup Expand and select the item for group . More...
 
QUndoCommand * associatedUndo () const override
 PropertiesEditorWidget::associatedUndo By default, return a nullptr. More...
 
- Public Member Functions inherited from AbstractElementPropertiesEditorWidget
 AbstractElementPropertiesEditorWidget (QWidget *parent=nullptr)
 
- Public Member Functions inherited from PropertiesEditorWidget
 PropertiesEditorWidget (QWidget *parent=nullptr)
 PropertiesEditorWidget::PropertiesEditorWidget Constructor. More...
 
virtual void reset ()
 
virtual void updateUi ()
 
bool isLiveEdit () const
 PropertiesEditorWidget::isLiveEdit. More...
 

Private Slots

void on_m_add_text_clicked ()
 DynamicElementTextItemEditor::on_m_add_text_clicked Add a new dynamic text. More...
 
void on_m_remove_selection_clicked ()
 DynamicElementTextItemEditor::on_m_remove_selection_clicked Remove the selected item. More...
 
void on_m_add_group_clicked ()
 DynamicElementTextItemEditor::on_m_add_group_clicked Add a new group. More...
 
void on_m_tree_view_clicked (const QModelIndex &index)
 
void on_m_export_pb_clicked ()
 
void on_m_import_pb_clicked ()
 

Private Member Functions

void dataEdited ()
 

Private Attributes

Ui::DynamicElementTextItemEditor * ui
 
DynamicElementTextModelm_model = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from PropertiesEditorWidget
virtual void enableLiveEdit ()
 
virtual void disableLiveEdit ()
 
- Protected Attributes inherited from AbstractElementPropertiesEditorWidget
QPointer< Elementm_element
 
- Protected Attributes inherited from PropertiesEditorWidget
bool m_live_edit
 

Detailed Description

Definition at line 32 of file dynamicelementtextitemeditor.h.

Constructor & Destructor Documentation

◆ DynamicElementTextItemEditor()

DynamicElementTextItemEditor::DynamicElementTextItemEditor ( Element element,
QWidget *  parent = nullptr 
)
explicit

Definition at line 34 of file dynamicelementtextitemeditor.cpp.

References setElement(), and ui.

◆ ~DynamicElementTextItemEditor()

DynamicElementTextItemEditor::~DynamicElementTextItemEditor ( )
override

Definition at line 46 of file dynamicelementtextitemeditor.cpp.

References ui.

Member Function Documentation

◆ apply()

void DynamicElementTextItemEditor::apply ( )
overridevirtual

◆ associatedUndo()

QUndoCommand * DynamicElementTextItemEditor::associatedUndo ( ) const
overridevirtual

◆ dataEdited()

void DynamicElementTextItemEditor::dataEdited ( )
private

Definition at line 189 of file dynamicelementtextitemeditor.cpp.

References apply(), and PropertiesEditorWidget::m_live_edit.

Referenced by setElement().

◆ on_m_add_group_clicked

void DynamicElementTextItemEditor::on_m_add_group_clicked ( )
privateslot

◆ on_m_add_text_clicked

void DynamicElementTextItemEditor::on_m_add_text_clicked ( )
privateslot

◆ on_m_export_pb_clicked

void DynamicElementTextItemEditor::on_m_export_pb_clicked ( )
privateslot

◆ on_m_import_pb_clicked

void DynamicElementTextItemEditor::on_m_import_pb_clicked ( )
privateslot

◆ on_m_remove_selection_clicked

void DynamicElementTextItemEditor::on_m_remove_selection_clicked ( )
privateslot

◆ on_m_tree_view_clicked

void DynamicElementTextItemEditor::on_m_tree_view_clicked ( const QModelIndex &  index)
privateslot

◆ setCurrentGroup()

void DynamicElementTextItemEditor::setCurrentGroup ( ElementTextItemGroup group)

DynamicElementTextItemEditor::setCurrentGroup Expand and select the item for group .

Parameters
group

Definition at line 159 of file dynamicelementtextitemeditor.cpp.

References DynamicElementTextModel::indexFromGroup(), m_model, and ui.

Referenced by ElementPropertiesWidget::setTextsGroup().

◆ setCurrentText()

void DynamicElementTextItemEditor::setCurrentText ( DynamicElementTextItem text)

DynamicElementTextItemEditor::setCurrentText Expand and select the item for text .

Parameters
text

Definition at line 142 of file dynamicelementtextitemeditor.cpp.

References DynamicElementTextModel::indexFromText(), m_model, and ui.

Referenced by on_m_add_text_clicked(), and ElementPropertiesWidget::setDynamicText().

◆ setElement()

void DynamicElementTextItemEditor::setElement ( Element element)
overridevirtual

◆ setLiveEdit()

bool DynamicElementTextItemEditor::setLiveEdit ( bool  live_edit)
overridevirtual

PropertiesEditorWidget::setLiveEdit Set the editor in live edit mode. When an editor is in live edit mode, every change is applied immediately (no need to call apply). If live edit can be enable, return true, else false. By default this method do nothing and return false (live edit is disable). Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode.

Parameters
live_edittrue to enable live edit
Returns
true if live edit is enable, else false.

Reimplemented from PropertiesEditorWidget.

Definition at line 67 of file dynamicelementtextitemeditor.cpp.

References PropertiesEditorWidget::m_live_edit.

◆ title()

QString DynamicElementTextItemEditor::title ( ) const
inlineoverridevirtual

PropertiesEditorWidget::title.

Returns
the title of this editor

Reimplemented from PropertiesEditorWidget.

Definition at line 41 of file dynamicelementtextitemeditor.h.

References QET::Icons::tr.

Member Data Documentation

◆ m_model

DynamicElementTextModel* DynamicElementTextItemEditor::m_model = nullptr
private

◆ ui

Ui::DynamicElementTextItemEditor* DynamicElementTextItemEditor::ui
private

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