QElectroTech
0.70
|
The MasterPropertiesWidget class This class is a widget for make link between a master element with several slave element. This class embenddedthe undo/redo command when apply new connection. More...
#include <masterpropertieswidget.h>
Public Slots | |
void | updateUi () override |
MasterPropertiesWidget::updateUi Build the interface of the widget. More... | |
Public Member Functions | |
MasterPropertiesWidget (Element *elmt, QWidget *parent=nullptr) | |
MasterPropertiesWidget::MasterPropertiesWidget Default constructor. More... | |
~MasterPropertiesWidget () override | |
MasterPropertiesWidget::~MasterPropertiesWidget Destructor. More... | |
void | setElement (Element *element) override |
MasterPropertiesWidget::setElement Set the element to be edited. More... | |
void | apply () override |
MasterPropertiesWidget::apply If link betwen edited element and other change, apply the change with a QUndoCommand (got with method associatedUndo) pushed to the stack of element project. Return true if link change, else false. More... | |
void | reset () override |
MasterPropertiesWidget::reset Reset curent widget, clear eveything and rebuild widget. More... | |
QUndoCommand * | associatedUndo () const override |
MasterPropertiesWidget::associatedUndo If link between the edited element and other change, return a QUndoCommand with this change. If no change return nullptr. More... | |
QString | title () const override |
PropertiesEditorWidget::title. More... | |
bool | setLiveEdit (bool live_edit) override |
MasterPropertiesWidget::setLiveEdit. More... | |
![]() | |
AbstractElementPropertiesEditorWidget (QWidget *parent=nullptr) | |
![]() | |
PropertiesEditorWidget (QWidget *parent=nullptr) | |
PropertiesEditorWidget::PropertiesEditorWidget Constructor. More... | |
virtual void | updateUi () |
bool | isLiveEdit () const |
PropertiesEditorWidget::isLiveEdit. More... | |
Private Slots | |
void | headerCustomContextMenuRequested (const QPoint &pos) |
void | on_link_button_clicked () |
MasterPropertiesWidget::on_link_button_clicked move curent item in the free_list to linked_list. More... | |
void | on_unlink_button_clicked () |
MasterPropertiesWidget::on_unlink_button_clicked move curent item in linked_list to free_list. More... | |
void | showElementFromTWI (QTreeWidgetItem *qtwi, int column) |
MasterPropertiesWidget::showElementFromTWI Show the element corresponding to the given QTreeWidgetItem. More... | |
void | showedElementWasDeleted () |
MasterPropertiesWidget::showedElementWasDeleted Set to nullptr the current showed element when he was deleted. More... | |
void | diagramWasdeletedFromProject () |
MasterPropertiesWidget::diagramWasdeletedFromProject This slot is called when a diagram is removed from the parent project of edited element to update the content of this widget. More... | |
void | customContextMenu (const QPoint &pos, int i=0) |
MasterPropertiesWidget::customContextMenu Display a context menu. More... | |
Private Attributes | |
Ui::MasterPropertiesWidget * | ui |
QHash< QTreeWidgetItem *, Element * > | m_qtwi_hash |
QTreeWidgetItem * | m_qtwi_at_context_menu = nullptr |
QPointer< Element > | m_showed_element |
QETProject * | m_project |
QMenu * | m_context_menu |
QAction * | m_link_action |
QAction * | m_unlink_action |
QAction * | m_show_qtwi |
QAction * | m_show_element |
QAction * | m_save_header_state |
Additional Inherited Members | |
![]() | |
virtual void | enableLiveEdit () |
virtual void | disableLiveEdit () |
![]() | |
QPointer< Element > | m_element |
![]() | |
bool | m_live_edit |
The MasterPropertiesWidget class This class is a widget for make link between a master element with several slave element. This class embenddedthe undo/redo command when apply new connection.
Definition at line 43 of file masterpropertieswidget.h.
|
explicit |
MasterPropertiesWidget::MasterPropertiesWidget Default constructor.
elmt | |
parent |
Definition at line 33 of file masterpropertieswidget.cpp.
References headerCustomContextMenuRequested(), m_context_menu, AbstractElementPropertiesEditorWidget::m_element, m_link_action, m_qtwi_at_context_menu, m_save_header_state, m_show_element, m_show_qtwi, m_showed_element, m_unlink_action, on_link_button_clicked(), on_unlink_button_clicked(), setElement(), showElementFromTWI(), QET::Icons::tr, and ui.
|
override |
MasterPropertiesWidget::~MasterPropertiesWidget Destructor.
Definition at line 96 of file masterpropertieswidget.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_showed_element, and ui.
|
overridevirtual |
MasterPropertiesWidget::apply If link betwen edited element and other change, apply the change with a QUndoCommand (got with method associatedUndo) pushed to the stack of element project. Return true if link change, else false.
Reimplemented from PropertiesEditorWidget.
Definition at line 153 of file masterpropertieswidget.cpp.
References associatedUndo(), and AbstractElementPropertiesEditorWidget::m_element.
Referenced by on_link_button_clicked(), and on_unlink_button_clicked().
|
overridevirtual |
MasterPropertiesWidget::associatedUndo If link between the edited element and other change, return a QUndoCommand with this change. If no change return nullptr.
Reimplemented from PropertiesEditorWidget.
Definition at line 178 of file masterpropertieswidget.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_qtwi_hash, LinkElementCommand::setLink(), ui, and LinkElementCommand::unlinkAll().
Referenced by apply().
|
privateslot |
MasterPropertiesWidget::customContextMenu Display a context menu.
pos | |
i | : the tree widget where the context menu was requested. |
Definition at line 393 of file masterpropertieswidget.cpp.
References m_context_menu, m_link_action, m_qtwi_at_context_menu, m_show_element, m_show_qtwi, m_unlink_action, and ui.
|
privateslot |
MasterPropertiesWidget::diagramWasdeletedFromProject This slot is called when a diagram is removed from the parent project of edited element to update the content of this widget.
Definition at line 380 of file masterpropertieswidget.cpp.
References updateUi().
Referenced by setElement().
|
privateslot |
Definition at line 301 of file masterpropertieswidget.cpp.
References m_context_menu, m_save_header_state, and ui.
Referenced by MasterPropertiesWidget().
|
privateslot |
MasterPropertiesWidget::on_link_button_clicked move curent item in the free_list to linked_list.
Definition at line 312 of file masterpropertieswidget.cpp.
References apply(), PropertiesEditorWidget::m_live_edit, and ui.
Referenced by MasterPropertiesWidget().
|
privateslot |
MasterPropertiesWidget::on_unlink_button_clicked move curent item in linked_list to free_list.
Definition at line 330 of file masterpropertieswidget.cpp.
References apply(), PropertiesEditorWidget::m_live_edit, and ui.
Referenced by MasterPropertiesWidget().
|
overridevirtual |
MasterPropertiesWidget::reset Reset curent widget, clear eveything and rebuild widget.
Reimplemented from PropertiesEditorWidget.
Definition at line 162 of file masterpropertieswidget.cpp.
References m_qtwi_hash, and updateUi().
|
overridevirtual |
MasterPropertiesWidget::setElement Set the element to be edited.
element |
Implements AbstractElementPropertiesEditorWidget.
Definition at line 112 of file masterpropertieswidget.cpp.
References QetGraphicsItem::diagram(), diagramWasdeletedFromProject(), Element::linkedElementChanged(), AbstractElementPropertiesEditorWidget::m_element, m_project, m_showed_element, Diagram::project(), and updateUi().
Referenced by MasterPropertiesWidget().
|
overridevirtual |
MasterPropertiesWidget::setLiveEdit.
Reimplemented from PropertiesEditorWidget.
Definition at line 215 of file masterpropertieswidget.cpp.
References PropertiesEditorWidget::m_live_edit.
|
privateslot |
MasterPropertiesWidget::showedElementWasDeleted Set to nullptr the current showed element when he was deleted.
Definition at line 371 of file masterpropertieswidget.cpp.
References m_showed_element.
Referenced by showElementFromTWI().
|
privateslot |
MasterPropertiesWidget::showElementFromTWI Show the element corresponding to the given QTreeWidgetItem.
qtwi | |
column |
Definition at line 350 of file masterpropertieswidget.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_qtwi_hash, m_showed_element, and showedElementWasDeleted().
Referenced by MasterPropertiesWidget().
|
inlineoverridevirtual |
PropertiesEditorWidget::title.
Reimplemented from PropertiesEditorWidget.
Definition at line 55 of file masterpropertieswidget.h.
References QET::Icons::tr.
|
overrideslot |
MasterPropertiesWidget::updateUi Build the interface of the widget.
Definition at line 225 of file masterpropertieswidget.cpp.
References autonum::AssignVariables::formulaToLabel(), ElementProvider::freeElement(), AbstractElementPropertiesEditorWidget::m_element, m_project, m_qtwi_hash, Element::Slave, and ui.
Referenced by diagramWasdeletedFromProject(), reset(), and setElement().
|
private |
Definition at line 76 of file masterpropertieswidget.h.
Referenced by customContextMenu(), headerCustomContextMenuRequested(), and MasterPropertiesWidget().
|
private |
Definition at line 77 of file masterpropertieswidget.h.
Referenced by customContextMenu(), and MasterPropertiesWidget().
|
private |
Definition at line 75 of file masterpropertieswidget.h.
Referenced by setElement(), and updateUi().
|
private |
Definition at line 73 of file masterpropertieswidget.h.
Referenced by customContextMenu(), and MasterPropertiesWidget().
|
private |
Definition at line 72 of file masterpropertieswidget.h.
Referenced by associatedUndo(), reset(), showElementFromTWI(), and updateUi().
|
private |
Definition at line 77 of file masterpropertieswidget.h.
Referenced by headerCustomContextMenuRequested(), and MasterPropertiesWidget().
|
private |
Definition at line 77 of file masterpropertieswidget.h.
Referenced by customContextMenu(), and MasterPropertiesWidget().
|
private |
Definition at line 77 of file masterpropertieswidget.h.
Referenced by customContextMenu(), and MasterPropertiesWidget().
|
private |
Definition at line 74 of file masterpropertieswidget.h.
Referenced by MasterPropertiesWidget(), setElement(), showedElementWasDeleted(), showElementFromTWI(), and ~MasterPropertiesWidget().
|
private |
Definition at line 77 of file masterpropertieswidget.h.
Referenced by customContextMenu(), and MasterPropertiesWidget().
|
private |
Definition at line 71 of file masterpropertieswidget.h.
Referenced by associatedUndo(), customContextMenu(), headerCustomContextMenuRequested(), MasterPropertiesWidget(), on_link_button_clicked(), on_unlink_button_clicked(), updateUi(), and ~MasterPropertiesWidget().