krita
KisFilter Class Reference
#include <kis_filter.h>
Inheritance diagram for KisFilter:

Detailed Description
Basic interface of a Krita filter.
Definition at line 46 of file kis_filter.h.
Public Member Functions | |
KisFilter (const KisID &id, const QString &category, const QString &entry) | |
virtual | ~KisFilter () |
virtual void | setProgressDisplay (KisProgressDisplayInterface *progressDisplay) |
virtual void | process (KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration *, const QRect &)=0 |
virtual KisFilterConfiguration * | configuration (QWidget *) |
virtual KisFilterConfiguration * | configuration () |
virtual bool | supportsPainting () |
virtual bool | supportsPreview () |
virtual std::list< KisFilterConfiguration * > | listOfExamplesConfiguration (KisPaintDeviceSP) |
virtual bool | supportsIncrementalPainting () |
virtual bool | supportsThreading () |
virtual int | overlapMarginNeeded () |
virtual ColorSpaceIndependence | colorSpaceIndependence () |
virtual bool | workWith (KisColorSpace *) |
virtual void | enableProgress () |
virtual void | disableProgress () |
bool | autoUpdate () |
const KisID | id () const |
QString | menuCategory () const |
QString | menuEntry () const |
virtual KisFilterConfigWidget * | createConfigurationWidget (QWidget *parent, KisPaintDeviceSP dev) |
virtual void | cancel () |
virtual void | setAutoUpdate (bool set) |
bool | progressEnabled () const |
bool | cancelRequested () const |
Protected Slots | |
void | setProgressTotalSteps (Q_INT32 totalSteps) |
void | setProgress (Q_INT32 progress) |
void | incProgress () |
void | setProgressStage (const QString &stage, Q_INT32 progress) |
void | setProgressDone () |
Q_INT32 | progress () |
Protected Attributes | |
Q_INT32 | m_progressTotalSteps |
Q_INT32 | m_lastProgressPerCent |
Q_INT32 | m_progressSteps |
KisID | m_id |
KisProgressDisplayInterface * | m_progressDisplay |
QString | m_category |
QString | m_entry |
Constructor & Destructor Documentation
KisFilter::KisFilter | ( | const KisID & | id, | |
const QString & | category, | |||
const QString & | entry | |||
) |
Member Function Documentation
virtual ColorSpaceIndependence KisFilter::colorSpaceIndependence | ( | ) | [inline, virtual] |
Determine the colorspace independence of this filter.
- See also:
- ColorSpaceIndependence
- Returns:
- the degree of independence
Definition at line 107 of file kis_filter.h.
KisFilterConfigWidget * KisFilter::createConfigurationWidget | ( | QWidget * | parent, | |
KisPaintDeviceSP | dev | |||
) | [virtual] |
Create the configuration widget for this filter.
- Parameters:
-
parent the Qt owner widget of this widget dev the paintdevice this filter will act on
Definition at line 44 of file kis_filter.cc.
virtual std::list<KisFilterConfiguration*> KisFilter::listOfExamplesConfiguration | ( | KisPaintDeviceSP | ) | [inline, virtual] |
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 78 of file kis_filter.h.
virtual int KisFilter::overlapMarginNeeded | ( | ) | [inline, virtual] |
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 99 of file kis_filter.h.
virtual bool KisFilter::supportsIncrementalPainting | ( | ) | [inline, virtual] |
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 85 of file kis_filter.h.
virtual bool KisFilter::supportsPainting | ( | ) | [inline, virtual] |
If true, this filter can be used in painting tools as a paint operation.
Definition at line 69 of file kis_filter.h.
virtual bool KisFilter::supportsPreview | ( | ) | [inline, virtual] |
virtual bool KisFilter::supportsThreading | ( | ) | [inline, virtual] |
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 92 of file kis_filter.h.
virtual bool KisFilter::workWith | ( | KisColorSpace * | ) | [inline, virtual] |
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 119 of file kis_filter.h.
The documentation for this class was generated from the following files: