QElectroTech  0.70
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
ImagePropertiesWidget Class Reference

The ImagePropertiesWidget class This class provide a widget to edit the propertie of a DiagramImageItem. More...

#include <imagepropertieswidget.h>

Public Member Functions

 ImagePropertiesWidget (DiagramImageItem *image=nullptr, QWidget *parent=nullptr)
 ImagePropertiesWidget::ImagePropertiesWidget Constructor. More...
 
 ~ImagePropertiesWidget () override
 ImagePropertiesWidget::~ImagePropertiesWidget Destructor. More...
 
void setImageItem (DiagramImageItem *image)
 ImagePropertiesWidget::setImageItem Set the image to edit properties. More...
 
void apply () override
 ImagePropertiesWidget::apply Apply the change. More...
 
void reset () override
 ImagePropertiesWidget::reset Reset the change. More...
 
bool setLiveEdit (bool live_edit) override
 ImagePropertiesWidget::setLiveEdit. More...
 
QUndoCommand * associatedUndo () const override
 ImagePropertiesWidget::associatedUndo. More...
 
- Public Member Functions inherited from PropertiesEditorWidget
 PropertiesEditorWidget (QWidget *parent=nullptr)
 PropertiesEditorWidget::PropertiesEditorWidget Constructor. More...
 
virtual QString title () const
 PropertiesEditorWidget::title. More...
 
bool isLiveEdit () const
 PropertiesEditorWidget::isLiveEdit. More...
 

Private Slots

void on_m_scale_slider_valueChanged (int value)
 ImagePropertiesWidget::on_m_scale_slider_valueChanged Update the size of image when move slider. More...
 
void on_m_lock_pos_cb_clicked ()
 ImagePropertiesWidget::on_m_lock_pos_cb_clicked Set movable or not the image according to corresponding check box. More...
 

Private Member Functions

void updateUi () override
 ImagePropertiesWidget::updateUi Udpdate the ui, notably when the image to edit change. More...
 

Private Attributes

Ui::ImagePropertiesWidget * ui
 
DiagramImageItemm_image
 
bool m_movable
 
qreal m_scale
 

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 ImagePropertiesWidget class This class provide a widget to edit the propertie of a DiagramImageItem.

Definition at line 33 of file imagepropertieswidget.h.

Constructor & Destructor Documentation

◆ ImagePropertiesWidget()

ImagePropertiesWidget::ImagePropertiesWidget ( DiagramImageItem image = nullptr,
QWidget *  parent = nullptr 
)
explicit

ImagePropertiesWidget::ImagePropertiesWidget Constructor.

Parameters
image: image to edit properties
parent: parent widget

Definition at line 30 of file imagepropertieswidget.cpp.

References setImageItem(), and ui.

◆ ~ImagePropertiesWidget()

ImagePropertiesWidget::~ImagePropertiesWidget ( )
override

ImagePropertiesWidget::~ImagePropertiesWidget Destructor.

Definition at line 44 of file imagepropertieswidget.cpp.

References ui.

Member Function Documentation

◆ apply()

void ImagePropertiesWidget::apply ( )
overridevirtual

◆ associatedUndo()

QUndoCommand * ImagePropertiesWidget::associatedUndo ( ) const
overridevirtual

ImagePropertiesWidget::associatedUndo.

Returns
the change in an undo command (ItemResizerCommand). If there is no change return nullptr

Reimplemented from PropertiesEditorWidget.

Definition at line 133 of file imagepropertieswidget.cpp.

References QPropertyUndoCommand::enableAnimation(), m_image, m_scale, QET::Icons::tr, and ui.

Referenced by apply().

◆ on_m_lock_pos_cb_clicked

void ImagePropertiesWidget::on_m_lock_pos_cb_clicked ( )
privateslot

ImagePropertiesWidget::on_m_lock_pos_cb_clicked Set movable or not the image according to corresponding check box.

Definition at line 171 of file imagepropertieswidget.cpp.

References m_image, QetGraphicsItem::setMovable(), and ui.

◆ on_m_scale_slider_valueChanged

void ImagePropertiesWidget::on_m_scale_slider_valueChanged ( int  value)
privateslot

ImagePropertiesWidget::on_m_scale_slider_valueChanged Update the size of image when move slider.

Parameters
value

Definition at line 161 of file imagepropertieswidget.cpp.

References m_image.

◆ reset()

void ImagePropertiesWidget::reset ( )
overridevirtual

ImagePropertiesWidget::reset Reset the change.

Reimplemented from PropertiesEditorWidget.

Definition at line 94 of file imagepropertieswidget.cpp.

References m_image, m_movable, m_scale, QetGraphicsItem::setMovable(), and updateUi().

◆ setImageItem()

void ImagePropertiesWidget::setImageItem ( DiagramImageItem image)

ImagePropertiesWidget::setImageItem Set the image to edit properties.

Parameters
image: image to edit

Definition at line 53 of file imagepropertieswidget.cpp.

References QetGraphicsItem::isMovable(), m_image, m_movable, m_scale, and updateUi().

Referenced by ImagePropertiesWidget().

◆ setLiveEdit()

bool ImagePropertiesWidget::setLiveEdit ( bool  live_edit)
overridevirtual

ImagePropertiesWidget::setLiveEdit.

Parameters
live_edittrue -> enable live edit false -> disable live edit
Returns
always true

Reimplemented from PropertiesEditorWidget.

Definition at line 109 of file imagepropertieswidget.cpp.

References apply(), PropertiesEditorWidget::m_live_edit, and ui.

◆ updateUi()

void ImagePropertiesWidget::updateUi ( )
overrideprivatevirtual

ImagePropertiesWidget::updateUi Udpdate the ui, notably when the image to edit change.

Reimplemented from PropertiesEditorWidget.

Definition at line 149 of file imagepropertieswidget.cpp.

References QetGraphicsItem::isMovable(), m_image, and ui.

Referenced by apply(), reset(), and setImageItem().

Member Data Documentation

◆ m_image

DiagramImageItem* ImagePropertiesWidget::m_image
private

◆ m_movable

bool ImagePropertiesWidget::m_movable
private

Definition at line 57 of file imagepropertieswidget.h.

Referenced by reset(), and setImageItem().

◆ m_scale

qreal ImagePropertiesWidget::m_scale
private

Definition at line 58 of file imagepropertieswidget.h.

Referenced by apply(), associatedUndo(), reset(), and setImageItem().

◆ ui

Ui::ImagePropertiesWidget* ImagePropertiesWidget::ui
private

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