krita/ui
KisCanvasDecoration Class Reference
This class is the base class for object that draw a decoration on the canvas, for instance, selections, grids, tools, . More...
#include <kis_canvas_decoration.h>

Public Slots | |
| void | setVisible (bool v) |
| void | toggleVisibility () |
Public Member Functions | |
| KisCanvasDecoration (const QString &id, const QString &name, KisView2 *parent) | |
| ~KisCanvasDecoration () | |
| const QString & | id () const |
| const QString & | name () const |
| void | paint (QPainter &gc, const QPoint &documentOffset, const QRect &area, const KoViewConverter &converter) |
| bool | visible () const |
Protected Member Functions | |
| virtual void | drawDecoration (QPainter &gc, const QPoint &documentOffset, const QRect &area, const KoViewConverter &converter)=0 |
| KisView2 * | view () const |
Detailed Description
This class is the base class for object that draw a decoration on the canvas, for instance, selections, grids, tools, .
..
Definition at line 35 of file kis_canvas_decoration.h.
Constructor & Destructor Documentation
| KisCanvasDecoration::KisCanvasDecoration | ( | const QString & | id, | |
| const QString & | name, | |||
| KisView2 * | parent | |||
| ) |
Definition at line 30 of file kis_canvas_decoration.cc.
| KisCanvasDecoration::~KisCanvasDecoration | ( | ) |
Definition at line 38 of file kis_canvas_decoration.cc.
Member Function Documentation
| virtual void KisCanvasDecoration::drawDecoration | ( | QPainter & | gc, | |
| const QPoint & | documentOffset, | |||
| const QRect & | area, | |||
| const KoViewConverter & | converter | |||
| ) | [protected, pure virtual] |
Implemented in KisGridManager, KisPerspectiveGridManager, KisPaintingAssistantsManager, and KisSelectionDecoration.
| const QString & KisCanvasDecoration::id | ( | ) | const |
Definition at line 43 of file kis_canvas_decoration.cc.
| const QString & KisCanvasDecoration::name | ( | ) | const |
Definition at line 48 of file kis_canvas_decoration.cc.
| void KisCanvasDecoration::paint | ( | QPainter & | gc, | |
| const QPoint & | documentOffset, | |||
| const QRect & | area, | |||
| const KoViewConverter & | converter | |||
| ) |
Will paint the decoration on the QPainter, if the visible is set to true.
- Parameters:
-
documentOffset the offset of the view in the document, expressed in the view reference (not in the document reference)
Definition at line 69 of file kis_canvas_decoration.cc.
| void KisCanvasDecoration::setVisible | ( | bool | v | ) | [slot] |
Set if the decoration is visible or not.
Definition at line 53 of file kis_canvas_decoration.cc.
| void KisCanvasDecoration::toggleVisibility | ( | ) | [slot] |
If decoration is visible, hide it, if not show it.
Definition at line 64 of file kis_canvas_decoration.cc.
| KisView2 * KisCanvasDecoration::view | ( | ) | const [protected] |
- Returns:
- the parent KisView
Definition at line 77 of file kis_canvas_decoration.cc.
| bool KisCanvasDecoration::visible | ( | ) | const |
- Returns:
- whether the decoration is visible.
Definition at line 59 of file kis_canvas_decoration.cc.
The documentation for this class was generated from the following files:
