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 114 of file kis_tool_utils.h.

Constructor & Destructor Documentation

◆ MoveShortcutsHelper()

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

Definition at line 416 of file kis_tool_utils.cpp.

417 : m_tool(tool)
418 {
419 }

Member Function Documentation

◆ activate()

void KisToolUtils::MoveShortcutsHelper::activate ( )
inline

Definition at line 119 of file kis_tool_utils.h.

119 {
121 }
void setInternalMoveShortcutsEnabled(bool value)

◆ cancelMoveAction()

void KisToolUtils::MoveShortcutsHelper::cancelMoveAction ( )
inline

Definition at line 131 of file kis_tool_utils.h.

131 {
133 }

◆ createActions()

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

Definition at line 421 of file kis_tool_utils.cpp.

422 {
424 QList<QAction *> actions;
425
426 actions << actionRegistry->makeQAction("movetool-move-up", actionRegistry);
427 actions << actionRegistry->makeQAction("movetool-move-down", actionRegistry);
428 actions << actionRegistry->makeQAction("movetool-move-left", actionRegistry);
429 actions << actionRegistry->makeQAction("movetool-move-right", actionRegistry);
430
431 actions << actionRegistry->makeQAction("movetool-move-up-more", actionRegistry);
432 actions << actionRegistry->makeQAction("movetool-move-down-more", actionRegistry);
433 actions << actionRegistry->makeQAction("movetool-move-left-more", actionRegistry);
434 actions << actionRegistry->makeQAction("movetool-move-right-more", actionRegistry);
435
436 return actions;
437 }
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 122 of file kis_tool_utils.h.

122 {
124 }

◆ endMoveAction()

void KisToolUtils::MoveShortcutsHelper::endMoveAction ( )
inline

Definition at line 128 of file kis_tool_utils.h.

128 {
130 }

◆ setInternalMoveShortcutsEnabled()

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

Definition at line 439 of file kis_tool_utils.cpp.

440 {
441 m_tool->action("movetool-move-up")->setEnabled(value);
442 m_tool->action("movetool-move-down")->setEnabled(value);
443 m_tool->action("movetool-move-left")->setEnabled(value);
444 m_tool->action("movetool-move-right")->setEnabled(value);
445 m_tool->action("movetool-move-up-more")->setEnabled(value);
446 m_tool->action("movetool-move-down-more")->setEnabled(value);
447 m_tool->action("movetool-move-left-more")->setEnabled(value);
448 m_tool->action("movetool-move-right-more")->setEnabled(value);
449 }
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 125 of file kis_tool_utils.h.

125 {
127 }

Member Data Documentation

◆ m_tool

KoToolBase* KisToolUtils::MoveShortcutsHelper::m_tool
private

Definition at line 141 of file kis_tool_utils.h.


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