Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPathEnclosingProducer.h
Go to the documentation of this file.
1/*
2 * KDE. Krita Project.
3 *
4 * SPDX-FileCopyrightText: 2022 Deif Lou <ginoba@gmail.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KISPATHENCLOSINGPRODUCER
10#define KISPATHENCLOSINGPRODUCER
11
12#include <KoCreatePathTool.h>
13#include <kis_pixel_selection.h>
14#include <kis_delegated_tool.h>
15#include <kis_tool_shape.h>
16
18
20
22public:
24
25 void paintPath(KoPathShape &pathShape, QPainter &painter, const KoViewConverter &converter) override;
26 void addPathShape(KoPathShape* pathShape) override;
27 void beginShape() override;
28 void endShape() override;
29
35
36private:
38};
39
41
42class KisPathEnclosingProducer : public KisDynamicDelegateTool<DelegatedPathTool>
43{
44 Q_OBJECT
45
46public:
49
50 bool hasUserInteractionRunning() const;
51
52 void mousePressEvent(KoPointerEvent *event) override;
53 bool eventFilter(QObject *obj, QEvent *event) override;
54 void beginPrimaryAction(KoPointerEvent* event) override;
55 void continuePrimaryAction(KoPointerEvent *event) override;
56 void endPrimaryAction(KoPointerEvent *event) override;
57 void beginAlternateAction(KoPointerEvent *event, AlternateAction action) override;
58 // reimplementing KisTool's method because that method calls beginPrimaryAction
59 // which now is used to start the path tool.
61
63
64protected:
65 void requestStrokeCancellation() override;
66 void requestStrokeEnd() override;
67
68 void addPathShape(KoPathShape* pathShape);
69 void beginShape() override;
70 void endShape() override;
71
73
74Q_SIGNALS:
76
77private:
79
80protected Q_SLOTS:
81 void resetCursorStyle() override;
82};
83
84#endif
KisDelegatedTool< KisToolShape, KisToolPathLocalTool, DeselectShapesActivationPolicy > DelegatedPathTool
void beginPrimaryDoubleClickAction(KoPointerEvent *event) override
KisPathEnclosingProducer(KoCanvasBase *canvas)
void addPathShape(KoPathShape *pathShape)
void endPrimaryAction(KoPointerEvent *event) override
void mousePressEvent(KoPointerEvent *event) override
void enclosingMaskProduced(KisPixelSelectionSP enclosingMask)
void beginPrimaryAction(KoPointerEvent *event) override
void continuePrimaryAction(KoPointerEvent *event) override
KisPopupWidgetInterface * popupWidget() override
void beginAlternateAction(KoPointerEvent *event, AlternateAction action) override
bool eventFilter(QObject *obj, QEvent *event) override
The PopupWidgetInterface abstract class defines the basic interface that will be used by all popup wi...
KisPathEnclosingProducer *const m_parentTool
void addPathShape(KoPathShape *pathShape) override
KisToolPathLocalTool(KoCanvasBase *canvas, KisPathEnclosingProducer *parentTool)
void paintPath(KoPathShape &pathShape, QPainter &painter, const KoViewConverter &converter) override
QList< QPointer< QWidget > > createOptionWidgets() override
reimplemented
The position of a path point within a path shape.
Definition KoPathShape.h:63
KoCanvasBase * canvas() const
Returns the canvas the tool is working on.