Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/kis_tool_paint.h
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef KIS_TOOL_PAINT_H_ | 19 | #ifndef KIS_TOOL_PAINT_H_ | ||
20 | #define KIS_TOOL_PAINT_H_ | 20 | #define KIS_TOOL_PAINT_H_ | ||
21 | 21 | | |||
22 | #include <vector> | 22 | #include "kis_tool.h" | ||
23 | 23 | | |||
24 | #include <QCursor> | | |||
25 | #include <QLayout> | | |||
26 | #include <QGridLayout> | 24 | #include <QGridLayout> | ||
27 | #include <QVariant> | | |||
28 | #include <QTimer> | 25 | #include <QTimer> | ||
26 | #include <QCheckBox> | ||||
29 | 27 | | |||
30 | #include <KoCanvasResourceManager.h> | 28 | #include <KoCanvasResourceManager.h> | ||
31 | #include <KoToolBase.h> | 29 | #include <KoToolBase.h> | ||
32 | #include <resources/KoAbstractGradient.h> | 30 | #include <resources/KoAbstractGradient.h> | ||
33 | 31 | | |||
34 | #include <kritaui_export.h> | 32 | #include <kritaui_export.h> | ||
35 | 33 | | |||
36 | #include <kis_types.h> | 34 | #include <kis_types.h> | ||
37 | #include <kis_image.h> | 35 | #include <kis_image.h> | ||
38 | #include "kis_signal_compressor_with_param.h" | 36 | #include "kis_signal_compressor_with_param.h" | ||
39 | #include <brushengine/kis_paintop_settings.h> | 37 | #include <brushengine/kis_paintop_settings.h> | ||
40 | | ||||
41 | #include <resources/KoPattern.h> | 38 | #include <resources/KoPattern.h> | ||
42 | 39 | | |||
43 | #include "kis_tool.h" | | |||
44 | #include <QCheckBox> | | |||
45 | | ||||
46 | class QGridLayout; | 40 | class QGridLayout; | ||
47 | class KoCompositeOp; | 41 | class KoCompositeOp; | ||
48 | | ||||
49 | | ||||
50 | class KoCanvasBase; | 42 | class KoCanvasBase; | ||
51 | 43 | | |||
52 | | ||||
53 | class KRITAUI_EXPORT KisToolPaint : public KisTool | 44 | class KRITAUI_EXPORT KisToolPaint : public KisTool | ||
54 | { | 45 | { | ||
55 | 46 | | |||
56 | Q_OBJECT | 47 | Q_OBJECT | ||
57 | 48 | | |||
58 | public: | 49 | public: | ||
59 | KisToolPaint(KoCanvasBase * canvas, const QCursor & cursor); | 50 | KisToolPaint(KoCanvasBase *canvas, const QCursor &cursor); | ||
60 | ~KisToolPaint() override; | 51 | ~KisToolPaint() override; | ||
61 | int flags() const override; | 52 | int flags() const override; | ||
62 | 53 | | |||
63 | void mousePressEvent(KoPointerEvent *event) override; | 54 | void mousePressEvent(KoPointerEvent *event) override; | ||
64 | void mouseReleaseEvent(KoPointerEvent *event) override; | 55 | void mouseReleaseEvent(KoPointerEvent *event) override; | ||
65 | void mouseMoveEvent(KoPointerEvent *event) override; | 56 | void mouseMoveEvent(KoPointerEvent *event) override; | ||
66 | 57 | | |||
67 | protected: | 58 | protected: | ||
68 | 59 | | |||
69 | void setMode(ToolMode mode) override; | 60 | void setMode(ToolMode mode) override; | ||
70 | 61 | | |||
71 | void canvasResourceChanged(int key, const QVariant & v) override; | 62 | void canvasResourceChanged(int key, const QVariant &v) override; | ||
72 | 63 | | |||
73 | void paint(QPainter& gc, const KoViewConverter &converter) override; | 64 | void paint(QPainter &gc, const KoViewConverter &converter) override; | ||
74 | 65 | | |||
75 | void activatePrimaryAction() override; | 66 | void activatePrimaryAction() override; | ||
76 | void deactivatePrimaryAction() override; | 67 | void deactivatePrimaryAction() override; | ||
77 | 68 | | |||
78 | void activateAlternateAction(AlternateAction action) override; | 69 | void activateAlternateAction(AlternateAction action) override; | ||
79 | void deactivateAlternateAction(AlternateAction action) override; | 70 | void deactivateAlternateAction(AlternateAction action) override; | ||
80 | 71 | | |||
81 | void beginAlternateAction(KoPointerEvent *event, AlternateAction action) override; | 72 | void beginAlternateAction(KoPointerEvent *event, AlternateAction action) override; | ||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |