|
Krita Source Code Documentation
|
#include <KoShapeResizeCommand.h>
Inheritance diagram for KoShapeResizeCommand:Public Member Functions | |
| int | id () const override |
| KoShapeResizeCommand (const QList< KoShape * > &shapes, qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint, bool useGLobalMode, bool usePostScaling, const QTransform &postScalingCoveringTransform, KUndo2Command *parent=0) | |
| bool | mergeWith (const KUndo2Command *command) override |
| void | redoImpl () override |
| QMap< KoShape *, QRectF > | redoNoUpdate () |
| void | replaceResizeAction (qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint) |
| void | undoImpl () override |
| QMap< KoShape *, QRectF > | undoNoUpdate () |
| ~KoShapeResizeCommand () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KisCommandUtils::SkipFirstRedoBase | |
| void | redo () override final |
| void | setSkipOneRedo (bool value) |
| SkipFirstRedoBase (bool skipFirstRedo, const KUndo2MagicString &text, KUndo2Command *parent=0) | |
| SkipFirstRedoBase (bool skipFirstRedo, KUndo2Command *parent=0) | |
| void | undo () override final |
Public Member Functions inherited from KUndo2Command | |
| QString | actionText () const |
| virtual bool | canAnnihilateWith (const KUndo2Command *other) const |
| const KUndo2Command * | child (int index) const |
| int | childCount () const |
| virtual QTime | endTime () const |
| KUndo2CommandExtraData * | extraData () const |
| bool | hasParent () const |
| virtual bool | isMerged () const |
| KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0) | |
| KUndo2Command (KUndo2Command *parent=0) | |
| virtual QVector< KUndo2Command * > | mergeCommandsVector () const |
| virtual void | redoMergedCommands () |
| void | setEndTime () |
| virtual void | setEndTime (const QTime &time) |
| void | setExtraData (KUndo2CommandExtraData *data) |
| void | setText (const KUndo2MagicString &text) |
| void | setTime () |
| virtual void | setTime (const QTime &time) |
| virtual void | setTimedID (int timedID) |
| KUndo2MagicString | text () const |
| virtual QTime | time () const |
| virtual int | timedId () const |
| virtual bool | timedMergeWith (KUndo2Command *other) |
| virtual void | undoMergedCommands () |
| virtual | ~KUndo2Command () |
Public Attributes | |
| QPointF | absoluteStillPoint |
| QList< QSizeF > | oldSizes |
| QList< QTransform > | oldTransforms |
| QTransform | postScalingCoveringTransform |
| qreal | scaleX |
| qreal | scaleY |
| QList< KoShape * > | shapes |
| bool | useGlobalMode |
| bool | usePostScaling |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Attributes | |
| QScopedPointer< Private > const | m_d |
Additional Inherited Members |
Definition at line 14 of file KoShapeResizeCommand.cpp.
| KoShapeResizeCommand::KoShapeResizeCommand | ( | const QList< KoShape * > & | shapes, |
| qreal | scaleX, | ||
| qreal | scaleY, | ||
| const QPointF & | absoluteStillPoint, | ||
| bool | useGLobalMode, | ||
| bool | usePostScaling, | ||
| const QTransform & | postScalingCoveringTransform, | ||
| KUndo2Command * | parent = 0 ) |
Definition at line 29 of file KoShapeResizeCommand.cpp.
References absoluteStillPoint, m_d, postScalingCoveringTransform, scaleX, scaleY, shapes, KoShape::size(), KoShape::transformation(), and usePostScaling.
|
override |
Definition at line 53 of file KoShapeResizeCommand.cpp.
|
overridevirtual |
Returns the ID of this command.
A command ID is used in command compression. It must be an integer unique to this command's class, or -1 if the command doesn't support compression.
If the command supports compression this function must be overridden in the derived class to return the correct ID. The base implementation returns -1.
KUndo2QStack::push() will only try to merge two commands if they have the same ID, and the ID is not -1.
Reimplemented from KUndo2Command.
Definition at line 112 of file KoShapeResizeCommand.cpp.
References KisCommandUtils::ResizeShapeId.
|
overridevirtual |
Attempts to merge this command with command. Returns true on success; otherwise returns false.
If this function returns true, calling this command's redo() must have the same effect as redoing both this command and command. Similarly, calling this command's undo() must have the same effect as undoing command and this command.
KUndo2QStack will only try to merge two commands if they have the same id, and the id is not -1.
The default implementation returns false.
Reimplemented from KUndo2Command.
Definition at line 117 of file KoShapeResizeCommand.cpp.
References m_d, and KoFlake::significantScaleOrientation().
|
overridevirtual |
Implements KisCommandUtils::SkipFirstRedoBase.
Definition at line 57 of file KoShapeResizeCommand.cpp.
References redoNoUpdate().
| QMap< KoShape *, QRectF > KoShapeResizeCommand::redoNoUpdate | ( | ) |
Definition at line 75 of file KoShapeResizeCommand.cpp.
References KoShape::boundingRect(), m_d, and KoFlake::resizeShapeCommon().
| void KoShapeResizeCommand::replaceResizeAction | ( | qreal | scaleX, |
| qreal | scaleY, | ||
| const QPointF & | absoluteStillPoint ) |
Definition at line 145 of file KoShapeResizeCommand.cpp.
References absoluteStillPoint, KIS_SAFE_ASSERT_RECOVER_NOOP, m_d, redoNoUpdate(), scaleX, scaleY, and undoNoUpdate().
|
overridevirtual |
Implements KisCommandUtils::SkipFirstRedoBase.
Definition at line 66 of file KoShapeResizeCommand.cpp.
References undoNoUpdate().
| QMap< KoShape *, QRectF > KoShapeResizeCommand::undoNoUpdate | ( | ) |
Definition at line 95 of file KoShapeResizeCommand.cpp.
References KoShape::boundingRect(), m_d, KoShape::setSize(), and KoShape::setTransformation().
| QPointF KoShapeResizeCommand::absoluteStillPoint |
Definition at line 19 of file KoShapeResizeCommand.cpp.
|
private |
Definition at line 47 of file KoShapeResizeCommand.h.
| QList<QSizeF> KoShapeResizeCommand::oldSizes |
Definition at line 24 of file KoShapeResizeCommand.cpp.
| QList<QTransform> KoShapeResizeCommand::oldTransforms |
Definition at line 25 of file KoShapeResizeCommand.cpp.
| QTransform KoShapeResizeCommand::postScalingCoveringTransform |
Definition at line 22 of file KoShapeResizeCommand.cpp.
| qreal KoShapeResizeCommand::scaleX |
Definition at line 17 of file KoShapeResizeCommand.cpp.
| qreal KoShapeResizeCommand::scaleY |
Definition at line 18 of file KoShapeResizeCommand.cpp.
Definition at line 16 of file KoShapeResizeCommand.cpp.
| bool KoShapeResizeCommand::useGlobalMode |
Definition at line 20 of file KoShapeResizeCommand.cpp.
| bool KoShapeResizeCommand::usePostScaling |
Definition at line 21 of file KoShapeResizeCommand.cpp.