Default superclass and implementation for an internal filter (handler) which is delivered by a QuillImageFilterInterface::create(). More...
#include <quillimagefilterimplementation.h>
Public Member Functions | |
QuillImageFilterImplementation () | |
virtual | ~QuillImageFilterImplementation () |
virtual QVariant | option (const QString &filterOption) const |
virtual bool | setOption (const QString &filterOption, const QVariant &value) |
virtual QuillImage | apply (const QuillImage &image) const |
virtual QSize | newFullImageSize (const QSize &fullImageSize) const |
virtual QRect | newArea (const QSize &fullImageSize, const QRect &area) const |
virtual QIODevice * | iODevice () const |
virtual void | setIODevice (QIODevice *iODevice) |
virtual void | cancel () |
virtual QuillImageFilter::ImageFilterError | error () const |
virtual const QString | name () const |
virtual QuillImageFilter::QuillFilterRole | role () const |
virtual const QStringList | supportedOptions () const |
Default superclass and implementation for an internal filter (handler) which is delivered by a QuillImageFilterInterface::create().
Instances created directly from this class will work as an identity filter (one which returns exactly the same image or dimensions that were provided). They do not need to be reimplemented if a filter developer wants to implement a simple filter.
QuillImageFilterImplementation::QuillImageFilterImplementation | ( | ) |
Initializes common things to all filters.
QuillImageFilterImplementation::~QuillImageFilterImplementation | ( | ) | [virtual] |
Frees common things to all filters.
QuillImage QuillImageFilterImplementation::apply | ( | const QuillImage & | image | ) | const [virtual] |
Applies the filter to a given preview or fragment.
Reimplemented in BrightnessContrast, Crop, LoadFilter, Overlay, SaveFilter, ScaleCrop, Flip, FreeRotate, Gaussian, Lanczos, Levels, RedEyeReduction, Rotate, and Scale.
void QuillImageFilterImplementation::cancel | ( | ) | [virtual] |
Note: This is currently an API placeholder with no actual functionality.
Cancel a call to apply() which is currently running in some other thread. This is the only method of its class which is thread safe. Cancellation implementation by filter is optional. When the canceled filter recognizes the cancellation, it will terminate gracefully, return an invalid QuillImage, and have its error() value set as QuillImageFilter::CanceledError.
QuillImageFilter::ImageFilterError QuillImageFilterImplementation::error | ( | ) | const [virtual] |
Reimplemented in LoadFilter.
QIODevice * QuillImageFilterImplementation::iODevice | ( | ) | const [virtual] |
Returns the IO device used, see setIODevice().
Reimplemented in LoadFilter, and SaveFilter.
virtual const QString QuillImageFilterImplementation::name | ( | ) | const [inline, virtual] |
Reimplemented in AutoContrast, BrightnessContrast, Crop, LoadFilter, Overlay, SaveFilter, ScaleCrop, Flip, FreeRotate, Gaussian, Lanczos, AutoLevels, Levels, RedEyeDetection, RedEyeReduction, Rotate, and Scale.
QRect QuillImageFilterImplementation::newArea | ( | const QSize & | fullImageSize, | |
const QRect & | area | |||
) | const [virtual] |
QSize QuillImageFilterImplementation::newFullImageSize | ( | const QSize & | fullImageSize | ) | const [virtual] |
If the filter changes dimensions of the image, this can be used to re-calculate a new size for the full image.
Reimplemented in Crop, LoadFilter, ScaleCrop, FreeRotate, Rotate, and Scale.
QVariant QuillImageFilterImplementation::option | ( | const QString & | filterOption | ) | const [virtual] |
Returns the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.
Reimplemented in BrightnessContrast, Crop, LoadFilter, Overlay, SaveFilter, ScaleCrop, Flip, FreeRotate, Gaussian, Lanczos, Levels, RedEyeDetection, RedEyeReduction, Rotate, and Scale.
QuillImageFilter::QuillFilterRole QuillImageFilterImplementation::role | ( | ) | const [virtual] |
Reimplemented in LoadFilter, Overlay, SaveFilter, and ScaleCrop.
void QuillImageFilterImplementation::setIODevice | ( | QIODevice * | iODevice | ) | [virtual] |
Sets the IO device used. This is only used by filters which represent file system access (loading and saving). The device remains property of the caller but remains in use by the filter; it should only be deleted after the filter has been removed.
Reimplemented in LoadFilter, and SaveFilter.
bool QuillImageFilterImplementation::setOption | ( | const QString & | filterOption, | |
const QVariant & | value | |||
) | [virtual] |
Sets the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.
Reimplemented in BrightnessContrast, Crop, LoadFilter, Overlay, SaveFilter, ScaleCrop, Flip, FreeRotate, Gaussian, Lanczos, Levels, RedEyeDetection, RedEyeReduction, Rotate, and Scale.
const QStringList QuillImageFilterImplementation::supportedOptions | ( | ) | const [virtual] |
Reimplemented in BrightnessContrast, Crop, LoadFilter, Overlay, SaveFilter, ScaleCrop, Flip, FreeRotate, Gaussian, Lanczos, Levels, RedEyeDetection, RedEyeReduction, Rotate, and Scale.