Krita Source Code Documentation
Loading...
Searching...
No Matches
KarbonCalligraphyToolFactory.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2007 Jan Hambrecht <jaham@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
9
10#include <KoToolRegistry.h>
11#include <kis_action_registry.h>
12
13#include <KoIcon.h>
14#include <klocalizedstring.h>
15#include <QDebug>
16
18 : KoToolFactoryBase("KarbonCalligraphyTool")
19{
20 setToolTip(i18n("Calligraphy"));
21 setToolName(i18n("Calligraphy"));
23 setIconName(koIconNameCStr("calligraphy"));
24 setPriority(6);
25 setActivationShapeId("flake/edit");
26}
27
31
36
38{
39 Q_UNUSED(toolManager);
40
42 QList<QAction *> actions;
43
44 actions << actionRegistry->makeQAction("calligraphy_increase_width", this);
45 actions << actionRegistry->makeQAction("calligraphy_decrease_width", this);
46 actions << actionRegistry->makeQAction("calligraphy_increase_angle", this);
47 actions << actionRegistry->makeQAction("calligraphy_decrease_angle", this);
48
49 return actions;
50}
KoToolBase * createTool(KoCanvasBase *canvas) override
QList< QAction * > createActionsImpl(KoToolManager *toolManager) override
createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a va...
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()
void setSection(const QString &section)
void setActivationShapeId(const QString &activationShapeId)
void setToolName(const QString &toolName)
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 Main
Tools that only work on vector shapes.
KisCanvas2 * canvas