本文整理汇总了C++中KnobIPtr::getLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ KnobIPtr::getLabel方法的具体用法?C++ KnobIPtr::getLabel怎么用?C++ KnobIPtr::getLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KnobIPtr
的用法示例。
在下文中一共展示了KnobIPtr::getLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QUndoCommand
PasteKnobClipBoardUndoCommand::PasteKnobClipBoardUndoCommand(const KnobIPtr& knob,
KnobClipBoardType type,
DimSpec fromDimension,
DimSpec targetDimensionIn,
ViewSetSpec fromView,
ViewSetSpec targetViewIn,
const KnobIPtr& fromKnob)
: QUndoCommand(0)
, _imp( new PasteKnobClipBoardUndoCommandPrivate() )
{
assert(knob && fromKnob);
// If target view is all but target is not multi-view, convert back to main view
// Also, if all dimensions are folded, convert to all dimensions
knob->convertDimViewArgAccordingToKnobState(targetDimensionIn, targetViewIn, &_imp->targetDimension, &_imp->targetView);
_imp->fromKnob = fromKnob;
_imp->knob = knob;
_imp->type = type;
_imp->fromDimension = fromDimension;
_imp->fromView = fromView;
_imp->toKnobSerialization.reset(new SERIALIZATION_NAMESPACE::KnobSerialization);
knob->toSerialization(_imp->toKnobSerialization.get());
_imp->fromKnobSerialization.reset(new SERIALIZATION_NAMESPACE::KnobSerialization);
fromKnob->toSerialization(_imp->fromKnobSerialization.get());
QString text;
switch (type) {
case eKnobClipBoardTypeCopyAnim:
text = tr("Paste Animation on %1").arg( QString::fromUtf8( knob->getLabel().c_str() ) );
break;
case eKnobClipBoardTypeCopyValue:
text = tr("Paste Value on %1").arg( QString::fromUtf8( knob->getLabel().c_str() ) );
break;
case eKnobClipBoardTypeCopyLink:
text = tr("Link %1 to %2").arg( QString::fromUtf8( fromKnob->getLabel().c_str() ) ).arg( QString::fromUtf8( knob->getLabel().c_str() ) );
break;
case eKnobClipBoardTypeCopyExpressionLink:
text = tr("Link with Expression %1 to %2").arg( QString::fromUtf8( fromKnob->getLabel().c_str() ) ).arg( QString::fromUtf8( knob->getLabel().c_str() ) );
break;
case eKnobClipBoardTypeCopyExpressionMultCurveLink:
text = tr("Set curve(frame)*%1 on %2").arg( QString::fromUtf8( fromKnob->getLabel().c_str() ) ).arg( QString::fromUtf8( knob->getLabel().c_str() ) );
break;
}
setText(text);
}
示例2: getKnobGui
std::string
KnobGuiWidgets::getDescriptionLabel() const
{
std::string ret;
KnobGuiPtr knob = getKnobGui();
if (!knob) {
return ret;
}
KnobIPtr internalKnob = knob->getKnob();
if (!internalKnob) {
return ret;
}
ret = internalKnob->getLabel();
return ret;
}