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

The RectangleEditor class This class provides a widget to edit rectangles within the element editor. More...

#include <rectangleeditor.h>

Inheritance diagram for RectangleEditor:
Inheritance graph
Collaboration diagram for RectangleEditor:
Collaboration graph

Public Slots

void updateForm () override
 RectangleEditor::updateForm. More...
 

Public Member Functions

 RectangleEditor (QETElementEditor *editor, PartRectangle *rect=nullptr, QWidget *parent=nullptr)
 RectangleEditor::RectangleEditor. More...
 
 ~RectangleEditor () override
 RectangleEditor::~RectangleEditor. More...
 
bool setPart (CustomElementPart *part) override
 RectangleEditor::setPart. More...
 
bool setParts (QList< CustomElementPart * > parts) override
 
CustomElementPartcurrentPart () const override
 RectangleEditor::currentPart. More...
 
QList< CustomElementPart * > currentParts () const override
 
QPointF editedTopLeft () const
 RectangleEditor::topLeft. More...
 
- 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 void updateForm ()=0
 

Private Member Functions

void editingFinished ()
 RectangleEditor::editingFinished Slot called when a editor widget is finish to be edited Update the geometry of the rectangle according to value of editing widget. More...
 
void activeConnections (bool active)
 RectangleEditor::activeConnections Enable/disable connection between editor widget and slot editingFinished True == enable | false == disable. More...
 
void xPosChanged ()
 
void yPosChanged ()
 
void widthChanged ()
 
void heightChanged ()
 
void xRadiusChanged ()
 
void yRadiusChanged ()
 
void setUpChangeConnections ()
 setUpChangeConnections Setup the connection from the rectangles(s) to the widget, to update it when the rectangles(s) are changed (moved ...) More...
 
void disconnectChangeConnections ()
 

Private Attributes

bool m_locked = false
 
StyleEditorm_style
 
PartRectanglem_part
 
Ui::RectangleEditor * ui
 
QList< QMetaObject::Connection > m_change_connections
 

Detailed Description

The RectangleEditor class This class provides a widget to edit rectangles within the element editor.

Constructor & Destructor Documentation

◆ RectangleEditor()

RectangleEditor::RectangleEditor ( QETElementEditor editor,
PartRectangle rect = nullptr,
QWidget *  parent = nullptr 
)
explicit

RectangleEditor::RectangleEditor.

Parameters
editor
rect
parent

◆ ~RectangleEditor()

RectangleEditor::~RectangleEditor ( )
override

Member Function Documentation

◆ activeConnections()

void RectangleEditor::activeConnections ( bool  active)
private

RectangleEditor::activeConnections Enable/disable connection between editor widget and slot editingFinished True == enable | false == disable.

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

◆ currentPart()

CustomElementPart * RectangleEditor::currentPart ( ) const
overridevirtual

◆ currentParts()

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

Implements ElementItemEditor.

Here is the call graph for this function:

◆ disconnectChangeConnections()

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

◆ editedTopLeft()

QPointF RectangleEditor::editedTopLeft ( ) const

RectangleEditor::topLeft.

Returns
The edited topLeft already mapped to part coordinate
Here is the caller graph for this function:

◆ editingFinished()

void RectangleEditor::editingFinished ( )
private

RectangleEditor::editingFinished Slot called when a editor widget is finish to be edited Update the geometry of the rectangle according to value of editing widget.

Here is the call graph for this function:

◆ heightChanged()

void RectangleEditor::heightChanged ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPart()

bool RectangleEditor::setPart ( CustomElementPart part)
overridevirtual

RectangleEditor::setPart.

Parameters
part
Returns

Implements ElementItemEditor.

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

◆ setParts()

bool RectangleEditor::setParts ( QList< CustomElementPart * >  parts)
overridevirtual

Reimplemented from ElementItemEditor.

Here is the call graph for this function:

◆ setUpChangeConnections()

void RectangleEditor::setUpChangeConnections ( )
private

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

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

◆ updateForm

void RectangleEditor::updateForm ( )
overrideslot

RectangleEditor::updateForm.

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

◆ widthChanged()

void RectangleEditor::widthChanged ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xPosChanged()

void RectangleEditor::xPosChanged ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xRadiusChanged()

void RectangleEditor::xRadiusChanged ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ yPosChanged()

void RectangleEditor::yPosChanged ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ yRadiusChanged()

void RectangleEditor::yRadiusChanged ( )
private
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> RectangleEditor::m_change_connections
private

◆ m_locked

bool RectangleEditor::m_locked = false
private

◆ m_part

PartRectangle* RectangleEditor::m_part
private

◆ m_style

StyleEditor* RectangleEditor::m_style
private

◆ ui

Ui::RectangleEditor* RectangleEditor::ui
private

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