|
Krita Source Code Documentation
|
The undo / redo command for setting the shape background. More...
#include <KoShapeBackgroundCommand.h>
Inheritance diagram for KoShapeBackgroundCommand:Public Attributes | |
| QList< QSharedPointer< KoShapeBackground > > | newFills |
| QList< QSharedPointer< KoShapeBackground > > | oldFills |
| QList< KoShape * > | shapes |
| the shapes to set background 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 background.
Definition at line 17 of file KoShapeBackgroundCommand.cpp.
|
inline |
Definition at line 22 of file KoShapeBackgroundCommand.cpp.
| KoShapeBackgroundCommand::KoShapeBackgroundCommand | ( | const QList< KoShape * > & | shapes, |
| QSharedPointer< KoShapeBackground > | fill, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape background.
| shapes | a set of all the shapes that should get the new background. |
| fill | the new shape background |
| parent | the parent command used for macro commands |
Definition at line 42 of file KoShapeBackgroundCommand.cpp.
References KoShape::background(), d, kundo2_i18n(), KUndo2Command::setText(), and shapes.
| KoShapeBackgroundCommand::KoShapeBackgroundCommand | ( | KoShape * | shape, |
| QSharedPointer< KoShapeBackground > | fill, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape background.
| shape | a single shape that should get the new background. |
| fill | the new shape background |
| parent | the parent command used for macro commands |
Definition at line 56 of file KoShapeBackgroundCommand.cpp.
References KoShape::background(), d, kundo2_i18n(), and KUndo2Command::setText().
| KoShapeBackgroundCommand::KoShapeBackgroundCommand | ( | const QList< KoShape * > & | shapes, |
| const QList< QSharedPointer< KoShapeBackground > > & | fills, | ||
| KUndo2Command * | parent = 0 ) |
Command to set new shape backgrounds.
| shapes | a set of all the shapes that should get a new background. |
| fills | the new backgrounds, one for each shape |
| parent | the parent command used for macro commands |
Definition at line 67 of file KoShapeBackgroundCommand.cpp.
References KoShape::background(), d, kundo2_i18n(), KUndo2Command::setText(), and shapes.
|
override |
|
inline |
Definition at line 32 of file KoShapeBackgroundCommand.cpp.
|
inline |
Definition at line 27 of file KoShapeBackgroundCommand.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 104 of file KoShapeBackgroundCommand.cpp.
References KisCommandUtils::ChangeShapeBackgroundId.
|
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 109 of file KoShapeBackgroundCommand.cpp.
References d.
|
inline |
Definition at line 20 of file KoShapeBackgroundCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 82 of file KoShapeBackgroundCommand.cpp.
References d, KUndo2Command::redo(), KoShape::setBackground(), and KoShape::update().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 93 of file KoShapeBackgroundCommand.cpp.
References d, KoShape::setBackground(), KUndo2Command::undo(), and KoShape::update().
|
private |
Definition at line 59 of file KoShapeBackgroundCommand.h.
| QList<QSharedPointer<KoShapeBackground> > KoShapeBackgroundCommand::newFills |
Definition at line 39 of file KoShapeBackgroundCommand.cpp.
| QList<QSharedPointer<KoShapeBackground> > KoShapeBackgroundCommand::oldFills |
Definition at line 38 of file KoShapeBackgroundCommand.cpp.
the shapes to set background for
Definition at line 37 of file KoShapeBackgroundCommand.cpp.