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"));
22 setIconName(koIconNameCStr("calligraphy"));
23 setPriority(6);
24 setActivationShapeId("flake/edit");
25}
26
30
35
37{
39 QList<QAction *> actions;
40
41 actions << actionRegistry->makeQAction("calligraphy_increase_width", this);
42 actions << actionRegistry->makeQAction("calligraphy_decrease_width", this);
43 actions << actionRegistry->makeQAction("calligraphy_increase_angle", this);
44 actions << actionRegistry->makeQAction("calligraphy_decrease_angle", this);
45
46 return actions;
47}
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
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()
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 Main
Tools that only work on vector shapes.
KisCanvas2 * canvas