| 718 | } |
| 719 | |
| 720 | ColorParam* |
| 721 | UserParamHolder::createColorParam(const QString& name, |
| 722 | const QString& label, |
| 723 | bool useAlpha) |
| 724 | { |
| 725 | KnobColorPtr knob = _holder->createColorKnob(name.toStdString(), label.toStdString(), useAlpha ? 4 : 3); |
| 726 | |
| 727 | if (knob) { |
| 728 | KnobPagePtr userPage = _holder->getOrCreateUserPageKnob(); |
| 729 | if (userPage) { |
| 730 | userPage->addKnob(knob); |
| 731 | } |
| 732 | |
| 733 | return new ColorParam(knob); |
| 734 | } else { |
| 735 | return 0; |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | StringParam* |
| 740 | UserParamHolder::createStringParam(const QString& name, |
no test coverage detected