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

#include <KarbonCalligraphyToolFactory.h>

+ Inheritance diagram for KarbonCalligraphyToolFactory:

Public Member Functions

QList< QAction * > createActionsImpl () override
 createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().
 
KoToolBasecreateTool (KoCanvasBase *canvas) override
 
 KarbonCalligraphyToolFactory ()
 
 ~KarbonCalligraphyToolFactory () override
 
- Public Member Functions inherited from KoToolFactoryBase
QString activationShapeId () const
 
QList< QAction * > createActions (KisKActionCollection *actionCollection)
 
QString iconName () const
 
QString id () const
 
 KoToolFactoryBase (const QString &id)
 
int priority () const
 
 Private (const QString &i)
 
QString section () const
 
QKeySequence shortcut () 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 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 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"));
22 setIconName(koIconNameCStr("calligraphy"));
23 setPriority(6);
24 setActivationShapeId("flake/edit");
25}
void setSection(const QString &section)
void setActivationShapeId(const QString &activationShapeId)
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(), and KoToolFactoryBase::setToolTip().

◆ ~KarbonCalligraphyToolFactory()

KarbonCalligraphyToolFactory::~KarbonCalligraphyToolFactory ( )
override

Definition at line 27 of file KarbonCalligraphyToolFactory.cpp.

28{
29}

Member Function Documentation

◆ createActionsImpl()

QList< QAction * > KarbonCalligraphyToolFactory::createActionsImpl ( )
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 36 of file KarbonCalligraphyToolFactory.cpp.

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}
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 31 of file KarbonCalligraphyToolFactory.cpp.

References Private::canvas.


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