digiKam
|
Public Types | |
enum | Type { NoOperation , Rotate90 , Rotate180 , Rotate270 , FlipHorizontally , FlipVertically , Crop , Resize , ConvertTo8Bit , ConvertTo16Bit } |
Public Member Functions | |
void | apply (DImg &image) const |
DImgThreadedFilter * | createThreadedFilter (DImg *const orgImage, QObject *const parent=nullptr) const |
DImgThreadedFilter * | createThreadedFilter (QObject *const parent=nullptr) const |
DImgBuiltinFilter () | |
DImgBuiltinFilter (const FilterAction &action) | |
DImgBuiltinFilter (Type type, const QVariant &arg=QVariant()) | |
QString | displayableName () const |
FilterAction | filterAction () const |
QString | filterIcon () const |
QString | i18nDisplayableName () const |
bool | isReversible () const |
bool | isValid () const |
DImgBuiltinFilter | reverseFilter () const |
void | setAction (const FilterAction &action) |
void | setAction (Type type, const QVariant &arg=QVariant()) |
Static Public Member Functions | |
static QString | filterIcon (const QString &filterIdentifier) |
static QString | i18nDisplayableName (const QString &filterIdentifier) |
static bool | isSupported (const QString &filterIdentifier) |
static bool | isSupported (const QString &filterIdentifier, int version) |
static QStringList | supportedFilters () |
static QList< int > | supportedVersions (const QString &filterIdentifier) |
Protected Attributes | |
QVariant | m_arg |
Type | m_type |
Digikam::DImgBuiltinFilter::DImgBuiltinFilter | ( | ) |
Create a filter performing no operation
Referenced by reverseFilter().
|
explicit |
Create a filter for the given action. If the action is not supported, the filter will perform no operation.
References setAction().
|
explicit |
Create a filter of the given type. See documentation of Type for required arguments.
References setAction().
void Digikam::DImgBuiltinFilter::apply | ( | DImg & | image | ) | const |
Apply the described change to the given image reference
References ConvertTo16Bit, ConvertTo8Bit, Digikam::DImg::convertToEightBit(), Digikam::DImg::convertToSixteenBit(), Digikam::DImg::crop(), Crop, Digikam::DImg::flip(), FlipHorizontally, FlipVertically, Digikam::DImg::HORIZONTAL, m_arg, m_type, NoOperation, Digikam::DImg::resize(), Resize, Digikam::DImg::ROT180, Digikam::DImg::ROT270, Digikam::DImg::ROT90, Digikam::DImg::rotate(), Rotate180, Rotate270, Rotate90, and Digikam::DImg::VERTICAL.
Referenced by Digikam::EditorCore::Private::applyBuiltinFilter(), Digikam::BatchTool::applyFilter(), Digikam::FilterActionFilter::filterImage(), and Digikam::UndoManager::putImageDataAndHistory().
DImgThreadedFilter * Digikam::DImgBuiltinFilter::createThreadedFilter | ( | DImg *const | orgImage, |
QObject *const | parent = nullptr |
||
) | const |
DImgThreadedFilter * Digikam::DImgBuiltinFilter::createThreadedFilter | ( | QObject *const | parent = nullptr | ) | const |
Returns a DImgThreadedFilter which executes this builtin action.
QString Digikam::DImgBuiltinFilter::displayableName | ( | ) | const |
Returns a displayableName for this filter
References ConvertTo16Bit, ConvertTo8Bit, Crop, FlipHorizontally, FlipVertically, m_type, NoOperation, Resize, Rotate180, Rotate270, and Rotate90.
Referenced by filterAction(), and i18nDisplayableName().
FilterAction Digikam::DImgBuiltinFilter::filterAction | ( | ) | const |
NOTE: The following methods are also accessed by the more general DImgFilterManager methods, so you usually do not need to call these directly. Returns the FilterAction describing this filter.
References Digikam::FilterAction::addParameter(), ConvertTo16Bit, ConvertTo8Bit, Crop, displayableName(), FlipHorizontally, FlipVertically, m_arg, m_type, NoOperation, Resize, Rotate180, Rotate270, Rotate90, and Digikam::FilterAction::setDisplayableName().
Referenced by Digikam::EditorCore::Private::applyBuiltinFilter(), Digikam::BatchTool::applyFilter(), and Digikam::FilterActionFilter::filterImage().
QString Digikam::DImgBuiltinFilter::filterIcon | ( | ) | const |
References ConvertTo16Bit, ConvertTo8Bit, Crop, FlipHorizontally, FlipVertically, m_type, NoOperation, Resize, Rotate180, Rotate270, and Rotate90.
Referenced by Digikam::DImgFilterManager::filterIcon().
|
static |
QString Digikam::DImgBuiltinFilter::i18nDisplayableName | ( | ) | const |
References displayableName().
Referenced by Digikam::DImgFilterManager::i18nDisplayableName(), and Digikam::UndoActionReversible::UndoActionReversible().
|
static |
bool Digikam::DImgBuiltinFilter::isReversible | ( | ) | const |
References isValid(), and reverseFilter().
|
static |
Returns if the given filter and version are supported by DImgBuiltinFilter
References supportedFilters().
Referenced by Digikam::DImgFilterManager::filterIcon(), Digikam::FilterActionFilter::filterImage(), Digikam::DImgFilterManager::i18nDisplayableName(), Digikam::DImgFilterManager::isSupported(), isSupported(), supportedVersions(), and Digikam::DImgFilterManager::supportedVersions().
|
static |
References isSupported().
bool Digikam::DImgBuiltinFilter::isValid | ( | ) | const |
Checks that the action is supported and valid arguments are set
References Crop, m_arg, m_type, NoOperation, and Resize.
Referenced by Digikam::FilterActionFilter::filterImage(), and isReversible().
DImgBuiltinFilter Digikam::DImgBuiltinFilter::reverseFilter | ( | ) | const |
Returns the reverse action of this filter. If the current action is not revertible, returns an invalid filter.
References ConvertTo16Bit, ConvertTo8Bit, Crop, DImgBuiltinFilter(), FlipHorizontally, FlipVertically, m_type, NoOperation, Resize, Rotate180, Rotate270, and Rotate90.
Referenced by Digikam::UndoActionReversible::getReverseFilter(), and isReversible().
void Digikam::DImgBuiltinFilter::setAction | ( | const FilterAction & | action | ) |
same as constructor
References ConvertTo16Bit, ConvertTo8Bit, Crop, FlipHorizontally, FlipVertically, Digikam::FilterAction::identifier(), m_arg, m_type, NoOperation, Digikam::FilterAction::parameter(), Resize, Rotate180, Rotate270, Rotate90, and Digikam::FilterAction::version().
Referenced by DImgBuiltinFilter().
void Digikam::DImgBuiltinFilter::setAction | ( | Type | type, |
const QVariant & | arg = QVariant() |
||
) |
|
static |
Referenced by isSupported(), and Digikam::DImgFilterManager::supportedFilters().
|
static |
Returns a list of supported versions of the given filter
References isSupported().
Referenced by Digikam::DImgFilterManager::supportedVersions().
|
protected |
Referenced by apply(), filterAction(), isValid(), and setAction().
|
protected |
Referenced by apply(), displayableName(), filterAction(), filterIcon(), isValid(), reverseFilter(), and setAction().