11#include <klocalizedstring.h>
15, m_segmentType(segmentType)
18 pointDataList.append(pointData);
25 , m_segmentType(segmentType)
90 for (; it != pointDataList.end(); ++it) {
91 KoPathSegment segment = it->pathShape->segmentByIndex(it->pointIndex);
void setText(const KUndo2MagicString &text)
Describe a KoPathPoint by a KoPathShape and its indices.
KoPathPointIndex pointIndex
position of the point in the path shape
KoPathShape * pathShape
path shape the path point belongs too
PointProperties properties
void setProperties(PointProperties properties)
Set the properties of a point.
void setControlPoint1(const QPointF &point)
Set the control point 1.
void setControlPoint2(const QPointF &point)
Set the control point 2.
void removeControlPoint1()
Removes the first control point.
KoPathShape * parent() const
Get the path shape the point belongs to.
void removeControlPoint2()
Removes the second control point.
SegmentType m_segmentType
QList< KoPathPointData > m_pointDataList
SegmentType
Segment Types.
void undo() override
revert the actions done in redo
QList< SegmentTypeData > m_segmentData
KoPathSegmentTypeCommand(const KoPathPointData &pointData, SegmentType segmentType, KUndo2Command *parent=0)
void initialize(const QList< KoPathPointData > &pointDataList)
~KoPathSegmentTypeCommand() override
void redo() override
redo the command
A KoPathSegment consist of two neighboring KoPathPoints.
bool isValid() const
Returns if segment is valid, e.g. has two valid points.
The position of a path point within a path shape.
virtual QPointF normalize()
Normalizes the path data.
KoPathSegment segmentByIndex(const KoPathPointIndex &pointIndex) const
Returns the segment specified by a path point index.
void update() const override
reimplemented
QPointF shapeToDocument(const QPointF &point) const
Transforms point from shape coordinates to document coordinates.
QPointF documentToShape(const QPointF &point) const
Transforms point from document coordinates to shape coordinates.
KUndo2MagicString kundo2_i18n(const char *text)
KoPathPoint::PointProperties m_properties1
KoPathPoint::PointProperties m_properties2