|
Krita Source Code Documentation
|
#include <kis_tool_select_path.h>
Inheritance diagram for __KisToolSelectPathLocalTool:Public Member Functions | |
| __KisToolSelectPathLocalTool (KoCanvasBase *canvas, KisToolSelectPath *parentTool) | |
| void | addPathShape (KoPathShape *pathShape) override |
| void | cancelPath () |
| QList< QPointer< QWidget > > | createOptionWidgets () override |
| reimplemented | |
| void | endPath () |
| void | endPathWithoutLastPoint () |
| void | paintPath (KoPathShape &path, QPainter &painter, const KoViewConverter &converter) override |
| void | removeLastPoint () |
Public Member Functions inherited from KoCreatePathTool | |
| QRectF | decorationsRect () const override |
| KoCreatePathTool (KoCanvasBase *canvas) | |
| void | mouseDoubleClickEvent (KoPointerEvent *event) override |
| reimplemented | |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| reimplemented | |
| void | mousePressEvent (KoPointerEvent *event) override |
| reimplemented | |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| reimplemented | |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| reimplemented | |
| bool | pathStarted () const |
| void | setEnableClosePathShortcut (bool value) |
| bool | tryMergeInPathShape (KoPathShape *pathShape) |
| ~KoCreatePathTool () 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 () |
| 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 | keyPressEvent (QKeyEvent *event) |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| KoToolBase (KoCanvasBase *canvas) | |
| bool | maskSyntheticEvents () const |
| 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 Member Functions | |
| void | beginShape () override |
| void | endShape () override |
Private Attributes | |
| KisToolSelectPath *const | m_selectionTool |
Additional Inherited Members | |
Public Slots inherited from KoCreatePathTool | |
| void | activate (const QSet< KoShape * > &shapes) override |
| reimplemented | |
| void | canvasResourceChanged (int key, const QVariant &res) override |
| reimplemented | |
| void | deactivate () override |
| reimplemented | |
Public Slots inherited from KoToolBase | |
| virtual void | activate (const QSet< KoShape * > &shapes) |
| virtual void | canvasResourceChanged (int key, const QVariant &res) |
| virtual void | deactivate () |
| 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 KoCreatePathTool | |
| void | sigUpdateAutoSmoothCurvesGUI (bool value) |
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 Member Functions inherited from KoCreatePathTool | |
| bool | addPathShapeImpl (KoPathShape *pathShape, bool tryMergeOnly) |
| void | cancelPath () |
| QList< QPointer< QWidget > > | createOptionWidgets () override |
| reimplemented | |
| void | endPath () |
| void | endPathWithoutLastPoint () |
| void | handleMouseMove (const KoPointerEvent *event, bool considerDrag) |
| void | removeLastPoint () |
Protected Member Functions inherited from KoToolBase | |
| virtual QWidget * | createOptionWidget () |
| int | grabSensitivity () const |
| Convenience function to get the current grab sensitivity. | |
| qreal | handleDocRadius () const |
| QRectF | handleGrabRect (const QPointF &position) const |
| QRectF | handlePaintRect (const QPointF &position) const |
| int | handleRadius () const |
| Convenience function to get the current handle radius. | |
| bool | isActivated () const |
| KoToolBase (KoToolBasePrivate &dd) | |
| KoPointerEvent * | lastDeliveredPointerEvent () const |
| void | setAbstractResource (KoAbstractCanvasResourceInterfaceSP abstractResource) |
| void | setConverter (KoDerivedResourceConverterSP converter) |
| void | setIsOpacityPresetMode (bool value) |
| void | setMaskSyntheticEvents (bool value) |
| void | setTextMode (bool value) |
| QHash< int, KoAbstractCanvasResourceInterfaceSP > | toolAbstractResources () |
| QHash< int, KoDerivedResourceConverterSP > | toolConverters () |
| void | useCursor (const QCursor &cursor) |
Protected Attributes inherited from KoToolBase | |
| KoToolBasePrivate * | d_ptr |
Definition at line 22 of file kis_tool_select_path.h.
| __KisToolSelectPathLocalTool::__KisToolSelectPathLocalTool | ( | KoCanvasBase * | canvas, |
| KisToolSelectPath * | parentTool ) |
Definition at line 127 of file kis_tool_select_path.cc.
References KoCreatePathTool::setEnableClosePathShortcut().
|
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 KoCreatePathTool.
Definition at line 146 of file kis_tool_select_path.cc.
References KisSelectionToolHelper::addSelectionShape(), KisToolSelectBase< BaseClass >::antiAliasSelection(), KisProcessingApplicator::applyCommand(), KoToolBase::canvas(), KoPathShape::close(), KisPaintDevice::colorSpace(), KisProcessingApplicator::end(), KisToolSelectBase< BaseClass >::featherSelection(), KisPainter::fillPainterPath(), KisPainter::FillStyleForegroundColor, KisToolSelectBase< BaseClass >::growSelection(), KisCanvas2::image(), KisPixelSelection::invalidateOutlineCache(), kundo2_i18n(), m_selectionTool, KisProcessingApplicator::NONE, KoPathShape::normalize(), KoPathShape::outline(), PIXEL_SELECTION, KoShape::position(), KisFeatherSelectionFilter::process(), KisGrowSelectionFilter::process(), KisShrinkSelectionFilter::process(), KisPixelSelection::selectedRect(), KisViewManager::selection(), KisToolSelectBase< BaseClass >::selectionAction(), KisToolSelectBase< BaseClass >::selectionMode(), KisSelectionToolHelper::selectPixelSelection(), KisStrokeJobData::SEQUENTIAL, KisPainter::setAntiAliasPolygonFill(), KisPainter::setFillStyle(), KisPixelSelection::setOutlineCache(), KisPainter::setPaintColor(), KisPainter::setStrokeStyle(), KisPainter::StrokeStyleNone, KisSelectionToolHelper::tryOverrideSelectionMode(), KisCanvas2::viewManager(), KisImage::xRes(), and KisImage::yRes().
|
overrideprivatevirtual |
Use these methods in subclassed to notify when the user starts and finishes making a shape, and override to be notified
Reimplemented from KoCreatePathTool.
Definition at line 240 of file kis_tool_select_path.cc.
References KisToolSelectBase< BaseClass >::beginSelectInteraction(), KIS_ASSERT, and m_selectionTool.
| void KoCreatePathTool::cancelPath | ( | ) |
Definition at line 97 of file KoCreatePathTool.cpp.
reimplemented
Reimplemented from KoToolBase.
Definition at line 103 of file KoCreatePathTool.cpp.
| void KoCreatePathTool::endPath | ( | ) |
Definition at line 95 of file KoCreatePathTool.cpp.
| void KoCreatePathTool::endPathWithoutLastPoint | ( | ) |
Definition at line 96 of file KoCreatePathTool.cpp.
|
overrideprivatevirtual |
Reimplemented from KoCreatePathTool.
Definition at line 247 of file kis_tool_select_path.cc.
References KisToolSelectBase< BaseClass >::endSelectInteraction(), KIS_ASSERT, and m_selectionTool.
|
overridevirtual |
This method is called to paint the path. Decorations are drawn by KoCreatePathTool afterwards.
Reimplemented from KoCreatePathTool.
Definition at line 133 of file kis_tool_select_path.cc.
References KoToolBase::canvas(), KisCanvas2::image(), m_selectionTool, KoPathShape::outline(), KoShape::position(), KisImage::xRes(), and KisImage::yRes().
| void KoCreatePathTool::removeLastPoint | ( | ) |
Definition at line 98 of file KoCreatePathTool.cpp.
|
private |
Definition at line 35 of file kis_tool_select_path.h.