chalk

#include <kis_filter.h>

Public Member Functions

 KisFilter (const KisID &id, const TQString &category, const TQString &entry)
virtual void setProgressDisplay (KisProgressDisplayInterface *progressDisplay)
virtual void process (KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration *, const TQRect &)=0
virtual KisFilterConfiguration * configuration (TQWidget *)
virtual KisFilterConfiguration * configuration ()
virtual bool supportsPainting ()
virtual bool supportsPreview ()
virtual bool supportsAdjustmentLayers ()
virtual std::list< KisFilterConfiguration * > listOfExamplesConfiguration (KisPaintDeviceSP)
virtual bool supportsIncrementalPainting ()
virtual bool supportsThreading ()
virtual int overlapMarginNeeded (KisFilterConfiguration *=0) const
virtual TQRect enlargeRect (TQRect rect, KisFilterConfiguration *=0) const
virtual ColorSpaceIndependence colorSpaceIndependence ()
virtual bool workWith (KisColorSpace *)
virtual void enableProgress ()
virtual void disableProgress ()
bool autoUpdate ()
const KisID id () const
TQString menuCategory () const
TQString menuEntry () const
virtual KisFilterConfigWidget * createConfigurationWidget (TQWidget *parent, KisPaintDeviceSP dev)
virtual void cancel ()
virtual void setAutoUpdate (bool set)
bool progressEnabled () const
bool cancelRequested () const

Protected Slots

void setProgressTotalSteps (TQ_INT32 totalSteps)
void setProgress (TQ_INT32 progress)
void incProgress ()
void setProgressStage (const TQString &stage, TQ_INT32 progress)
void setProgressDone ()
TQ_INT32 progress ()

Protected Attributes

TQ_INT32 m_progressTotalSteps
TQ_INT32 m_lastProgressPerCent
TQ_INT32 m_progressSteps
KisID m_id
KisProgressDisplayInterface * m_progressDisplay
TQString m_category
TQString m_entry

Detailed Description

Basic interface of a Chalk filter.

Definition at line 46 of file kis_filter.h.

Constructor & Destructor Documentation

◆ KisFilter()

KisFilter::KisFilter ( const KisID & id,
const TQString & category,
const TQString & entry )

Construct a Chalk filter.

Definition at line 25 of file kis_filter.cpp.

◆ ~KisFilter()

virtual KisFilter::~KisFilter ( )
inlinevirtual

Definition at line 55 of file kis_filter.h.

Member Function Documentation

◆ autoUpdate()

bool KisFilter::autoUpdate ( )

Definition at line 116 of file kis_filter.cpp.

◆ cancel()

virtual void KisFilter::cancel ( )
inlinevirtual

Definition at line 168 of file kis_filter.h.

◆ cancelRequested()

bool KisFilter::cancelRequested ( ) const
inline

Definition at line 172 of file kis_filter.h.

◆ colorSpaceIndependence()

virtual ColorSpaceIndependence KisFilter::colorSpaceIndependence ( )
inlinevirtual

Determine the colorspace independence of this filter.

See also
ColorSpaceIndependence
Returns
the degree of independence

Definition at line 130 of file kis_filter.h.

◆ configuration() [1/2]

KisFilterConfiguration * KisFilter::configuration ( )
virtual
Returns
a default configuration object Normally this doesn't need to be overriden

Definition at line 39 of file kis_filter.cpp.

◆ configuration() [2/2]

KisFilterConfiguration * KisFilter::configuration ( TQWidget * )
virtual
Returns
a new configuration derived from the widget. If the widget is NULL or not the correct type, a default configuration object will be returned

Definition at line 34 of file kis_filter.cpp.

◆ createConfigurationWidget()

KisFilterConfigWidget * KisFilter::createConfigurationWidget ( TQWidget * parent,
KisPaintDeviceSP dev )
virtual
  Create the configuration widget for this filter.

  @param parent the TQt owner widget of this widget
  @param dev the paintdevice this filter will act on

    *

Returns
NULL if the filter does not use user-settable configuration settings.     *         else return a pointer to the new configuration widget

Definition at line 44 of file kis_filter.cpp.

◆ disableProgress()

void KisFilter::disableProgress ( )
virtual

Definition at line 60 of file kis_filter.cpp.

◆ enableProgress()

void KisFilter::enableProgress ( )
virtual

Definition at line 55 of file kis_filter.cpp.

◆ enlargeRect()

TQRect KisFilter::enlargeRect ( TQRect rect,
KisFilterConfiguration * c = 0 ) const
virtual

Similar to overlapMarginNeeded: some filters will alter a lot of pixels that are near to each other at the same time.

So when you changed a single rectangle in a device, the actual rectangle that will feel the influence of this change might be bigger. Use this function to detirmine that rect. The default implementation makes a guess using overlapMarginNeeded.

Definition at line 124 of file kis_filter.cpp.

◆ id()

const KisID KisFilter::id ( ) const
inline

Definition at line 150 of file kis_filter.h.

