MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / lock

Method lock

bt_editor/models/BehaviorTreeNodeModel.cpp:433–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void BehaviorTreeDataModel::lock(bool locked)
434{
435 _line_edit_name->setEnabled( !locked );
436
437 for(const auto& it: _ports_widgets)
438 {
439 const auto& field_widget = it.second;
440
441 if(auto lineedit = dynamic_cast<QLineEdit*>( field_widget ))
442 {
443 lineedit->setReadOnly( locked );
444 }
445 else if(auto combo = dynamic_cast<QComboBox*>( field_widget ))
446 {
447 combo->setEnabled( !locked );
448 }
449 }
450}
451
452void BehaviorTreeDataModel::setPortMapping(const QString &port_name, const QString &value)
453{

Callers 2

lockEditingMethod · 0.45
lockSubtreeEditingMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected