void KnobGuiGroup::setCheckedInternal(bool checked, bool userRequested) { if (checked == _checked) { return; } _checked = checked; if (userRequested) { KnobGroupPtr knob = _knob.lock(); if (knob) { knob->setValue(checked); } } //getGui()->getPropertiesBin()->setUpdatesEnabled(false); for (std::list<KnobGuiWPtr>::iterator it = _children.begin(); it != _children.end(); ++it) { KnobGuiPtr knob = it->lock(); if (!knob) { continue; } if (!checked) { knob->hide(); } else if ( !knob->getKnob()->getIsSecret() ) { knob->show(); } } //getGui()->getPropertiesBin()->setUpdatesEnabled(true); }
void KnobGuiGroup::_hide() { if (_button) { _button->hide(); } for (std::list<KnobGuiWPtr>::iterator it = _children.begin(); it != _children.end(); ++it) { KnobGuiPtr k = it->lock(); if (!k) { continue; } k->hide(); } }
void KnobGuiGroup::setWidgetsVisible(bool visible) { if (_button) { _button->setVisible(visible); } for (std::list<KnobGuiWPtr>::iterator it = _children.begin(); it != _children.end(); ++it) { KnobGuiPtr k = it->lock(); if (!k) { continue; } if (visible) { k->show(); } else { k->hide(); } } }
void KnobGuiGroup::setCheckedInternal(bool checked, bool userRequested) { if (checked == _checked) { return; } _checked = checked; if (userRequested) { boost::shared_ptr<KnobGroup> knob = _knob.lock(); if (knob) { knob->setValue(checked, ViewSpec::all(), 0, eValueChangedReasonUserEdited, 0); } } ///get the current index of the group knob in the layout, and reinsert ///the children back with an offset relative to the group. int realIndexInLayout = getActualIndexInLayout(); int startChildIndex = realIndexInLayout + 1; //getGui()->getPropertiesBin()->setUpdatesEnabled(false); for (std::list<KnobGuiWPtr>::iterator it = _children.begin(); it != _children.end(); ++it) { KnobGuiPtr knob = it->lock(); if (!knob) { continue; } if (!checked) { knob->hide(); } else if ( !knob->getKnob()->getIsSecret() ) { knob->show(startChildIndex); if ( knob->getKnob()->isNewLineActivated() ) { ++startChildIndex; } } } //getGui()->getPropertiesBin()->setUpdatesEnabled(true); }