|
Krita Source Code Documentation
|
The undo / redo command for setting the shape stroke. More...
#include <KoShapeStrokeCommand.h>
Inheritance diagram for KoShapeStrokeCommand:Public Attributes | |
| QList< KoShapeStrokeModelSP > | newStrokes |
| the new strokes to set | |
| QList< KoShapeStrokeModelSP > | oldStrokes |
| the old strokes, one for each shape | |
| QList< KoShape * > | shapes |
| the shapes to set stroke for | |
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 setting the shape stroke.
Definition at line 19 of file KoShapeStrokeCommand.cpp.
|
inline |
Definition at line 23 of file KoShapeStrokeCommand.cpp.
| KoShapeStrokeCommand::KoShapeStrokeCommand | ( | const QList< KoShape * > & | shapes, |
| KoShapeStrokeModelSP | stroke, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape stroke.
| shapes | a set of all the shapes that should get the new stroke. |
| stroke | the new stroke, the same for all given shapes |
| parent | the parent command used for macro commands |
Definition at line 42 of file KoShapeStrokeCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), shapes, and KoShape::stroke().
| KoShapeStrokeCommand::KoShapeStrokeCommand | ( | const QList< KoShape * > & | shapes, |
| const QList< KoShapeStrokeModelSP > & | strokes, | ||
| KUndo2Command * | parent = 0 ) |
Command to set new shape strokes.
| shapes | a set of all the shapes that should get a new stroke. |
| strokes | the new strokes, one for each shape |
| parent | the parent command used for macro commands |
Definition at line 57 of file KoShapeStrokeCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), shapes, and KoShape::stroke().
| KoShapeStrokeCommand::KoShapeStrokeCommand | ( | KoShape * | shape, |
| KoShapeStrokeModelSP | stroke, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape stroke.
| shape | a single shape that should get the new stroke. |
| stroke | the new stroke |
| parent | the parent command used for macro commands |
Definition at line 76 of file KoShapeStrokeCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), and KoShape::stroke().
|
override |
|
inline |
Definition at line 32 of file KoShapeStrokeCommand.cpp.
|
inline |
Definition at line 27 of file KoShapeStrokeCommand.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 116 of file KoShapeStrokeCommand.cpp.
References KisCommandUtils::ChangeShapeStrokeId.
|
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 121 of file KoShapeStrokeCommand.cpp.
References d.
|
inline |
Definition at line 22 of file KoShapeStrokeCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 92 of file KoShapeStrokeCommand.cpp.
References KoShape::boundingRect(), d, KUndo2Command::redo(), KoShape::setStroke(), and KoShape::updateAbsolute().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 104 of file KoShapeStrokeCommand.cpp.
References KoShape::boundingRect(), d, KoShape::setStroke(), KUndo2Command::undo(), and KoShape::updateAbsolute().
|
private |
Definition at line 61 of file KoShapeStrokeCommand.h.
| QList<KoShapeStrokeModelSP> KoShapeStrokeCommand::newStrokes |
the new strokes to set
Definition at line 39 of file KoShapeStrokeCommand.cpp.
| QList<KoShapeStrokeModelSP> KoShapeStrokeCommand::oldStrokes |
the old strokes, one for each shape
Definition at line 38 of file KoShapeStrokeCommand.cpp.
the shapes to set stroke for
Definition at line 37 of file KoShapeStrokeCommand.cpp.