|
Krita Source Code Documentation
|
The undo / redo command for changing segments to curves/lines. More...
#include <KoPathSegmentTypeCommand.h>
Inheritance diagram for KoPathSegmentTypeCommand:Classes | |
| struct | SegmentTypeData |
Public Types | |
| enum | SegmentType { Curve = 1 , Line = 2 } |
| Segment Types. More... | |
Public Member Functions | |
| KoPathSegmentTypeCommand (const KoPathPointData &pointData, SegmentType segmentType, KUndo2Command *parent=0) | |
| KoPathSegmentTypeCommand (const QList< KoPathPointData > &pointDataList, SegmentType segmentType, KUndo2Command *parent=0) | |
| void | redo () override |
| redo the command | |
| void | undo () override |
| revert the actions done in redo | |
| ~KoPathSegmentTypeCommand () 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 () |
Private Member Functions | |
| void | initialize (const QList< KoPathPointData > &pointDataList) |
Private Attributes | |
| QList< KoPathPointData > | m_pointDataList |
| QList< SegmentTypeData > | m_segmentData |
| SegmentType | m_segmentType |
The undo / redo command for changing segments to curves/lines.
Definition at line 19 of file KoPathSegmentTypeCommand.h.
Segment Types.
| Enumerator | |
|---|---|
| Curve | |
| Line | |
Definition at line 23 of file KoPathSegmentTypeCommand.h.
| KoPathSegmentTypeCommand::KoPathSegmentTypeCommand | ( | const KoPathPointData & | pointData, |
| SegmentType | segmentType, | ||
| KUndo2Command * | parent = 0 ) |
Command for changing the segment type ( curve/line )
| pointData | point data identifying the segment that should be changed. |
| segmentType | to which the segment should be changed to |
| parent | the parent command used for macro commands |
Definition at line 13 of file KoPathSegmentTypeCommand.cpp.
References initialize().
| KoPathSegmentTypeCommand::KoPathSegmentTypeCommand | ( | const QList< KoPathPointData > & | pointDataList, |
| SegmentType | segmentType, | ||
| KUndo2Command * | parent = 0 ) |
Command for changing the segment type ( curve/line )
| pointDataList | List of point data identifying the segments that should be changed. |
| segmentType | to which the segments should be changed to |
| parent | the parent command used for macro commands |
Definition at line 22 of file KoPathSegmentTypeCommand.cpp.
References initialize().
|
override |
Definition at line 30 of file KoPathSegmentTypeCommand.cpp.
|
private |
Definition at line 87 of file KoPathSegmentTypeCommand.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, KoPathPoint::controlPoint1, KoPathPoint::controlPoint2, Curve, KoPathSegment::first, KoPathSegment::isValid(), kundo2_i18n(), Line, KoPathSegmentTypeCommand::SegmentTypeData::m_controlPoint1, KoPathSegmentTypeCommand::SegmentTypeData::m_controlPoint2, m_pointDataList, KoPathSegmentTypeCommand::SegmentTypeData::m_properties1, KoPathSegmentTypeCommand::SegmentTypeData::m_properties2, m_segmentData, m_segmentType, KoPathPoint::parent(), KoPathPoint::properties, KoPathSegment::second, KUndo2Command::setText(), and KoShape::shapeToDocument().
|
overridevirtual |
redo the command
Reimplemented from KUndo2Command.
Definition at line 34 of file KoPathSegmentTypeCommand.cpp.
References Curve, KoPathSegment::first, m_pointDataList, m_segmentType, KoPathShape::normalize(), KoPathPoint::point, KUndo2Command::redo(), KoPathPoint::removeControlPoint1(), KoPathPoint::removeControlPoint2(), KoPathSegment::second, KoPathShape::segmentByIndex(), KoPathPoint::setControlPoint1(), KoPathPoint::setControlPoint2(), and KoShapeContainer::update().
|
overridevirtual |
revert the actions done in redo
Reimplemented from KUndo2Command.
Definition at line 60 of file KoPathSegmentTypeCommand.cpp.
References KoShape::documentToShape(), KoPathSegment::first, Line, KoPathSegmentTypeCommand::SegmentTypeData::m_controlPoint1, KoPathSegmentTypeCommand::SegmentTypeData::m_controlPoint2, m_pointDataList, KoPathSegmentTypeCommand::SegmentTypeData::m_properties1, KoPathSegmentTypeCommand::SegmentTypeData::m_properties2, m_segmentData, m_segmentType, KoPathShape::normalize(), KoPathPointData::pathShape, KoPathPointData::pointIndex, KoPathPoint::removeControlPoint1(), KoPathPoint::removeControlPoint2(), KoPathSegment::second, KoPathShape::segmentByIndex(), KoPathPoint::setControlPoint1(), KoPathPoint::setControlPoint2(), KoPathPoint::setProperties(), KUndo2Command::undo(), and KoShapeContainer::update().
|
private |
Definition at line 62 of file KoPathSegmentTypeCommand.h.
|
private |
Definition at line 63 of file KoPathSegmentTypeCommand.h.
|
private |
Definition at line 64 of file KoPathSegmentTypeCommand.h.