krita/ui
KisCanvas2 Class Reference
KisCanvas2 is not an actual widget class, but rather an adapter for the widget it contains, which may be either a QPainter based canvas, or an OpenGL based canvas: that are the real widgets. More...
#include <kis_canvas2.h>

Public Slots | |
| void | adjustOrigin () |
| void | setImageSize (qint32 w, qint32 h) |
| void | updateCanvas () |
| void | updateCanvasProjection (const QRect &rc) |
| void | updateRulers () |
Signals | |
| void | canvasDestroyed (QWidget *) |
| void | documentOriginChanged () |
| void | imageChanged (KisImageWSP image) |
Public Member Functions | |
| KisCanvas2 (KoViewConverter *viewConverter, KisView2 *view, KoShapeControllerBase *sc) | |
| virtual | ~KisCanvas2 () |
| void | addCommand (QUndoCommand *command) |
| void | addDecoration (KisCanvasDecoration *deco) |
| virtual const QWidget * | canvasWidget () const |
| virtual QWidget * | canvasWidget () |
| void | connectCurrentImage () |
| KisImageWSP | currentImage () |
| KisCanvasDecoration * | decoration (const QString &id) |
| void | disconnectCurrentImage () |
| QPoint | documentOffset () const |
| virtual QPoint | documentOrigin () const |
| KoShapeManager * | globalShapeManager () const |
| void | gridSize (qreal *horizontal, qreal *vertical) const |
| KisImageWSP | image () |
| KoColorProfile * | monitorProfile () |
| void | preScale () |
| void | setCanvasWidget (QWidget *widget) |
| KoShapeManager * | shapeManager () const |
| bool | snapToGrid () const |
| virtual void | startMacro (const QString &title) |
| virtual void | stopMacro () |
| virtual KoToolProxy * | toolProxy () const |
| virtual KoUnit | unit () const |
| void | updateCanvas (const QRectF &rc) |
| virtual void | updateInputMethodInfo () |
| bool | usingHDRExposureProgram () |
| KisView2 * | view () |
| virtual const KoViewConverter * | viewConverter () const |
Detailed Description
KisCanvas2 is not an actual widget class, but rather an adapter for the widget it contains, which may be either a QPainter based canvas, or an OpenGL based canvas: that are the real widgets.
Definition at line 50 of file kis_canvas2.h.
Constructor & Destructor Documentation
| KisCanvas2::KisCanvas2 | ( | KoViewConverter * | viewConverter, | |
| KisView2 * | view, | |||
| KoShapeControllerBase * | sc | |||
| ) |
Create a new canvas.
The canvas manages a widget that will do the actual painting: the canvas itself is not a widget.
- Parameters:
-
viewConverter the viewconverter for converting between window and document coordinates.
Definition at line 102 of file kis_canvas2.cpp.
| KisCanvas2::~KisCanvas2 | ( | ) | [virtual] |
Definition at line 112 of file kis_canvas2.cpp.
Member Function Documentation
| void KisCanvas2::addCommand | ( | QUndoCommand * | command | ) |
Definition at line 151 of file kis_canvas2.cpp.
| void KisCanvas2::addDecoration | ( | KisCanvasDecoration * | deco | ) |
Definition at line 438 of file kis_canvas2.cpp.
| void KisCanvas2::adjustOrigin | ( | ) | [slot] |
adjust the origin of the document
Definition at line 455 of file kis_canvas2.cpp.
| void KisCanvas2::canvasDestroyed | ( | QWidget * | ) | [signal] |
| const QWidget * KisCanvas2::canvasWidget | ( | ) | const [virtual] |
Definition at line 216 of file kis_canvas2.cpp.
| QWidget * KisCanvas2::canvasWidget | ( | ) | [virtual] |
Definition at line 211 of file kis_canvas2.cpp.
| void KisCanvas2::connectCurrentImage | ( | ) |
Definition at line 349 of file kis_canvas2.cpp.
| KisImageWSP KisCanvas2::currentImage | ( | ) |
Definition at line 338 of file kis_canvas2.cpp.
| KisCanvasDecoration * KisCanvas2::decoration | ( | const QString & | id | ) |
Definition at line 443 of file kis_canvas2.cpp.
| void KisCanvas2::disconnectCurrentImage | ( | ) |
Definition at line 370 of file kis_canvas2.cpp.
| QPoint KisCanvas2::documentOffset | ( | ) | const |
Definition at line 467 of file kis_canvas2.cpp.
| QPoint KisCanvas2::documentOrigin | ( | ) | const [virtual] |
Definition at line 449 of file kis_canvas2.cpp.
| void KisCanvas2::documentOriginChanged | ( | ) | [signal] |
| KoShapeManager * KisCanvas2::globalShapeManager | ( | ) | const |
Return the shape manager associated with this canvas.
Definition at line 186 of file kis_canvas2.cpp.
| void KisCanvas2::gridSize | ( | qreal * | horizontal, | |
| qreal * | vertical | |||
| ) | const |
Definition at line 138 of file kis_canvas2.cpp.
| KisImageWSP KisCanvas2::image | ( | ) |
Definition at line 327 of file kis_canvas2.cpp.
| void KisCanvas2::imageChanged | ( | KisImageWSP | image | ) | [signal] |
| KoColorProfile * KisCanvas2::monitorProfile | ( | ) |
Definition at line 333 of file kis_canvas2.cpp.
| void KisCanvas2::preScale | ( | ) |
Prescale the canvas represention of the image (if necessary, it is for QPainter, not for OpenGL).
Definition at line 410 of file kis_canvas2.cpp.
| void KisCanvas2::setCanvasWidget | ( | QWidget * | widget | ) |
Definition at line 117 of file kis_canvas2.cpp.
| void KisCanvas2::setImageSize | ( | qint32 | w, | |
| qint32 | h | |||
| ) | [slot] |
Definition at line 343 of file kis_canvas2.cpp.
| KoShapeManager * KisCanvas2::shapeManager | ( | ) | const |
Return the right shape manager for the current layer.
That is to say, if the current layer is a shape layer, return the shape layer's canvas' shapemanager, else the shapemanager associated with the global krita canvas.
Definition at line 166 of file kis_canvas2.cpp.
| bool KisCanvas2::snapToGrid | ( | ) | const |
Definition at line 146 of file kis_canvas2.cpp.
| void KisCanvas2::startMacro | ( | const QString & | title | ) | [virtual] |
Definition at line 156 of file kis_canvas2.cpp.
| void KisCanvas2::stopMacro | ( | ) | [virtual] |
Definition at line 161 of file kis_canvas2.cpp.
| KoToolProxy * KisCanvas2::toolProxy | ( | ) | const [virtual] |
Definition at line 227 of file kis_canvas2.cpp.
| KoUnit KisCanvas2::unit | ( | ) | const [virtual] |
Definition at line 222 of file kis_canvas2.cpp.
| void KisCanvas2::updateCanvas | ( | ) | [slot] |
Update the entire canvas area.
Definition at line 321 of file kis_canvas2.cpp.
| void KisCanvas2::updateCanvas | ( | const QRectF & | rc | ) |
Definition at line 191 of file kis_canvas2.cpp.
| void KisCanvas2::updateCanvasProjection | ( | const QRect & | rc | ) | [slot] |
The image projection has changed, now update the canvas representation of it.
Definition at line 308 of file kis_canvas2.cpp.
| void KisCanvas2::updateInputMethodInfo | ( | ) | [virtual] |
Definition at line 201 of file kis_canvas2.cpp.
| void KisCanvas2::updateRulers | ( | ) | [slot] |
documentOffset changed, now update the rulers in zoom manager
Definition at line 461 of file kis_canvas2.cpp.
| bool KisCanvas2::usingHDRExposureProgram | ( | ) |
Definition at line 416 of file kis_canvas2.cpp.
| KisView2 * KisCanvas2::view | ( | ) |
Definition at line 291 of file kis_canvas2.cpp.
| const KoViewConverter * KisCanvas2::viewConverter | ( | ) | const [virtual] |
Definition at line 206 of file kis_canvas2.cpp.
The documentation for this class was generated from the following files:
