示例#1
0
void
KnobGuiBool::onCheckBoxStateChanged(bool b)
{
    KnobBoolPtr knob = _knob.lock();
    if (!knob) {
        return;
    }
    getKnobGui()->pushUndoCommand( new KnobUndoCommand<bool>(knob, knob->getValue(DimIdx(0), getView()), b, DimIdx(0), getView()) );
}
示例#2
0
 bool getInteractive() const
 {
     KnobBoolPtr inter = interactive.lock();
     if (inter) {
         return inter->getValue();
     } else {
         return !appPTR->getCurrentSettings()->getRenderOnEditingFinishedOnly();
     }
 }
示例#3
0
void
KnobGuiBool::onLabelClicked(bool b)
{
    if ( _checkBox->getReadOnly() ) {
        return;
    }
    _checkBox->setChecked(b);

    KnobBoolPtr knob = _knob.lock();
    getKnobGui()->pushUndoCommand( new KnobUndoCommand<bool>(knob, knob->getValue(DimIdx(0), getView()), b, DimIdx(0), getView()) );
}
示例#4
0
void
KnobGuiBool::updateGUI()
{
    KnobBoolPtr knob = _knob.lock();
    if (!knob) {
        return;
    }
    bool checked = knob->getValue(DimIdx(0), getView());
    if (_checkBox->isChecked() == checked) {
        return;
    }
    _checkBox->setChecked(checked);
}