当前位置: 首页>>代码示例>>C++>>正文


C++ FilterAction类代码示例

本文整理汇总了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);
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:7,代码来源:bcgfilter.cpp

示例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();
        }
    }
}
开发者ID:swatilodha,项目名称:digikam,代码行数:25,代码来源:dimgfiltermanager.cpp

示例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();
    }
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:8,代码来源:nrfilter.cpp

示例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;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:9,代码来源:bcgfilter.cpp

示例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());
}
开发者ID:bblu,项目名称:wireshark,代码行数:11,代码来源:tap_parameter_dialog.cpp

示例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();
    }
}
开发者ID:KDE,项目名称:digikam,代码行数:12,代码来源:distortionfxfilter.cpp

示例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);
}
开发者ID:KDE,项目名称:digikam,代码行数:12,代码来源:bwsepiafilter.cpp

示例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;
}
开发者ID:KDE,项目名称:digikam,代码行数:7,代码来源:redeyecorrectioncontainer.cpp

示例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());
}
开发者ID:UIKit0,项目名称:digikam,代码行数:13,代码来源:freerotationfilter.cpp

示例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());
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:shearfilter.cpp

示例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);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:20,代码来源:dimagefilteractiontest.cpp

示例12: filterIcon

QString DImgFilterManager::filterIcon(const FilterAction& action)
{
    QString iconName = filterIcon(action.identifier());

    if (!iconName.isNull())
    {
        return iconName;
    }

    return QLatin1String("document-edit");
}
开发者ID:swatilodha,项目名称:digikam,代码行数:11,代码来源:dimgfiltermanager.cpp

示例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);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:10,代码来源:wbfilter.cpp

示例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;
}
开发者ID:UIKit0,项目名称:digikam,代码行数:12,代码来源:wbfilter.cpp

示例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;
        }
    }
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:64,代码来源:dimgbuiltinfilter.cpp


注:本文中的FilterAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。