QElectroTech
0.70
|
The LinkSingleElementWidget class this class provide a widget to select an element to be linked to the element given in the constructor. The element given in constructor must be linked with only one other element (like report or slave element). This widget detect automaticaly the kind of element given in the constructor and search all element that can be linked with it. If the element is already linked, the widget ask user to unlink. This widget embedded the diagram command for undo/redo the action. More...
#include <linksingleelementwidget.h>
Public Slots | |
void | updateUi () override |
LinkSingleElementWidget::updateUi Update the content of this widget. More... | |
void | buildTree () |
LinkSingleElementWidget::buildTree Build the content of the QTreeWidget. More... | |
Private Member Functions | |
QList< Element * > | availableElements () |
LinkSingleElementWidget::availableElements. More... | |
void | setUpCompleter () |
LinkSingleElementWidget::setUpCompleter Setup the completer of search_field. More... | |
void | clearTreeWidget () |
LinkSingleElementWidget::clearTreeWidget Clear the tree widget. Delete all QTreeWidget (in the tree widget and in the hash). Clear the hash. More... | |
void | setUpHeaderLabels () |
Private Attributes | |
Ui::LinkSingleElementWidget * | ui |
bool | m_unlink = false |
Element::kind | m_filter |
QHash< QTreeWidgetItem *, Element * > | m_qtwi_elmt_hash |
QHash< QTreeWidgetItem *, QStringList > | m_qtwi_strl_hash |
QTreeWidgetItem * | m_qtwi_at_context_menu = nullptr |
QTreeWidgetItem * | m_pending_qtwi = nullptr |
Element * | m_showed_element = nullptr |
Element * | m_element_to_link = nullptr |
QMenu * | m_context_menu |
QAction * | m_link_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 LinkSingleElementWidget class this class provide a widget to select an element to be linked to the element given in the constructor. The element given in constructor must be linked with only one other element (like report or slave element). This widget detect automaticaly the kind of element given in the constructor and search all element that can be linked with it. If the element is already linked, the widget ask user to unlink. This widget embedded the diagram command for undo/redo the action.
Definition at line 40 of file linksingleelementwidget.h.
|
explicit |
Methods.
LinkSingleElementWidget::LinkSingleElementWidget Default constructor.
elmt | the edited element |
parent | the parent widget |
Definition at line 36 of file linksingleelementwidget.cpp.
References Element::AllReport, headerCustomContextMenuRequested(), linkTriggered(), 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, on_m_tree_widget_itemDoubleClicked(), setElement(), Element::setHighlighted(), Element::Slave, QET::Icons::tr, and ui.
|
override |
LinkSingleElementWidget::~LinkSingleElementWidget Default destructor.
Definition at line 81 of file linksingleelementwidget.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_showed_element, Element::setHighlighted(), and ui.
|
overridevirtual |
LinkSingleElementWidget::apply Apply the new property of the edited element by pushing the associated undo command to parent project undo stack.
Reimplemented from PropertiesEditorWidget.
Definition at line 142 of file linksingleelementwidget.cpp.
References associatedUndo(), AbstractElementPropertiesEditorWidget::m_element, m_element_to_link, m_pending_qtwi, and m_unlink.
Referenced by linkTriggered(), and on_m_unlink_pb_clicked().
|
overridevirtual |
LinkSingleElementWidget::associatedUndo.
Reimplemented from PropertiesEditorWidget.
Definition at line 158 of file linksingleelementwidget.cpp.
References AbstractElementPropertiesEditorWidget::m_element, m_element_to_link, m_unlink, LinkElementCommand::setLink(), and LinkElementCommand::unlinkAll().
Referenced by apply().
|
private |
LinkSingleElementWidget::availableElements.
Definition at line 349 of file linksingleelementwidget.cpp.
References Element::AllReport, ElementProvider::freeElement(), AbstractElementPropertiesEditorWidget::m_element, m_filter, and m_unlink.
Referenced by buildTree().
|
slot |
LinkSingleElementWidget::buildTree Build the content of the QTreeWidget.
Definition at line 208 of file linksingleelementwidget.cpp.
References Element::AllReport, availableElements(), clearTreeWidget(), autonum::AssignVariables::formulaToLabel(), AbstractElementPropertiesEditorWidget::m_element, ConductorProperties::m_function, m_qtwi_elmt_hash, m_qtwi_strl_hash, ConductorProperties::m_tension_protocol, setUpCompleter(), setUpHeaderLabels(), Element::Slave, ConductorProperties::text, and ui.
Referenced by on_m_unlink_pb_clicked(), and updateUi().
|
private |
LinkSingleElementWidget::clearTreeWidget Clear the tree widget. Delete all QTreeWidget (in the tree widget and in the hash). Clear the hash.
Definition at line 395 of file linksingleelementwidget.cpp.
References m_qtwi_elmt_hash, m_qtwi_strl_hash, and ui.
Referenced by buildTree().
|
privateslot |
LinkSingleElementWidget::diagramWasRemovedFromProject.
Definition at line 448 of file linksingleelementwidget.cpp.
References updateUi().
Referenced by setElement().
|
privateslot |
Definition at line 524 of file linksingleelementwidget.cpp.
References m_context_menu, m_save_header_state, and ui.
Referenced by LinkSingleElementWidget().
|
privateslot |
LinkSingleElementWidget::hideButtons Hide the button displayed when element is already linked.
Definition at line 502 of file linksingleelementwidget.cpp.
References ui.
Referenced by updateUi().
|
privateslot |
LinkSingleElementWidget::linkTriggered Action linkis triggered.
Definition at line 464 of file linksingleelementwidget.cpp.
References apply(), m_element_to_link, PropertiesEditorWidget::m_live_edit, m_pending_qtwi, m_qtwi_at_context_menu, m_qtwi_elmt_hash, and updateUi().
Referenced by LinkSingleElementWidget().
|
privateslot |
LinkSingleElementWidget::on_m_search_field_textEdited Search all items which match with.
and shows it, other items is hidden. If is empty, show all items.
arg1 |
Definition at line 610 of file linksingleelementwidget.cpp.
References m_qtwi_elmt_hash, and m_qtwi_strl_hash.
|
privateslot |
Definition at line 589 of file linksingleelementwidget.cpp.
References QetGraphicsItem::diagram(), AbstractElementPropertiesEditorWidget::m_element, Element::setHighlighted(), and Diagram::showMe().
|
privateslot |
Definition at line 599 of file linksingleelementwidget.cpp.
References m_show_element.
|
privateslot |
Definition at line 568 of file linksingleelementwidget.cpp.
References m_context_menu, m_link_action, m_qtwi_at_context_menu, m_show_element, m_show_qtwi, and ui.
|
privateslot |
LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked Highlight the element represented by .
item | |
column |
Definition at line 550 of file linksingleelementwidget.cpp.
References QetGraphicsItem::diagram(), m_qtwi_elmt_hash, m_showed_element, Element::setHighlighted(), showedElementWasDeleted(), and Diagram::showMe().
Referenced by LinkSingleElementWidget().
|
privateslot |
Definition at line 531 of file linksingleelementwidget.cpp.
References apply(), buildTree(), PropertiesEditorWidget::m_live_edit, m_unlink, and updateUi().
|
overridevirtual |
LinkSingleElementWidget::setElement Set element to be the edited element.
element |
Implements AbstractElementPropertiesEditorWidget.
Definition at line 100 of file linksingleelementwidget.cpp.
References Element::AllReport, QETProject::diagramRemoved(), diagramWasRemovedFromProject(), Element::linkedElementChanged(), AbstractElementPropertiesEditorWidget::m_element, m_element_to_link, m_filter, m_pending_qtwi, m_showed_element, m_unlink, Element::Master, Element::NextReport, Element::PreviousReport, Element::setHighlighted(), Element::Simple, Element::Slave, and updateUi().
Referenced by LinkSingleElementWidget().
|
overridevirtual |
LinkSingleElementWidget::setLiveEdit.
live_edit |
Reimplemented from PropertiesEditorWidget.
Definition at line 333 of file linksingleelementwidget.cpp.
References PropertiesEditorWidget::m_live_edit.
|
private |
LinkSingleElementWidget::setUpCompleter Setup the completer of search_field.
Definition at line 374 of file linksingleelementwidget.cpp.
References m_qtwi_strl_hash, and ui.
Referenced by buildTree().
|
private |
Definition at line 411 of file linksingleelementwidget.cpp.
References Element::AllReport, AbstractElementPropertiesEditorWidget::m_element, Element::Slave, QET::Icons::tr, and ui.
Referenced by buildTree().
|
privateslot |
LinkSingleElementWidget::showButtons Show the button displayed when element is already linked.
Definition at line 515 of file linksingleelementwidget.cpp.
References ui.
Referenced by updateUi().
|
privateslot |
Definition at line 455 of file linksingleelementwidget.cpp.
References m_showed_element.
Referenced by on_m_tree_widget_itemDoubleClicked().
|
overridevirtual |
LinkSingleElementWidget::title.
Reimplemented from PropertiesEditorWidget.
Definition at line 179 of file linksingleelementwidget.cpp.
References Element::AllReport, AbstractElementPropertiesEditorWidget::m_element, and QET::Icons::tr.
|
overrideslot |
LinkSingleElementWidget::updateUi Update the content of this widget.
Definition at line 191 of file linksingleelementwidget.cpp.
References buildTree(), hideButtons(), AbstractElementPropertiesEditorWidget::m_element, m_unlink, and showButtons().
Referenced by diagramWasRemovedFromProject(), linkTriggered(), on_m_unlink_pb_clicked(), and setElement().
|
private |
Definition at line 98 of file linksingleelementwidget.h.
Referenced by headerCustomContextMenuRequested(), LinkSingleElementWidget(), and on_m_tree_widget_customContextMenuRequested().
|
private |
Definition at line 96 of file linksingleelementwidget.h.
Referenced by apply(), associatedUndo(), linkTriggered(), and setElement().
|
private |
Definition at line 87 of file linksingleelementwidget.h.
Referenced by availableElements(), and setElement().
|
private |
Definition at line 99 of file linksingleelementwidget.h.
Referenced by LinkSingleElementWidget(), and on_m_tree_widget_customContextMenuRequested().
|
private |
Definition at line 93 of file linksingleelementwidget.h.
Referenced by apply(), linkTriggered(), and setElement().
|
private |
Definition at line 92 of file linksingleelementwidget.h.
Referenced by LinkSingleElementWidget(), linkTriggered(), and on_m_tree_widget_customContextMenuRequested().
|
private |
Definition at line 89 of file linksingleelementwidget.h.
Referenced by buildTree(), clearTreeWidget(), linkTriggered(), on_m_search_field_textEdited(), and on_m_tree_widget_itemDoubleClicked().
|
private |
Definition at line 90 of file linksingleelementwidget.h.
Referenced by buildTree(), clearTreeWidget(), on_m_search_field_textEdited(), and setUpCompleter().
|
private |
Definition at line 99 of file linksingleelementwidget.h.
Referenced by headerCustomContextMenuRequested(), and LinkSingleElementWidget().
|
private |
Definition at line 99 of file linksingleelementwidget.h.
Referenced by LinkSingleElementWidget(), on_m_show_this_pb_clicked(), and on_m_tree_widget_customContextMenuRequested().
|
private |
Definition at line 99 of file linksingleelementwidget.h.
Referenced by LinkSingleElementWidget(), and on_m_tree_widget_customContextMenuRequested().
|
private |
Definition at line 95 of file linksingleelementwidget.h.
Referenced by LinkSingleElementWidget(), on_m_tree_widget_itemDoubleClicked(), setElement(), showedElementWasDeleted(), and ~LinkSingleElementWidget().
|
private |
Definition at line 86 of file linksingleelementwidget.h.
Referenced by apply(), associatedUndo(), availableElements(), on_m_unlink_pb_clicked(), setElement(), and updateUi().
|
private |
Definition at line 84 of file linksingleelementwidget.h.
Referenced by buildTree(), clearTreeWidget(), headerCustomContextMenuRequested(), hideButtons(), LinkSingleElementWidget(), on_m_tree_widget_customContextMenuRequested(), setUpCompleter(), setUpHeaderLabels(), showButtons(), and ~LinkSingleElementWidget().