|
Krita Source Code Documentation
|
The undo / redo command for aligning shapes. More...
#include <KoShapeAlignCommand.h>
Inheritance diagram for KoShapeAlignCommand:Public Types | |
| enum | Align { HorizontalLeftAlignment , HorizontalCenterAlignment , HorizontalRightAlignment , VerticalBottomAlignment , VerticalCenterAlignment , VerticalTopAlignment } |
| The different alignment options for this command. More... | |
Public Member Functions | |
| KoShapeAlignCommand (const QList< KoShape * > &shapes, Align align, const QRectF &boundingRect, KUndo2Command *parent=0) | |
| Private () | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoShapeAlignCommand () override | |
| ~Private () | |
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 () |
Public Attributes | |
| KoShapeMoveCommand * | command |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
The undo / redo command for aligning shapes.
Definition at line 16 of file KoShapeAlignCommand.cpp.
The different alignment options for this command.
Definition at line 24 of file KoShapeAlignCommand.h.
|
inline |
Definition at line 20 of file KoShapeAlignCommand.cpp.
| KoShapeAlignCommand::KoShapeAlignCommand | ( | const QList< KoShape * > & | shapes, |
| Align | align, | ||
| const QRectF & | boundingRect, | ||
| KUndo2Command * | parent = 0 ) |
Command to align a set of shapes in a rect
| shapes | a set of all the shapes that should be aligned |
| align | the alignment type |
| boundingRect | the rect the shape will be aligned in |
| parent | the parent command used for macro commands |
Definition at line 26 of file KoShapeAlignCommand.cpp.
References KoShape::absoluteOutlineRect(), KoShape::absolutePosition(), d, HorizontalCenterAlignment, HorizontalLeftAlignment, HorizontalRightAlignment, kundo2_i18n(), KUndo2Command::setText(), VerticalBottomAlignment, VerticalCenterAlignment, and VerticalTopAlignment.
|
override |
|
inline |
Definition at line 19 of file KoShapeAlignCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 79 of file KoShapeAlignCommand.cpp.
References d, and KUndo2Command::redo().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 85 of file KoShapeAlignCommand.cpp.
References d, and KUndo2Command::undo().
| KoShapeMoveCommand* KoShapeAlignCommand::command |
Definition at line 23 of file KoShapeAlignCommand.cpp.
|
private |
Definition at line 47 of file KoShapeAlignCommand.h.