|
Krita Source Code Documentation
|
#include <KoShapePaintOrderCommand.h>
Inheritance diagram for KoShapePaintOrderCommand:Public Member Functions | |
| int | id () const override |
| KoShapePaintOrderCommand (const QList< KoShape * > &shapes, KoShape::PaintOrder first, KoShape::PaintOrder second, KUndo2Command *parent=nullptr) | |
| bool | mergeWith (const KUndo2Command *command) override |
| Private () | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoShapePaintOrderCommand () 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 | |
| KoShape::PaintOrder | first |
| QList< KoShape::PaintOrder > | oldFirst |
| QList< KoShape::PaintOrder > | oldSecond |
| QList< bool > | paintOrderInherited |
| KoShape::PaintOrder | second |
| QList< KoShape * > | shapes |
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) | |
Definition at line 12 of file KoShapePaintOrderCommand.cpp.
|
inline |
Definition at line 17 of file KoShapePaintOrderCommand.cpp.
| KoShapePaintOrderCommand::KoShapePaintOrderCommand | ( | const QList< KoShape * > & | shapes, |
| KoShape::PaintOrder | first, | ||
| KoShape::PaintOrder | second, | ||
| KUndo2Command * | parent = nullptr ) |
Definition at line 28 of file KoShapePaintOrderCommand.cpp.
References d, first, KoShape::inheritPaintOrder(), kundo2_i18n(), KoShape::paintOrder(), second, KUndo2Command::setText(), and shapes.
|
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 78 of file KoShapePaintOrderCommand.cpp.
References KisCommandUtils::ChangePaintOrderCommand.
|
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 83 of file KoShapePaintOrderCommand.cpp.
References d.
|
inline |
Definition at line 15 of file KoShapePaintOrderCommand.cpp.
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 53 of file KoShapePaintOrderCommand.cpp.
References d, KUndo2Command::redo(), KoShape::setPaintOrder(), and KoShape::update().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 62 of file KoShapePaintOrderCommand.cpp.
References d, KoShape::setInheritPaintOrder(), KoShape::setPaintOrder(), KUndo2Command::undo(), and KoShape::update().
|
private |
Definition at line 32 of file KoShapePaintOrderCommand.h.
| KoShape::PaintOrder KoShapePaintOrderCommand::first |
Definition at line 24 of file KoShapePaintOrderCommand.cpp.
| QList<KoShape::PaintOrder> KoShapePaintOrderCommand::oldFirst |
Definition at line 21 of file KoShapePaintOrderCommand.cpp.
| QList<KoShape::PaintOrder> KoShapePaintOrderCommand::oldSecond |
Definition at line 22 of file KoShapePaintOrderCommand.cpp.
| QList<bool> KoShapePaintOrderCommand::paintOrderInherited |
Definition at line 23 of file KoShapePaintOrderCommand.cpp.
| KoShape::PaintOrder KoShapePaintOrderCommand::second |
Definition at line 25 of file KoShapePaintOrderCommand.cpp.
Definition at line 20 of file KoShapePaintOrderCommand.cpp.