#include <kis_canvas_subject.h>
Inherited by KisView.
Public Member Functions | |
| virtual void | attach (KisCanvasObserver *observer)=0 |
| virtual void | detach (KisCanvasObserver *observer)=0 |
| virtual void | notifyObservers ()=0 |
| virtual KisImageSP | currentImg () const =0 |
| virtual KisColor | bgColor () const =0 |
| virtual void | setBGColor (const KisColor &c)=0 |
| virtual KisColor | fgColor () const =0 |
| virtual void | setFGColor (const KisColor &c)=0 |
| virtual float | HDRExposure () const =0 |
| virtual void | setHDRExposure (float exposure)=0 |
| virtual KisBrush * | currentBrush () const =0 |
| virtual KisPattern * | currentPattern () const =0 |
| virtual KisGradient * | currentGradient () const =0 |
| virtual KisID | currentPaintop () const =0 |
| virtual const KisPaintOpSettings * | currentPaintopSettings () const =0 |
| virtual double | zoomFactor () const =0 |
| virtual KisUndoAdapter * | undoAdapter () const =0 |
| virtual KisCanvasController * | canvasController () const =0 |
| virtual KisToolControllerInterface * | toolController () const =0 |
| virtual KisDoc * | document () const =0 |
| virtual KisProgressDisplayInterface * | progressDisplay () const =0 |
| virtual KisSelectionManager * | selectionManager ()=0 |
| virtual KoPaletteManager * | paletteManager ()=0 |
| virtual KisProfile * | monitorProfile ()=0 |
| virtual KisPerspectiveGridManager * | perspectiveGridManager ()=0 |
Detailed Description
KisCanvasSubject is part of the Observer pattern.
Classes implementing KisCanvasObserver that have attached themselves to a class implementing this interface will be notified whenever any of the methods defined in this class will return something different.
Historical notes: This class has grown a bit an now seems to be the abstract definition of the View part in the Model-View-Controller pattern. We need to fix this!
Definition at line 52 of file kis_canvas_subject.h.
Constructor & Destructor Documentation
◆ KisCanvasSubject()
|
inline |
Definition at line 55 of file kis_canvas_subject.h.
◆ ~KisCanvasSubject()
|
inlinevirtual |
Definition at line 56 of file kis_canvas_subject.h.
Member Function Documentation
◆ attach()
|
pure virtual |
From now on, the observer will be notified of changes in brush, foreground color, background color, pattern, gradient and paintop.
◆ bgColor()
|
pure virtual |
- Returns
- the background color
◆ canvasController()
|
pure virtual |
- Returns
- the interface to the canvas widget
◆ currentBrush()
|
pure virtual |
- Returns
- the current brush object.
◆ currentGradient()
|
pure virtual |
- Returns
- the current gradient object
◆ currentImg()
|
pure virtual |
- Returns
- the image that is currently active.
◆ currentPaintop()
|
pure virtual |
- Returns
- the identification of the current paintop object, not the paintop object itself.
◆ currentPaintopSettings()
|
pure virtual |
- Returns
- the settings for the current paintop object, or 0 if there are no options set.
◆ currentPattern()
|
pure virtual |
- Returns
- the current pattern object.
◆ detach()
|
pure virtual |
From now on, the specified observer will no longer be informed of changes.
◆ document()
|
pure virtual |
XXX: Remove this method.
◆ fgColor()
|
pure virtual |
- Returns
- the currently set foreground or painting color
◆ HDRExposure()
|
pure virtual |
- Returns
- the exposure value. This determines which exposure of multiple exposure or HDR images will be displayed
◆ monitorProfile()
|
pure virtual |
Get the profile that this view uses to display itself on he monitor.
◆ notifyObservers()
|
pure virtual |
Calling this method will notify all observers.
Do not call this method from the Update method of a KisCanvasObserver!
◆ paletteManager()
|
pure virtual |
XXX: Remove this method.
◆ perspectiveGridManager()
|
pure virtual |
Get the perspective grid manager.
◆ progressDisplay()
|
pure virtual |
XXX: Remove this method.
◆ selectionManager()
|
pure virtual |
XXX: Remove this method.
◆ setBGColor()
|
pure virtual |
Set the background color.
This should cause all observers to be notified. Do not call from KisCanvasObserver::update()!
- Parameters
-
c the new background color
◆ setFGColor()
|
pure virtual |
Set the foreground or painting color.
This should cause all observers to be notified. Do not call from KisCanvasObserver::update()!
- Parameters
-
c the new foreground color
◆ setHDRExposure()
|
pure virtual |
Set the exposure value.
This determines which exposure of multiple exposure or HDR images will be displayed. All observers should be notified.
- Parameters
-
exposure the new exposure value
◆ toolController()
|
pure virtual |
XXX: Remove this method.
◆ undoAdapter()
|
pure virtual |
retrieve the undo adapater – there is one undo adapter per document, and it collects all transactions
◆ zoomFactor()
|
pure virtual |
- Returns
- the currently applied zoom factor. XXX: Shouldn't this be in the canvas controller?
The documentation for this class was generated from the following file:
