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

#include <elementpropertieswidget.h>

Inheritance diagram for ElementPropertiesWidget:
Inheritance graph
Collaboration diagram for ElementPropertiesWidget:
Collaboration graph

Public Slots

void findInPanel ()
 ElementPropertiesWidget::findInPanel If m_element is a custom element, emit findElementRequired.
 
void editElement ()
 ElementPropertiesWidget::editElement If m_element is a custom element, emit findElementRequired and editElementRequired.
 

Signals

void findEditClicked ()
 

Public Member Functions

 ElementPropertiesWidget (Element *elmt, QWidget *parent=nullptr)
 ElementPropertiesWidget::ElementPropertiesWidget Default constructor.
 
 ElementPropertiesWidget (DynamicElementTextItem *text, QWidget *parent=nullptr)
 ElementPropertiesWidget::ElementPropertiesWidget Same as default constructor, the edited element, is the parent element of text. The only difference with default constructor, is that the current tab is the tab for dynamic texts, and the item in the tree that represent text is expanded and selected.
 
 ElementPropertiesWidget (ElementTextItemGroup *group, QWidget *parent=nullptr)
 ElementPropertiesWidget::ElementPropertiesWidget Same as default constructor, the edited element, is the parent element of group. The only difference with default constructor, is that the current tab is the tab for dynamic texts, and the item in the tree that represent group is expanded and selected.
 
void setElement (Element *element) override
 ElementPropertiesWidget::setElement Set element to be the edited element.
 
void setDynamicText (DynamicElementTextItem *text)
 ElementPropertiesWidget::setDynamicText convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of text. Set the dynamics text tab as current tab, expand and select the item that represent text.
 
void setTextsGroup (ElementTextItemGroup *group)
 ElementPropertiesWidget::setTextsGroup Convenience function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of group. Set the dynamics text tab as current tab, expand and select the item that represent group.
 
void apply () override
 ElementPropertiesWidget::apply Apply the new properties by pushing an undo command to the parent project's undo stack of element.
 
void reset () override
 ElementPropertiesWidget::reset Reset the edited properties.
 
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 enabled, return true, or else false. By default this method does nothing and returns false (live edit is disabled). Inherited class of PropertiesEditorWidget must reimplement this method to manage the live edit mode.
 
- Public Member Functions inherited from AbstractElementPropertiesEditorWidget
 AbstractElementPropertiesEditorWidget (QWidget *parent=nullptr)
 
- Public Member Functions inherited from PropertiesEditorWidget
 PropertiesEditorWidget (QWidget *parent=nullptr)
 PropertiesEditorWidget::PropertiesEditorWidget Constructor.
 
virtual QUndoCommand * associatedUndo () const
 PropertiesEditorWidget::associatedUndo By default, return a nullptr.
 
virtual QString title () const
 PropertiesEditorWidget::title.
 
bool isLiveEdit () const
 PropertiesEditorWidget::isLiveEdit.
 

Private Member Functions

void buildGui ()
 ElementPropertiesWidget::build Build the content of this widget.
 
void updateUi () override
 ElementPropertiesWidget::updateUi Update the content of this widget.
 
void addGeneralWidget ()
 ElementPropertiesWidget::addGeneralWidget Add or update the general widget on this tab widget.
 
QWidget * generalWidget ()
 ElementPropertiesWidget::generalWidget.
 

Private Attributes

Diagramm_diagram
 
QTabWidget * m_tab
 
QList< AbstractElementPropertiesEditorWidget * > m_list_editor
 
QWidget * m_general_widget
 

Additional Inherited Members

- Protected Member Functions inherited from PropertiesEditorWidget
virtual void enableLiveEdit ()
 
virtual void disableLiveEdit ()
 
- Protected Attributes inherited from AbstractElementPropertiesEditorWidget
QPointer< Elementm_element
 
- Protected Attributes inherited from PropertiesEditorWidget
bool m_live_edit
 

Constructor & Destructor Documentation

◆ ElementPropertiesWidget() [1/3]

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

ElementPropertiesWidget::ElementPropertiesWidget Default constructor.

