本文整理汇总了C++中FilterAction::setDisplayableName方法的典型用法代码示例。如果您正苦于以下问题:C++ FilterAction::setDisplayableName方法的具体用法?C++ FilterAction::setDisplayableName怎么用?C++ FilterAction::setDisplayableName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FilterAction
的用法示例。
在下文中一共展示了FilterAction::setDisplayableName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filterAction
FilterAction DImgBuiltinFilter::filterAction() const
{
FilterAction action;
switch (m_type)
{
case NoOperation:
default:
return action;
case Rotate90:
case Rotate180:
case Rotate270:
{
action = FilterAction("transform:rotate", 1);
int angle;
if (m_type == Rotate90)
{
angle = 90;
}
else if (m_type == Rotate180)
{
angle = 180;
}
else
{
angle = 270;
}
action.addParameter("angle", angle);
break;
}
case FlipHorizontally:
case FlipVertically:
{
action = FilterAction("transform:flip", 1);
action.addParameter("direction", m_type == FlipHorizontally ? "horizontal" : "vertical");
break;
}
case Crop:
{
action = FilterAction("transform:crop", 1);
QRect r = m_arg.toRect();
action.addParameter("x", r.x());
action.addParameter("y", r.y());
action.addParameter("width", r.width());
action.addParameter("height", r.height());
break;
}
case Resize:
{
action = FilterAction("transform:resize", 1);
QSize s = m_arg.toSize();
action.addParameter("width", s.width());
action.addParameter("height", s.height());
break;
}
case ConvertTo8Bit:
case ConvertTo16Bit:
{
action = FilterAction("transform:convertDepth", 1);
action.addParameter("depth", m_type == ConvertTo8Bit ? 8 : 16);
break;
}
}
action.setDisplayableName(displayableName());
return action;
}