|
QElectroTech
0.70
|
The ElementInfoWidget class this class is a widget to edit an element informations. More...
#include <elementinfowidget.h>
Public Member Functions | |
| ElementInfoWidget (Element *elmt, QWidget *parent=nullptr) | |
| ElementInfoWidget::ElementInfoWidget Constructor. More... | |
| ~ElementInfoWidget () override | |
| ElementInfoWidget::~ElementInfoWidget Destructor. More... | |
| void | setElement (Element *element) override |
| ElementInfoWidget::setElement Set to be the edited element. More... | |
| void | apply () override |
| ElementInfoWidget::apply Apply the new information with a new undo command (got with method associatedUndo) pushed to the stack of element project. More... | |
| QUndoCommand * | associatedUndo () const override |
| ElementInfoWidget::associatedUndo If the edited info is different of the actual element info, return a QUndoCommand with the change. If no change return nullptr;. More... | |
| QString | title () const override |
| PropertiesEditorWidget::title. More... | |
| bool | setLiveEdit (bool live_edit) override |
| ElementInfoWidget::setLiveEdit. More... | |
| void | updateUi () override |
| ElementInfoWidget::updateUi fill information fetch in m_element_info to the corresponding line edit. More... | |
| DiagramContext | currentInfo () const |
| ElementInfoWidget::currentInfo. 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 () |
| bool | isLiveEdit () const |
| PropertiesEditorWidget::isLiveEdit. More... | |
Protected Member Functions | |
| bool | event (QEvent *event) override |
| ElementInfoWidget::event Reimplemented from QWidget::event Only give focus to the first line edit at first activation. After send the event to QWidget. More... | |
| void | enableLiveEdit () override |
| ElementInfoWidget::enableLiveEdit Enable the live edit mode. More... | |
| void | disableLiveEdit () override |
| ElementInfoWidget::disableLiveEdit disable the live edit mode. More... | |
Private Slots | |
| void | firstActivated () |
| ElementInfoWidget::firstActivated Slot activated when this widget is show. Set the focus to the first line edit provided by this widget. More... | |
| void | elementInfoChange () |
| ElementInfoWidget::elementInfoChange This slot is called when m_element::elementInformation change. More... | |
Private Member Functions | |
| void | buildInterface () |
| ElementInfoWidget::buildInterface Build the widget. More... | |
| ElementInfoPartWidget * | infoPartWidgetForKey (const QString &key) const |
| ElementInfoWidget::infoPartWidgetForKey. More... | |
Private Attributes | |
| Ui::ElementInfoWidget * | ui |
| QList< ElementInfoPartWidget * > | m_eipw_list |
| bool | m_first_activation |
Additional Inherited Members | |
Protected Attributes inherited from AbstractElementPropertiesEditorWidget | |
| QPointer< Element > | m_element |
Protected Attributes inherited from PropertiesEditorWidget | |
| bool | m_live_edit |
The ElementInfoWidget class this class is a widget to edit an element informations.
Definition at line 38 of file elementinfowidget.h.
|
explicit |
ElementInfoWidget::ElementInfoWidget Constructor.
| elmt | element to edit information |
| parent | parent widget |
Definition at line 32 of file elementinfowidget.cpp.
References buildInterface(), setElement(), and ui.
|
override |
ElementInfoWidget::~ElementInfoWidget Destructor.
Definition at line 46 of file elementinfowidget.cpp.
References m_eipw_list, and ui.
|
overridevirtual |
ElementInfoWidget::apply Apply the new information with a new undo command (got with method associatedUndo) pushed to the stack of element project.
Reimplemented from PropertiesEditorWidget.
Definition at line 91 of file elementinfowidget.cpp.
References associatedUndo(), and AbstractElementPropertiesEditorWidget::m_element.
Referenced by disableLiveEdit(), and enableLiveEdit().
|
overridevirtual |
ElementInfoWidget::associatedUndo If the edited info is different of the actual element info, return a QUndoCommand with the change. If no change return nullptr;.
Reimplemented from PropertiesEditorWidget.
Definition at line 104 of file elementinfowidget.cpp.
References currentInfo(), and AbstractElementPropertiesEditorWidget::m_element.
Referenced by apply().
|
private |
ElementInfoWidget::buildInterface Build the widget.
Definition at line 178 of file elementinfowidget.cpp.
References QETApp::elementInfoKeys(), QETApp::elementTranslatedInfoKey(), m_eipw_list, and ui.
Referenced by ElementInfoWidget().
| DiagramContext ElementInfoWidget::currentInfo | ( | ) | const |
ElementInfoWidget::currentInfo.
Definition at line 230 of file elementinfowidget.cpp.
References DiagramContext::addValue(), and m_eipw_list.
Referenced by associatedUndo(), and elementInfoChange().
|
overrideprotectedvirtual |
ElementInfoWidget::disableLiveEdit disable the live edit mode.
Reimplemented from PropertiesEditorWidget.
Definition at line 168 of file elementinfowidget.cpp.
References apply(), m_eipw_list, and ElementInfoPartWidget::textChanged().
Referenced by setLiveEdit(), and updateUi().
|
privateslot |
ElementInfoWidget::elementInfoChange This slot is called when m_element::elementInformation change.
Definition at line 263 of file elementinfowidget.cpp.
References currentInfo(), AbstractElementPropertiesEditorWidget::m_element, and updateUi().
Referenced by setElement().
|
overrideprotectedvirtual |
ElementInfoWidget::enableLiveEdit Enable the live edit mode.
Reimplemented from PropertiesEditorWidget.
Definition at line 158 of file elementinfowidget.cpp.
References apply(), m_eipw_list, and ElementInfoPartWidget::textChanged().
Referenced by setLiveEdit(), and updateUi().
|
overrideprotected |
ElementInfoWidget::event Reimplemented from QWidget::event Only give focus to the first line edit at first activation. After send the event to QWidget.
| event |
Definition at line 141 of file elementinfowidget.cpp.
References firstActivated(), and m_first_activation.
|
privateslot |
ElementInfoWidget::firstActivated Slot activated when this widget is show. Set the focus to the first line edit provided by this widget.
Definition at line 255 of file elementinfowidget.cpp.
References m_eipw_list.
Referenced by event().
|
private |
ElementInfoWidget::infoPartWidgetForKey.
| key |
Definition at line 194 of file elementinfowidget.cpp.
References ElementInfoPartWidget::key(), and m_eipw_list.
Referenced by setElement().
|
overridevirtual |
ElementInfoWidget::setElement Set to be the edited element.
| element |
Implements AbstractElementPropertiesEditorWidget.
Definition at line 57 of file elementinfowidget.cpp.
References elementInfoChange(), Element::elementInfoChange(), infoPartWidgetForKey(), AbstractElementPropertiesEditorWidget::m_element, ElementInfoPartWidget::setDisabled(), ElementInfoPartWidget::setEnabled(), ElementInfoPartWidget::text(), ElementInfoPartWidget::textChanged(), and updateUi().
Referenced by ElementInfoWidget().
|
overridevirtual |
ElementInfoWidget::setLiveEdit.
| live_edit | true : enable the live edit mode, false disable |
Reimplemented from PropertiesEditorWidget.
Definition at line 120 of file elementinfowidget.cpp.
References disableLiveEdit(), enableLiveEdit(), and PropertiesEditorWidget::m_live_edit.
|
inlineoverridevirtual |
PropertiesEditorWidget::title.
Reimplemented from PropertiesEditorWidget.
Definition at line 50 of file elementinfowidget.h.
References QET::Icons::tr.
|
overridevirtual |
ElementInfoWidget::updateUi fill information fetch in m_element_info to the corresponding line edit.
Reimplemented from PropertiesEditorWidget.
Definition at line 210 of file elementinfowidget.cpp.
References disableLiveEdit(), enableLiveEdit(), m_eipw_list, AbstractElementPropertiesEditorWidget::m_element, and PropertiesEditorWidget::m_live_edit.
Referenced by elementInfoChange(), and setElement().
|
private |
Definition at line 72 of file elementinfowidget.h.
Referenced by buildInterface(), currentInfo(), disableLiveEdit(), enableLiveEdit(), firstActivated(), infoPartWidgetForKey(), updateUi(), and ~ElementInfoWidget().
|
private |
Definition at line 73 of file elementinfowidget.h.
Referenced by event().
|
private |
Definition at line 71 of file elementinfowidget.h.
Referenced by buildInterface(), ElementInfoWidget(), and ~ElementInfoWidget().
1.8.15