Krita Source Code Documentation
Loading...
Searching...
No Matches
KisToolUtils::MoveShortcutsHelper Class Reference

#include <kis_tool_utils.h>

Public Member Functions

void activate ()
 
void cancelMoveAction ()
 
void deactivate ()
 
void endMoveAction ()
 
 MoveShortcutsHelper (KoToolBase *tool)
 
void startMoveAction ()
 

Static Public Member Functions

static QList< QAction * > createActions ()
 

Private Member Functions

void setInternalMoveShortcutsEnabled (bool value)
 

Private Attributes

KoToolBasem_tool
 

Detailed Description

Definition at line 104 of file kis_tool_utils.h.

Constructor & Destructor Documentation

◆ MoveShortcutsHelper()

KisToolUtils::MoveShortcutsHelper::MoveShortcutsHelper ( KoToolBase * tool)

Definition at line 404 of file kis_tool_utils.cpp.

405 : m_tool(tool)
406 {
407 }

Member Function Documentation

◆ activate()

void KisToolUtils::MoveShortcutsHelper::activate ( )
inline

Definition at line 109 of file kis_tool_utils.h.

109 {
111 }
void setInternalMoveShortcutsEnabled(bool value)

◆ cancelMoveAction()

void KisToolUtils::MoveShortcutsHelper::cancelMoveAction ( )
inline

Definition at line 121 of file kis_tool_utils.h.

121 {
123 }

◆ createActions()

QList< QAction * > KisToolUtils::MoveShortcutsHelper::createActions ( )
static

Definition at line 409 of file kis_tool_utils.cpp.

410 {
412 QList<QAction *> actions;
413
414 actions << actionRegistry->makeQAction("movetool-move-up", actionRegistry);
415 actions << actionRegistry->makeQAction("movetool-move-down", actionRegistry);
416 actions << actionRegistry->makeQAction("movetool-move-left", actionRegistry);
417 actions << actionRegistry->makeQAction("movetool-move-right", actionRegistry);
418
419 actions << actionRegistry->makeQAction("movetool-move-up-more", actionRegistry);
420 actions << actionRegistry->makeQAction("movetool-move-down-more", actionRegistry);
421 actions << actionRegistry->makeQAction("movetool-move-left-more", actionRegistry);
422 actions << actionRegistry->makeQAction("movetool-move-right-more", actionRegistry);
423
424 return actions;
425 }
QAction * makeQAction(const QString &name, QObject *parent=0)
static KisActionRegistry * instance()

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

◆ deactivate()

void KisToolUtils::MoveShortcutsHelper::deactivate ( )
inline

Definition at line 112 of file kis_tool_utils.h.

112 {
114 }

◆ endMoveAction()

void KisToolUtils::MoveShortcutsHelper::endMoveAction ( )
inline

Definition at line 118 of file kis_tool_utils.h.

118 {
120 }

◆ setInternalMoveShortcutsEnabled()

void KisToolUtils::MoveShortcutsHelper::setInternalMoveShortcutsEnabled ( bool value)
private

Definition at line 427 of file kis_tool_utils.cpp.

428 {
429 m_tool->action("movetool-move-up")->setEnabled(value);
430 m_tool->action("movetool-move-down")->setEnabled(value);
431 m_tool->action("movetool-move-left")->setEnabled(value);
432 m_tool->action("movetool-move-right")->setEnabled(value);
433 m_tool->action("movetool-move-up-more")->setEnabled(value);
434 m_tool->action("movetool-move-down-more")->setEnabled(value);
435 m_tool->action("movetool-move-left-more")->setEnabled(value);
436 m_tool->action("movetool-move-right-more")->setEnabled(value);
437 }
float value(const T *src, size_t ch)
QAction * action(const QString &name) const

References KoToolBase::action(), m_tool, and value().

◆ startMoveAction()

void KisToolUtils::MoveShortcutsHelper::startMoveAction ( )
inline

Definition at line 115 of file kis_tool_utils.h.

115 {
117 }

Member Data Documentation

◆ m_tool

KoToolBase* KisToolUtils::MoveShortcutsHelper::m_tool
private

Definition at line 131 of file kis_tool_utils.h.


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