| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Digikam::DImgBuiltinFilter Class Reference

## Public Types
enum | Type { NoOperation , Rotate90 , Rotate180 , Rotate270 , FlipHorizontally , FlipVertically , Crop , Resize , ConvertTo8Bit , ConvertTo16Bit }

## Public Member Functions
| DImgBuiltinFilter ()=default
| Create a filter performing no operation.
| DImgBuiltinFilter (const FilterAction &action)
| Create a filter for the given action.
| DImgBuiltinFilter (Type type, const QVariant &arg=QVariant())
| Create a filter of the given type.
void | apply (DImg &image) const
| Apply the described change to the given image reference.
DImgThreadedFilter * | createThreadedFilter (DImg *const orgImage, QObject *const parent=nullptr) const
DImgThreadedFilter * | createThreadedFilter (QObject *const parent=nullptr) const
QString | displayableName () const
FilterAction | filterAction () const
QString | filterIcon () const
QString | i18nDisplayableName () const
bool | isReversible () const
bool | isValid () const
| Checks that the action is supported and valid arguments are set.
DImgBuiltinFilter | reverseFilter () const
void | setAction (const FilterAction &action)
| Same as constructor.
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 = NoOperation

## Member Enumeration Documentation

## ◆ Type

enum Digikam::DImgBuiltinFilter::Type

Enumerator
Crop | Argument: QRect.
Resize | Argument: QSize.

## Constructor & Destructor Documentation

## ◆ DImgBuiltinFilter() [1/2]

Digikam::DImgBuiltinFilter::DImgBuiltinFilter | ( | const FilterAction & | action | ) |
| explicit

If the action is not supported, the filter will perform no operation.

## ◆ DImgBuiltinFilter() [2/2]

Digikam::DImgBuiltinFilter::DImgBuiltinFilter | ( | Type | type,
|  | const QVariant & | arg = `QVariant()`
| ) |  |
| explicit

See documentation of Type for required arguments.

## Member Function Documentation

## ◆ createThreadedFilter()

DImgThreadedFilter * Digikam::DImgBuiltinFilter::createThreadedFilter | ( | QObject *const | parent = `nullptr` | ) | const

Returns
  A DImgThreadedFilter which executes this builtin action.

## ◆ displayableName()

QString Digikam::DImgBuiltinFilter::displayableName | ( |  | ) | const

Returns
  A displayableName for this filter

## ◆ filterAction()

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.

## ◆ isSupported()

bool Digikam::DImgBuiltinFilter::isSupported | ( | const QString & | filterIdentifier | ) |
| static

Returns
  True if the given filter and version are supported by DImgBuiltinFilter

## ◆ reverseFilter()

DImgBuiltinFilter Digikam::DImgBuiltinFilter::reverseFilter | ( |  | ) | const

Returns
  The reverse action of this filter. If the current action is not revertible, returns an invalid filter.

## ◆ supportedVersions()

QList< int > Digikam::DImgBuiltinFilter::supportedVersions | ( | const QString & | filterIdentifier | ) |
| static

Returns
  A list of supported versions of the given filter