Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_polygon.h
Go to the documentation of this file.
1/*
2 * kis_tool_polygon.h - part of Krita
3 *
4 * SPDX-FileCopyrightText: 2004 Michael Thaler <michael Thaler@physik.tu-muenchen.de>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KIS_TOOL_POLYGON_H_
10#define KIS_TOOL_POLYGON_H_
11
12#include "kis_tool_shape.h"
15#include <kis_icon.h>
16
17class KoCanvasBase;
18
20{
21 Q_OBJECT
22
23public:
25 ~KisToolPolygon() override;
26
27 bool supportsPaintingAssistants() const override;
28
29protected:
30 void finishPolyline(const QVector<QPointF>& points) override;
31protected Q_SLOTS:
32 void resetCursorStyle() override;
33};
34
35
36#include "KoToolFactoryBase.h"
37
39{
40
41public:
43 : KisToolPolyLineFactoryBase("KisToolPolygon") {
44 setToolTip(i18n("Polygon Tool: Shift-mouseclick ends the polygon."));
47 setIconName(koIconNameCStr("krita_tool_polygon"));
48 setPriority(4);
49 }
50
52
54 return new KisToolPolygon(canvas);
55 }
56};
57
58
59#endif //__KIS_TOOL_POLYGON_H__
KoToolBase * createTool(KoCanvasBase *canvas) override
~KisToolPolygonFactory() override
void finishPolyline(const QVector< QPointF > &points) override
void resetCursorStyle() override
KisToolPolygon(KoCanvasBase *canvas)
~KisToolPolygon() override
bool supportsPaintingAssistants() const override
void setSection(const QString &section)
void setActivationShapeId(const QString &activationShapeId)
void setIconName(const char *iconName)
void setToolTip(const QString &tooltip)
void setPriority(int newPriority)
#define koIconNameCStr(name)
Definition kis_icon.h:28
static const QString KRITA_TOOL_ACTIVATION_ID
Definition kis_tool.h:37
static const QString Shape
Freehand and shapes like ellipses and lines.
KisCanvas2 * canvas