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


C++ FilterAction::parameter方法代码示例

本文整理汇总了C++中FilterAction::parameter方法的典型用法代码示例。如果您正苦于以下问题:C++ FilterAction::parameter方法的具体用法?C++ FilterAction::parameter怎么用?C++ FilterAction::parameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FilterAction的用法示例。


在下文中一共展示了FilterAction::parameter方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

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