|
Krita Source Code Documentation
|
The undo / redo command for distributing shapes. More...
#include <KoShapeDistributeCommand.h>
Inheritance diagram for KoShapeDistributeCommand:Public Types | |
| enum | Distribute { HorizontalCenterDistribution , HorizontalGapsDistribution , HorizontalLeftDistribution , HorizontalRightDistribution , VerticalCenterDistribution , VerticalGapsDistribution , VerticalBottomDistribution , VerticalTopDistribution } |
| The different options to distribute with this command. More... | |
Public Member Functions | |
| qreal | getAvailableSpace (KoShape *first, KoShape *last, qreal extent, const QRectF &boundingRect) |
| KoShapeDistributeCommand (const QList< KoShape * > &shapes, Distribute distribute, const QRectF &boundingRect, KUndo2Command *parent=0) | |
| Private () | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoShapeDistributeCommand () 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 |
| Distribute | distribute |
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 distributing shapes.
Definition at line 16 of file KoShapeDistributeCommand.cpp.
The different options to distribute with this command.
Definition at line 24 of file KoShapeDistributeCommand.h.
|
inline |
Definition at line 20 of file KoShapeDistributeCommand.cpp.
| KoShapeDistributeCommand::KoShapeDistributeCommand | ( | const QList< KoShape * > & | shapes, |
| Distribute | distribute, | ||
| 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 distributed |
| distribute | the distribution type |
| boundingRect | the rect the shapes will be distributed in |
| parent | the parent command used for macro commands |
Definition at line 30 of file KoShapeDistributeCommand.cpp.
References KoShape::absoluteOutlineRect(), d, distribute, HorizontalCenterDistribution, HorizontalGapsDistribution, HorizontalLeftDistribution, HorizontalRightDistribution, kundo2_i18n(), KUndo2Command::setText(), value(), VerticalBottomDistribution, VerticalCenterDistribution, VerticalGapsDistribution, and VerticalTopDistribution.
|
override |
| qreal KoShapeDistributeCommand::getAvailableSpace | ( | KoShape * | first, |
| KoShape * | last, | ||
| qreal | extent, | ||
| const QRectF & | boundingRect ) |
|
inline |
Definition at line 19 of file KoShapeDistributeCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 125 of file KoShapeDistributeCommand.cpp.
References d, and KUndo2Command::redo().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 131 of file KoShapeDistributeCommand.cpp.
References d, and KUndo2Command::undo().
| KoShapeMoveCommand* KoShapeDistributeCommand::command |
Definition at line 27 of file KoShapeDistributeCommand.cpp.
|
private |
Definition at line 51 of file KoShapeDistributeCommand.h.
| Distribute KoShapeDistributeCommand::distribute |
Definition at line 26 of file KoShapeDistributeCommand.cpp.