Krita Source Code Documentation
Loading...
Searching...
No Matches
ShapeRotateStrategy.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006-2007 Thomas Zander <zander@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef SHAPEROTATESTRATEGY_H
8#define SHAPEROTATESTRATEGY_H
9
11
12#include <QPointF>
13#include <QRectF>
14#include <QTransform>
15#include <QList>
16
17class KoToolBase;
18class KoShape;
19class KoSelection;
20
27{
28public:
34 ShapeRotateStrategy(KoToolBase *tool, KoSelection *selection, const QPointF &clicked, Qt::MouseButtons buttons);
36
37 void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
38 KUndo2Command *createCommand() override;
39 void finishInteraction(Qt::KeyboardModifiers modifiers) override
40 {
41 Q_UNUSED(modifiers);
42 }
43 void paint(QPainter &painter, const KoViewConverter &converter) override;
44
45private:
46 void rotateBy(qreal angle);
47
48 QPointF m_start;
49 QTransform m_rotationMatrix;
53};
54
55#endif
56
void paint(QPainter &painter, const KoViewConverter &converter) override
ShapeRotateStrategy(KoToolBase *tool, KoSelection *selection, const QPointF &clicked, Qt::MouseButtons buttons)
QList< QTransform > m_oldTransforms
void finishInteraction(Qt::KeyboardModifiers modifiers) override
void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override
void rotateBy(qreal angle)
QList< KoShape * > m_transformedShapesAndSelection
KUndo2Command * createCommand() override
QString buttons(const T &ev)