QElectroTech  0.8-dev
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
PolygonEditor Class Reference

#include <polygoneditor.h>

Inheritance diagram for PolygonEditor:
Inheritance graph
Collaboration diagram for PolygonEditor:
Collaboration graph

Public Member Functions

 PolygonEditor (QETElementEditor *editor, PartPolygon *part=nullptr, QWidget *parent=nullptr)
 PolygonEditor::PolygonEditor. More...
 
 ~PolygonEditor () override
 PolygonEditor::~PolygonEditor. More...
 
bool setPart (CustomElementPart *part) override
 PolygonEditor::setPart. More...
 
CustomElementPartcurrentPart () const override
 PolygonEditor::currentPart. More...
 
QList< CustomElementPart * > currentParts () const override
 
void updateForm () override
 PolygonEditor::updateForm Update the widget. More...
 
QVector< QPointF > pointsFromTree ()
 PolygonEditor::pointsFromTree. More...
 
bool eventFilter (QObject *watched, QEvent *event) override
 
- Public Member Functions inherited from ElementItemEditor
 ElementItemEditor (QETElementEditor *, QWidget *=nullptr)
 
 ~ElementItemEditor () override
 
virtual QETElementEditorelementEditor () const
 
virtual ElementSceneelementScene () const
 
virtual QUndoStack & undoStack () const
 
virtual QString elementTypeName () const
 
virtual void setElementTypeName (const QString &)
 
virtual void detach ()
 
virtual bool setParts (QList< CustomElementPart * >)
 

Private Slots

void on_m_close_polygon_cb_stateChanged (int arg1)
 PolygonEditor::on_m_close_polygon_cb_stateChanged. More...
 
void on_m_points_list_tree_itemChanged (QTreeWidgetItem *item, int column)
 PolygonEditor::on_m_points_list_tree_itemChanged Update the polygon according to the current value of the tree editor. More...
 
void on_m_points_list_tree_itemSelectionChanged ()
 PolygonEditor::on_m_points_list_tree_itemSelectionChanged Used to change the color of the current selected point. More...
 
void on_m_add_point_action_triggered ()
 
void on_m_remove_point_action_triggered ()
 

Private Member Functions

void setUpChangeConnections ()
 setUpChangeConnections Setup the connection from the line(s) to the widget, to update it when the line(s) are changed (moved ...) More...
 
void disconnectChangeConnections ()
 

Private Attributes

Ui::PolygonEditor * ui
 
StyleEditorm_style = nullptr
 
PartPolygonm_part = nullptr
 
QList< QMetaObject::Connection > m_change_connections
 

Constructor & Destructor Documentation

◆ PolygonEditor()

PolygonEditor::PolygonEditor ( QETElementEditor editor,
PartPolygon part = nullptr,
QWidget *  parent = nullptr 
)
explicit

PolygonEditor::PolygonEditor.

Parameters
editor
part
parent
Here is the call graph for this function:

◆ ~PolygonEditor()

PolygonEditor::~PolygonEditor ( )
override

Member Function Documentation

◆ currentPart()

CustomElementPart * PolygonEditor::currentPart ( ) const
overridevirtual

PolygonEditor::currentPart.

Returns
the curent edited part

Implements ElementItemEditor.

◆ currentParts()

QList< CustomElementPart * > PolygonEditor::currentParts ( ) const
overridevirtual

Implements ElementItemEditor.

Here is the call graph for this function:

◆ disconnectChangeConnections()

void PolygonEditor::disconnectChangeConnections ( )
private
Here is the caller graph for this function:

◆ eventFilter()

bool PolygonEditor::eventFilter ( QObject *  watched,
QEvent *  event 
)
override
Here is the call graph for this function:

◆ on_m_add_point_action_triggered

void PolygonEditor::on_m_add_point_action_triggered ( )
privateslot
Here is the call graph for this function:

◆ on_m_close_polygon_cb_stateChanged

void PolygonEditor::on_m_close_polygon_cb_stateChanged ( int  arg1)
privateslot

PolygonEditor::on_m_close_polygon_cb_stateChanged.

Here is the call graph for this function:

◆ on_m_points_list_tree_itemChanged

void PolygonEditor::on_m_points_list_tree_itemChanged ( QTreeWidgetItem *  item,
int  column 
)
privateslot

PolygonEditor::on_m_points_list_tree_itemChanged Update the polygon according to the current value of the tree editor.

Here is the call graph for this function:

◆ on_m_points_list_tree_itemSelectionChanged

void PolygonEditor::on_m_points_list_tree_itemSelectionChanged ( )
privateslot

PolygonEditor::on_m_points_list_tree_itemSelectionChanged Used to change the color of the current selected point.

Here is the call graph for this function:

◆ on_m_remove_point_action_triggered

void PolygonEditor::on_m_remove_point_action_triggered ( )
privateslot
Here is the call graph for this function:

◆ pointsFromTree()

QVector< QPointF > PolygonEditor::pointsFromTree ( )

PolygonEditor::pointsFromTree.

Returns
the point of polygon from the current value of the tree editor if part coordinate.
Here is the caller graph for this function:

◆ setPart()

bool PolygonEditor::setPart ( CustomElementPart new_part)
overridevirtual

PolygonEditor::setPart.

Parameters
new_part
Returns

Implements ElementItemEditor.

Here is the call graph for this function:

◆ setUpChangeConnections()

void PolygonEditor::setUpChangeConnections ( )
private

setUpChangeConnections Setup the connection from the line(s) to the widget, to update it when the line(s) are changed (moved ...)

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

◆ updateForm()

void PolygonEditor::updateForm ( )
overridevirtual

PolygonEditor::updateForm Update the widget.

Implements ElementItemEditor.

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

Member Data Documentation

◆ m_change_connections

QList<QMetaObject::Connection> PolygonEditor::m_change_connections
private

◆ m_part

PartPolygon* PolygonEditor::m_part = nullptr
private

◆ m_style

StyleEditor* PolygonEditor::m_style = nullptr
private

◆ ui

Ui::PolygonEditor* PolygonEditor::ui
private

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