Krita Source Code Documentation
Loading...
Searching...
No Matches
KarbonCalligraphyToolFactory Class Reference

#include <KarbonCalligraphyToolFactory.h>

+ Inheritance diagram for KarbonCalligraphyToolFactory:

Public Member Functions

QList< QAction * > createActionsImpl (KoToolManager *toolManager) override
 createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().
 
KoToolBase * createTool (KoCanvasBase *canvas) override
 
 KarbonCalligraphyToolFactory ()
 
 ~KarbonCalligraphyToolFactory () override
 
- Public Member Functions inherited from KoToolFactoryBase
QString activationShapeId () const
 
QList< QAction * > createActions (KisKActionCollection *actionCollection, KoToolManager *toolManager)
 
QString iconName () const
 
QString id () const
 
 KoToolFactoryBase (const QString &id)
 
int priority () const
 
 Private (const QString &i)
 
QString section () const
 
QKeySequence shortcut () const
 
QString toolName () const
 
QString toolTip () const
 
virtual ~KoToolFactoryBase ()
 

Additional Inherited Members

- Public Attributes inherited from KoToolFactoryBase
QString activationId
 
QString iconName
 
const QString id
 
int priority
 
QString section
 
QKeySequence shortcut
 
QString toolName
 
QString tooltip
 
- Protected Member Functions inherited from KoToolFactoryBase
void setActivationShapeId (const QString &activationShapeId)
 
void setIconName (const char *iconName)
 
void setIconName (const QString &iconName)
 
void setPriority (int newPriority)
 
void setSection (const QString &section)
 
void setShortcut (const QKeySequence &shortcut)
 
void setToolName (const QString &toolName)
 
void setToolTip (const QString &tooltip)
 

Detailed Description

Definition at line 12 of file KarbonCalligraphyToolFactory.h.

Constructor & Destructor Documentation

◆ KarbonCalligraphyToolFactory()

KarbonCalligraphyToolFactory::KarbonCalligraphyToolFactory ( )

Definition at line 17 of file KarbonCalligraphyToolFactory.cpp.

18 : KoToolFactoryBase("KarbonCalligraphyTool")
19{
20 setToolTip(i18n("Calligraphy"));
21 setToolName(i18n("Calligraphy"));
23 setIconName(koIconNameCStr("calligraphy"));
24 setPriority(6);
25 setActivationShapeId("flake/edit");
26}
void setSection(const QString &section)
void setActivationShapeId(const QString &activationShapeId)
void setToolName(const QString &toolName)
void setIconName(const char *iconName)
KoToolFactoryBase(const QString &id)
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.

References koIconNameCStr, ToolBoxSection::Main, KoToolFactoryBase::setActivationShapeId(), KoToolFactoryBase::setIconName(), KoToolFactoryBase::setPriority(), KoToolFactoryBase::setSection(), KoToolFactoryBase::setToolName(), and KoToolFactoryBase::setToolTip().

◆ ~KarbonCalligraphyToolFactory()

KarbonCalligraphyToolFactory::~KarbonCalligraphyToolFactory ( )
override

Definition at line 28 of file KarbonCalligraphyToolFactory.cpp.

29{
30}

Member Function Documentation

◆ createActionsImpl()

QList< QAction * > KarbonCalligraphyToolFactory::createActionsImpl ( KoToolManager * toolManager)
overridevirtual

createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().

Returns
the list of actions this tool wishes to be available.

Reimplemented from KoToolFactoryBase.

Definition at line 37 of file KarbonCalligraphyToolFactory.cpp.

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}
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()

References KisActionRegistry::instance(), and KisActionRegistry::makeQAction().

◆ createTool()

KoToolBase * KarbonCalligraphyToolFactory::createTool ( KoCanvasBase * canvas)
overridevirtual

Instantiate a new tool

Parameters
canvasthe canvas that the new tool will work on. Should be passed to the constructor of the tool.
Returns
a new KoToolBase instance, or zero if the tool doesn't want to show up.

Implements KoToolFactoryBase.

Definition at line 32 of file KarbonCalligraphyToolFactory.cpp.

References Private::canvas.


The documentation for this class was generated from the following files: