Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_ellipse.h
Go to the documentation of this file.
1/*
2 * kis_tool_ellipse.h - part of Krayon
3 *
4 * SPDX-FileCopyrightText: 2000 John Califf <jcaliff@compuzone.net>
5 * SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
6 * SPDX-FileCopyrightText: 2004 Clarence Dang <dang@kde.org>
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef __KIS_TOOL_ELLIPSE_H__
12#define __KIS_TOOL_ELLIPSE_H__
13
14#include "kis_tool_shape.h"
15#include "kis_types.h"
19#include <kis_icon.h>
20
21
22class KoCanvasBase;
23
25{
26 Q_OBJECT
27
28public:
30 ~KisToolEllipse() override;
31
32 bool supportsPaintingAssistants() const override;
33
34protected Q_SLOTS:
35 void resetCursorStyle() override;
36
37protected:
38 void finishRect(const QRectF& rect, qreal roundCornersX, qreal roundCornersY) override;
39};
40
42{
43
44public:
46 : KisToolPaintFactoryBase("KritaShape/KisToolEllipse") {
47 setToolTip(i18n("Ellipse Tool"));
50 setIconName(koIconNameCStr("krita_tool_ellipse"));
51 setPriority(3);
52 }
53
55
57 return new KisToolEllipse(canvas);
58 }
59
60};
61
62
63#endif //__KIS_TOOL_ELLIPSE_H__
64
~KisToolEllipseFactory() override
KoToolBase * createTool(KoCanvasBase *canvas) override
~KisToolEllipse() override
bool supportsPaintingAssistants() const override
KisToolEllipse(KoCanvasBase *canvas)
void finishRect(const QRectF &rect, qreal roundCornersX, qreal roundCornersY) override
void resetCursorStyle() 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