本文整理汇总了C++中action::Param类的典型用法代码示例。如果您正苦于以下问题:C++ Param类的具体用法?C++ Param怎么用?C++ Param使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Param类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
bool
Action::ValueDescSet::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
{
value_desc=param.get_value_desc();
return true;
}
if(name=="new_value" && param.get_type()==Param::TYPE_VALUE)
{
value=param.get_value();
return true;
}
if(name=="time" && param.get_type()==Param::TYPE_TIME)
{
time=param.get_time();
return true;
}
if(name=="recursive" && param.get_type()==Param::TYPE_BOOL)
{
recursive=param.get_bool();
return true;
}
if(name=="animate" && param.get_type()==Param::TYPE_BOOL)
{
animate=param.get_bool();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ZurbaXI,项目名称:synfig,代码行数:31,代码来源:valuedescset.cpp
示例2:
bool
Action::ValueDescSkeletonLink::set_param(const synfig::String& name, const Action::Param ¶m)
{
if (name == "value_desc" && param.get_type() == Param::TYPE_VALUEDESC
&& param.get_value_desc().parent_is_value_node()
&& ValueNode_Bone::Handle::cast_dynamic(param.get_value_desc().get_parent_value_node())
&& param.get_value_desc().get_parent_desc().parent_is_value_node()
&& ValueNode_StaticList::Handle::cast_dynamic(param.get_value_desc().get_parent_desc().get_parent_value_node()) )
{
value_desc = param.get_value_desc();
return true;
}
if (name == "selected_value_desc" && param.get_type() == Param::TYPE_VALUEDESC)
{
value_desc_list.push_back(param.get_value_desc());
return true;
}
if(name=="time" && param.get_type()==Param::TYPE_TIME)
{
time=param.get_time();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:jottoprimo,项目名称:synfig,代码行数:27,代码来源:valuedescskeletonlink.cpp
示例3:
bool
Action::ValueNodeRename::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
{
value_node=param.get_value_node();
if(value_node && !value_node->is_exported())
{
synfig::error("Action::ValueNodeRename::set_param(): ValueBase node not exported!");
value_node=0;
}
return (bool)value_node;
}
if(name=="name" && param.get_type()==Param::TYPE_STRING)
{
new_name=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:aaronaskew,项目名称:synfig,代码行数:25,代码来源:valuenoderename.cpp
示例4: value_desc
bool
Action::ValueNodeConstUnSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(!value_node && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
{
ValueDesc value_desc(param.get_value_desc());
if(!value_desc.parent_is_value_node())
return false;
value_node=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node());
if(!value_node)
return false;
return true;
}
if(!value_node && name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
{
value_node=ValueNode_Const::Handle::cast_dynamic(param.get_value_node());
if(!value_node)
return false;
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:aaronaskew,项目名称:synfig,代码行数:29,代码来源:valuenodeconstunsetstatic.cpp
示例5: value_desc
bool
Action::ActivepointSimpleAdd::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
{
ValueDesc value_desc(param.get_value_desc());
if(!value_desc.parent_is_value_node())
return false;
value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
if(!value_node)
return false;
index=value_desc.get_index();
return true;
}
if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT)
{
activepoint = param.get_activepoint();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ZurbaXI,项目名称:synfig,代码行数:28,代码来源:activepointsimpleadd.cpp
示例6: value_desc
bool
Action::LayerParamUnSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(!layer && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
{
ValueDesc value_desc(param.get_value_desc());
if(!value_desc.parent_is_layer_param())
return false;
layer=Layer::Handle::cast_dynamic(value_desc.get_layer());
if(!layer)
return false;
}
if(param_name.empty() && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
{
ValueDesc value_desc(param.get_value_desc());
if(!value_desc.parent_is_layer_param())
return false;
param_name=value_desc.get_param_name();
if(param_name.empty())
return false;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ZurbaXI,项目名称:synfig,代码行数:33,代码来源:layerparamunsetstatic.cpp
示例7:
bool
Action::ColorSet::set_param(const synfig::String& name, const Action::Param ¶m)
{
if (name == "value_desc" && param.get_type() == Param::TYPE_VALUEDESC)
{
// Grab the value_desc
ValueDesc value_desc = param.get_value_desc();
if (value_desc.get_value_type() != type_color)
return false;
value_desc_list.push_back(value_desc);
// Grab the current outline or fill color
if (use_outline_color)
color = synfigapp::Main::get_outline_color();
else
color = synfigapp::Main::get_fill_color();
return true;
}
if (name == "time" && param.get_type() == Param::TYPE_TIME)
{
time = param.get_time();
return true;
}
return Action::CanvasSpecific::set_param(name, param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:30,代码来源:colorset.cpp
示例8:
bool
Action::KeyframeDuplicate::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
{
keyframe=param.get_keyframe();
new_keyframe.set_description(keyframe.get_description()+_(" (Duplicate)"));
//! TODO add and use keyframe::operator=
//! Copy the kf's Waypoint::model is exist
if(keyframe.has_model())
new_keyframe.apply_model(keyframe.get_waypoint_model());
//! Copy the active status
new_keyframe.set_active(keyframe.active());
return true;
}
if(name=="time" && param.get_type()==Param::TYPE_TIME)
{
new_keyframe.set_time(param.get_time());
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:d-j-a-y,项目名称:synfig,代码行数:27,代码来源:keyframeduplicate.cpp
示例9:
bool
Action::LayerMakeBLine::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layer = param.get_layer();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:blackwarthog,项目名称:synfig,代码行数:11,代码来源:layermakebline.cpp
示例10:
bool
Action::CanvasNameSet::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="name" && param.get_type()==Param::TYPE_STRING)
{
new_name=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:12,代码来源:canvasnameset.cpp
示例11:
bool
Action::KeyframeAdd::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
{
keyframe=param.get_keyframe();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:12,代码来源:keyframeadd.cpp
示例12:
bool
Action::LayerLower::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layers.push_back(param.get_layer());
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:12,代码来源:layerlower.cpp
示例13:
bool
Action::CanvasDescriptionSet::set_param(const synfig::String& description, const Action::Param ¶m)
{
if(description=="description" && param.get_type()==Param::TYPE_STRING)
{
new_description=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(description,param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:12,代码来源:canvasdescriptionset.cpp
示例14:
bool
Action::CanvasIdSet::set_param(const synfig::String& id, const Action::Param ¶m)
{
if(id=="id" && param.get_type()==Param::TYPE_STRING)
{
new_id=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(id,param);
}
开发者ID:synfig,项目名称:synfig,代码行数:12,代码来源:canvasidset.cpp
示例15:
bool
Action::CanvasMetadataErase::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="key" && param.get_type()==Param::TYPE_STRING)
{
key=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:blackwarthog,项目名称:synfig,代码行数:12,代码来源:canvasmetadataerase.cpp
示例16:
bool
Action::KeyframeRemove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
{
keyframe=param.get_keyframe();
// For some reason the state of the keyframe is not always passed correctly
// Make sure to get it right:
keyframe.set_active(get_canvas()->keyframe_list().find(keyframe)->active());
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ZurbaXI,项目名称:synfig,代码行数:14,代码来源:keyframeremove.cpp
示例17:
bool
Action::LayerRemove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
std::pair<synfig::Layer::Handle,int> layer_pair;
layer_pair.first=param.get_layer();
layer_list.push_back(layer_pair);
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:blackwarthog,项目名称:synfig,代码行数:14,代码来源:layerremove.cpp
示例18: value_desc
bool
Action::ValueDescBLineLink::set_param(const synfig::String& name, const Action::Param ¶m)
{
if (name == "time" && param.get_type() == Param::TYPE_TIME)
{
time = param.get_time();
return true;
}
if (name == "value_desc" && param.get_type() == Param::TYPE_VALUEDESC)
{
value_desc = param.get_value_desc();
index = value_desc.get_index();
return true;
}
if (name == "selected_value_desc" && param.get_type() == Param::TYPE_VALUEDESC)
{
ValueDesc value_desc(param.get_value_desc());
value_desc_list.push_back(value_desc);
return true;
}
if (name == "origin" && param.get_type() == Param::TYPE_REAL)
{
origin = param.get_real();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:breaklyn,项目名称:synfig-osx,代码行数:31,代码来源:valuedescblinelink.cpp
示例19:
bool
Action::TimepointsMove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="addlayer" && param.get_type()==Param::TYPE_LAYER)
{
//add a layer to the list
sel_layers.push_back(param.get_layer());
//synfig::info("action got layer");
return true;
}
if(name=="addcanvas" && param.get_type()==Param::TYPE_CANVAS)
{
//add a layer to the list
sel_canvases.push_back(param.get_canvas());
//synfig::info("action got canvas");
return true;
}
if(name=="addvaluedesc" && param.get_type()==Param::TYPE_VALUEDESC)
{
//add a layer to the list
sel_values.push_back(param.get_value_desc());
//synfig::info("action got valuedesc");
return true;
}
if(name=="addtime" && param.get_type()==Param::TYPE_TIME)
{
//add a layer to the list
sel_times.insert(param.get_time());
//synfig::info("action got time");
return true;
}
if(name=="deltatime" && param.get_type()==Param::TYPE_TIME)
{
timemove = param.get_time();
//synfig::info("action got time to move");
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:49,代码来源:timepointsmove.cpp
示例20:
bool
Action::KeyframeSet::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
{
synfig::info("KeyframeSet::set_param():old_time: %s",keyframe.get_time().get_string().c_str());
keyframe=param.get_keyframe();
synfig::info("KeyframeSet::set_param():new_time: %s",keyframe.get_time().get_string().c_str());
synfig::info("KeyframeSet::set_param():get_keyframe(): %s",param.get_keyframe().get_time().get_string().c_str());
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
开发者ID:blackwarthog,项目名称:synfig,代码行数:15,代码来源:keyframeset.cpp
注:本文中的action::Param类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论