Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathControlPointMoveStrategy.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 KOPATHCONTROLPOINTMOVESTRATEGY_H
9#define KOPATHCONTROLPOINTMOVESTRATEGY_H
10
11#include <QPointF>
13#include "KoPathPoint.h"
14#include "KoPathPointData.h"
15
16#include <memory>
17
18class KoPathTool;
19
25{
26public:
28 KoPathPoint::PointType type, const QPointF &pos);
30 void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
31 void finishInteraction(Qt::KeyboardModifiers modifiers) override;
32 KUndo2Command* createCommand() override;
33
34private:
38 QPointF m_move;
39
44 std::unique_ptr<KUndo2Command> m_intermediateCommand;
45};
46
47#endif /* KOPATHCONTROLPOINTMOVESTRATEGY_H */
48
Strategy for moving points of a path shape.
std::unique_ptr< KUndo2Command > m_intermediateCommand
KoPathControlPointMoveStrategy(KoPathTool *tool, const KoPathPointData &point, KoPathPoint::PointType type, const QPointF &pos)
void finishInteraction(Qt::KeyboardModifiers modifiers) override
void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override
QPointF m_lastPosition
the last mouse position
QPointF m_move
the accumulated point move amount
Describe a KoPathPoint by a KoPathShape and its indices.
PointType
the type for identifying part of a KoPathPoint
Definition KoPathPoint.h:47
The position of a path point within a path shape.
Definition KoPathShape.h:63