◆ incProgress

void KisFilter::incProgress ( )
protectedslot

Definition at line 91 of file kis_filter.cpp.

◆ listOfExamplesConfiguration()

virtual std::list< KisFilterConfiguration * > KisFilter::listOfExamplesConfiguration ( KisPaintDeviceSP )
inlinevirtual

Return a list of default configuration to demonstrates the use of the filter.

Returns
a list with a null element if the filter do not use a configuration

Definition at line 92 of file kis_filter.h.

◆ menuCategory()

TQString KisFilter::menuCategory ( ) const
inline

Definition at line 153 of file kis_filter.h.

◆ menuEntry()

TQString KisFilter::menuEntry ( ) const
inline

Definition at line 156 of file kis_filter.h.

◆ overlapMarginNeeded()

virtual int KisFilter::overlapMarginNeeded ( KisFilterConfiguration * = 0) const
inlinevirtual

Used when threading is used – the overlap margin is passed to the filter to use to compute pixels, but the margin is not pasted into the resulting image.

Definition at line 113 of file kis_filter.h.

◆ progress

TQ_INT32 KisFilter::progress ( )
inlineprotectedslot

Definition at line 182 of file kis_filter.h.

◆ progressEnabled()

bool KisFilter::progressEnabled ( ) const
inline

Definition at line 171 of file kis_filter.h.

◆ setAutoUpdate()

void KisFilter::setAutoUpdate ( bool set)
virtual

Definition at line 120 of file kis_filter.cpp.

◆ setProgress

void KisFilter::setProgress ( TQ_INT32 progress)
protectedslot

Definition at line 77 of file kis_filter.cpp.

◆ setProgressDisplay()

void KisFilter::setProgressDisplay ( KisProgressDisplayInterface * progressDisplay)
virtual

Definition at line 49 of file kis_filter.cpp.

◆ setProgressDone

void KisFilter::setProgressDone ( )
protectedslot

Definition at line 108 of file kis_filter.cpp.

◆ setProgressStage

void KisFilter::setProgressStage ( const TQString & stage,
TQ_INT32 progress )
protectedslot

Definition at line 97 of file kis_filter.cpp.

◆ setProgressTotalSteps

void KisFilter::setProgressTotalSteps ( TQ_INT32 totalSteps)
protectedslot

Definition at line 66 of file kis_filter.cpp.

◆ supportsAdjustmentLayers()

virtual bool KisFilter::supportsAdjustmentLayers ( )
inlinevirtual

This filter can be used in adjustment layers.

Definition at line 86 of file kis_filter.h.

◆ supportsIncrementalPainting()

virtual bool KisFilter::supportsIncrementalPainting ( )
inlinevirtual

Can this filter work incrementally when painting, or do we need to work on the state as it was before painting started.

The former is faster.

Definition at line 99 of file kis_filter.h.

◆ supportsPainting()

virtual bool KisFilter::supportsPainting ( )
inlinevirtual

If true, this filter can be used in painting tools as a paint operation.

Definition at line 79 of file kis_filter.h.

◆ supportsPreview()

virtual bool KisFilter::supportsPreview ( )
inlinevirtual

This filter can be displayed in a preview dialog.

Definition at line 82 of file kis_filter.h.

◆ supportsThreading()

virtual bool KisFilter::supportsThreading ( )
inlinevirtual

This filter supports cutting up the work area and filtering each chunk in a separate thread.

Filters that need access to the whole area for correct computations should return false.

Definition at line 106 of file kis_filter.h.

◆ workWith()

virtual bool KisFilter::workWith ( KisColorSpace * )
inlinevirtual

Determine if this filter can work with this colorSpace.

For instance, some colorspaces don't depend on lcms, and cannot do certain tasks. The colorsfilters are problems here. BSAR: I'm still not convinced that this is the right approach. I think that every colorspace should implement the api fully; and that the filter should simply call that api. After all, you don't need lcms to desaturate.

Parameters
colorsSpace

Definition at line 142 of file kis_filter.h.

Member Data Documentation

◆ m_category

TQString KisFilter::m_category
protected

Definition at line 195 of file kis_filter.h.

◆ m_entry

TQString KisFilter::m_entry
protected

Definition at line 196 of file kis_filter.h.

◆ m_id

KisID KisFilter::m_id
protected

Definition at line 193 of file kis_filter.h.

◆ m_lastProgressPerCent

TQ_INT32 KisFilter::m_lastProgressPerCent
protected

Definition at line 190 of file kis_filter.h.

◆ m_progressDisplay

KisProgressDisplayInterface* KisFilter::m_progressDisplay
protected

Definition at line 194 of file kis_filter.h.

◆ m_progressSteps

TQ_INT32 KisFilter::m_progressSteps
protected

Definition at line 191 of file kis_filter.h.

◆ m_progressTotalSteps

TQ_INT32 KisFilter::m_progressTotalSteps
protected

Definition at line 189 of file kis_filter.h.


The documentation for this class was generated from the following files: