|
Krita Source Code Documentation
|
#include <kis_canvas_decoration.h>
Inheritance diagram for KisCanvasDecoration:Classes | |
| struct | Private |
Public Slots | |
| virtual void | setVisible (bool v) |
| void | toggleVisibility () |
Public Member Functions | |
| const QString & | id () const |
| KisCanvasDecoration (const QString &id, QPointer< KisView >parent) | |
| virtual void | notifyWindowMinimized (bool minimized) |
| void | paint (QPainter &gc, const QRectF &updateRect, const KisCoordinatesConverter *converter, KisCanvas2 *canvas) |
| int | priority () const |
| void | setView (QPointer< KisView > imageView) |
| bool | visible () const |
| ~KisCanvasDecoration () override | |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Static Public Member Functions | |
| static bool | comparePriority (KisCanvasDecorationSP decoration1, KisCanvasDecorationSP decoration2) |
Protected Member Functions | |
| int | decorationThickness () const |
| virtual void | drawDecoration (QPainter &gc, const QRectF &updateArea, const KisCoordinatesConverter *converter, KisCanvas2 *canvas)=0 |
| void | setPriority (int value) |
| QPointer< KisView > | view () const |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Private Attributes | |
| Private *const | d |
This class is the base class for object that draw a decoration on the canvas, for instance, selections, grids, tools, ...
Definition at line 30 of file kis_canvas_decoration.h.
Definition at line 19 of file kis_canvas_decoration.cc.
References d, KisCanvasDecoration::Private::id, id(), KisCanvasDecoration::Private::view, and KisCanvasDecoration::Private::visible.
|
override |
|
static |
Definition at line 93 of file kis_canvas_decoration.cc.
|
protected |
|
protectedpure virtual |
| const QString & KisCanvasDecoration::id | ( | ) | const |
Definition at line 39 of file kis_canvas_decoration.cc.
References d, and KisCanvasDecoration::Private::id.
|
virtual |
Reimplemented in KisSelectionDecoration.
Definition at line 97 of file kis_canvas_decoration.cc.
| void KisCanvasDecoration::paint | ( | QPainter & | gc, |
| const QRectF & | updateRect, | ||
| const KisCoordinatesConverter * | converter, | ||
| KisCanvas2 * | canvas = 0 ) |
Will paint the decoration on the QPainter, if the visible is set to true.
| gc | the painter |
| updateRect | dirty rect in document pixels |
| converter | coordinate converter |
| canvas | the canvas |
Definition at line 64 of file kis_canvas_decoration.cc.
References dbgFile, drawDecoration(), KIS_SAFE_ASSERT_RECOVER_RETURN, and visible().
| int KisCanvasDecoration::priority | ( | ) | const |
Return z-order priority of the decoration. The higher the priority, the higher the decoration is painted.
Definition at line 75 of file kis_canvas_decoration.cc.
References d, and KisCanvasDecoration::Private::priority.
|
protected |
Set the priority of the decoration. The higher the priority, the higher the decoration is painted.
Definition at line 80 of file kis_canvas_decoration.cc.
References d, KisCanvasDecoration::Private::priority, and value().
Definition at line 33 of file kis_canvas_decoration.cc.
References d, and KisCanvasDecoration::Private::view.
|
virtualslot |
Set if the decoration is visible or not.
Reimplemented in KisMirrorAxis, and KisSelectionDecoration.
Definition at line 44 of file kis_canvas_decoration.cc.
References d, v, KisCanvasDecoration::Private::view, and KisCanvasDecoration::Private::visible.
|
slot |
If decoration is visible, hide it, if not show it.
Definition at line 59 of file kis_canvas_decoration.cc.
References setVisible(), and visible().
Definition at line 101 of file kis_canvas_decoration.cc.
References d, and KisCanvasDecoration::Private::view.
| bool KisCanvasDecoration::visible | ( | ) | const |
Definition at line 54 of file kis_canvas_decoration.cc.
References d, and KisCanvasDecoration::Private::visible.
|
private |
Definition at line 95 of file kis_canvas_decoration.h.