Parameters
elmt
parent
Here is the call graph for this function:

◆ ElementPropertiesWidget() [2/3]

ElementPropertiesWidget::ElementPropertiesWidget ( DynamicElementTextItem text,
QWidget *  parent = nullptr 
)
explicit

ElementPropertiesWidget::ElementPropertiesWidget Same as default constructor, the edited element, is the parent element of text. The only difference with default constructor, is that the current tab is the tab for dynamic texts, and the item in the tree that represent text is expanded and selected.

Parameters
text
parent
Here is the call graph for this function:

◆ ElementPropertiesWidget() [3/3]

ElementPropertiesWidget::ElementPropertiesWidget ( ElementTextItemGroup group,
QWidget *  parent = nullptr 
)
explicit

ElementPropertiesWidget::ElementPropertiesWidget Same as default constructor, the edited element, is the parent element of group. The only difference with default constructor, is that the current tab is the tab for dynamic texts, and the item in the tree that represent group is expanded and selected.

Parameters
group
parent
Here is the call graph for this function:

Member Function Documentation

◆ addGeneralWidget()

void ElementPropertiesWidget::addGeneralWidget ( )
private

ElementPropertiesWidget::addGeneralWidget Add or update the general widget on this tab widget.

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

◆ apply()

void ElementPropertiesWidget::apply ( )
overridevirtual

ElementPropertiesWidget::apply Apply the new properties by pushing an undo command to the parent project's undo stack of element.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:

◆ buildGui()

void ElementPropertiesWidget::buildGui ( )
private

ElementPropertiesWidget::build Build the content of this widget.

Here is the caller graph for this function:

◆ editElement

void ElementPropertiesWidget::editElement ( )
slot

ElementPropertiesWidget::editElement If m_element is a custom element, emit findElementRequired and editElementRequired.

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

◆ findEditClicked

void ElementPropertiesWidget::findEditClicked ( )
signal
Here is the caller graph for this function:

◆ findInPanel

void ElementPropertiesWidget::findInPanel ( )
slot

ElementPropertiesWidget::findInPanel If m_element is a custom element, emit findElementRequired.

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

◆ generalWidget()

QWidget * ElementPropertiesWidget::generalWidget ( )
private

ElementPropertiesWidget::generalWidget.

Returns
build and return the "general" widget
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void ElementPropertiesWidget::reset ( )
overridevirtual

ElementPropertiesWidget::reset Reset the edited properties.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:

◆ setDynamicText()

void ElementPropertiesWidget::setDynamicText ( DynamicElementTextItem text)

ElementPropertiesWidget::setDynamicText convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of text. Set the dynamics text tab as current tab, expand and select the item that represent text.

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

◆ setElement()

void ElementPropertiesWidget::setElement ( Element element)
overridevirtual

ElementPropertiesWidget::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 ElementPropertiesWidget::setLiveEdit ( bool  live_edit)
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 enabled, return true, or else false. By default this method does nothing and returns false (live edit is disabled). Inherited class of PropertiesEditorWidget must reimplement this method to manage the live edit mode.

Parameters
live_edittrue to enable live edit
Returns
true if live edit is enabled, else false.

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:

◆ setTextsGroup()

void ElementPropertiesWidget::setTextsGroup ( ElementTextItemGroup group)

ElementPropertiesWidget::setTextsGroup Convenience function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of group. Set the dynamics text tab as current tab, expand and select the item that represent group.

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

◆ updateUi()

void ElementPropertiesWidget::updateUi ( )
overrideprivatevirtual

ElementPropertiesWidget::updateUi Update the content of this widget.

Reimplemented from PropertiesEditorWidget.

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

Member Data Documentation

◆ m_diagram

Diagram* ElementPropertiesWidget::m_diagram
private

◆ m_general_widget

QWidget* ElementPropertiesWidget::m_general_widget
private

◆ m_list_editor

QList<AbstractElementPropertiesEditorWidget *> ElementPropertiesWidget::m_list_editor
private

◆ m_tab

QTabWidget* ElementPropertiesWidget::m_tab
private

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