Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TransformCommand Class Reference
+ Inheritance diagram for TransformCommand:
Inheritance graph
[legend]
+ Collaboration diagram for TransformCommand:
Collaboration graph
[legend]

Public Member Functions

 TransformCommand (const QRectF &undoSelectionRect, const QPointF &undoTranslation, const qreal undoRotationAngle, const qreal undoScaleX, const qreal undoScaleY, const QPointF &undoTransformAnchor, const bool roundPixels, const QString &description, Editor *editor, QUndoCommand *parent=nullptr)
 
void undo () override
 
void redo () override
 
- Public Member Functions inherited from UndoRedoCommand
 UndoRedoCommand (Editor *editor, QUndoCommand *parent=nullptr)
 
- Public Member Functions inherited from QUndoCommand
 QUndoCommand (QUndoCommand *parent)
 
 QUndoCommand (const QString &text, QUndoCommand *parent)
 
virtual void undo ()
 
virtual void redo ()
 
QString text () const const
 
QString actionText () const const
 
void setText (const QString &text)
 
bool isObsolete () const const
 
void setObsolete (bool obsolete)
 
virtual int id () const const
 
virtual bool mergeWith (const QUndoCommand *command)
 
int childCount () const const
 
const QUndoCommand * child (int index) const const
 

Private Member Functions

void apply (const QRectF &selectionRect, const QPointF &translation, const qreal rotationAngle, const qreal scaleX, const qreal scaleY, const QPointF &selectionAnchor, const bool roundPixels)
 

Private Attributes

QRectF undoSelectionRect
 
QRectF redoSelectionRect
 
QPointF undoAnchor
 
QPointF redoAnchor
 
QPointF undoTranslation
 
QPointF redoTranslation
 
qreal undoScaleX
 
qreal undoScaleY
 
qreal redoScaleX
 
qreal redoScaleY
 
qreal undoRotationAngle
 
qreal redoRotationAngle
 
bool roundPixels
 

Additional Inherited Members

- Protected Member Functions inherited from UndoRedoCommand
Editor * editor ()
 
bool isFirstRedo () const
 
void setFirstRedo (const bool state)
 

Detailed Description

Definition at line 95 of file undoredocommand.h.

Constructor & Destructor Documentation

◆ TransformCommand()

TransformCommand::TransformCommand ( const QRectF &  undoSelectionRect,
const QPointF &  undoTranslation,
const qreal  undoRotationAngle,
const qreal  undoScaleX,
const qreal  undoScaleY,
const QPointF &  undoTransformAnchor,
const bool  roundPixels,
const QString &  description,
Editor *  editor,
QUndoCommand *  parent = nullptr 
)

Definition at line 124 of file undoredocommand.cpp.

Member Function Documentation

◆ apply()

void TransformCommand::apply ( const QRectF &  selectionRect,
const QPointF &  translation,
const qreal  rotationAngle,
const qreal  scaleX,
const qreal  scaleY,
const QPointF &  selectionAnchor,
const bool  roundPixels 
)
private

Definition at line 180 of file undoredocommand.cpp.

◆ redo()

void TransformCommand::redo ( )
overridevirtual

Reimplemented from QUndoCommand.

Definition at line 166 of file undoredocommand.cpp.

◆ undo()

void TransformCommand::undo ( )
overridevirtual

Reimplemented from QUndoCommand.

Definition at line 155 of file undoredocommand.cpp.

Member Data Documentation

◆ redoAnchor

QPointF TransformCommand::redoAnchor
private

Definition at line 126 of file undoredocommand.h.

◆ redoRotationAngle

qreal TransformCommand::redoRotationAngle
private

Definition at line 138 of file undoredocommand.h.

◆ redoScaleX

qreal TransformCommand::redoScaleX
private

Definition at line 134 of file undoredocommand.h.

◆ redoScaleY

qreal TransformCommand::redoScaleY
private

Definition at line 135 of file undoredocommand.h.

◆ redoSelectionRect

QRectF TransformCommand::redoSelectionRect
private

Definition at line 123 of file undoredocommand.h.

◆ redoTranslation

QPointF TransformCommand::redoTranslation
private

Definition at line 129 of file undoredocommand.h.

◆ roundPixels

bool TransformCommand::roundPixels
private

Definition at line 140 of file undoredocommand.h.

◆ undoAnchor

QPointF TransformCommand::undoAnchor
private

Definition at line 125 of file undoredocommand.h.

◆ undoRotationAngle

qreal TransformCommand::undoRotationAngle
private

Definition at line 137 of file undoredocommand.h.

◆ undoScaleX

qreal TransformCommand::undoScaleX
private

Definition at line 131 of file undoredocommand.h.

◆ undoScaleY

qreal TransformCommand::undoScaleY
private

Definition at line 132 of file undoredocommand.h.

◆ undoSelectionRect

QRectF TransformCommand::undoSelectionRect
private

Definition at line 122 of file undoredocommand.h.

◆ undoTranslation

QPointF TransformCommand::undoTranslation
private

Definition at line 128 of file undoredocommand.h.


The documentation for this class was generated from the following files:
  • core_lib/src/interface/undoredocommand.h
  • core_lib/src/interface/undoredocommand.cpp
Generated on Thu May 8 2025 04:47:54 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39