digiKam
Digikam::FilterAction Class Reference
+ Inheritance diagram for Digikam::FilterAction:

Public Types

enum  Category {
  ReproducibleFilter = 0 , ComplexFilter = 1 , DocumentedHistory = 2 , CategoryFirst = ReproducibleFilter ,
  CategoryLast = DocumentedHistory
}
 
enum  Flag { ExplicitBranch = 1 << 0 }
 

Public Member Functions

void addFlag (Flags flags)
 
void addParameter (const QString &key, const QVariant &value)
 Sets parameter, removing all other values for the same key. More...
 
Category category () const
 
void clearParameters ()
 Clear all parameters. More...
 
QString description () const
 
QString displayableName () const
 
 FilterAction ()
 
 FilterAction (const QString &identifier, int version, Category category=ReproducibleFilter)
 
Flags flags () const
 
bool hasParameter (const QString &key) const
 
bool hasParameters () const
 
QString identifier () const
 
bool isNull () const
 
bool operator== (const FilterAction &other) const
 
QVariant & parameter (const QString &key)
 
const QVariant parameter (const QString &key) const
 
template<typename T >
T parameter (const QString &key) const
 
template<typename T >
T parameter (const QString &key, const T &defaultValue) const
 
QHash< QString, QVariant > & parameters ()
 
const QHash< QString, QVariant > & parameters () const
 
void removeFlag (Flags flags)
 
void removeParameters (const QString &key)
 Removes all parameters for key. More...
 
void setDescription (const QString &description)
 
void setDisplayableName (const QString &displayableName)
 
void setFlags (Flags flags)
 
void setParameters (const QHash< QString, QVariant > &params)
 Replaces parameters. More...
 
int version () const
 

Protected Attributes

Category m_category
 NOTE: Value class, do not create a d-pointer. More...
 
QString m_description
 
QString m_displayableName
 
Flags m_flags
 
QString m_identifier
 
QHash< QString, QVariant > m_params
 
int m_version
 

Member Enumeration Documentation

◆ Category

Enumerator
ReproducibleFilter 

NOTE: Do not change existing values, they are written to XML in files! When given the set of stored parameters and the original data, an identical result will be produced.

ComplexFilter 

The operation is documented and a number of parameters may be known, but the identical result cannot be reproduced. It may be possible to produce a sufficiently similar result.

DocumentedHistory 

The source images are known, a textual description may be added, but there is no way to automatically replay

CategoryFirst 
CategoryLast 

◆ Flag

Enumerator
ExplicitBranch 

The editing step of this filter action explicitly branches from the parent. This is an optional hint that the result is meant as a new version.

Constructor & Destructor Documentation

◆ FilterAction() [1/2]

Digikam::FilterAction::FilterAction ( )

◆ FilterAction() [2/2]

Digikam::FilterAction::FilterAction ( const QString &  identifier,
int  version,
FilterAction::Category  category = ReproducibleFilter 
)

Member Function Documentation

◆ addFlag()

void Digikam::FilterAction::addFlag ( Flags  flags)

References flags(), and m_flags.

Referenced by Digikam::DImageHistory::fromXml().

◆ addParameter()

void Digikam::FilterAction::addParameter ( const QString &  key,
const QVariant &  value 
)

Sets parameter, removing all other values for the same key.

References m_params, and value.

Referenced by DigikamEditorPerspectiveToolPlugin::PerspectiveWidget::applyPerspectiveAdjustment(), Digikam::DImgBuiltinFilter::filterAction(), Digikam::BWSepiaFilter::filterAction(), Digikam::InfraredFilter::filterAction(), Digikam::MixerFilter::filterAction(), Digikam::TonalityFilter::filterAction(), Digikam::CBFilter::filterAction(), Digikam::BorderFilter::filterAction(), Digikam::TextureFilter::filterAction(), Digikam::FilmFilter::filterAction(), Digikam::BlurFilter::filterAction(), Digikam::BlurFXFilter::filterAction(), Digikam::CharcoalFilter::filterAction(), Digikam::ColorFXFilter::filterAction(), Digikam::DistortionFXFilter::filterAction(), Digikam::EmbossFilter::filterAction(), Digikam::FilmGrainFilter::filterAction(), Digikam::OilPaintFilter::filterAction(), Digikam::RainDropFilter::filterAction(), Digikam::GreycstorationFilter::filterAction(), Digikam::HotPixelFixer::filterAction(), Digikam::HSLFilter::filterAction(), Digikam::IccTransformFilter::filterAction(), Digikam::LocalContrastFilter::filterAction(), Digikam::AntiVignettingFilter::filterAction(), Digikam::LensDistortionFilter::filterAction(), Digikam::LensFunFilter::filterAction(), Digikam::LevelsFilter::filterAction(), Digikam::NRFilter::filterAction(), Digikam::RefocusFilter::filterAction(), Digikam::SharpenFilter::filterAction(), Digikam::UnsharpMaskFilter::filterAction(), Digikam::ContentAwareFilter::filterAction(), Digikam::FreeRotationFilter::filterAction(), Digikam::ShearFilter::filterAction(), Digikam::DImageHistory::fromXml(), Digikam::BCGContainer::writeToFilterAction(), Digikam::CurvesContainer::writeToFilterAction(), Digikam::HotPixelContainer::writeToFilterAction(), Digikam::RedEyeCorrectionContainer::writeToFilterAction(), and Digikam::WBContainer::writeToFilterAction().

◆ category()

◆ clearParameters()

void Digikam::FilterAction::clearParameters ( )

Clear all parameters.

References m_params.

◆ description()

QString Digikam::FilterAction::description ( ) const

Returns a description / comment for this action. In the case of DocumentedHistory, this may be the most useful value.

References m_description.

Referenced by Digikam::ToolTipFiller::filterActionTipContents(), and setDescription().

◆ displayableName()

QString Digikam::FilterAction::displayableName ( ) const

◆ flags()

FilterAction::Flags Digikam::FilterAction::flags ( ) const

◆ hasParameter()

bool Digikam::FilterAction::hasParameter ( const QString &  key) const

◆ hasParameters()

bool Digikam::FilterAction::hasParameters ( ) const

Access parameters. A parameters is a key -> value pair. Keys need to be unique.

References m_params.

Referenced by Digikam::ToolTipFiller::filterActionTipContents().

◆ identifier()

QString Digikam::FilterAction::identifier ( ) const

◆ isNull()

◆ operator==()

bool Digikam::FilterAction::operator== ( const FilterAction other) const

◆ parameter() [1/4]

QVariant & Digikam::FilterAction::parameter ( const QString &  key)

References m_params.

◆ parameter() [2/4]

const QVariant Digikam::FilterAction::parameter ( const QString &  key) const

References m_params.

Referenced by Digikam::BCGContainer::fromFilterAction(), Digikam::CurvesContainer::fromFilterAction(), Digikam::HotPixelContainer::fromFilterAction(), Digikam::RedEyeCorrectionContainer::fromFilterAction(), Digikam::WBContainer::fromFilterAction(), Digikam::BWSepiaFilter::readParameters(), Digikam::InfraredFilter::readParameters(), Digikam::MixerFilter::readParameters(), Digikam::TonalityFilter::readParameters(), Digikam::CBFilter::readParameters(), Digikam::BorderFilter::readParameters(), Digikam::TextureFilter::readParameters(), Digikam::FilmFilter::readParameters(), Digikam::BlurFilter::readParameters(), Digikam::BlurFXFilter::readParameters(), Digikam::CharcoalFilter::readParameters(), Digikam::ColorFXFilter::readParameters(), Digikam::DistortionFXFilter::readParameters(), Digikam::EmbossFilter::readParameters(), Digikam::FilmGrainFilter::readParameters(), Digikam::OilPaintFilter::readParameters(), Digikam::RainDropFilter::readParameters(), Digikam::GreycstorationFilter::readParameters(), Digikam::HotPixelFixer::readParameters(), Digikam::HSLFilter::readParameters(), Digikam::IccTransformFilter::readParameters(), Digikam::LocalContrastFilter::readParameters(), Digikam::AntiVignettingFilter::readParameters(), Digikam::LensDistortionFilter::readParameters(), Digikam::LensFunFilter::readParameters(), Digikam::LevelsFilter::readParameters(), Digikam::NRFilter::readParameters(), Digikam::RefocusFilter::readParameters(), Digikam::SharpenFilter::readParameters(), Digikam::UnsharpMaskFilter::readParameters(), Digikam::ContentAwareFilter::readParameters(), Digikam::FreeRotationFilter::readParameters(), Digikam::ShearFilter::readParameters(), Digikam::IccTransformFilter::readParametersError(), and Digikam::DImgBuiltinFilter::setAction().

◆ parameter() [3/4]

template<typename T >
T Digikam::FilterAction::parameter ( const QString &  key) const
inline

Returns parameter converted from QVariant to given type

References T.

◆ parameter() [4/4]

template<typename T >
T Digikam::FilterAction::parameter ( const QString &  key,
const T defaultValue 
) const
inline

Read parameter with a default value: If there is a parameter for the given key, return it converted from QVariant to the template type. If there is no parameter, return the given default value.

References T.

◆ parameters() [1/2]

QHash< QString, QVariant > & Digikam::FilterAction::parameters ( )

References m_params.

◆ parameters() [2/2]

const QHash< QString, QVariant > & Digikam::FilterAction::parameters ( ) const

◆ removeFlag()

void Digikam::FilterAction::removeFlag ( Flags  flags)

References flags(), and m_flags.

◆ removeParameters()

void Digikam::FilterAction::removeParameters ( const QString &  key)

Removes all parameters for key.

References m_params.

◆ setDescription()

void Digikam::FilterAction::setDescription ( const QString &  description)

References description(), and m_description.

◆ setDisplayableName()

void Digikam::FilterAction::setDisplayableName ( const QString &  displayableName)

References displayableName(), and m_displayableName.

Referenced by DigikamEditorPerspectiveToolPlugin::PerspectiveWidget::applyPerspectiveAdjustment(), Digikam::DImgBuiltinFilter::filterAction(), Digikam::BWSepiaFilter::filterAction(), Digikam::InfraredFilter::filterAction(), Digikam::MixerFilter::filterAction(), Digikam::TonalityFilter::filterAction(), Digikam::CBFilter::filterAction(), Digikam::BorderFilter::filterAction(), Digikam::TextureFilter::filterAction(), Digikam::FilmFilter::filterAction(), Digikam::BlurFilter::filterAction(), Digikam::BlurFXFilter::filterAction(), Digikam::CharcoalFilter::filterAction(), Digikam::ColorFXFilter::filterAction(), Digikam::DistortionFXFilter::filterAction(), Digikam::EmbossFilter::filterAction(), Digikam::FilmGrainFilter::filterAction(), Digikam::InvertFilter::filterAction(), Digikam::OilPaintFilter::filterAction(), Digikam::RainDropFilter::filterAction(), Digikam::GreycstorationFilter::filterAction(), Digikam::HSLFilter::filterAction(), Digikam::IccTransformFilter::filterAction(), Digikam::LocalContrastFilter::filterAction(), Digikam::AntiVignettingFilter::filterAction(), Digikam::LensDistortionFilter::filterAction(), Digikam::LensFunFilter::filterAction(), Digikam::LevelsFilter::filterAction(), Digikam::NRFilter::filterAction(), Digikam::RefocusFilter::filterAction(), Digikam::SharpenFilter::filterAction(), Digikam::UnsharpMaskFilter::filterAction(), Digikam::FreeRotationFilter::filterAction(), Digikam::ShearFilter::filterAction(), Digikam::WBFilter::filterAction(), and Digikam::DImageHistory::fromXml().

◆ setFlags()

void Digikam::FilterAction::setFlags ( Flags  flags)

References flags(), and m_flags.

◆ setParameters()

void Digikam::FilterAction::setParameters ( const QHash< QString, QVariant > &  params)

Replaces parameters.

References m_params.

◆ version()

int Digikam::FilterAction::version ( ) const

Returns the version (>= 1) of the filter used to produce this action. When a filter / tool is found by the identifier, it can decide by the version if it supports this action and which parameters it expects.

References m_version.

Referenced by Digikam::ToolTipFiller::filterActionTipContents(), Digikam::FilterActionFilter::filterImage(), Digikam::FilterActionFilter::isSupported(), Digikam::DImgBuiltinFilter::setAction(), and Digikam::DImageHistory::toXml().

Member Data Documentation

◆ m_category

Category Digikam::FilterAction::m_category
protected

NOTE: Value class, do not create a d-pointer.

Referenced by category(), and operator==().

◆ m_description

QString Digikam::FilterAction::m_description
protected

◆ m_displayableName

QString Digikam::FilterAction::m_displayableName
protected

◆ m_flags

Flags Digikam::FilterAction::m_flags
protected

Referenced by addFlag(), flags(), removeFlag(), and setFlags().

◆ m_identifier

QString Digikam::FilterAction::m_identifier
protected

Referenced by identifier(), isNull(), and operator==().

◆ m_params

QHash<QString, QVariant> Digikam::FilterAction::m_params
protected

◆ m_version

int Digikam::FilterAction::m_version
protected

Referenced by operator==(), and version().


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