krita

KisCanvasSubject Class Reference

#include <kis_canvas_subject.h>

Inheritance diagram for KisCanvasSubject:

KisView 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.


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 KisBrushcurrentBrush () const =0
virtual KisPatterncurrentPattern () const =0
virtual KisGradientcurrentGradient () const =0
virtual KisID currentPaintop () const =0
virtual const KisPaintOpSettingscurrentPaintopSettings () const =0
virtual double zoomFactor () const =0
virtual KisUndoAdapterundoAdapter () const =0
virtual KisCanvasControllercanvasController () const =0
virtual KisToolControllerInterfacetoolController () const =0
virtual KisDocdocument () const =0
virtual KisProgressDisplayInterfaceprogressDisplay () const =0
virtual KisSelectionManagerselectionManager ()=0
virtual KoPaletteManager * paletteManager ()=0
virtual KisProfilemonitorProfile ()=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 KisColor KisCanvasSubject::bgColor  )  const [pure virtual]
 

Returns:
the background color

virtual KisCanvasController* KisCanvasSubject::canvasController  )  const [pure virtual]
 

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]
 

XXX: Remove this method.

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]
 

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 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 KisToolControllerInterface* KisCanvasSubject::toolController  )  const [pure virtual]
 

XXX: Remove this method.

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:
KDE Home | KDE Accessibility Home | Description of Access Keys