| 372 | } |
| 373 | |
| 374 | PortsMapping BehaviorTreeDataModel::getCurrentPortMapping() const |
| 375 | { |
| 376 | PortsMapping out; |
| 377 | |
| 378 | for(const auto& it: _ports_widgets) |
| 379 | { |
| 380 | const auto& label = it.first; |
| 381 | const auto& value = it.second; |
| 382 | |
| 383 | if(auto linedit = dynamic_cast<QLineEdit*>( value ) ) |
| 384 | { |
| 385 | out.insert( std::make_pair( label, linedit->text() ) ); |
| 386 | } |
| 387 | else if( auto combo = dynamic_cast<QComboBox*>( value ) ) |
| 388 | { |
| 389 | out.insert( std::make_pair( label, combo->currentText() ) ); |
| 390 | } |
| 391 | } |
| 392 | return out; |
| 393 | } |
| 394 | |
| 395 | QJsonObject BehaviorTreeDataModel::save() const |
| 396 | { |
no outgoing calls
no test coverage detected