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

The ShapeGraphicsItemPropertiesWidget class Provide a widget to edit the properties of a QetShapeItem. More...

#include <shapegraphicsitempropertieswidget.h>

Inheritance diagram for ShapeGraphicsItemPropertiesWidget:
Inheritance graph
Collaboration diagram for ShapeGraphicsItemPropertiesWidget:
Collaboration graph

Public Slots

void apply () override
 ShapeGraphicsItemPropertiesWidget::apply Apply the current change, by pushing an undo command to the undo stack of the shape diagram. More...
 
void reset () override
 ShapeGraphicsItemPropertiesWidget::reset Reset the change. More...
 

Public Member Functions

 ShapeGraphicsItemPropertiesWidget (QetShapeItem *item, QWidget *parent=nullptr)
 ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget Constructor. More...
 
 ShapeGraphicsItemPropertiesWidget (QList< QetShapeItem * > items_list, QWidget *parent=nullptr)
 
 ~ShapeGraphicsItemPropertiesWidget () override
 ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget Destructor. More...
 
void setItem (QetShapeItem *shape)
 ShapeGraphicsItemPropertiesWidget::setItem Set shape as the current edited item. More...
 
void setItems (QList< QetShapeItem * > shapes_list)
 ShapeGraphicsItemPropertiesWidget::setItems Set a list of shapes to be edited. More...
 
QUndoCommand * associatedUndo () const override
 ShapeGraphicsItemPropertiesWidget::associatedUndo. More...
 
QString title () const override
 PropertiesEditorWidget::title. More...
 
void updateUi () override
 ShapeGraphicsItemPropertiesWidget::updateUi. More...
 
bool setLiveEdit (bool live_edit) override
 ShapeGraphicsItemPropertiesWidget::setLiveEdit. More...
 
- Public Member Functions inherited from PropertiesEditorWidget
 PropertiesEditorWidget (QWidget *parent=nullptr)
 PropertiesEditorWidget::PropertiesEditorWidget Constructor. More...
 
virtual void apply ()
 
virtual void reset ()
 
bool isLiveEdit () const
 PropertiesEditorWidget::isLiveEdit. More...
 

Private Slots

void on_m_lock_pos_cb_clicked ()
 
void on_m_color_kpb_changed (const QColor &newColor)
 
void on_m_brush_color_kpb_changed (const QColor &newColor)
 

Private Member Functions

void setUpEditConnection ()
 ShapeGraphicsItemPropertiesWidget::setUpEditConnection Disconnect the previous connection, and reconnect the connection between the editors widgets and void ShapeGraphicsItemPropertiesWidget::apply function. More...
 

Private Attributes

Ui::ShapeGraphicsItemPropertiesWidget * ui
 
QetShapeItemm_shape
 
QList< QPointer< QetShapeItem > > m_shapes_list
 
QList< QMetaObject::Connection > m_connect_list
 
QList< QMetaObject::Connection > m_edit_connection
 

Additional Inherited Members

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

Detailed Description

The ShapeGraphicsItemPropertiesWidget class Provide a widget to edit the properties of a QetShapeItem.

Constructor & Destructor Documentation

◆ ShapeGraphicsItemPropertiesWidget() [1/2]

ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget ( QetShapeItem item,
QWidget *  parent = nullptr 
)
explicit

ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget Constructor.

Parameters
item: shape to edit
parent: parent widget
Here is the call graph for this function:

◆ ShapeGraphicsItemPropertiesWidget() [2/2]

ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget ( QList< QetShapeItem * >  items_list,
QWidget *  parent = nullptr 
)
Here is the call graph for this function:

◆ ~ShapeGraphicsItemPropertiesWidget()

ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget ( )
override

Member Function Documentation

◆ apply

void ShapeGraphicsItemPropertiesWidget::apply ( )
overrideslot

ShapeGraphicsItemPropertiesWidget::apply Apply the current change, by pushing an undo command to the undo stack of the shape diagram.

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

◆ associatedUndo()

QUndoCommand * ShapeGraphicsItemPropertiesWidget::associatedUndo ( ) const
overridevirtual

ShapeGraphicsItemPropertiesWidget::associatedUndo.

Returns
an undo command that represent the change edited by this widget. The returned undo command is a QPropertyUndoCommand with the properties "pen". If there isn't change, return nullptr

Reimplemented from PropertiesEditorWidget.

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

◆ on_m_brush_color_kpb_changed

void ShapeGraphicsItemPropertiesWidget::on_m_brush_color_kpb_changed ( const QColor &  newColor)
privateslot
Here is the call graph for this function:

◆ on_m_color_kpb_changed

void ShapeGraphicsItemPropertiesWidget::on_m_color_kpb_changed ( const QColor &  newColor)
privateslot
Here is the call graph for this function:

◆ on_m_lock_pos_cb_clicked

void ShapeGraphicsItemPropertiesWidget::on_m_lock_pos_cb_clicked ( )
privateslot
Here is the call graph for this function:

◆ reset

void ShapeGraphicsItemPropertiesWidget::reset ( )
overrideslot

ShapeGraphicsItemPropertiesWidget::reset Reset the change.

Here is the call graph for this function:

◆ setItem()

void ShapeGraphicsItemPropertiesWidget::setItem ( QetShapeItem shape)

ShapeGraphicsItemPropertiesWidget::setItem Set shape as the current edited item.

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

◆ setItems()

void ShapeGraphicsItemPropertiesWidget::setItems ( QList< QetShapeItem * >  shapes_list)

ShapeGraphicsItemPropertiesWidget::setItems Set a list of shapes to be edited.

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

◆ setLiveEdit()

bool ShapeGraphicsItemPropertiesWidget::setLiveEdit ( bool  live_edit)
overridevirtual

ShapeGraphicsItemPropertiesWidget::setLiveEdit.

Parameters
live_edit
Returns
always true

Reimplemented from PropertiesEditorWidget.

Here is the call graph for this function:

◆ setUpEditConnection()

void ShapeGraphicsItemPropertiesWidget::setUpEditConnection ( )
private

ShapeGraphicsItemPropertiesWidget::setUpEditConnection Disconnect the previous connection, and reconnect the connection between the editors widgets and void ShapeGraphicsItemPropertiesWidget::apply function.

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

◆ title()

QString ShapeGraphicsItemPropertiesWidget::title ( ) const
inlineoverridevirtual

PropertiesEditorWidget::title.

Returns
the title of this editor

Reimplemented from PropertiesEditorWidget.

◆ updateUi()

void ShapeGraphicsItemPropertiesWidget::updateUi ( )
overridevirtual

ShapeGraphicsItemPropertiesWidget::updateUi.

Reimplemented from PropertiesEditorWidget.

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

Member Data Documentation

◆ m_connect_list

QList<QMetaObject::Connection> ShapeGraphicsItemPropertiesWidget::m_connect_list
private

◆ m_edit_connection

QList<QMetaObject::Connection> ShapeGraphicsItemPropertiesWidget::m_edit_connection
private

◆ m_shape

QetShapeItem* ShapeGraphicsItemPropertiesWidget::m_shape
private

◆ m_shapes_list

QList<QPointer<QetShapeItem> > ShapeGraphicsItemPropertiesWidget::m_shapes_list
private

◆ ui

Ui::ShapeGraphicsItemPropertiesWidget* ShapeGraphicsItemPropertiesWidget::ui
private

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