|
Krita Source Code Documentation
|
#include <kis_tool_pencil.h>
Inheritance diagram for __KisToolPencilLocalTool:Public Member Functions | |
| __KisToolPencilLocalTool (KoCanvasBase *canvas, KisToolPencil *parentTool) | |
| void | addPathShape (KoPathShape *pathShape, bool closePath) override |
| QList< QPointer< QWidget > > | createOptionWidgets () override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| virtual void | paintPath (KoPathShape *path, QPainter &painter, const KoViewConverter &converter) |
Public Member Functions inherited from KoPencilTool | |
| void | activate (const QSet< KoShape * > &shapes) override |
| void | deactivate () override |
| void | keyPressEvent (QKeyEvent *event) override |
| KoPencilTool (KoCanvasBase *canvas) | |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| void | mousePressEvent (KoPointerEvent *event) override |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| ~KoPencilTool () override | |
Public Member Functions inherited from KoToolBase | |
| QAction * | action (const QString &name) const |
| KoCanvasBase * | canvas () const |
| Returns the canvas the tool is working on. | |
| virtual void | copy () const |
| QCursor | cursor () const |
| return the last emitted cursor | |
| virtual void | customMoveEvent (KoPointerEvent *event) |
| virtual void | customPressEvent (KoPointerEvent *event) |
| virtual void | customReleaseEvent (KoPointerEvent *event) |
| virtual void | cut () |
| virtual QRectF | decorationsRect () const |
| int | decorationThickness () const |
| decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true); | |
| virtual void | deleteSelection () |
| virtual void | deselect () |
| deselect the tool should clear the selection if it has one. | |
| virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
| virtual void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| virtual void | dropEvent (QDropEvent *event, const QPointF &point) |
| virtual void | explicitUserStrokeEndRequest () |
| explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source. | |
| KoToolFactoryBase * | factory () const |
| virtual void | focusInEvent (QFocusEvent *event) |
| virtual void | focusOutEvent (QFocusEvent *event) |
| virtual bool | hasSelection () |
| virtual void | inputMethodEvent (QInputMethodEvent *event) |
| virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
| bool | isInTextMode () const |
| bool | isOpacityPresetMode () const |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| KoToolBase (KoCanvasBase *canvas) | |
| bool | maskSyntheticEvents () const |
| virtual void | mouseDoubleClickEvent (KoPointerEvent *event) |
| virtual void | mouseTripleClickEvent (KoPointerEvent *event) |
| QList< QPointer< QWidget > > | optionWidgets () |
| virtual bool | paste () |
| virtual QMenu * | popupActionsMenu () |
| virtual KisPopupWidgetInterface * | popupWidget () |
| virtual bool | selectAll () |
| selectAll select all data the tool can select. | |
| virtual KoToolSelection * | selection () |
| Q_INVOKABLE QString | toolId () const |
| virtual bool | wantsAutoScroll () const |
| ~KoToolBase () override | |
Private Attributes | |
| KisToolPencil *const | m_parentTool |
Additional Inherited Members | |
Public Slots inherited from KoToolBase | |
| virtual void | canvasResourceChanged (int key, const QVariant &res) |
| virtual void | documentResourceChanged (int key, const QVariant &res) |
| virtual void | repaintDecorations () |
| virtual void | requestRedoDuringStroke () |
| virtual void | requestStrokeCancellation () |
| virtual void | requestStrokeEnd () |
| virtual void | requestUndoDuringStroke () |
| void | setStatusText (const QString &statusText) |
| void | updateOptionsWidgetIcons () |
Signals inherited from KoToolBase | |
| void | activateTool (const QString &id) |
| void | cursorChanged (const QCursor &cursor) |
| void | selectionChanged (bool hasSelection) |
| void | statusTextChanged (const QString &statusText) |
| void | textModeChanged (bool inTextMode) |
Protected Slots inherited from KoPencilTool | |
Protected Attributes inherited from KoToolBase | |
| KoToolBasePrivate * | d_ptr |
Definition at line 23 of file kis_tool_pencil.h.
| __KisToolPencilLocalTool::__KisToolPencilLocalTool | ( | KoCanvasBase * | canvas, |
| KisToolPencil * | parentTool ) |
Definition at line 97 of file kis_tool_pencil.cc.
References KoToolBase::setIsOpacityPresetMode().
|
overridevirtual |
Add path shape to document. This method can be overridden and change the behaviour of the tool. In that case the subclass takes ownership of pathShape. It gets only called, if there are two or more points in the path.
Reimplemented from KoPencilTool.
Definition at line 126 of file kis_tool_pencil.cc.
References KoPathShape::close(), kundo2_i18n(), m_parentTool, and KoPathShape::normalize().
Reimplemented from KoToolBase.
Definition at line 39 of file KoPencilTool.cpp.
|
overridevirtual |
Called by the canvas to paint any decorations that the tool deems needed. The painter has the top left of the canvas as its origin.
| painter | used for painting the shape |
| converter | to convert between internal and view coordinates. |
Implements KoToolBase.
Definition at line 102 of file kis_tool_pencil.cc.
References m_parentTool, KoPencilTool::paint(), paintPath(), KoPencilTool::path(), and KisToolShapeUtils::StrokeStyleNone.
|
virtual |
Definition at line 113 of file kis_tool_pencil.cc.
References m_parentTool, KoPathShape::outline(), and KoShape::position().
|
overrideprotectedvirtual |
Reimplemented from KoPencilTool.
Definition at line 136 of file kis_tool_pencil.cc.
References KoPencilTool::createStroke(), m_parentTool, and KisToolPencil::updatePencilCursor().
|
private |
Definition at line 36 of file kis_tool_pencil.h.