#include <kis_canvas_controller.h>
Inherited by KisView [private].
|
| virtual KisCanvas * | kiscanvas () const =0 |
| |
| virtual TQ_INT32 | horzValue () const =0 |
| |
| virtual TQ_INT32 | vertValue () const =0 |
| |
| virtual void | scrollTo (TQ_INT32 x, TQ_INT32 y)=0 |
| |
| virtual void | updateCanvas ()=0 |
| |
| virtual void | updateCanvas (TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)=0 |
| |
| virtual void | updateCanvas (const TQRect &rc)=0 |
| |
| virtual void | zoomIn ()=0 |
| |
| virtual void | zoomIn (TQ_INT32 x, TQ_INT32 y)=0 |
| |
| virtual void | zoomOut ()=0 |
| |
| virtual void | zoomOut (TQ_INT32 x, TQ_INT32 y)=0 |
| |
| virtual void | zoomAroundPoint (double x, double y, double zf)=0 |
| |
| virtual void | zoomTo (TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)=0 |
| |
| virtual void | zoomTo (const TQRect &r)=0 |
| |
| virtual void | zoomTo (const KisRect &r)=0 |
| |
| virtual TQPoint | viewToWindow (const TQPoint &pt)=0 |
| |
|
virtual KisPoint | viewToWindow (const KisPoint &pt)=0 |
| |
|
virtual TQRect | viewToWindow (const TQRect &rc)=0 |
| |
|
virtual KisRect | viewToWindow (const KisRect &rc)=0 |
| |
|
virtual void | viewToWindow (TQ_INT32 *x, TQ_INT32 *y)=0 |
| |
| virtual TQPoint | windowToView (const TQPoint &pt)=0 |
| |
|
virtual KisPoint | windowToView (const KisPoint &pt)=0 |
| |
|
virtual TQRect | windowToView (const TQRect &rc)=0 |
| |
|
virtual KisRect | windowToView (const KisRect &rc)=0 |
| |
|
virtual void | windowToView (TQ_INT32 *x, TQ_INT32 *y)=0 |
| |
| virtual TQCursor | setCanvasCursor (const TQCursor &cursor)=0 |
| |
| virtual void | setInputDevice (KisInputDevice inputDevice)=0 |
| |
| virtual KisInputDevice | currentInputDevice () const =0 |
| |
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.
◆ KisCanvasController()
| KisCanvasController::KisCanvasController |
( |
| ) |
|
|
inline |
◆ ~KisCanvasController()
| virtual KisCanvasController::~KisCanvasController |
( |
| ) |
|
|
inlinevirtual |
◆ currentInputDevice()
| virtual KisInputDevice KisCanvasController::currentInputDevice |
( |
| ) |
const |
|
pure virtual |
- Returns
- the current input device, such as a mouse or a stylus
◆ horzValue()
| virtual TQ_INT32 KisCanvasController::horzValue |
( |
| ) |
const |
|
pure virtual |
- Returns
- the value of the horizontal scrollbar.
◆ kiscanvas()
| virtual KisCanvas * KisCanvasController::kiscanvas |
( |
| ) |
const |
|
pure virtual |
◆ scrollTo()
| virtual void KisCanvasController::scrollTo |
( |
TQ_INT32 |
x, |
|
|
TQ_INT32 |
y |
|
) |
| |
|
pure virtual |
Sets the horizontal and vertical scrollbars to the specified values.
- Parameters
-
| x | the value the horizontal scrollbar is set to |
| y | the value the vertical scrollbar is set to |
◆ setCanvasCursor()
| virtual TQCursor KisCanvasController::setCanvasCursor |
( |
const TQCursor & |
cursor | ) |
|
|
pure virtual |
Set the cursor shown when the pointer is over the canvas widget to the specified cursor.
- Parameters
-
- Returns
- the old cursor
◆ setInputDevice()
| virtual void KisCanvasController::setInputDevice |
( |
KisInputDevice |
inputDevice | ) |
|
|
pure virtual |
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.
- Parameters
-
| inputDevice | the new input device |
◆ updateCanvas() [1/3]
| virtual void KisCanvasController::updateCanvas |
( |
| ) |
|
|
pure virtual |
Tell all of the canvas to repaint itself.
◆ updateCanvas() [2/3]
| virtual void KisCanvasController::updateCanvas |
( |
const TQRect & |
rc | ) |
|
|
pure virtual |
Tell the canvas repaint the specified rectangle.
The coordinates are image coordinates, not view coordinates.
◆ updateCanvas() [3/3]
| virtual void KisCanvasController::updateCanvas |
( |
TQ_INT32 |
x, |
|
|
TQ_INT32 |
y, |
|
|
TQ_INT32 |
w, |
|
|
TQ_INT32 |
h |
|
) |
| |
|
pure virtual |
Tell the canvas to repaint the rectangle defined by x, y, w and h.
The coordinates are image coordinates.
◆ vertValue()
| virtual TQ_INT32 KisCanvasController::vertValue |
( |
| ) |
const |
|
pure virtual |
- Returns
- the value of the vertical scrollbar
◆ viewToWindow()
| virtual TQPoint KisCanvasController::viewToWindow |
( |
const TQPoint & |
pt | ) |
|
|
pure virtual |
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(TQRect(0, 0, canvasWidth, canvasHeight)).
Here, the view is the canvas widget in the view widget, and the window is the window on the image.
◆ windowToView()
| virtual TQPoint KisCanvasController::windowToView |
( |
const TQPoint & |
pt | ) |
|
|
pure virtual |
Conversion functions from image coordinates to view coordinates.
◆ zoomAroundPoint()
| virtual void KisCanvasController::zoomAroundPoint |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
zf |
|
) |
| |
|
pure virtual |
To centre the view on the given point with the given zoom factor.
- Parameters
-
| x | the x coordinate of the center point in image coordinates |
| y | the y coordinate of the center point in image coordinates |
| zf | the zoomfactor |
◆ zoomIn() [1/2]
| virtual void KisCanvasController::zoomIn |
( |
| ) |
|
|
pure virtual |
Increase the zoomlevel one step.
◆ zoomIn() [2/2]
| virtual void KisCanvasController::zoomIn |
( |
TQ_INT32 |
x, |
|
|
TQ_INT32 |
y |
|
) |
| |
|
pure virtual |
Increase the zoomlevel one step and make sure that x,y is the center point of the view.
- Parameters
-
| x | The x coordinate of the visible point in image coordinates |
| y | the y coordinate of the visible point in image coordinates |
◆ zoomOut() [1/2]
| virtual void KisCanvasController::zoomOut |
( |
| ) |
|
|
pure virtual |
Decrease the zoomlevel one step.
◆ zoomOut() [2/2]
| virtual void KisCanvasController::zoomOut |
( |
TQ_INT32 |
x, |
|
|
TQ_INT32 |
y |
|
) |
| |
|
pure virtual |
Decrease the zoomlevel one step and make sure that x,y is the center point of the view.
- Parameters
-
| x | the x coordinate of the visible point in image coordinates |
| y | the y coordinate of the visible point in image coordinates |
◆ zoomTo() [1/3]
| virtual void KisCanvasController::zoomTo |
( |
const KisRect & |
r | ) |
|
|
pure virtual |
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.
◆ zoomTo() [2/3]
| virtual void KisCanvasController::zoomTo |
( |
const TQRect & |
r | ) |
|
|
pure virtual |
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.
◆ zoomTo() [3/3]
| virtual void KisCanvasController::zoomTo |
( |
TQ_INT32 |
x, |
|
|
TQ_INT32 |
y, |
|
|
TQ_INT32 |
w, |
|
|
TQ_INT32 |
h |
|
) |
| |
|
pure virtual |
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:
|