Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathSegmentTypeCommand.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006, 2009 Jan Hambrecht <jaham@gmx.net>
3 * SPDX-FileCopyrightText: 2006, 2007 Thorsten Zachmann <zachmann@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef KOPATHSEGMENTTYPECOMMAND_H
9#define KOPATHSEGMENTTYPECOMMAND_H
10
11#include <kundo2command.h>
12#include <QList>
13#include <QPointF>
14#include "KoPathPoint.h"
15#include "KoPathPointData.h"
16#include "kritaflake_export.h"
17
19class KRITAFLAKE_EXPORT KoPathSegmentTypeCommand : public KUndo2Command
20{
21public:
24 Curve = 1,
25 Line = 2
26 };
27
34 KoPathSegmentTypeCommand(const KoPathPointData &pointData, SegmentType segmentType, KUndo2Command *parent = 0);
35
42 KoPathSegmentTypeCommand(const QList<KoPathPointData> &pointDataList, SegmentType segmentType, KUndo2Command *parent = 0);
44
46 void redo() override;
48 void undo() override;
49
50private:
51 // used for storing the data for undo
53 // old control points in document coordinates
56 KoPathPoint::PointProperties m_properties1;
57 KoPathPoint::PointProperties m_properties2;
58 };
59
60 void initialize(const QList<KoPathPointData> &pointDataList);
61
65};
66
67#endif // KOPATHSEGMENTTYPECOMMAND_H
virtual void undo()
virtual void redo()
Describe a KoPathPoint by a KoPathShape and its indices.
The undo / redo command for changing segments to curves/lines.
QList< KoPathPointData > m_pointDataList
QList< SegmentTypeData > m_segmentData