The ImagePropertiesWidget class This class provides a widget to edit the properties of a DiagramImageItem.
More...
#include <imagepropertieswidget.h>
The ImagePropertiesWidget class This class provides a widget to edit the properties of a DiagramImageItem.
◆ ImagePropertiesWidget()
| ImagePropertiesWidget::ImagePropertiesWidget |
( |
DiagramImageItem * | image = nullptr, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
◆ ~ImagePropertiesWidget()
| ImagePropertiesWidget::~ImagePropertiesWidget |
( |
| ) |
|
|
override |
◆ apply()
| void ImagePropertiesWidget::apply |
( |
| ) |
|
|
overridevirtual |
◆ associatedUndo()
| QUndoCommand * ImagePropertiesWidget::associatedUndo |
( |
| ) |
const |
|
overridevirtual |
ImagePropertiesWidget::associatedUndo.
- Returns
- the change in an undo command. If there is no change return nullptr. Chains scaleFactorX, scaleFactorY, rotationAngle, skewX and skewY as separate QPropertyUndoCommands, matching the established "check each field, chain if changed" pattern used elsewhere – each of these is genuinely independent (the resize/rotate/skew handles can set any of them without touching the others), so a single combined command wouldn't correctly capture "only two of five
fields actually changed".
Reimplemented from PropertiesEditorWidget.
◆ on_m_angle_sb_valueChanged
| void ImagePropertiesWidget::on_m_angle_sb_valueChanged |
( |
double | value | ) |
|
|
privateslot |
◆ on_m_height_sb_valueChanged
| void ImagePropertiesWidget::on_m_height_sb_valueChanged |
( |
double | value | ) |
|
|
privateslot |
◆ on_m_lock_pos_cb_clicked
| void ImagePropertiesWidget::on_m_lock_pos_cb_clicked |
( |
| ) |
|
|
privateslot |
◆ on_m_lock_ratio_tb_toggled
| void ImagePropertiesWidget::on_m_lock_ratio_tb_toggled |
( |
bool | checked | ) |
|
|
privateslot |
ImagePropertiesWidget::on_m_lock_ratio_tb_toggled Keeps the button's own icon and tooltip in sync with its checked state – Qt shows the checked/unchecked state visually (a sunken look) regardless, but the lock/unlock glyph makes the meaning obvious at a glance rather than needing that convention noticed.
- Parameters
-
◆ on_m_restore_ratio_pb_clicked
| void ImagePropertiesWidget::on_m_restore_ratio_pb_clicked |
( |
| ) |
|
|
privateslot |
ImagePropertiesWidget::on_m_restore_ratio_pb_clicked The same action as the item's own "Restaurer les proportions" context-menu entry, offered here too since this dialog is exactly where someone would notice the proportions are off in the first place. Deliberately bypasses on_m_height_sb_valueChanged()'s own lock-following logic (guarded by m_updating_ratio, then applied directly rather than through the spinbox's own signal) rather than going through it normally: if the lock happened to be engaged, that logic would treat this as an ordinary edit and scale width by the same ratio the height change just applied – compounding into some other, unrelated value instead of the plain "make height
match width" this button promises regardless of lock state.
◆ on_m_skew_x_sb_valueChanged
| void ImagePropertiesWidget::on_m_skew_x_sb_valueChanged |
( |
double | value | ) |
|
|
privateslot |
◆ on_m_skew_y_sb_valueChanged
| void ImagePropertiesWidget::on_m_skew_y_sb_valueChanged |
( |
double | value | ) |
|
|
privateslot |
◆ on_m_width_sb_valueChanged
| void ImagePropertiesWidget::on_m_width_sb_valueChanged |
( |
double | value | ) |
|
|
privateslot |
ImagePropertiesWidget::on_m_width_sb_valueChanged Applies the new width live, and – if "Conserver les proportions" is checked – scales height by the same ratio this change just applied to width, so the two stay locked together. Guarded by m_updating_ratio: the setValue() call below would otherwise re-trigger on_m_height_sb_valueChanged(), which would then try to scale width again in response, recursing indefinitely.
- Parameters
-
| value | the new width, as a percentage |
◆ reset()
| void ImagePropertiesWidget::reset |
( |
| ) |
|
|
overridevirtual |
◆ setImageItem()
◆ setLiveEdit()
| bool ImagePropertiesWidget::setLiveEdit |
( |
bool | live_edit | ) |
|
|
overridevirtual |
◆ updateUi()
| void ImagePropertiesWidget::updateUi |
( |
| ) |
|
|
overrideprivatevirtual |
◆ m_image
◆ m_movable
| bool ImagePropertiesWidget::m_movable |
|
private |
◆ m_rotation
| qreal ImagePropertiesWidget::m_rotation |
|
private |
◆ m_scaleX
| qreal ImagePropertiesWidget::m_scaleX |
|
private |
◆ m_scaleY
| qreal ImagePropertiesWidget::m_scaleY |
|
private |
◆ m_skewX
| qreal ImagePropertiesWidget::m_skewX |
|
private |
◆ m_skewY
| qreal ImagePropertiesWidget::m_skewY |
|
private |
◆ m_updating_ratio
| bool ImagePropertiesWidget::m_updating_ratio = false |
|
private |
◆ ui
| Ui::ImagePropertiesWidget* ImagePropertiesWidget::ui |
|
private |
The documentation for this class was generated from the following files: