digiKam
Digikam::DImgBuiltinFilter Class Reference

Public Types

enum  Type {
  NoOperation , Rotate90 , Rotate180 , Rotate270 ,
  FlipHorizontally , FlipVertically , Crop , Resize ,
  ConvertTo8Bit , ConvertTo16Bit
}
 

Public Member Functions

void apply (DImg &image) const
 
DImgThreadedFiltercreateThreadedFilter (DImg *const orgImage, QObject *const parent=nullptr) const
 
DImgThreadedFiltercreateThreadedFilter (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
 

Member Enumeration Documentation

◆ Type

Enumerator
NoOperation 
Rotate90 
Rotate180 
Rotate270 
FlipHorizontally 
FlipVertically 
Crop 

Argument: QRect.

Resize 

Argument: QSize.

ConvertTo8Bit 
ConvertTo16Bit 

Constructor & Destructor Documentation

◆ DImgBuiltinFilter() [1/3]

Digikam::DImgBuiltinFilter::DImgBuiltinFilter ( )

Create a filter performing no operation

Referenced by reverseFilter().

◆ DImgBuiltinFilter() [2/3]

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

Create a filter for the given action. If the action is not supported, the filter will perform no operation.

References setAction().

◆ DImgBuiltinFilter() [3/3]

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

Create a filter of the given type. See documentation of Type for required arguments.

References setAction().

Member Function Documentation

◆ apply()

◆ createThreadedFilter() [1/2]

DImgThreadedFilter * Digikam::DImgBuiltinFilter::createThreadedFilter ( DImg *const  orgImage,
QObject *const  parent = nullptr 
) const

◆ createThreadedFilter() [2/2]

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

References ConvertTo16Bit, ConvertTo8Bit, Crop, FlipHorizontally, FlipVertically, m_type, NoOperation, Resize, Rotate180, Rotate270, and Rotate90.

Referenced by filterAction(), and i18nDisplayableName().

◆ filterAction()

FilterAction Digikam::DImgBuiltinFilter::filterAction ( ) const

◆ filterIcon() [1/2]

QString Digikam::DImgBuiltinFilter::filterIcon ( ) const

◆ filterIcon() [2/2]

QString Digikam::DImgBuiltinFilter::filterIcon ( const QString &  filterIdentifier)
static

◆ i18nDisplayableName() [1/2]

QString Digikam::DImgBuiltinFilter::i18nDisplayableName ( ) const

◆ i18nDisplayableName() [2/2]

QString Digikam::DImgBuiltinFilter::i18nDisplayableName ( const QString &  filterIdentifier)
static

◆ isReversible()

bool Digikam::DImgBuiltinFilter::isReversible ( ) const

References isValid(), and reverseFilter().

◆ isSupported() [1/2]

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

◆ isSupported() [2/2]

bool Digikam::DImgBuiltinFilter::isSupported ( const QString &  filterIdentifier,
int  version 
)
static

References isSupported().

◆ isValid()

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().

◆ reverseFilter()

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().

◆ setAction() [1/2]

◆ setAction() [2/2]

void Digikam::DImgBuiltinFilter::setAction ( Type  type,
const QVariant &  arg = QVariant() 
)

References m_arg, and m_type.

◆ supportedFilters()

QStringList Digikam::DImgBuiltinFilter::supportedFilters ( )
static

◆ supportedVersions()

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

Returns a list of supported versions of the given filter

References isSupported().

Referenced by Digikam::DImgFilterManager::supportedVersions().

Member Data Documentation

◆ m_arg

QVariant Digikam::DImgBuiltinFilter::m_arg
protected

◆ m_type

Type Digikam::DImgBuiltinFilter::m_type
protected

The documentation for this class was generated from the following files: