krita/ui
KisTool Class Reference
#include <kis_tool.h>

Public Slots | |
| virtual void | activate (bool temporary=false) |
| virtual void | deactivate () |
| virtual void | resourceChanged (int key, const QVariant &res) |
Public Member Functions | |
| KisTool (KoCanvasBase *canvas, const QCursor &cursor) | |
| virtual | ~KisTool () |
| QPoint | convertToIntPixelCoord (KoPointerEvent *e) |
| QPointF | convertToPixelCoord (const QPointF &pt) |
| QPointF | convertToPixelCoord (KoPointerEvent *e) |
| QRectF | convertToPt (const QRectF &rect) |
| virtual QWidget * | createOptionWidget () |
| virtual void | mouseDoubleClickEvent (KoPointerEvent *) |
| virtual void | mouseMoveEvent (KoPointerEvent *event) |
| virtual void | mousePressEvent (KoPointerEvent *event) |
| virtual void | mouseReleaseEvent (KoPointerEvent *event) |
| virtual QWidget * | optionWidget () |
| QRectF | pixelToView (const QRectF &pixelRect) |
| QPointF | pixelToView (const QPointF &pixelCoord) |
| QPointF | pixelToView (const QPoint &pixelCoord) |
| void | setOutlineStyle (PaintMode mode) |
| void | updateCanvasPixelRect (const QRectF &pixelRect) |
| void | updateCanvasViewRect (const QRectF &viewRect) |
| QPointF | viewToPixel (const QPointF &viewCoord) |
Protected Slots | |
| virtual void | resetCursorStyle () |
Protected Member Functions | |
| KoColor | currentBgColor () |
| KoColor | currentFgColor () |
| KisFilterConfiguration * | currentGenerator () |
| KoAbstractGradient * | currentGradient () |
| KisImageWSP | currentImage () |
| KisNodeSP | currentNode () |
| KisPaintOpPresetSP | currentPaintOpPreset () |
| KisPattern * | currentPattern () |
| KisSelectionSP | currentSelection () const |
| QCursor | cursor () const |
| KisImageWSP | image () const |
| void | notifyModified () const |
| void | paintToolOutline (QPainter *painter, QPainterPath &path) |
| virtual void | setupPainter (KisPainter *painter) |
Detailed Description
Definition at line 49 of file kis_tool.h.
Constructor & Destructor Documentation
| KisTool::KisTool | ( | KoCanvasBase * | canvas, | |
| const QCursor & | cursor | |||
| ) |
Definition at line 89 of file kis_tool.cc.
| KisTool::~KisTool | ( | ) | [virtual] |
Definition at line 110 of file kis_tool.cc.
Member Function Documentation
| void KisTool::activate | ( | bool | temporary = false |
) | [virtual, slot] |
Reimplemented in KisToolPaint.
Definition at line 115 of file kis_tool.cc.
| QPoint KisTool::convertToIntPixelCoord | ( | KoPointerEvent * | e | ) |
Convert from native (postscript points) to integer image pixel coordinates.
This truncates the floating point components and should be used in preference to QPointF::toPoint(), which rounds, to ensure the cursor acts on the pixel it is visually over.
Definition at line 195 of file kis_tool.cc.
Definition at line 187 of file kis_tool.cc.
| QPointF KisTool::convertToPixelCoord | ( | KoPointerEvent * | e | ) |
Convert from native (postscript points) to image pixel coordinates.
Definition at line 179 of file kis_tool.cc.
Definition at line 211 of file kis_tool.cc.
| QWidget * KisTool::createOptionWidget | ( | ) | [virtual] |
Reimplemented in KisToolPaint, and KisToolShape.
Definition at line 365 of file kis_tool.cc.
| KoColor KisTool::currentBgColor | ( | ) | [protected] |
Definition at line 319 of file kis_tool.cc.
| KoColor KisTool::currentFgColor | ( | ) | [protected] |
Definition at line 314 of file kis_tool.cc.
| KisFilterConfiguration * KisTool::currentGenerator | ( | ) | [protected] |
Definition at line 329 of file kis_tool.cc.
| KoAbstractGradient * KisTool::currentGradient | ( | ) | [protected] |
Definition at line 299 of file kis_tool.cc.
| KisImageWSP KisTool::currentImage | ( | ) | [protected] |
Definition at line 324 of file kis_tool.cc.
| KisNodeSP KisTool::currentNode | ( | ) | [protected] |
Definition at line 309 of file kis_tool.cc.
| KisPaintOpPresetSP KisTool::currentPaintOpPreset | ( | ) | [protected] |
Definition at line 304 of file kis_tool.cc.
| KisPattern * KisTool::currentPattern | ( | ) | [protected] |
Definition at line 294 of file kis_tool.cc.
| KisSelectionSP KisTool::currentSelection | ( | ) | const [protected] |
- Returns:
- the currently active selection
Definition at line 274 of file kis_tool.cc.
| QCursor KisTool::cursor | ( | ) | const [protected] |
Definition at line 269 of file kis_tool.cc.
| void KisTool::deactivate | ( | ) | [virtual, slot] |
Definition at line 143 of file kis_tool.cc.
| KisImageWSP KisTool::image | ( | ) | const [protected] |
Definition at line 257 of file kis_tool.cc.
| virtual void KisTool::mouseDoubleClickEvent | ( | KoPointerEvent * | ) | [inline, virtual] |
reimplemented from superclass
Definition at line 81 of file kis_tool.h.
| void KisTool::mouseMoveEvent | ( | KoPointerEvent * | event | ) | [virtual] |
reimplemented from superclass
Reimplemented in KisToolFreehand.
Definition at line 339 of file kis_tool.cc.
| void KisTool::mousePressEvent | ( | KoPointerEvent * | event | ) | [virtual] |
reimplemented from superclass
Reimplemented in KisToolFreehand.
Definition at line 334 of file kis_tool.cc.
| void KisTool::mouseReleaseEvent | ( | KoPointerEvent * | event | ) | [virtual] |
reimplemented from superclass
Reimplemented in KisToolFreehand, and KisToolPaint.
Definition at line 344 of file kis_tool.cc.
| void KisTool::notifyModified | ( | ) | const [protected] |
Call this to set the document modified.
Definition at line 286 of file kis_tool.cc.
| QWidget * KisTool::optionWidget | ( | ) | [virtual] |
Definition at line 372 of file kis_tool.cc.
| void KisTool::paintToolOutline | ( | QPainter * | painter, | |
| QPainterPath & | path | |||
| ) | [protected] |
paint the path which is in view coordinates, default paint mode is XOR_MODE, BW_MODE is also possible
Definition at line 378 of file kis_tool.cc.
Convert a pixel rectangle into a view rectangle.
Definition at line 238 of file kis_tool.cc.
Convert a floating point pixel coordinate into a view coordinate.
Definition at line 230 of file kis_tool.cc.
Convert an integer pixel coordinate into a view coordinate.
The view coordinate is at the centre of the pixel.
Definition at line 222 of file kis_tool.cc.
| void KisTool::resetCursorStyle | ( | ) | [protected, virtual, slot] |
Called whenever the configuration settings change.
Reimplemented in KisToolPaint.
Definition at line 405 of file kis_tool.cc.
| void KisTool::resourceChanged | ( | int | key, | |
| const QVariant & | res | |||
| ) | [virtual, slot] |
Reimplemented in KisToolPaint.
Definition at line 147 of file kis_tool.cc.
| void KisTool::setOutlineStyle | ( | PaintMode | mode | ) | [inline] |
Definition at line 116 of file kis_tool.h.
| void KisTool::setupPainter | ( | KisPainter * | painter | ) | [protected, virtual] |
convenience method to fill the painter's settings with all the current resources
Reimplemented in KisToolShape.
Definition at line 349 of file kis_tool.cc.
| void KisTool::updateCanvasPixelRect | ( | const QRectF & | pixelRect | ) |
Update the canvas for the given rectangle in image pixel coordinates.
Definition at line 247 of file kis_tool.cc.
| void KisTool::updateCanvasViewRect | ( | const QRectF & | viewRect | ) |
Update the canvas for the given rectangle in view coordinates.
Definition at line 252 of file kis_tool.cc.
Definition at line 203 of file kis_tool.cc.
The documentation for this class was generated from the following files:
