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

#include <kis_tool_select_polygonal.h>

+ Inheritance diagram for KisToolSelectPolygonalFactory:

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
 
 KisToolSelectPolygonalFactory ()
 
 ~KisToolSelectPolygonalFactory () override
 
- Public Member Functions inherited from KisSelectionToolFactoryBase
 KisSelectionToolFactoryBase (const QString &id)
 
 ~KisSelectionToolFactoryBase () override
 
- Public Member Functions inherited from KisToolPaintFactoryBase
 KisToolPaintFactoryBase (const QString &id)
 
 ~KisToolPaintFactoryBase () 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 42 of file kis_tool_select_polygonal.h.

Constructor & Destructor Documentation

◆ KisToolSelectPolygonalFactory()

KisToolSelectPolygonalFactory::KisToolSelectPolygonalFactory ( )
inline

Definition at line 45 of file kis_tool_select_polygonal.h.

46 : KisSelectionToolFactoryBase("KisToolSelectPolygonal")
47 {
48 setToolTip(i18n("Polygonal Selection Tool"));
50 setIconName(koIconNameCStr("tool_polygonal_selection"));
51 setPriority(2);
53 }
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 KRITA_TOOL_ACTIVATION_ID
Definition kis_tool.h:37
static const QString Select
Tools that select pixels.

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

◆ ~KisToolSelectPolygonalFactory()

KisToolSelectPolygonalFactory::~KisToolSelectPolygonalFactory ( )
inlineoverride

Definition at line 55 of file kis_tool_select_polygonal.h.

55{}

Member Function Documentation

◆ createActionsImpl()

QList< QAction * > KisToolSelectPolygonalFactory::createActionsImpl ( )
inlineoverridevirtual

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 KisSelectionToolFactoryBase.

Definition at line 61 of file kis_tool_select_polygonal.h.

62 {
65
66 actions << actionRegistry->makeQAction("undo_polygon_selection", this);
67 actions << actionRegistry->makeQAction("selection_tool_mode_add", this);
68
69 return actions;
70 }
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()
QList< QAction * > createActionsImpl() override
createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a va...

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

◆ createTool()

KoToolBase * KisToolSelectPolygonalFactory::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 57 of file kis_tool_select_polygonal.h.

References Private::canvas.


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