|
Krita Source Code Documentation
|
The undo / redo command for setting the shape transparency. More...
#include <KoShapeTransparencyCommand.h>
Inheritance diagram for KoShapeTransparencyCommand:Public Member Functions | |
| int | id () const override |
| KoShapeTransparencyCommand (const QList< KoShape * > &shapes, const QList< qreal > &transparencies, KUndo2Command *parent=0) | |
| KoShapeTransparencyCommand (const QList< KoShape * > &shapes, qreal transparency, KUndo2Command *parent=0) | |
| KoShapeTransparencyCommand (KoShape *shape, qreal transparency, KUndo2Command *parent=0) | |
| bool | mergeWith (const KUndo2Command *command) override |
| Private () | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoShapeTransparencyCommand () 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 bool | isMerged () const |
| KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0) | |
| KUndo2Command (KUndo2Command *parent=0) | |
| virtual QVector< KUndo2Command * > | mergeCommandsVector () const |
| 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 | |
| QList< qreal > | newTransparencies |
| the new transparencies | |
| QList< qreal > | oldTransparencies |
| the old transparencies | |
| 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 transparency.
Definition at line 13 of file KoShapeTransparencyCommand.cpp.
|
inline |
Definition at line 18 of file KoShapeTransparencyCommand.cpp.
| KoShapeTransparencyCommand::KoShapeTransparencyCommand | ( | const QList< KoShape * > & | shapes, |
| qreal | transparency, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape transparency.
| shapes | a set of all the shapes that should get the new background. |
| transparency | the new shape transparency |
| parent | the parent command used for macro commands |
Definition at line 26 of file KoShapeTransparencyCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), shapes, and KoShape::transparency().
| KoShapeTransparencyCommand::KoShapeTransparencyCommand | ( | KoShape * | shape, |
| qreal | transparency, | ||
| KUndo2Command * | parent = 0 ) |
Command to set a new shape transparency.
| shape | a single shape that should get the new transparency. |
| transparency | the new shape transparency |
| parent | the parent command used for macro commands |
Definition at line 39 of file KoShapeTransparencyCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), and KoShape::transparency().
| KoShapeTransparencyCommand::KoShapeTransparencyCommand | ( | const QList< KoShape * > & | shapes, |
| const QList< qreal > & | transparencies, | ||
| KUndo2Command * | parent = 0 ) |
Command to set new shape transparencies.
| shapes | a set of all the shapes that should get a new transparency. |
| fills | the new transparencies, one for each shape |
| parent | the parent command used for macro commands |
Definition at line 50 of file KoShapeTransparencyCommand.cpp.
References d, kundo2_i18n(), KUndo2Command::setText(), shapes, and KoShape::transparency().
|
override |
|
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 90 of file KoShapeTransparencyCommand.cpp.
References KisCommandUtils::ChangeShapeTransparencyId.
|
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 95 of file KoShapeTransparencyCommand.cpp.
References d.
|
inline |
Definition at line 16 of file KoShapeTransparencyCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 68 of file KoShapeTransparencyCommand.cpp.
References d, KUndo2Command::redo(), KoShape::setTransparency(), and KoShape::update().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 79 of file KoShapeTransparencyCommand.cpp.
References d, KoShape::setTransparency(), KUndo2Command::undo(), and KoShape::update().
|
private |
Definition at line 56 of file KoShapeTransparencyCommand.h.
| QList<qreal> KoShapeTransparencyCommand::newTransparencies |
the new transparencies
Definition at line 23 of file KoShapeTransparencyCommand.cpp.
| QList<qreal> KoShapeTransparencyCommand::oldTransparencies |
the old transparencies
Definition at line 22 of file KoShapeTransparencyCommand.cpp.
the shapes to set background for
Definition at line 21 of file KoShapeTransparencyCommand.cpp.