|
Krita Source Code Documentation
|
The undo / redo command for grouping shapes. More...
#include <KoShapeGroupCommand.h>
Inheritance diagram for KoShapeGroupCommand:Public Member Functions | |
| KoShapeGroupCommand (KoShapeContainer *container, const QList< KoShape * > &shapes, bool shouldNormalize, KUndo2Command *parent=0) | |
| KoShapeGroupCommand (KoShapeContainer *container, const QList< KoShape * > &shapes, KUndo2Command *parent=0) | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoShapeGroupCommand () override | |
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 int | id () const |
| virtual bool | isMerged () const |
| KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0) | |
| KUndo2Command (KUndo2Command *parent=0) | |
| virtual QVector< KUndo2Command * > | mergeCommandsVector () const |
| virtual bool | mergeWith (const KUndo2Command *other) |
| 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 () |
Static Public Member Functions | |
| static KoShapeGroupCommand * | createCommand (KoShapeContainer *container, const QList< KoShape * > &shapes, bool shouldNormalize=false) |
Protected Attributes | |
| const QScopedPointer< KoShapeGroupCommandPrivate > | d |
The undo / redo command for grouping shapes.
Definition at line 23 of file KoShapeGroupCommand.h.
| KoShapeGroupCommand::KoShapeGroupCommand | ( | KoShapeContainer * | container, |
| const QList< KoShape * > & | shapes, | ||
| bool | shouldNormalize, | ||
| KUndo2Command * | parent = 0 ) |
Command to group a set of shapes into a predefined container.
| container | the container to group the shapes under. |
| shapes | a list of all the shapes that should be grouped. |
| shouldNormalize | shows whether the shapes should be normalized by the container |
| parent | the parent command used for macro commands |
Definition at line 57 of file KoShapeGroupCommand.cpp.
References d, kundo2_i18n(), KoShape::parent(), and KUndo2Command::setText().
| KoShapeGroupCommand::KoShapeGroupCommand | ( | KoShapeContainer * | container, |
| const QList< KoShape * > & | shapes, | ||
| KUndo2Command * | parent = 0 ) |
Command to group a set of shapes into a predefined container. Convenience constructor since KoShapeGroup does not allow clipping.
| container | the group to group the shapes under. |
| parent | the parent command if the resulting command is a compound undo command. |
| shapes | a list of all the shapes that should be grouped. |
Definition at line 52 of file KoShapeGroupCommand.cpp.
|
override |
Definition at line 73 of file KoShapeGroupCommand.cpp.
|
static |
Create command to group a set of shapes into a predefined container. This uses the KoShapeGroupCommand(KoShapeGroup *container, const QList<KoShape *> &shapes, KUndo2Command *parent = 0); constructor. The createCommand will make sure that the group will have the z-index and the parent of the top most shape in the group.
| container | the group to group the shapes under. |
| shapes | a list of all the shapes that should be grouped. |
| shouldNormalize | whether the shapes should be normalized |
Definition at line 18 of file KoShapeGroupCommand.cpp.
References KoShapeGroupCommand(), KoShape::parent(), KoShape::setParent(), KoShape::setZIndex(), and KoShape::zIndex().
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 77 of file KoShapeGroupCommand.cpp.
References KoShape::applyAbsoluteTransformation(), KUndo2Command::child(), KoShape::compareShapeZIndex(), d, KoShape::hasCommonParent(), KoShapeReorderCommand::homogenizeZIndexesLazy(), KUndo2Command::redo(), and KoFlake::TopLeft.
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 139 of file KoShapeGroupCommand.cpp.
References KoShape::applyAbsoluteTransformation(), KoShape::boundingRect(), KUndo2Command::child(), d, KoFlake::TopLeft, and KUndo2Command::undo().
|
protected |
Definition at line 64 of file KoShapeGroupCommand.h.