QElectroTech
0.70
|
#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... | |
![]() | |
AbstractElementPropertiesEditorWidget (QWidget *parent=nullptr) | |
![]() | |
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 |
DynamicElementTextModel * | m_model = nullptr |
Additional Inherited Members | |
![]() | |
virtual void | enableLiveEdit () |
virtual void | disableLiveEdit () |
![]() | |
QPointer< Element > | m_element |
![]() | |
bool | m_live_edit |
Definition at line 32 of file dynamicelementtextitemeditor.h.
|
explicit |
Definition at line 34 of file dynamicelementtextitemeditor.cpp.
References setElement(), and ui.
|
override |
Definition at line 46 of file dynamicelementtextitemeditor.cpp.
References ui.
|
overridevirtual |
Reimplemented from PropertiesEditorWidget.
Definition at line 73 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_model, QET::Icons::tr, DynamicElementTextModel::undoForEditedGroup(), and DynamicElementTextModel::undoForEditedText().
Referenced by dataEdited().
|
overridevirtual |
PropertiesEditorWidget::associatedUndo By default, return a nullptr.
Reimplemented from PropertiesEditorWidget.
Definition at line 170 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_model, QET::Icons::tr, DynamicElementTextModel::undoForEditedGroup(), and DynamicElementTextModel::undoForEditedText().
|
private |
Definition at line 189 of file dynamicelementtextitemeditor.cpp.
References apply(), and PropertiesEditorWidget::m_live_edit.
Referenced by setElement().
|
privateslot |
DynamicElementTextItemEditor::on_m_add_group_clicked Add a new group.
Definition at line 242 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element, Element::name(), and QET::Icons::tr.
|
privateslot |
DynamicElementTextItemEditor::on_m_add_text_clicked Add a new dynamic text.
Definition at line 199 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element, and setCurrentText().
|
privateslot |
Definition at line 260 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element.
|
privateslot |
Definition at line 265 of file dynamicelementtextitemeditor.cpp.
References AbstractElementPropertiesEditorWidget::m_element.
|
privateslot |
DynamicElementTextItemEditor::on_m_remove_selection_clicked Remove the selected item.
Definition at line 220 of file dynamicelementtextitemeditor.cpp.
References DynamicElementTextModel::groupFromIndex(), AbstractElementPropertiesEditorWidget::m_element, DiagramContent::m_element_texts, m_model, DynamicElementTextModel::textFromIndex(), and ui.
|
privateslot |
Definition at line 252 of file dynamicelementtextitemeditor.cpp.
References DynamicElementTextModel::indexIsGroup(), DynamicElementTextModel::indexIsText(), m_model, and ui.
void DynamicElementTextItemEditor::setCurrentGroup | ( | ElementTextItemGroup * | group | ) |
DynamicElementTextItemEditor::setCurrentGroup Expand and select the item for group .
group |
Definition at line 159 of file dynamicelementtextitemeditor.cpp.
References DynamicElementTextModel::indexFromGroup(), m_model, and ui.
Referenced by ElementPropertiesWidget::setTextsGroup().
void DynamicElementTextItemEditor::setCurrentText | ( | DynamicElementTextItem * | text | ) |
DynamicElementTextItemEditor::setCurrentText Expand and select the item for text .
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().
|
overridevirtual |
Implements AbstractElementPropertiesEditorWidget.
Definition at line 51 of file dynamicelementtextitemeditor.cpp.
References DynamicElementTextModel::dataChanged(), dataEdited(), AbstractElementPropertiesEditorWidget::m_element, m_model, and ui.
Referenced by DynamicElementTextItemEditor().
|
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.
live_edit | true to enable live edit |
Reimplemented from PropertiesEditorWidget.
Definition at line 67 of file dynamicelementtextitemeditor.cpp.
References PropertiesEditorWidget::m_live_edit.
|
inlineoverridevirtual |
PropertiesEditorWidget::title.
Reimplemented from PropertiesEditorWidget.
Definition at line 41 of file dynamicelementtextitemeditor.h.
References QET::Icons::tr.
|
private |
Definition at line 61 of file dynamicelementtextitemeditor.h.
Referenced by apply(), associatedUndo(), on_m_remove_selection_clicked(), on_m_tree_view_clicked(), setCurrentGroup(), setCurrentText(), and setElement().
|
private |
Definition at line 60 of file dynamicelementtextitemeditor.h.
Referenced by DynamicElementTextItemEditor(), on_m_remove_selection_clicked(), on_m_tree_view_clicked(), setCurrentGroup(), setCurrentText(), setElement(), and ~DynamicElementTextItemEditor().