A pseudo-filter for saving images. More...
#include <savefilter.h>
Public Member Functions | |
SaveFilter () | |
~SaveFilter () | |
QuillImage | apply (const QuillImage &image) const |
bool | setOption (const QString &option, const QVariant &value) |
QVariant | option (const QString &option) const |
const QStringList | supportedOptions () const |
const QString | name () const |
QuillImageFilter::QuillFilterRole | role () const |
QIODevice * | iODevice () const |
void | setIODevice (QIODevice *iODevice) |
A pseudo-filter for saving images.
Saves its input image to the file system or if iODevice() is set, to the given IO device. Apply() will return an empty image on failure, or a non-empty image on success.
Supports options: FileName, FileFormat (as in QImageReader).
Default behavior: does nothing (if iODevice() is specified, writes input to that file).
SaveFilter::SaveFilter | ( | ) |
SaveFilter::~SaveFilter | ( | ) |
QuillImage SaveFilter::apply | ( | const QuillImage & | image | ) | const [virtual] |
Applies the save operation.
Reimplemented from QuillImageFilterImplementation.
QIODevice * SaveFilter::iODevice | ( | ) | const [virtual] |
Returns the IO device used, see setIODevice().
Reimplemented from QuillImageFilterImplementation.
const QString SaveFilter::name | ( | ) | const [inline, virtual] |
Reimplemented from QuillImageFilterImplementation.
QVariant SaveFilter::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 from QuillImageFilterImplementation.
QuillImageFilter::QuillFilterRole SaveFilter::role | ( | ) | const [virtual] |
Reimplemented from QuillImageFilterImplementation.
void SaveFilter::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 from QuillImageFilterImplementation.
bool SaveFilter::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 from QuillImageFilterImplementation.
const QStringList SaveFilter::supportedOptions | ( | ) | const [virtual] |
Reimplemented from QuillImageFilterImplementation.