Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSubpathJoinCommand.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006 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 KOSUBPATHJOINCOMMAND_H
9#define KOSUBPATHJOINCOMMAND_H
10
11#include <kundo2command.h>
12#include <QPointF>
13#include "KoPathPoint.h"
14#include "KoPathPointData.h"
15#include <boost/optional.hpp>
16
19{
20public:
30 KoSubpathJoinCommand(const KoPathPointData &pointData1, const KoPathPointData &pointData2, KUndo2Command *parent = 0);
31 ~KoSubpathJoinCommand() override;
32
34 void redo() override;
36 void undo() override;
37
38private:
39 bool closeSubpathMode() const;
40
41private:
45
46 // the control points have to be stored in shape coordinates
47 boost::optional<QPointF> m_savedControlPoint1;
48 boost::optional<QPointF> m_savedControlPoint2;
49
50 KoPathPoint::PointProperties m_oldProperties1;
51 KoPathPoint::PointProperties m_oldProperties2;
57};
58
59#endif // KOSUBPATHJOINCOMMAND_H
QPair< int, int > KoPathPointIndex
Definition KoPathShape.h:28
Describe a KoPathPoint by a KoPathShape and its indices.
The undo / redo command for joining two subpath end points.
KoPathPoint::PointProperties m_oldProperties1
KoSubpathJoinCommand(const KoPathPointData &pointData1, const KoPathPointData &pointData2, KUndo2Command *parent=0)
KoPathPointIndex m_splitIndex
boost::optional< QPointF > m_savedControlPoint1
boost::optional< QPointF > m_savedControlPoint2
void undo() override
revert the actions done in redo
void redo() override
redo the command
KoPathPoint::PointProperties m_oldProperties2