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

#include <kis_tool_pan.h>

+ Inheritance diagram for KisToolPanFactory:

Public Member Functions

QList< QAction * > createActionsImpl () override
 createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().
 
KoToolBase * createTool (KoCanvasBase *canvas) override
 
 KisToolPanFactory ()
 
 ~KisToolPanFactory () 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 40 of file kis_tool_pan.h.

Constructor & Destructor Documentation

◆ KisToolPanFactory()

KisToolPanFactory::KisToolPanFactory ( )

Definition at line 92 of file kis_tool_pan.cpp.

93 : KoToolFactoryBase("PanTool")
94{
95 setToolTip(i18n("Pan Tool"));
98 setPriority(2);
99 setIconName(koIconNameCStr("tool_pan"));
100}
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 Navigation
Tools that affect the canvas: pan, zoom, etc.

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

◆ ~KisToolPanFactory()

KisToolPanFactory::~KisToolPanFactory ( )
override

Definition at line 102 of file kis_tool_pan.cpp.

103{
104}

Member Function Documentation

◆ createActionsImpl()

QList< QAction * > KisToolPanFactory::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 106 of file kis_tool_pan.cpp.

107{
110
111 actions << actionRegistry->makeQAction("movetool-move-up", this);
112 actions << actionRegistry->makeQAction("movetool-move-down", this);
113 actions << actionRegistry->makeQAction("movetool-move-left", this);
114 actions << actionRegistry->makeQAction("movetool-move-right", this);
115
116 return actions;
117}
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()
virtual QList< QAction * > createActionsImpl()
createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a va...

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

◆ createTool()

KoToolBase * KisToolPanFactory::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 119 of file kis_tool_pan.cpp.

120{
121 return new KisToolPan(canvas);
122}
KisCanvas2 * canvas

References Private::canvas.


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