本文整理汇总了C++中FilterAction类的典型用法代码示例。如果您正苦于以下问题:C++ FilterAction类的具体用法?C++ FilterAction怎么用?C++ FilterAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FilterAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeToFilterAction
void BCGContainer::writeToFilterAction(FilterAction& action, const QString& prefix) const
{
action.addParameter(prefix + "channel", channel);
action.addParameter(prefix + "brightness", brightness);
action.addParameter(prefix + "contrast", contrast);
action.addParameter(prefix + "gamma", gamma);
}
示例2: if
QString DImgFilterManager::i18nDisplayableName(const FilterAction& action)
{
if (action.displayableName().isEmpty() && action.identifier().isEmpty())
{
return i18n("Unknown filter");
}
else
{
QString i18nDispName = i18nDisplayableName(action.identifier());
QString metadataDispName = action.displayableName();
if (!i18nDispName.isEmpty())
{
return i18nDispName;
}
else if (!metadataDispName.isEmpty())
{
return metadataDispName;
}
else
{
return action.identifier();
}
}
}
示例3: readParameters
void NRFilter::readParameters(const FilterAction& action)
{
for (int i = 0; i < 3; ++i)
{
d->settings.softness[i] = action.parameter(QString("softness[%1]").arg(i)).toDouble();
d->settings.thresholds[i] = action.parameter(QString("thresholds[%1]").arg(i)).toDouble();
}
}
示例4: fromFilterAction
BCGContainer BCGContainer::fromFilterAction(const FilterAction& action, const QString& prefix)
{
BCGContainer settings;
settings.channel = action.parameter(prefix + "channel", settings.channel);
settings.brightness = action.parameter(prefix + "brightness", settings.brightness);
settings.contrast = action.parameter(prefix + "contrast", settings.contrast);
settings.gamma = action.parameter(prefix + "gamma", settings.gamma);
return settings;
}
示例5: filterActionTriggered
void TapParameterDialog::filterActionTriggered()
{
FilterAction *fa = qobject_cast<FilterAction *>(QObject::sender());
QString filter_expr = filterExpression();
if (!fa || filter_expr.isEmpty()) {
return;
}
emit filterAction(filter_expr, fa->action(), fa->actionType());
}
示例6: readParameters
void DistortionFXFilter::readParameters(const FilterAction& action)
{
d->antiAlias = action.parameter(QLatin1String("antiAlias")).toBool();
d->effectType = action.parameter(QLatin1String("type")).toInt();
d->iteration = action.parameter(QLatin1String("iteration")).toInt();
d->level = action.parameter(QLatin1String("level")).toInt();
if (d->effectType == Tile)
{
d->randomSeed = action.parameter(QLatin1String("randomSeed")).toUInt();
}
}
示例7: readParameters
void BWSepiaFilter::readParameters(const FilterAction& action)
{
d->settings.filmType = action.parameter(QLatin1String("filmType")).toInt();
d->settings.filterType = action.parameter(QLatin1String("filterType")).toInt();
d->settings.preview = action.parameter(QLatin1String("preview")).toBool();
d->settings.previewType = action.parameter(QLatin1String("previewType")).toInt();
d->settings.strength = action.parameter(QLatin1String("strength")).toDouble();
d->settings.toneType = action.parameter(QLatin1String("toneType")).toInt();
d->settings.curvesPrm = CurvesContainer::fromFilterAction(action);
d->settings.bcgPrm = BCGContainer::fromFilterAction(action);
}
示例8: fromFilterAction
RedEyeCorrectionContainer RedEyeCorrectionContainer::fromFilterAction(const FilterAction& action, const QString& prefix)
{
RedEyeCorrectionContainer settings;
settings.m_redToAvgRatio = action.parameter(prefix + QLatin1String("redtoavgratio"), settings.m_redToAvgRatio);
return settings;
}
示例9: readParameters
void FreeRotationFilter::readParameters(const FilterAction& action)
{
d->settings.angle = action.parameter("angle").toDouble();
d->settings.antiAlias = action.parameter("antiAlias").toBool();
d->settings.autoCrop = action.parameter("autoCrop").toInt();
d->settings.newSize = action.parameter("newSize").toSize();
d->settings.orgH = action.parameter("orgH").toInt();
d->settings.orgW = action.parameter("orgW").toInt();
d->settings.backgroundColor.setRed(action.parameter("backgroundColorR").toInt());
d->settings.backgroundColor.setGreen(action.parameter("backgroundColorG").toInt());
d->settings.backgroundColor.setBlue(action.parameter("backgroundColorB").toInt());
d->settings.backgroundColor.setAlpha(action.parameter("backgroundColorA").toInt());
}
示例10: readParameters
void ShearFilter::readParameters(const FilterAction& action)
{
d->antiAlias = action.parameter("antiAlias").toBool();
d->hAngle = action.parameter("hAngle").toFloat();
d->orgH = action.parameter("orgH").toInt();
d->orgW = action.parameter("orgW").toInt();
d->vAngle = action.parameter("vAngle").toFloat();
d->backgroundColor.setRed(action.parameter("backgroundColorR").toInt());
d->backgroundColor.setGreen(action.parameter("backgroundColorG").toInt());
d->backgroundColor.setBlue(action.parameter("backgroundColorB").toInt());
d->backgroundColor.setAlpha(action.parameter("backgroundColorA").toInt());
}
示例11: qDebug
void DImageFilterActionTest::testDRawDecoding()
{
DRawDecoding params;
params.rawPrm.sixteenBitsImage = true;
params.rawPrm.autoBrightness = true;
params.rawPrm.whiteBalance = KDcrawIface::RawDecodingSettings::AERA;
params.rawPrm.RGBInterpolate4Colors = true;
params.rawPrm.RAWQuality = KDcrawIface::RawDecodingSettings::AMAZE;
params.rawPrm.NRType = KDcrawIface::RawDecodingSettings::WAVELETSNR;
params.rawPrm.outputColorSpace = KDcrawIface::RawDecodingSettings::ADOBERGB;
FilterAction action;
params.writeToFilterAction(action);
qDebug() << action.parameters();
DRawDecoding params2 = DRawDecoding::fromFilterAction(action);
QVERIFY(params == params2);
}
示例12: filterIcon
QString DImgFilterManager::filterIcon(const FilterAction& action)
{
QString iconName = filterIcon(action.identifier());
if (!iconName.isNull())
{
return iconName;
}
return QLatin1String("document-edit");
}
示例13: writeToFilterAction
void WBContainer::writeToFilterAction(FilterAction& action, const QString& prefix) const
{
action.addParameter(prefix + "black", black);
action.addParameter(prefix + "exposition", exposition);
action.addParameter(prefix + "temperature", temperature);
action.addParameter(prefix + "green", green);
action.addParameter(prefix + "dark", dark);
action.addParameter(prefix + "gamma", gamma);
action.addParameter(prefix + "saturation", saturation);
}
示例14: fromFilterAction
WBContainer WBContainer::fromFilterAction(const FilterAction& action, const QString& prefix)
{
WBContainer settings;
settings.black = action.parameter(prefix + "black", settings.black);
settings.exposition = action.parameter(prefix + "exposition", settings.exposition);
settings.temperature = action.parameter(prefix + "temperature", settings.temperature);
settings.green = action.parameter(prefix + "green", settings.green);
settings.dark = action.parameter(prefix + "dark", settings.dark);
settings.gamma = action.parameter(prefix + "gamma", settings.gamma);
settings.saturation = action.parameter(prefix + "saturation", settings.saturation);
return settings;
}
示例15: setAction
void DImgBuiltinFilter::setAction(const FilterAction& action)
{
m_type = NoOperation;
if (action.identifier() == "transform:rotate" && action.version() == 1)
{
int angle = action.parameter("angle").toInt();
if (angle == 90)
{
m_type = Rotate90;
}
else if (angle == 180)
{
m_type = Rotate180;
}
else
{
m_type = Rotate270;
}
}
else if (action.identifier() == "transform:flip" && action.version() == 1)
{
QString direction = action.parameter("direction").toString();
if (direction == "vertical")
{
m_type = FlipVertically;
}
else
{
m_type = FlipHorizontally;
}
}
else if (action.identifier() == "transform:crop" && action.version() == 1)
{
m_type = Crop;
int x = action.parameter("x").toInt();
int y = action.parameter("y").toInt();
int width = action.parameter("width").toInt();
int height = action.parameter("height").toInt();
m_arg = QRect(x, y, width, height);
}
else if (action.identifier() == "transform:resize" && action.version() == 1)
{
m_type = Resize;
int width = action.parameter("width").toInt();
int height = action.parameter("height").toInt();
m_arg = QSize(width, height);
}
else if (action.identifier() == "transform:convertDepth" && action.version() == 1)
{
int depth = action.parameter("depth").toInt();
if (depth == 16)
{
m_type = ConvertTo16Bit;
}
else
{
m_type = ConvertTo8Bit;
}
}
}