krita
KisCanvasSubject Class Reference
#include <kis_canvas_subject.h>
Inheritance diagram for KisCanvasSubject:
List of all members.
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 51 of file kis_canvas_subject.h.
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 KisColor KisCanvasSubject::bgColor |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the background color
|
|
- Returns:
- the interface to the canvas widget
|
virtual KisBrush* KisCanvasSubject::currentBrush |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the current brush object.
|
virtual KisGradient* KisCanvasSubject::currentGradient |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the current gradient object
|
virtual KisImageSP KisCanvasSubject::currentImg |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the image that is currently active.
|
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 KisPattern* KisCanvasSubject::currentPattern |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the current pattern object.
|
virtual void KisCanvasSubject::detach |
( |
KisCanvasObserver * |
observer |
) |
[pure virtual] |
|
|
From now on, the specified observer will no longer be informed of changes.
|
virtual KisDoc* KisCanvasSubject::document |
( |
|
) |
const [pure virtual] |
|
virtual KisColor KisCanvasSubject::fgColor |
( |
|
) |
const [pure virtual] |
|
|
- Returns:
- the currently set foreground or painting 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 KisProfile* KisCanvasSubject::monitorProfile |
( |
|
) |
[pure virtual] |
|
|
Get the profile that this view uses to display itself on he monitor.
|
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 KoPaletteManager* KisCanvasSubject::paletteManager |
( |
|
) |
[pure virtual] |
|
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 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 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 KisUndoAdapter* KisCanvasSubject::undoAdapter |
( |
|
) |
const [pure virtual] |
|
|
retrieve the undo adapater -- there is one undo adapter per document, and it collects all transactions
|
virtual double KisCanvasSubject::zoomFactor |
( |
|
) |
const [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: