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

#include <kis_tool_move.h>

+ Inheritance diagram for KisToolMoveFactory:

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
 
 KisToolMoveFactory ()
 
 ~KisToolMoveFactory () 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 KisToolPaintFactoryBase
QList< QAction * > createActionsImpl () override
 createActionsImpl should be reimplemented if the tool needs any actions. The actions should have a valid objectName().
 
- 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 177 of file kis_tool_move.h.

Constructor & Destructor Documentation

◆ KisToolMoveFactory()

KisToolMoveFactory::KisToolMoveFactory ( )
inline

Definition at line 181 of file kis_tool_move.h.

182 : KisToolPaintFactoryBase("KritaTransform/KisToolMove") {
183 setToolTip(i18n("Move Tool"));
186 setPriority(3);
187 setIconName(koIconNameCStr("krita_tool_move"));
188 setShortcut(QKeySequence(Qt::Key_T));
189 }
KisToolPaintFactoryBase(const QString &id)
void setShortcut(const QKeySequence &shortcut)
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 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.

◆ ~KisToolMoveFactory()

KisToolMoveFactory::~KisToolMoveFactory ( )
inlineoverride

Definition at line 191 of file kis_tool_move.h.

191{}

Member Function Documentation

◆ createActionsImpl()

QList< QAction * > KisToolMoveFactory::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 821 of file kis_tool_move.cc.

822{
825
826 actions << actionRegistry->makeQAction("movetool-move-up", this);
827 actions << actionRegistry->makeQAction("movetool-move-down", this);
828 actions << actionRegistry->makeQAction("movetool-move-left", this);
829 actions << actionRegistry->makeQAction("movetool-move-right", this);
830 actions << actionRegistry->makeQAction("movetool-move-up-more", this);
831 actions << actionRegistry->makeQAction("movetool-move-down-more", this);
832 actions << actionRegistry->makeQAction("movetool-move-left-more", this);
833 actions << actionRegistry->makeQAction("movetool-move-right-more", this);
834 actions << actionRegistry->makeQAction("movetool-show-coordinates", this);
835
836 return actions;
837
838}
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 KisToolPaintFactoryBase::createActionsImpl(), KisActionRegistry::instance(), and KisActionRegistry::makeQAction().

◆ createTool()

KoToolBase * KisToolMoveFactory::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 193 of file kis_tool_move.h.

193 {
194 return new KisToolMove(canvas);
195 }
KisCanvas2 * canvas

References Private::canvas.


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