| 385 | } |
| 386 | |
| 387 | NodeModels SidepanelEditor::importFromSkills(const QString &fileName) |
| 388 | { |
| 389 | NodeModels custom_models; |
| 390 | |
| 391 | QFile loadFile(fileName); |
| 392 | |
| 393 | if (!loadFile.open(QIODevice::ReadOnly)) |
| 394 | { |
| 395 | QMessageBox::warning(this,"Error loading Skills", |
| 396 | tr("Something wrong with %1").arg(fileName) ); |
| 397 | return custom_models; |
| 398 | } |
| 399 | |
| 400 | // TODO VER_3 |
| 401 | // QJsonDocument loadDoc = QJsonDocument::fromJson( loadFile.readAll() ) ; |
| 402 | |
| 403 | // QJsonArray root_array = loadDoc.array(); |
| 404 | |
| 405 | // for (QJsonValueRef skill_node : root_array) |
| 406 | // { |
| 407 | |
| 408 | // auto skill = skill_node.toObject()["skill"].toObject(); |
| 409 | // auto name = skill["name"].toString(); |
| 410 | // qDebug() << name; |
| 411 | |
| 412 | // auto attributes = skill["in-attribute"].toObject(); |
| 413 | // auto params_keys = attributes.keys(); |
| 414 | |
| 415 | // PortModels ports_models; |
| 416 | |
| 417 | // for (const auto& key: params_keys) |
| 418 | // { |
| 419 | // ports_models.insert( {key, attributes[key].toString()} ); |
| 420 | // } |
| 421 | // NodeModel model = { NodeType::ACTION, name, ports_mapping }; |
| 422 | // custom_models.insert( {name, model} ); |
| 423 | // } |
| 424 | |
| 425 | return custom_models; |
| 426 | } |
| 427 | |
| 428 | |
| 429 | void SidepanelEditor::on_buttonLock_toggled(bool locked) |
nothing calls this directly
no outgoing calls
no test coverage detected