Krita Source Code Documentation
Loading...
Searching...
No Matches
DefaultToolFactory.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * SPDX-FileCopyrightText: 2006-2007 Thomas Zander <zander@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
9#include "DefaultTool.h"
10
11#include <kis_action_registry.h>
12
13#include <KoIcon.h>
14#include <klocalizedstring.h>
15
25
30
34
39
41{
43
44 QList<QAction *> actions;
45 actions << actionRegistry->makeQAction("object_order_front", this);
46 actions << actionRegistry->makeQAction("object_order_raise", this);
47 actions << actionRegistry->makeQAction("object_order_lower", this);
48 actions << actionRegistry->makeQAction("object_order_back", this);
49 actions << actionRegistry->makeQAction("object_align_horizontal_left", this);
50 actions << actionRegistry->makeQAction("object_align_horizontal_center", this);
51 actions << actionRegistry->makeQAction("object_align_horizontal_right", this);
52 actions << actionRegistry->makeQAction("object_align_vertical_top", this);
53 actions << actionRegistry->makeQAction("object_align_vertical_center", this);
54 actions << actionRegistry->makeQAction("object_align_vertical_bottom", this);
55 actions << actionRegistry->makeQAction("object_distribute_horizontal_left", this);
56 actions << actionRegistry->makeQAction("object_distribute_horizontal_center", this);
57 actions << actionRegistry->makeQAction("object_distribute_horizontal_right", this);
58 actions << actionRegistry->makeQAction("object_distribute_horizontal_gaps", this);
59 actions << actionRegistry->makeQAction("object_distribute_vertical_top", this);
60 actions << actionRegistry->makeQAction("object_distribute_vertical_center", this);
61 actions << actionRegistry->makeQAction("object_distribute_vertical_bottom", this);
62 actions << actionRegistry->makeQAction("object_distribute_vertical_gaps", this);
63 actions << actionRegistry->makeQAction("object_group", this);
64 actions << actionRegistry->makeQAction("object_ungroup", this);
65 actions << actionRegistry->makeQAction("object_transform_rotate_90_cw", this);
66 actions << actionRegistry->makeQAction("object_transform_rotate_90_ccw", this);
67 actions << actionRegistry->makeQAction("object_transform_rotate_180", this);
68 actions << actionRegistry->makeQAction("object_transform_mirror_horizontally", this);
69 actions << actionRegistry->makeQAction("object_transform_mirror_vertically", this);
70 actions << actionRegistry->makeQAction("object_transform_reset", this);
71 actions << actionRegistry->makeQAction("object_unite", this);
72 actions << actionRegistry->makeQAction("object_intersect", this);
73 actions << actionRegistry->makeQAction("object_subtract", this);
74 actions << actionRegistry->makeQAction("object_split", this);
75
76 actions << actionRegistry->makeQAction("text_type_preformatted", this);
77 actions << actionRegistry->makeQAction("text_type_pre_positioned", this);
78 actions << actionRegistry->makeQAction("text_type_inline_wrap", this);
79
80 return actions;
81
82}
#define KoInteractionTool_ID
DefaultToolFactory()
constructor
KoToolBase * createTool(KoCanvasBase *canvas) override
QList< QAction * > createActionsImpl() 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 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