QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
ElementInfoWidget Class Reference

The ElementInfoWidget class this class is a widget to edit an element informations. More...

#include <elementinfowidget.h>

Inheritance diagram for ElementInfoWidget:
Inheritance graph
Collaboration diagram for ElementInfoWidget:
Collaboration graph

Public Member Functions

 ElementInfoWidget (Element *elmt, QWidget *parent=nullptr)
 ElementInfoWidget::ElementInfoWidget Constructor.
 
 ~ElementInfoWidget () override
 ElementInfoWidget::~ElementInfoWidget Destructor.
 
void setElement (Element *element) override
 ElementInfoWidget::setElement Set element to be the edited element.
 
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.
 
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;.
 
QString title () const override
 PropertiesEditorWidget::title.
 
bool setLiveEdit (bool live_edit) override
 ElementInfoWidget::setLiveEdit.
 
void updateUi () override
 ElementInfoWidget::updateUi fill information fetch in m_element_info to the corresponding line edit.
 
DiagramContext currentInfo () const
 ElementInfoWidget::currentInfo.
 
- Public Member Functions inherited from AbstractElementPropertiesEditorWidget
 AbstractElementPropertiesEditorWidget (QWidget *parent=nullptr)
 
- Public Member Functions inherited from PropertiesEditorWidget
 PropertiesEditorWidget (QWidget *parent=nullptr)
 PropertiesEditorWidget::PropertiesEditorWidget Constructor.
 
virtual void reset ()
 
bool isLiveEdit () const
 PropertiesEditorWidget::isLiveEdit.
 

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.
 
void enableLiveEdit () override
 ElementInfoWidget::enableLiveEdit Enable the live edit mode.
 
void disableLiveEdit () override
 ElementInfoWidget::disableLiveEdit disable the live edit mode.
 

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.
 
void elementInfoChange ()
 ElementInfoWidget::elementInfoChange This slot is called when m_element::elementInformation change.
 

Private Member Functions

void buildInterface ()
 ElementInfoWidget::buildInterface Build the widget.
 
ElementInfoPartWidgetinfoPartWidgetForKey (const QString &key) const
 ElementInfoWidget::infoPartWidgetForKey.
 

Private Attributes

Ui::ElementInfoWidget * ui
 
QList< ElementInfoPartWidget * > m_eipw_list
 
bool m_first_activation
 
bool m_ui_builded = false
 

Additional Inherited Members

- Protected Attributes inherited from AbstractElementPropertiesEditorWidget
QPointer< Elementm_element
 
- Protected Attributes inherited from PropertiesEditorWidget
bool m_live_edit
 

Detailed Description

The ElementInfoWidget class this class is a widget to edit an element informations.

Constructor & Destructor Documentation

◆ ElementInfoWidget()

ElementInfoWidget::ElementInfoWidget ( Element elmt,
QWidget *  parent = nullptr 
)
explicit

ElementInfoWidget::ElementInfoWidget Constructor.

Parameters
elmtelement to edit information
parentparent widget
Here is the call graph for this function:

◆ ~ElementInfoWidget()

ElementInfoWidget::~ElementInfoWidget ( )
override

Member Function Documentation

◆ apply()

void ElementInfoWidget::apply ( )
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ associatedUndo()

QUndoCommand * ElementInfoWidget::associatedUndo ( ) const
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;.

Returns

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildInterface()

void ElementInfoWidget::buildInterface ( )
private

ElementInfoWidget::buildInterface Build the widget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentInfo()

DiagramContext ElementInfoWidget::currentInfo ( ) const

ElementInfoWidget::currentInfo.

Returns
the info currently edited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disableLiveEdit()

void ElementInfoWidget::disableLiveEdit ( )
overrideprotectedvirtual

ElementInfoWidget::disableLiveEdit disable the live edit mode.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementInfoChange

void ElementInfoWidget::elementInfoChange ( )
privateslot

ElementInfoWidget::elementInfoChange This slot is called when m_element::elementInformation change.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableLiveEdit()

void ElementInfoWidget::enableLiveEdit ( )
overrideprotectedvirtual

ElementInfoWidget::enableLiveEdit Enable the live edit mode.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ event()

bool ElementInfoWidget::event ( QEvent *  event)
overrideprotected

ElementInfoWidget::event Reimplemented from QWidget::event Only give focus to the first line edit at first activation. After send the event to QWidget.

Parameters
event
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ firstActivated

void ElementInfoWidget::firstActivated ( )
privateslot

ElementInfoWidget::firstActivated Slot activated when this widget is show. Set the focus to the first line edit provided by this widget.

Here is the caller graph for this function:

◆ infoPartWidgetForKey()

ElementInfoPartWidget * ElementInfoWidget::infoPartWidgetForKey ( const QString &  key) const
private

ElementInfoWidget::infoPartWidgetForKey.

Parameters
key
Returns
the ElementInfoPartWidget with key key, if not found return nullptr;
Here is the caller graph for this function:

◆ setElement()

void ElementInfoWidget::setElement ( Element element)
overridevirtual

ElementInfoWidget::setElement Set element to be the edited element.

Parameters
element

Implements AbstractElementPropertiesEditorWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLiveEdit()

bool ElementInfoWidget::setLiveEdit ( bool  live_edit)
overridevirtual

ElementInfoWidget::setLiveEdit.

Parameters
live_edittrue : enable the live edit mode, false disable
Returns
always true;

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:

◆ title()

QString ElementInfoWidget::title ( ) const
inlineoverridevirtual

PropertiesEditorWidget::title.

Returns
the title of this editor

Reimplemented from PropertiesEditorWidget.

◆ updateUi()

void ElementInfoWidget::updateUi ( )
overridevirtual

ElementInfoWidget::updateUi fill information fetch in m_element_info to the corresponding line edit.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_eipw_list

QList<ElementInfoPartWidget *> ElementInfoWidget::m_eipw_list
private

◆ m_first_activation

bool ElementInfoWidget::m_first_activation
private

◆ m_ui_builded

bool ElementInfoWidget::m_ui_builded = false
private

◆ ui

Ui::ElementInfoWidget* ElementInfoWidget::ui
private

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