|
Krita Source Code Documentation
|
The undo / redo command for changing the path point type. More...
#include <KoPathPointTypeCommand.h>
Inheritance diagram for KoPathPointTypeCommand:Classes | |
| struct | PointData |
Public Types | |
| enum | PointType { Corner , Smooth , Symmetric , Line , Curve } |
| The type of the point. More... | |
Public Member Functions | |
| KoPathPointTypeCommand (const QList< KoPathPointData > &pointDataList, PointType pointType, KUndo2Command *parent=0) | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoPathPointTypeCommand () override | |
Public Member Functions inherited from KoPathBaseCommand | |
| KoPathBaseCommand (KoPathShape *shape, KUndo2Command *parent=0) | |
| KoPathBaseCommand (KUndo2Command *parent=0) | |
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 void | makeCubicPointSmooth (KoPathPoint *point) |
Private Member Functions | |
| bool | appendPointData (KoPathPointData data) |
| void | undoChanges (const QList< PointData > &data) |
Private Attributes | |
| QList< PointData > | m_additionalPointData |
| QList< PointData > | m_oldPointData |
| PointType | m_pointType |
Additional Inherited Members | |
Protected Member Functions inherited from KoPathBaseCommand | |
| void | repaint (bool normalizeShapes) |
Protected Attributes inherited from KoPathBaseCommand | |
| QSet< KoPathShape * > | m_shapes |
| the shapes the command operates on | |
The undo / redo command for changing the path point type.
Definition at line 19 of file KoPathPointTypeCommand.h.
| KoPathPointTypeCommand::KoPathPointTypeCommand | ( | const QList< KoPathPointData > & | pointDataList, |
| PointType | pointType, | ||
| KUndo2Command * | parent = 0 ) |
Command to change the type of the given points
| pointDataList | List of point for changing the points |
| pointType | the new point type to set |
| parent | the parent command used for macro commands |
Definition at line 15 of file KoPathPointTypeCommand.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, KoPathPoint::controlPoint1, KoPathPoint::controlPoint2, kundo2_i18n(), KoPathPointTypeCommand::PointData::m_hadControlPoint1, KoPathPointTypeCommand::PointData::m_hadControlPoint2, KoPathPointTypeCommand::PointData::m_oldControlPoint1, KoPathPointTypeCommand::PointData::m_oldControlPoint2, m_oldPointData, KoPathPointTypeCommand::PointData::m_oldProperties, KoPathBaseCommand::m_shapes, KoPathPoint::properties, and KUndo2Command::setText().
|
override |
Definition at line 39 of file KoPathPointTypeCommand.cpp.
|
private |
Definition at line 206 of file KoPathPointTypeCommand.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, KoPathPoint::controlPoint1, KoPathPoint::controlPoint2, m_additionalPointData, KoPathPointTypeCommand::PointData::m_hadControlPoint1, KoPathPointTypeCommand::PointData::m_hadControlPoint2, KoPathPointTypeCommand::PointData::m_oldControlPoint1, KoPathPointTypeCommand::PointData::m_oldControlPoint2, KoPathPointTypeCommand::PointData::m_oldProperties, KoPathPointData::pathShape, KoPathShape::pointByIndex(), KoPathPointData::pointIndex, KoPathPoint::properties, and KoShape::shapeToDocument().
|
static |
Definition at line 164 of file KoPathPointTypeCommand.cpp.
References KoPathPoint::controlPoint1, KoPathPoint::controlPoint2, KoPathPoint::IsSmooth, KoPathPoint::point, KoPathPoint::properties, KoPathPoint::setControlPoint1(), KoPathPoint::setControlPoint2(), and KoPathPoint::setProperties().
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 43 of file KoPathPointTypeCommand.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, appendPointData(), KoPathPoint::controlPoint1, KoPathPoint::controlPoint2, Corner, Curve, KoPathSegment::first, KoPathPoint::IsSymmetric, Line, m_additionalPointData, m_oldPointData, m_pointType, makeCubicPointSmooth(), KoPathPoint::point, KoPathPoint::properties, KUndo2Command::redo(), KoPathPoint::removeControlPoint1(), KoPathPoint::removeControlPoint2(), KoPathBaseCommand::repaint(), KoPathSegment::second, KoPathPoint::setControlPoint1(), KoPathPoint::setControlPoint2(), KoPathPoint::setProperties(), Smooth, Symmetric, and KoPathSegment::toCubic().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 135 of file KoPathPointTypeCommand.cpp.
References m_additionalPointData, m_oldPointData, KoPathBaseCommand::repaint(), KUndo2Command::undo(), and undoChanges().
Definition at line 187 of file KoPathPointTypeCommand.cpp.
References KoShape::documentToShape(), KoPathShape::pointByIndex(), KoPathPoint::removeControlPoint1(), KoPathPoint::removeControlPoint2(), KoPathPoint::setControlPoint1(), KoPathPoint::setControlPoint2(), and KoPathPoint::setProperties().
Definition at line 65 of file KoPathPointTypeCommand.h.
Definition at line 64 of file KoPathPointTypeCommand.h.
|
private |
Definition at line 63 of file KoPathPointTypeCommand.h.