krita
KisCanvasSubject Class Reference
#include <kis_canvas_subject.h>
Inheritance diagram for KisCanvasSubject:

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.
Public Member Functions | |
KisCanvasSubject () | |
virtual | ~KisCanvasSubject () |
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 |
Member Function Documentation
virtual void KisCanvasSubject::attach | ( | KisCanvasObserver * | observer | ) | [pure virtual] |
From now on, the observer will be notified of changes in brush, foreground color, background color, pattern, gradient and paintop.
virtual void KisCanvasSubject::detach | ( | KisCanvasObserver * | observer | ) | [pure virtual] |
From now on, the specified observer will no longer be informed of changes.
virtual void KisCanvasSubject::notifyObservers | ( | ) | [pure virtual] |
Calling this method will notify all observers.
Do not call this method from the Update method of a KisCanvasObserver!
virtual KisImageSP KisCanvasSubject::currentImg | ( | ) | const [pure virtual] |
- Returns:
- the image that is currently active.
virtual KisColor KisCanvasSubject::bgColor | ( | ) | const [pure virtual] |
- Returns:
- the background color
virtual void KisCanvasSubject::setBGColor | ( | const KisColor & | c | ) | [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
virtual KisColor KisCanvasSubject::fgColor | ( | ) | const [pure virtual] |
- Returns:
- the currently set foreground or painting color
virtual void KisCanvasSubject::setFGColor | ( | const KisColor & | c | ) | [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
virtual float KisCanvasSubject::HDRExposure | ( | ) | const [pure virtual] |
- Returns:
- the exposure value.
This determines which exposure of multiple exposure or HDR images will be displayed
virtual void KisCanvasSubject::setHDRExposure | ( | float | exposure | ) | [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
virtual KisBrush* KisCanvasSubject::currentBrush | ( | ) | const [pure virtual] |
- Returns:
- the current brush object.
virtual KisPattern* KisCanvasSubject::currentPattern | ( | ) | const [pure virtual] |
- Returns:
- the current pattern object.
virtual KisGradient* KisCanvasSubject::currentGradient | ( | ) | const [pure virtual] |
- Returns:
- the current gradient object
virtual KisID KisCanvasSubject::currentPaintop | ( | ) | const [pure virtual] |
- Returns:
- the identification of the current paintop object, not the paintop object itself.
virtual const KisPaintOpSettings* KisCanvasSubject::currentPaintopSettings | ( | ) | const [pure virtual] |
- Returns:
- the settings for the current paintop object, or 0 if there are no options set.
virtual double KisCanvasSubject::zoomFactor | ( | ) | const [pure virtual] |
- Returns:
- the currently applied zoom factor.
XXX: Shouldn't this be in the canvas controller?
virtual KisUndoAdapter* KisCanvasSubject::undoAdapter | ( | ) | const [pure virtual] |
retrieve the undo adapater -- there is one undo adapter per document, and it collects all transactions
virtual KisCanvasController* KisCanvasSubject::canvasController | ( | ) | const [pure virtual] |
- Returns:
- the interface to the canvas widget
virtual KisToolControllerInterface* KisCanvasSubject::toolController | ( | ) | const [pure virtual] |
XXX: Remove this method.
virtual KisDoc* KisCanvasSubject::document | ( | ) | const [pure virtual] |
XXX: Remove this method.
virtual KisProgressDisplayInterface* KisCanvasSubject::progressDisplay | ( | ) | const [pure virtual] |
XXX: Remove this method.
virtual KisSelectionManager* KisCanvasSubject::selectionManager | ( | ) | [pure virtual] |
XXX: Remove this method.
virtual KoPaletteManager* KisCanvasSubject::paletteManager | ( | ) | [pure virtual] |
XXX: Remove this method.
virtual KisProfile* KisCanvasSubject::monitorProfile | ( | ) | [pure virtual] |
Get the profile that this view uses to display itself on he monitor.
virtual KisPerspectiveGridManager* KisCanvasSubject::perspectiveGridManager | ( | ) | [pure virtual] |
Get the perspective grid manager.
The documentation for this class was generated from the following file: