digiKam
|
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 > ¶ms) |
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 |
Digikam::FilterAction::FilterAction | ( | ) |
Digikam::FilterAction::FilterAction | ( | const QString & | identifier, |
int | version, | ||
FilterAction::Category | category = ReproducibleFilter |
||
) |
void Digikam::FilterAction::addFlag | ( | Flags | flags | ) |
References flags(), and m_flags.
Referenced by Digikam::DImageHistory::fromXml().
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().
FilterAction::Category Digikam::FilterAction::category | ( | ) | const |
void Digikam::FilterAction::clearParameters | ( | ) |
Clear all parameters.
References m_params.
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().
QString Digikam::FilterAction::displayableName | ( | ) | const |
References m_displayableName.
Referenced by Digikam::DImgFilterManager::i18nDisplayableName(), setDisplayableName(), and Digikam::DImageHistory::toXml().
FilterAction::Flags Digikam::FilterAction::flags | ( | ) | const |
References m_flags.
Referenced by addFlag(), removeFlag(), setFlags(), and Digikam::DImageHistory::toXml().
bool Digikam::FilterAction::hasParameter | ( | const QString & | key | ) | const |
References m_params.
Referenced by Digikam::CurvesContainer::fromFilterAction().
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().
QString Digikam::FilterAction::identifier | ( | ) | const |
Returns a technical identifier for the filter used to produce this action. Can include a namespace. Example: digikam:charcoal
References m_identifier.
Referenced by Digikam::ToolTipFiller::filterActionTipContents(), Digikam::DImgFilterManager::filterIcon(), Digikam::FilterActionFilter::filterImage(), Digikam::DImgFilterManager::i18nDisplayableName(), Digikam::FilterActionFilter::isSupported(), Digikam::DImgBuiltinFilter::setAction(), and Digikam::DImageHistory::toXml().
bool Digikam::FilterAction::isNull | ( | ) | const |
References m_identifier.
Referenced by Digikam::DImageHistory::actionCount(), Digikam::DImageHistory::allActions(), Digikam::ToolTipFiller::filterActionTipContents(), Digikam::FilterActionFilter::filterImage(), Digikam::DImageHistory::hasActions(), Digikam::FilterActionFilter::isComplexAction(), Digikam::FilterActionFilter::isReproducible(), Digikam::FilterActionFilter::isSupported(), Digikam::DImageHistory::isValid(), Digikam::DImageHistory::operator<<(), and Digikam::DImageHistory::toXml().
bool Digikam::FilterAction::operator== | ( | const FilterAction & | other | ) | const |
References m_category, m_description, m_displayableName, m_identifier, m_params, and m_version.
QVariant & Digikam::FilterAction::parameter | ( | const QString & | key | ) |
References m_params.
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().
|
inline |
Returns parameter converted from QVariant to given type
References T.
|
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.
QHash< QString, QVariant > & Digikam::FilterAction::parameters | ( | ) |
References m_params.
const QHash< QString, QVariant > & Digikam::FilterAction::parameters | ( | ) | const |
References m_params.
Referenced by Digikam::ToolTipFiller::filterActionTipContents(), Digikam::HotPixelFixer::readParameters(), and Digikam::DImageHistory::toXml().
void Digikam::FilterAction::removeParameters | ( | const QString & | key | ) |
Removes all parameters for key.
References m_params.
void Digikam::FilterAction::setDescription | ( | const QString & | description | ) |
References description(), and m_description.
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().
void Digikam::FilterAction::setParameters | ( | const QHash< QString, QVariant > & | params | ) |
Replaces parameters.
References m_params.
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().
|
protected |
NOTE: Value class, do not create a d-pointer.
Referenced by category(), and operator==().
|
protected |
Referenced by description(), operator==(), and setDescription().
|
protected |
Referenced by displayableName(), operator==(), and setDisplayableName().
|
protected |
Referenced by addFlag(), flags(), removeFlag(), and setFlags().
|
protected |
Referenced by identifier(), isNull(), and operator==().
|
protected |
Referenced by addParameter(), clearParameters(), hasParameter(), hasParameters(), operator==(), parameter(), parameters(), removeParameters(), and setParameters().
|
protected |
Referenced by operator==(), and version().