|
Krita Source Code Documentation
|
#include <KisToolKnife.h>
Inheritance diagram for KisToolKnife:Classes | |
| struct | Private |
Public Slots | |
| void | activate (const QSet< KoShape * > &shapes) override |
| KoInteractionStrategy * | createStrategy (KoPointerEvent *event) override |
| void | deactivate () override |
| bool | isValidForCurrentLayer () const |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| void | mousePressEvent (KoPointerEvent *event) |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
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 () |
Public Member Functions | |
| QWidget * | createOptionWidget () override |
| KisToolKnife (KoCanvasBase *canvas) | |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| ~KisToolKnife () override | |
Public Member Functions inherited from KoInteractionTool | |
| void | keyPressEvent (QKeyEvent *event) override |
| void | keyReleaseEvent (QKeyEvent *event) override |
| KoInteractionTool (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 |
| ~KoInteractionTool () 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 |
| 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 | |
| const QScopedPointer< Private > | m_d |
Definition at line 32 of file KisToolKnife.h.
| KisToolKnife::KisToolKnife | ( | KoCanvasBase * | canvas | ) |
Definition at line 57 of file KisToolKnife.cpp.
References KoToolBase::repaintDecorations(), and KoToolBase::useCursor().
|
override |
Definition at line 66 of file KisToolKnife.cpp.
References m_d.
Definition at line 187 of file KisToolKnife.cpp.
References KoToolBase::activate(), KisCursor::arrowCursor(), and KoToolBase::useCursor().
|
overridevirtual |
Reimplement this if your tool actually has an option widget. Sets the option widget to 0 by default.
Reimplemented from KoToolBase.
Definition at line 272 of file KisToolKnife.cpp.
References KoToolBase::canvas(), KisViewManager::canvasResourceProvider(), KisCanvas2::image(), KIS_ASSERT, m_d, KoToolBase::toolId(), KisCanvas2::viewManager(), and KisImage::xRes().
|
overrideslot |
Definition at line 251 of file KisToolKnife.cpp.
References KisToolKnifeOptionsWidget::AddGutter, KoToolBase::canvas(), m_d, KoPointerEvent::point, KoToolBase::selection(), KoCanvasBase::shapeManager(), and KoShapeManager::shapes.
|
overrideslot |
|
slot |
Definition at line 264 of file KisToolKnife.cpp.
References KoToolBase::canvas(), KisViewManager::canvasResourceProvider(), KisCanvasResourceProvider::currentNode(), KisSharedPtr< T >::data(), and KisCanvas2::viewManager().
|
overrideslot |
Definition at line 213 of file KisToolKnife.cpp.
References KisAlgebra2D::accumulateBounds(), KoPointerEvent::buttons(), KoToolBase::canvas(), m_d, KoInteractionTool::mouseMoveEvent(), KoToolBase::repaintDecorations(), and KoCanvasBase::updateCanvas().
|
slot |
Definition at line 199 of file KisToolKnife.cpp.
References KoToolBase::canvas(), isValidForCurrentLayer(), KisFloatingMessage::Medium, KoInteractionTool::mousePressEvent(), KisViewManager::showFloatingMessage(), and KisCanvas2::viewManager().
|
overrideslot |
Definition at line 235 of file KisToolKnife.cpp.
References KisAlgebra2D::accumulateBounds(), KoToolBase::canvas(), m_d, KoInteractionTool::mouseReleaseEvent(), and KoCanvasBase::updateCanvas().
|
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 139 of file KisToolKnife.cpp.
References KoShape::absoluteTransformation(), KoToolBase::canvas(), KisAlgebra2D::VectorPath::VectorPathPoint::endPoint, KIS_SAFE_ASSERT_RECOVER_RETURN, KoShape::outline(), KoInteractionTool::paint(), paintSelectedEdge(), paintSelectedPoint(), KisAlgebra2D::VectorPath::pointAt(), KisAlgebra2D::VectorPath::pointsCount(), KisAlgebra2D::VectorPath::segmentAtAsLine(), KisAlgebra2D::VectorPath::segmentsCount(), KoCanvasBase::selectedShapesProxy(), KoToolBase::selection(), and KoSelectedShapesProxy::selection().
|
private |
Definition at line 59 of file KisToolKnife.h.