|
Krita Source Code Documentation
|
#include <kis_tool_proxy.h>
Inheritance diagram for KisToolProxy:Public Types | |
| enum | ActionState { BEGIN , CONTINUE , END } |
Signals | |
| void | toolPrimaryActionActivated (bool activated) |
Signals inherited from KoToolProxy | |
| void | selectionChanged (bool hasSelection) |
| void | toolChanged (const QString &toolId) |
Public Member Functions | |
| void | activateToolAction (KisTool::ToolAction action) |
| bool | alternateActionSupportsHiResEvents (KisTool::AlternateAction action) const |
| void | deactivateToolAction (KisTool::ToolAction action) |
| bool | forwardEvent (ActionState state, KisTool::ToolAction action, QEvent *event, QEvent *originalEvent) |
| void | forwardHoverEvent (QEvent *event) |
| void | initializeImage (KisImageSP image) |
| KisToolProxy (KoCanvasBase *canvas, QObject *parent=0) | |
| bool | primaryActionSupportsHiResEvents () const |
| void | setActiveTool (KoToolBase *tool) override |
| Set the new active tool. | |
| bool | supportsPaintingAssistants () const |
Public Member Functions inherited from KoToolProxy | |
| void | copy () const |
| Forwarded to the current KoToolBase. | |
| void | cut () |
| Forwarded to the current KoToolBase. | |
| void | deleteSelection () |
| Forwarded to the current KoToolBase. | |
| void | deselect () |
| Forwarded to the current KoToolBase. | |
| void | dragLeaveEvent (QDragLeaveEvent *event) |
| Forwarded to the current KoToolBase. | |
| void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | dropEvent (QDropEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | explicitUserStrokeEndRequest () |
| Forwarded to the current KoToolBase. | |
| void | focusInEvent (QFocusEvent *event) |
| Forwarded to the current KoToolBase. | |
| void | focusOutEvent (QFocusEvent *event) |
| Forwarded to the current KoToolBase. | |
| bool | hasSelection () const |
| returns true if the current tool holds a selection | |
| void | inputMethodEvent (QInputMethodEvent *event) |
| Forwarded to the current KoToolBase. | |
| QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
| Forwarded to the current KoToolBase. | |
| void | keyPressEvent (QKeyEvent *event) |
| Forwarded to the current KoToolBase. | |
| void | keyReleaseEvent (QKeyEvent *event) |
| Forwarded to the current KoToolBase. | |
| KoToolProxy (KoCanvasBase *canvas, QObject *parent=0) | |
| KoPointerEvent * | lastDeliveredPointerEvent () const |
| void | mouseDoubleClickEvent (KoPointerEvent *event) |
| void | mouseDoubleClickEvent (QMouseEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | mouseMoveEvent (KoPointerEvent *event) |
| void | mouseMoveEvent (QMouseEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | mousePressEvent (KoPointerEvent *event) |
| void | mousePressEvent (QMouseEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | mouseReleaseEvent (KoPointerEvent *event) |
| void | mouseReleaseEvent (QMouseEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| void | paint (QPainter &painter, const KoViewConverter &converter) |
| Forwarded to the current KoToolBase. | |
| bool | paste () |
| Forwarded to the current KoToolBase. | |
| QMenu * | popupActionsMenu () |
| Forwarded to the current KoToolBase. | |
| KisPopupWidgetInterface * | popupWidget () |
| Forwarded to the current KoToolBase. | |
| KoToolProxyPrivate * | priv () |
| void | processEvent (QEvent *) const |
| void | repaintDecorations () |
| Forwarded to the current KoToolBase. | |
| bool | selectAll () |
| Forwarded to the current KoToolBase. | |
| void | tabletEvent (QTabletEvent *event, const QPointF &point) |
| Forwarded to the current KoToolBase. | |
| QVector< QKeySequence > | toolPriorityShortcuts () const |
| void | touchEvent (QTouchEvent *event, const QPointF &point) |
| ~KoToolProxy () override | |
Protected Member Functions | |
| QPointF | documentToWidget (const QPointF &documentPoint) const override |
| QPointF | widgetToDocument (const QPointF &widgetPoint) const override |
Protected Member Functions inherited from KoToolProxy | |
| KoCanvasBase * | canvas () const |
Private Member Functions | |
| KoPointerEvent | convertEventToPointerEvent (QEvent *event, const QPointF &docPoint, bool *result) |
| void | forwardToTool (ActionState state, KisTool::ToolAction action, QEvent *event, const QPointF &docPoint) |
| QPointF | tabletToDocument (const QPointF &globalPos) |
Private Attributes | |
| bool | m_isActionActivated |
| KisTool::ToolAction | m_lastAction |
Additional Inherited Members | |
Protected Slots inherited from KoToolProxy | |
| void | requestRedoDuringStroke () |
| Forwarded to the current KoToolBase. | |
| void | requestStrokeCancellation () |
| Forwarded to the current KoToolBase. | |
| void | requestStrokeEnd () |
| Forwarded to the current KoToolBase. | |
| void | requestUndoDuringStroke () |
| Forwarded to the current KoToolBase. | |
Definition at line 15 of file kis_tool_proxy.h.
| Enumerator | |
|---|---|
| BEGIN | Beginning an action |
| CONTINUE | Continuing an action |
| END | Ending an action |
Definition at line 19 of file kis_tool_proxy.h.
| KisToolProxy::KisToolProxy | ( | KoCanvasBase * | canvas, |
| QObject * | parent = 0 ) |
Definition at line 14 of file kis_tool_proxy.cpp.
| void KisToolProxy::activateToolAction | ( | KisTool::ToolAction | action | ) |
Definition at line 235 of file kis_tool_proxy.cpp.
References KisTool::actionToAlternateAction(), KisTool::activateAlternateAction(), KisTool::activatePrimaryAction(), KoToolProxyPrivate::activeTool, m_isActionActivated, m_lastAction, KisTool::Primary, and KoToolProxy::priv().
| bool KisToolProxy::alternateActionSupportsHiResEvents | ( | KisTool::AlternateAction | action | ) | const |
Definition at line 216 of file kis_tool_proxy.cpp.
References KoToolProxyPrivate::activeTool, KisTool::alternateActionSupportsHiResEvents(), and KoToolProxy::priv().
|
private |
Definition at line 51 of file kis_tool_proxy.cpp.
References KoToolProxy::tabletEvent(), and KoToolProxy::touchEvent().
| void KisToolProxy::deactivateToolAction | ( | KisTool::ToolAction | action | ) |
Definition at line 251 of file kis_tool_proxy.cpp.
References KisTool::actionToAlternateAction(), KoToolProxyPrivate::activeTool, KisTool::deactivateAlternateAction(), KisTool::deactivatePrimaryAction(), m_isActionActivated, m_lastAction, KisTool::Primary, and KoToolProxy::priv().
|
overrideprotectedvirtual |
Implements KoToolProxy.
Definition at line 43 of file kis_tool_proxy.cpp.
References KoToolProxy::canvas(), KisCanvas2::coordinatesConverter, and KisCoordinatesConverter::documentToWidget().
| bool KisToolProxy::forwardEvent | ( | ActionState | state, |
| KisTool::ToolAction | action, | ||
| QEvent * | event, | ||
| QEvent * | originalEvent ) |
Forwards the event to the active tool and returns true if the event was not ignored. That is by default the event is considered accepted, but the tool can explicitly ignore it.
| state | beginning, continuing, or ending the action. |
| action | alternate tool action requested. |
| event | the event being sent to the tool by the AbstractInputAction. |
| originalEvent | the original event received by the AbstractInputAction. |
Definition at line 118 of file kis_tool_proxy.cpp.
References forwardToTool(), KoToolProxy::keyPressEvent(), KoToolProxy::keyReleaseEvent(), KoToolProxy::mouseDoubleClickEvent(), KoToolProxy::mouseMoveEvent(), KoToolProxy::mousePressEvent(), KoToolProxy::mouseReleaseEvent(), KoToolProxy::tabletEvent(), KoToolProxy::touchEvent(), and widgetToDocument().
| void KisToolProxy::forwardHoverEvent | ( | QEvent * | event | ) |
Definition at line 93 of file kis_tool_proxy.cpp.
References KoToolProxy::mouseMoveEvent(), KoToolProxy::tabletEvent(), and widgetToDocument().
|
private |
Definition at line 167 of file kis_tool_proxy.cpp.
References KisTool::actionToAlternateAction(), KoToolProxyPrivate::activeTool, BEGIN, KisTool::beginAlternateAction(), KisTool::beginAlternateDoubleClickAction(), KisTool::beginPrimaryAction(), KisTool::beginPrimaryDoubleClickAction(), CONTINUE, KisTool::continueAlternateAction(), KisTool::continuePrimaryAction(), convertEventToPointerEvent(), END, KisTool::endAlternateAction(), KisTool::endPrimaryAction(), KisTool::Primary, KoToolProxy::priv(), and toolPrimaryActionActivated().
| void KisToolProxy::initializeImage | ( | KisImageSP | image | ) |
Definition at line 21 of file kis_tool_proxy.cpp.
References connect(), KoToolProxy::requestRedoDuringStroke(), KoToolProxy::requestStrokeCancellation(), KoToolProxy::requestStrokeEnd(), and KoToolProxy::requestUndoDuringStroke().
| bool KisToolProxy::primaryActionSupportsHiResEvents | ( | ) | const |
Definition at line 210 of file kis_tool_proxy.cpp.
References KoToolProxyPrivate::activeTool, KisTool::primaryActionSupportsHiResEvents(), and KoToolProxy::priv().
|
overridevirtual |
Set the new active tool.
Reimplemented from KoToolProxy.
Definition at line 222 of file kis_tool_proxy.cpp.
References activateToolAction(), deactivateToolAction(), m_isActionActivated, m_lastAction, and KoToolProxy::setActiveTool().
| bool KisToolProxy::supportsPaintingAssistants | ( | ) | const |
Definition at line 267 of file kis_tool_proxy.cpp.
References KoToolProxyPrivate::activeTool, KoToolProxy::priv(), and KisTool::supportsPaintingAssistants().
|
private |
Definition at line 29 of file kis_tool_proxy.cpp.
References KoToolProxy::canvas(), and widgetToDocument().
|
signal |
|
overrideprotectedvirtual |
Implements KoToolProxy.
Definition at line 35 of file kis_tool_proxy.cpp.
References KoToolProxy::canvas(), KisCanvas2::coordinatesConverter, and KisCoordinatesConverter::widgetToDocument().
|
private |
Definition at line 63 of file kis_tool_proxy.h.
|
private |
Definition at line 64 of file kis_tool_proxy.h.