Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_select_polygonal.h
Go to the documentation of this file.
1/*
2 * kis_tool_select_polygonal.h - part of Krayon^WKrita
3 *
4 * SPDX-FileCopyrightText: 2000 John Califf <jcaliff@compuzone.net>
5 * SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
6 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt <boud@valdyas.org>
7 * SPDX-FileCopyrightText: 2015 Michael Abrahams <miabraha@gmail.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12#ifndef KIS_TOOL_SELECT_POLYGONAL_H_
13#define KIS_TOOL_SELECT_POLYGONAL_H_
14
19#include <kis_icon.h>
20
27
28class KisToolSelectPolygonal : public KisToolSelectBase<__KisToolSelectPolygonalLocal>
29{
30 Q_OBJECT
31public:
33 void resetCursorStyle() override;
34private:
35 void finishPolyline(const QVector<QPointF> &points) override;
36 void beginShape() override;
37 void endShape() override;
38};
39
40
41
43{
44public:
46 : KisSelectionToolFactoryBase("KisToolSelectPolygonal")
47 {
48 setToolTip(i18n("Polygonal Selection Tool"));
50 setIconName(koIconNameCStr("tool_polygonal_selection"));
51 setPriority(2);
53 }
54
56
60
62 {
65
66 actions << actionRegistry->makeQAction("undo_polygon_selection", this);
67 actions << actionRegistry->makeQAction("selection_tool_mode_add", this);
68
69 return actions;
70 }
71
72
73};
74
75#endif //__selecttoolpolygonal_h__
76
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()
QList< QAction * > createActionsImpl() override
createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a va...
QList< QAction * > createActionsImpl() override
createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a va...
KoToolBase * createTool(KoCanvasBase *canvas) override
void finishPolyline(const QVector< QPointF > &points) override
KisToolSelectPolygonal(KoCanvasBase *canvas)
void setSection(const QString &section)
void setActivationShapeId(const QString &activationShapeId)
void setIconName(const char *iconName)
void setToolTip(const QString &tooltip)
void setPriority(int newPriority)
__KisToolSelectPolygonalLocal(KoCanvasBase *canvas)
#define koIconNameCStr(name)
Definition kis_icon.h:28
static const QString KRITA_TOOL_ACTIVATION_ID
Definition kis_tool.h:37
static const QString Select
Tools that select pixels.
KisCanvas2 * canvas