krita
KisCanvasController Class Reference
#include <kis_canvas_controller.h>
Inheritance diagram for KisCanvasController:

Detailed Description
Interface for classes that implement a canvas; i.e., a widget where KisImages are painted onto.This is the "view" part of the model-view-controller paradigm; the naming is a confusing historical artefact.
Definition at line 39 of file kis_canvas_controller.h.
Public Member Functions | |
KisCanvasController () | |
virtual | ~KisCanvasController () |
virtual KisCanvas * | kiscanvas () const =0 |
virtual Q_INT32 | horzValue () const =0 |
virtual Q_INT32 | vertValue () const =0 |
virtual void | scrollTo (Q_INT32 x, Q_INT32 y)=0 |
virtual void | updateCanvas ()=0 |
virtual void | updateCanvas (Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)=0 |
virtual void | updateCanvas (const QRect &rc)=0 |
virtual void | zoomIn ()=0 |
virtual void | zoomIn (Q_INT32 x, Q_INT32 y)=0 |
virtual void | zoomOut ()=0 |
virtual void | zoomOut (Q_INT32 x, Q_INT32 y)=0 |
virtual void | zoomAroundPoint (double x, double y, double zf)=0 |
virtual void | zoomTo (Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)=0 |
virtual void | zoomTo (const QRect &r)=0 |
virtual void | zoomTo (const KisRect &r)=0 |
virtual QPoint | viewToWindow (const QPoint &pt)=0 |
virtual KisPoint | viewToWindow (const KisPoint &pt)=0 |
virtual QRect | viewToWindow (const QRect &rc)=0 |
virtual KisRect | viewToWindow (const KisRect &rc)=0 |
virtual void | viewToWindow (Q_INT32 *x, Q_INT32 *y)=0 |
virtual QPoint | windowToView (const QPoint &pt)=0 |
virtual KisPoint | windowToView (const KisPoint &pt)=0 |
virtual QRect | windowToView (const QRect &rc)=0 |
virtual KisRect | windowToView (const KisRect &rc)=0 |
virtual void | windowToView (Q_INT32 *x, Q_INT32 *y)=0 |
virtual QCursor | setCanvasCursor (const QCursor &cursor)=0 |
virtual void | setInputDevice (KisInputDevice inputDevice)=0 |
virtual KisInputDevice | currentInputDevice () const =0 |
Member Function Documentation
|
|
|
|
|
|
|
Sets the horizontal and vertical scrollbars to the specified values.
|
|
Set the cursor shown when the pointer is over the canvas widget to the specified cursor.
|
|
Set the active input device to the specified input device, This could be a mouse, a stylus, an eraser or any other pointing input device.
|
|
Tell the canvas repaint the specified rectangle. The coordinates are image coordinates, not view coordinates. |
|
Tell the canvas to repaint the rectangle defined by x, y, w and h. The coordinates are image coordinates. |
|
Tell all of the canvas to repaint itself.
|
|
|
|
Conversion functions from view coordinates to image coordinates. You can get the rectangle of the image that's visible using the viewToWindow() functions (KisCanvasController). E.g. viewToWindow(QRect(0, 0, canvasWidth, canvasHeight)). Here, the view is the canvas widget in the view widget, and the window is the window on the image. |
|
Conversion functions from image coordinates to view coordinates.
|
|
To centre the view on the given point with the given zoom factor.
|
|
Increase the zoomlevel one step and make sure that x,y is the center point of the view.
|
|
Increase the zoomlevel one step.
|
|
Decrease the zoomlevel one step and make sure that x,y is the center point of the view.
|
|
Decrease the zoomlevel one step.
|
|
Make the rect defined by x, y, w and h visible, zooming in or out as necessary. The view will be centered around the center point of the specified rect. |
|
Make the rect defined by x, y, w and h visible, zooming in or out as necessary. The view will be centered around the center point of the specified rect. |
|
Make the rect defined by x, y, w and h visible, zooming in or out as necessary. The view will be centered around the center point of the specified rect. |
The documentation for this class was generated from the following file: