| 431 | } |
| 432 | |
| 433 | void 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 | |
| 452 | void BehaviorTreeDataModel::setPortMapping(const QString &port_name, const QString &value) |
| 453 | { |
no outgoing calls
no test coverage detected