| 705 | } |
| 706 | |
| 707 | ColorParam* |
| 708 | UserParamHolder::createColorParam(const QString& name, |
| 709 | const QString& label, |
| 710 | bool useAlpha) |
| 711 | { |
| 712 | boost::shared_ptr<KnobColor> knob = _holder->createColorKnob(name.toStdString(), label.toStdString(), useAlpha ? 4 : 3); |
| 713 | |
| 714 | if (knob) { |
| 715 | boost::shared_ptr<KnobPage> userPage = _holder->getOrCreateUserPageKnob(); |
| 716 | if (userPage) { |
| 717 | userPage->addKnob(knob); |
| 718 | } |
| 719 | |
| 720 | return new ColorParam(knob); |
| 721 | } else { |
| 722 | return 0; |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | StringParam* |
| 727 | UserParamHolder::createStringParam(const QString& name, |
no test coverage detected