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

#include <kis_tool_crop.h>

+ Inheritance diagram for KisToolCropFactory:

Public Member Functions

KoToolBasecreateTool (KoCanvasBase *canvas) override
 
 KisToolCropFactory ()
 
 ~KisToolCropFactory () 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
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

Definition at line 209 of file kis_tool_crop.h.

Constructor & Destructor Documentation

◆ KisToolCropFactory()

KisToolCropFactory::KisToolCropFactory ( )
inline

Definition at line 213 of file kis_tool_crop.h.

214 : KoToolFactoryBase("KisToolCrop") {
215 setToolTip(i18n("Crop Tool"));
218 setPriority(11);
219 setIconName(koIconNameCStr("tool_crop"));
220 setShortcut(QKeySequence("C"));
221 }
void setShortcut(const QKeySequence &shortcut)
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 KRITA_TOOL_ACTIVATION_ID
Definition kis_tool.h:37
static const QString Transform
Tools that transform the layer.

References koIconNameCStr, KRITA_TOOL_ACTIVATION_ID, KoToolFactoryBase::setActivationShapeId(), KoToolFactoryBase::setIconName(), KoToolFactoryBase::setPriority(), KoToolFactoryBase::setSection(), KoToolFactoryBase::setShortcut(), KoToolFactoryBase::setToolTip(), and ToolBoxSection::Transform.

◆ ~KisToolCropFactory()

KisToolCropFactory::~KisToolCropFactory ( )
inlineoverride

Definition at line 223 of file kis_tool_crop.h.

223{}

Member Function Documentation

◆ createTool()

KoToolBase * KisToolCropFactory::createTool ( KoCanvasBase * canvas)
inlineoverridevirtual

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 225 of file kis_tool_crop.h.

225 {
226 return new KisToolCrop(canvas);
227 }
KisCanvas2 * canvas

References Private::canvas.


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