The RotateSelectionCommand class Rotate the selected items in the given diagram.
More...
#include <rotateselectioncommand.h>
Inherits QUndoCommand.
The RotateSelectionCommand class Rotate the selected items in the given diagram.
◆ RotateSelectionCommand()
| RotateSelectionCommand::RotateSelectionCommand |
( |
Diagram * | diagram, |
|
|
qreal | angle = 90, |
|
|
QUndoCommand * | parent = nullptr, |
|
|
bool | rotate_as_group = false ) |
◆ addGroupPositionUndo()
| void RotateSelectionCommand::addGroupPositionUndo |
( |
QGraphicsItem * | item, |
|
|
const QPointF & | pivot, |
|
|
qreal | angle ) |
|
private |
RotateSelectionCommand::addGroupPositionUndo Queue a "pos" QPropertyUndoCommand that rotates item's position around pivot by angle degrees (Qt's clockwise-positive convention, matching QGraphicsItem::setRotation() so a group rotation turns the same direction as each item's own spin). Only meaningful for items whose pos() is in scene coordinates (Element, IndependentTextItem, DiagramImageItem) – never call this for a child item positioned relative to its own parent.
- Parameters
-
| item | : item to reposition, its own rotation undo already queued |
| pivot | : shared pivot point, in scene coordinates |
| angle | : rotation angle in degrees |
◆ isValid()
| bool RotateSelectionCommand::isValid |
( |
| ) |
|
◆ redo()
| void RotateSelectionCommand::redo |
( |
| ) |
|
|
override |
◆ undo()
| void RotateSelectionCommand::undo |
( |
| ) |
|
|
override |
◆ m_cond_text
◆ m_diagram
| Diagram* RotateSelectionCommand::m_diagram =nullptr |
|
private |
◆ m_rotate_by_user
◆ m_undo
The documentation for this class was generated from the following files: