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()) ); }
bool getInteractive() const { KnobBoolPtr inter = interactive.lock(); if (inter) { return inter->getValue(); } else { return !appPTR->getCurrentSettings()->getRenderOnEditingFinishedOnly(); } }
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()) ); }
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); }