Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathPointMoveStrategy.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 Thorsten Zachmann <zachmann@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef KOPATHPOINTMOVESTRATEGY_H
9#define KOPATHPOINTMOVESTRATEGY_H
10
11#include <QPointF>
12#include <QScopedPointer>
14
15#include <memory>
16
17class KoPathTool;
18
23{
24public:
25 KoPathPointMoveStrategy(KoPathTool *tool, const QPointF &mousePosition, const QPointF &pointPosition);
26 ~KoPathPointMoveStrategy() override;
27 void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
28 void finishInteraction(Qt::KeyboardModifiers modifiers) override;
29 KUndo2Command *createCommand() override;
30
31private:
35 QPointF m_move;
38 std::unique_ptr<KUndo2Command> m_intermediateCommand;
39};
40
41#endif /* KOPATHPOINTMOVESTRATEGY_H */
42
Strategy for moving points of a path shape.
KoPathPointMoveStrategy(KoPathTool *tool, const QPointF &mousePosition, const QPointF &pointPosition)
QPointF m_move
the accumulated point move amount
void finishInteraction(Qt::KeyboardModifiers modifiers) override
KoPathTool * m_tool
pointer to the path tool
KUndo2Command * createCommand() override
void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override
std::unique_ptr< KUndo2Command > m_intermediateCommand