Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_mesh_transform_strategy.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_MESH_TRANSFORM_STRATEGY_H
8#define __KIS_MESH_TRANSFORM_STRATEGY_H
9
10#include <QObject>
11#include <QScopedPointer>
12
14
15class QPointF;
16class QPainter;
20class QImage;
21
22
24{
25 Q_OBJECT
26public:
28 KoSnapGuide *snapGuide,
29 ToolTransformArgs &currentArgs,
32
33
34 void setTransformFunction(const QPointF &mousePos, bool perspectiveModifierActive, bool shiftModifierActive, bool altModifierActive) override;
35 QPointF handleSnapPoint(const QPointF &imagePos) override;
36 bool shiftModifierIsUsed() const override;
37
38 void paint(QPainter &gc) override;
39 QCursor getCurrentCursor() const override;
40 void externalConfigChanged() override;
41
42 bool beginPrimaryAction(const QPointF &pt) override;
43 void continuePrimaryAction(const QPointF &pt, bool shiftModifierActive, bool altModifierActive) override;
44 bool endPrimaryAction() override;
45
49
50 bool acceptsClicks() const override;
51private:
52 bool splitHoveredSegment(const QPointF &pt);
53 bool shouldDeleteNode(qreal distance, qreal param);
55
56private:
57 Q_PRIVATE_SLOT(m_d, void recalculateTransformations());
58
59Q_SIGNALS:
62
63private:
64 struct Private;
65 const QScopedPointer<Private> m_d;
66};
67
68#endif /* __KIS_MESH_TRANSFORM_STRATEGY_H */
qreal distance(const QPointF &p1, const QPointF &p2)
void paint(QPainter &gc) override
KisMeshTransformStrategy(const KisCoordinatesConverter *converter, KoSnapGuide *snapGuide, ToolTransformArgs &currentArgs, TransformTransactionProperties &transaction)
QCursor getCurrentCursor() const override
Q_PRIVATE_SLOT(m_d, void recalculateTransformations())
bool beginPrimaryAction(const QPointF &pt) override
bool shouldDeleteNode(qreal distance, qreal param)
const QScopedPointer< Private > m_d
void continuePrimaryAction(const QPointF &pt, bool shiftModifierActive, bool altModifierActive) override
QPointF handleSnapPoint(const QPointF &imagePos) override
bool splitHoveredSegment(const QPointF &pt)
void setTransformFunction(const QPointF &mousePos, bool perspectiveModifierActive, bool shiftModifierActive, bool altModifierActive) override
bool beginPrimaryAction(KoPointerEvent *event) override
void continuePrimaryAction(KoPointerEvent *event) override