|
Krita Source Code Documentation
|
The undo / redo command for removing path points. More...
#include <KoPathPointRemoveCommand.h>
Inheritance diagram for KoPathPointRemoveCommand:Public Member Functions | |
| KoPathPointRemoveCommand (const QList< KoPathPointData > &pointDataList, KUndo2Command *parent=0) | |
| Command to remove a points from path shapes. | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoPathPointRemoveCommand () override | |
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 () |
Static Public Member Functions | |
| static KUndo2Command * | createCommand (const QList< KoPathPointData > &pointDataList, KoShapeController *shapeController, KUndo2Command *parent=0) |
| Create command for removing points from path shapes. | |
Private Attributes | |
| KoPathPointRemoveCommandPrivate * | d |
The undo / redo command for removing path points.
Definition at line 20 of file KoPathPointRemoveCommand.h.
|
explicit |
Command to remove a points from path shapes.
Don't use this directly use createCommand instead.
| pointDataList | List of point data to remove. |
| parent | the parent command used for macro commands |
Definition at line 106 of file KoPathPointRemoveCommand.cpp.
References d, kundo2_i18n(), KoPathPointRemoveCommandPrivate::pointDataList, KoPathPointRemoveCommandPrivate::points, and KUndo2Command::setText().
|
override |
|
static |
Create command for removing points from path shapes.
This will create the command for removing points from path shapes. If all points from a path shape are deleted it will delete the path shape. If all points from a subpath are deleted it will delete the subpath.
| pointDataList | List of point data to remove |
| shapeController | shape controller in charge |
| parent | the parent command used for macro commands |
Definition at line 27 of file KoPathPointRemoveCommand.cpp.
References KoPathPointRemoveCommand(), kundo2_i18n(), KUndo2Command::KUndo2Command(), KoPathPointData::pathShape, KoPathPointData::pointIndex, KoShapeController::removeShapes(), KoPathShape::subpathCount(), and KoPathShape::subpathPointCount().
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 128 of file KoPathPointRemoveCommand.cpp.
References d, KoPathPointRemoveCommandPrivate::deletePoints, KoPathShape::normalize(), KoPathPointData::pathShape, KoPathPointRemoveCommandPrivate::pointDataList, KoPathPointData::pointIndex, KoPathPointRemoveCommandPrivate::points, KUndo2Command::redo(), KoPathShape::removePoint(), and KoShapeContainer::update().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 168 of file KoPathPointRemoveCommand.cpp.
References d, KoPathPointRemoveCommandPrivate::deletePoints, KoPathShape::insertPoint(), KoPathShape::normalize(), KoPathPointData::pathShape, KoPathPointRemoveCommandPrivate::pointDataList, KoPathPointData::pointIndex, KoPathPointRemoveCommandPrivate::points, KUndo2Command::undo(), and KoShapeContainer::update().
|
private |
Definition at line 53 of file KoPathPointRemoveCommand.h.