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
16class KoPathTool;
17
22{
23public:
24 KoPathPointMoveStrategy(KoPathTool *tool, const QPointF &mousePosition, const QPointF &pointPosition);
25 ~KoPathPointMoveStrategy() override;
26 void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
27 void finishInteraction(Qt::KeyboardModifiers modifiers) override;
28 KUndo2Command *createCommand() override;
29
30private:
34 QPointF m_move;
37 QScopedPointer<KUndo2Command> m_intermediateCommand;
38};
39
40#endif /* KOPATHPOINTMOVESTRATEGY_H */
41
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
QScopedPointer< KUndo2Command > m_intermediateCommand