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

Factory for the KoZoomTool. More...

#include <KoZoomToolFactory.h>

+ Inheritance diagram for KoZoomToolFactory:

Public Member Functions

KoToolBasecreateTool (KoCanvasBase *canvas) override
 
 KoZoomToolFactory ()
 constructor
 
- 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
virtual QList< QAction * > createActionsImpl ()
 createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().
 
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

Factory for the KoZoomTool.

Definition at line 14 of file KoZoomToolFactory.h.

Constructor & Destructor Documentation

◆ KoZoomToolFactory()

KoZoomToolFactory::KoZoomToolFactory ( )

constructor

Definition at line 14 of file KoZoomToolFactory.cpp.

15 : KoToolFactoryBase("ZoomTool")
16{
17 setToolTip(i18n("Zoom"));
19 setPriority(0);
20 setIconName(koIconNameCStr("tool_zoom"));
21 setActivationShapeId("flake/always");
22}
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 Navigation
Tools that affect the canvas: pan, zoom, etc.

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

Member Function Documentation

◆ createTool()

KoToolBase * KoZoomToolFactory::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 24 of file KoZoomToolFactory.cpp.

25{
26 return new KoZoomTool(canvas);
27}
KisCanvas2 * canvas

References Private::canvas.


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