26 #include <ArmarXGui/gui-plugins/ScenarioManager/gui/ui_detailedapplicationview.h>
29 #include <QToolButton>
37 #define UPDATE_TIMER_INTERVAL 500
40 using namespace Data_Structure;
45 auto instancePath = std::filesystem::canonical(linkpath);
46 auto scenarioFolder = instancePath.parent_path().parent_path();
47 std::string scenarioName = scenarioFolder.filename();
48 auto scenarioScx = scenarioFolder / (scenarioName +
".scx");
49 if (!std::filesystem::exists(scenarioScx))
51 return {
"unknown",
"unknown"};
55 if (packageName.empty())
57 return {
"unknown", scenarioName};
60 return {packageName, scenarioName};
66 variantManager(nullptr),
67 variantFactory(nullptr),
68 statusUpdateRelevant(false),
69 lastScenarioItem(nullptr),
72 updateTimer.setSingleShot(
true);
73 QObject::connect(&updateTimer, SIGNAL(timeout()),
this, SLOT(on_fileUpdate()));
81 void DetailedApplicationView::init()
87 ui->propertyBrowser->setFactoryForManager(variantManager.get(), variantFactory.get());
89 ui->propertyBrowser->setAlternatingRowColors(
true);
90 ui->propertyBrowser->setResizeMode(QtTreePropertyBrowser::ResizeMode::Interactive);
91 ui->propertyBrowser->setSplitterPosition(200);
93 QObject::connect(variantManager.get(), SIGNAL(valueChanged(
QtProperty*,
const QVariant&)),
94 this, SLOT(itemChanged(
QtProperty*,
const QVariant&)));
96 QObject::connect(variantManager.get(), SIGNAL(attributeChanged(
QtProperty*,
const QString&,
const QVariant&)),
97 this, SLOT(itemAttributeChanged(
QtProperty*,
const QString&,
const QVariant&)));
101 const QString & attribute,
const QVariant & val);
103 ui->linkedInfoLabel->setVisible(
false);
104 ui->makeLocalButton->setVisible(
false);
105 ui->addParameterButton->setEnabled(
false);
111 if (application.get() ==
nullptr)
115 if (variantManager.get() ==
nullptr || variantFactory.get() ==
nullptr)
120 ui->dataLabel->setText(QString::fromStdString(application->getName()));
124 lastScenarioItem =
nullptr;
125 statusUpdateRelevant =
false;
127 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
128 ui->stateLabel->setText(
"No Status");
130 ui->startButton->setEnabled(
false);
131 ui->stopButton->setEnabled(
false);
132 ui->restartButton->setEnabled(
false);
133 ui->addParameterButton->setEnabled(
false);
134 ui->addParameterButton->setMenu(
nullptr);
136 ui->toolButton->setEnabled(
false);
139 variantManager->clear();
140 static_cast<OptionalVariantFactory*
>(variantFactory.get())->setElementName(QString::fromStdString(application->getName()));
141 ui->propertyBrowser->clear();
144 QLatin1String(
"Application"));
149 nameItem->
setValue(QString::fromStdString(application->getName()));
153 execPathItem->
setValue(QString::fromStdString(application->getPathToExecutable()));
157 QLatin1String(
"Default Properties"));
162 Ice::PropertyDict dict = props->getProperties()->getPropertiesForPrefix(
"");
164 for (
auto const& property : dict)
166 QStringList valueList;
167 if (props->hasDefinition(property.first))
172 for (
auto& key : keys)
174 valueList << QString::fromStdString(key);
179 ARMARX_WARNING <<
"Could not find definition: " <<
property.first;
185 appPropertyItem->
setAttribute(
"PossibleValues", valueList);
187 appPropertyItem->
setValue(QString::fromStdString(property.second));
188 appPropertyItem->
setStatusTip(QString::fromStdString(props->getDescription()));
189 if (property.second.compare(
"<set value!>") == 0 || property.second.compare(
"::_NOT_SET_::") == 0)
196 ui->propertyBrowser->addProperty(appTopItem);
197 ui->propertyBrowser->setRootIsDecorated(
false);
202 if (appInstance.get() ==
nullptr)
208 if (variantManager.get() ==
nullptr || variantFactory.get() ==
nullptr)
213 if (appInstance->getStatus() ==
"Running")
215 ui->stateLabel->setStyleSheet(
"QLabel { color : green; }");
218 else if (appInstance->getStatus().compare(
"Stopped") == 0)
220 ui->stateLabel->setStyleSheet(
"QLabel { color : red; }");
222 else if (appInstance->getStatus().compare(
"Inactive") == 0)
224 ui->stateLabel->setStyleSheet(
"QLabel { color : gray; }");
228 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
231 bool readOnly = appInstance->isReadOnly();
232 ui->linkedInfoLabel->setVisible(readOnly);
233 ui->linkedInfoLabel->setText(
"Linked Application - read only");
234 ui->linkedInfoLabel->setToolTip(
235 "The application's config file is a link to another file, making it read only");
236 ui->makeLocalButton->setVisible(readOnly);
237 ui->makeLocalButton->setToolTip(
"Replace the linked application with a local copy");
238 ui->addParameterButton->setEnabled(!readOnly);
240 std::string label = appInstance->getName();
244 label +=
" -> " + scenario;
246 if (package ==
"unknown")
248 tooltip =
"Could not determine original scenario for config '" +
249 std::string(std::filesystem::canonical(appInstance->getConfigPath())) +
"'";
253 tooltip =
"Original is in " +
254 (
package == "unknown" ? "unknown package" : "package " + package) +
255 ", scenario " + scenario;
257 ui->dataLabel->setToolTip(QString::fromStdString(tooltip));
259 ui->dataLabel->setText(QString::fromStdString(label));
261 statusUpdateRelevant =
true;
262 lastAppInstance = appInstance;
266 lastScenarioItem = item;
269 if (lastAppInstance->getEnabled())
271 ui->startButton->setEnabled(
true);
272 ui->stopButton->setEnabled(
true);
273 ui->restartButton->setEnabled(
true);
277 ui->startButton->setEnabled(
false);
278 ui->stopButton->setEnabled(
false);
279 ui->restartButton->setEnabled(
false);
282 ui->addParameterButton->setMenu(
nullptr);
283 ui->toolButton->setEnabled(
true);
286 variantManager->clear();
287 static_cast<OptionalVariantFactory*
>(variantFactory.get())->setElementName(QString::fromStdString(appInstance->getName()));
288 ui->propertyBrowser->clear();
291 QLatin1String(
"ApplicationInstance"));
293 if (!appInstance->isConfigWritable())
300 nameItem->
setValue(QString::fromStdString(appInstance->getName()));
304 execPathItem->
setValue(QString::fromStdString(appInstance->getPathToExecutable()));
308 instanceNameItem->
setValue(QString::fromStdString(appInstance->getInstanceName()));
312 configPathItem->
setValue(QString::fromStdString(appInstance->getConfigPath()));
316 pidItem->
setValue(appInstance->getPid());
321 enabledItem->
setValue(appInstance->getEnabled());
325 QLatin1String(
"Properties"));
330 Ice::PropertyDict dict = props->getProperties()->getPropertiesForPrefix(
"");
332 for (
auto const& property : dict)
334 if (property.first !=
"Ice.Config")
336 QStringList valueList;
337 if (props->hasDefinition(property.first))
341 for (
auto& key : keys)
343 valueList << QString::fromStdString(key);
348 ARMARX_WARNING <<
"Could not find definition: " <<
property.first;
357 if (appInstance->isDefaultProperty(property.first))
361 appPropertyItem->
setAttribute(QLatin1String(
"enabled"), QVariant(appInstance->isDefaultPropertyEnabled(property.first)));
365 appPropertyItem = variantManager->addProperty(
QVariant::String, QString::fromStdString(property.first));
367 appPropertyItem->
setValue(QString::fromStdString(property.second));
368 appPropertyItem->
setAttribute(QLatin1String(
"PossibleValues"), QVariant(valueList));
373 auto helpString = props->getDefintion<std::string>(
property.first).
toString(formatter, props->getValue(property.first));
375 QString result = QString::fromStdString(
"Current value: " + property.second +
"\n\n" + helpString);
378 catch (armarx::LocalException&)
383 appPropertyItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(appInstance->isReadOnly()));
390 QLatin1String(
"Ice Deployment Properties"));
394 nodePropertyItem->
setValue(QString::fromStdString(appInstance->getNodeName()));
395 nodePropertyItem->
setToolTip(
"Describes on which Node the current Application should be deployed on");
396 nodePropertyItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(appInstance->isReadOnly()));
400 iceAutoRestartItem->
setValue(appInstance->getIceAutoRestart());
401 iceAutoRestartItem->
setToolTip(
"Describes if Ice should automatically restart this Application");
402 iceAutoRestartItem->
setAttribute(
"enabled", QVariant(appInstance->isReadOnly()));
405 ui->propertyBrowser->addProperty(appInstanceTopItem);
406 ui->propertyBrowser->setRootIsDecorated(
false);
411 if (scenario.get() ==
nullptr)
417 if (variantManager.get() ==
nullptr || variantFactory.get() ==
nullptr)
423 ui->dataLabel->setText(QString::fromStdString(scenario->getName()));
424 statusUpdateRelevant =
true;
425 lastScenario = scenario;
427 lastScenarioItem =
nullptr;
429 QAction* addVariableToScenarioAction =
new QAction(
this);
431 icon.addFile(QString::fromUtf8(
":/icons/images/add.png"), QSize(), QIcon::Normal,
QIcon::Off);
432 addVariableToScenarioAction->setIcon(icon);
433 addVariableToScenarioAction->setIconVisibleInMenu(
true);
434 addVariableToScenarioAction->setText(
"Add Scenario Variable");
435 addVariableToScenarioAction->setToolTip(
"Add an Variable to the Scenario");
436 connect(addVariableToScenarioAction, SIGNAL(triggered()),
this, SLOT(on_addParameterButton_clicked()));
438 QAction* addVariableToIceAction =
new QAction(
this);
439 addVariableToIceAction->setIcon(icon);
440 addVariableToIceAction->setIconVisibleInMenu(
true);
441 addVariableToIceAction->setText(
"Add Ice Enviroment Variable");
442 addVariableToIceAction->setToolTip(
"Add an Ice Enviroment Variable to the Scenario");
443 connect(addVariableToIceAction, SIGNAL(triggered()),
this, SLOT(on_addIceEnvButton_clicked()));
445 QMenu* subMenu =
new QMenu(
this);
446 subMenu->addAction(addVariableToScenarioAction);
447 subMenu->addAction(addVariableToIceAction);
450 bool readOnly = scenario->isReadOnly();
451 ui->linkedInfoLabel->setVisible(readOnly);
452 ui->linkedInfoLabel->setText(
"Linked Scenario config - read only");
453 ui->linkedInfoLabel->setToolTip(
454 "The Secnario's global configuration is a link to another file, making it read only");
455 ui->makeLocalButton->setVisible(readOnly);
456 ui->makeLocalButton->setToolTip(
"Replace the linked global scenario configuration with a local copy. Does not alter any applications.");
457 ui->addParameterButton->setEnabled(!readOnly);
459 std::string label = scenario->getName();
463 label +=
" -> " + origScenario;
465 if (package ==
"unknown")
467 tooltip =
"Could not determine original scenario for config '" +
468 std::string(std::filesystem::canonical(scenario->getGlobalConfigPath())) +
"'";
472 tooltip =
"Original is in " +
473 (
package == "unknown" ? "unknown package" : "package " + package) +
474 ", scenario " + origScenario;
476 ui->dataLabel->setToolTip(QString::fromStdString(tooltip));
478 ui->dataLabel->setText(QString::fromStdString(label));
481 ui->addParameterButton->setMenu(subMenu);
484 if (scenario->getStatus().compare(
"Running") == 0)
486 ui->stateLabel->setStyleSheet(
"QLabel { color : green; }");
489 else if (scenario->getStatus().compare(
"Stopped") == 0)
491 ui->stateLabel->setStyleSheet(
"QLabel { color : red; }");
493 else if (scenario->getStatus().compare(
"Inactive") == 0)
495 ui->stateLabel->setStyleSheet(
"QLabel { color : gray; }");
497 else if (scenario->getStatus().compare(
"Mixed") == 0)
499 ui->stateLabel->setStyleSheet(
"QLabel { color : darkYellow; }");
503 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
507 ui->stateLabel->setText(QString::fromStdString(scenario->getStatus()));
509 ui->startButton->setEnabled(
true);
510 ui->restartButton->setEnabled(
true);
511 ui->stopButton->setEnabled(
true);
512 ui->toolButton->setEnabled(
true);
515 variantManager->clear();
516 static_cast<OptionalVariantFactory*
>(variantFactory.get())->setElementName(QString::fromStdString(scenario->getName()));
517 ui->propertyBrowser->clear();
520 QLatin1String(
"Scenario"));
521 if (!scenario->isScenarioFileWriteable())
527 nameItem->
setValue(QString::fromStdString(scenario->getName()));
531 scenarioPathItem->
setValue(QString::fromStdString(scenario->getPath()));
535 createdAtItem->
setValue(QString::fromStdString(scenario->getCreationTime()));
539 lastChangeItem->
setValue(QString::fromStdString(scenario->getLastChangedTime()));
543 QLatin1String(
"Scenario Properties"));
545 if (!scenario->isGlobalConfigWritable())
552 Ice::PropertyDict dict = props->getProperties()->getPropertiesForPrefix(
"");
554 for (
auto const& property : dict)
556 if (property.first !=
"Ice.Config")
559 scenarioPropertyItem->
setValue(QString::fromStdString(property.second));
562 scenarioPropertyItem->
setToolTip(QString::fromStdString(props->getDefintion<std::string>(property.first).getDescription()));
564 catch (armarx::LocalException&)
569 scenarioPropertyItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(scenario->isReadOnly()));
575 QLatin1String(
"Scenario Ice Deployment Properties"));
581 scenarioDeploymentTypeItem = variantManager->addProperty(
583 QString::fromStdString(
"Deployment Type"));
584 scenarioDeploymentTypeItem->
setValue(
586 scenarioDeploymentTypeItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(
true));
590 scenarioDeploymentTypeItem = variantManager->addProperty(
592 QString::fromStdString(
"Deployment Type"));
595 scenarioDeploymentTypeItem->
setToolTip(
"Describes if the Scenario should either use the Local build for Ice deployment or an Remote sync directory");
596 scenarioIcePropertyTopItem->
addSubProperty(scenarioDeploymentTypeItem);
599 nodePropertyItem->
setValue(QString::fromStdString(scenario->getNodeName()));
600 nodePropertyItem->
setToolTip(
"Describes on which Node the currently applications of the current scenario should be deployed on. Can be overwritten for each application.");
601 nodePropertyItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(scenario->isReadOnly()));
606 QLatin1String(
"Ice Enviroment Variables"));
607 scenarioIcePropertyTopItem->
addSubProperty(scenarioIceEnvVarsTopItem);
609 for (
const auto& envVar : scenario->getIceEnviromentVariables())
612 iceEnvVarItem->
setValue(QString::fromStdString(envVar.second));
613 iceEnvVarItem->
setAttribute(QLatin1String(
"readOnly"), QVariant(scenario->isReadOnly()));
618 ui->propertyBrowser->addProperty(scenarioTopItem);
619 ui->propertyBrowser->setRootIsDecorated(
false);
624 if (variantManager.get() ==
nullptr || variantFactory.get() ==
nullptr)
628 if (package ==
nullptr)
631 variantManager->clear();
632 ui->propertyBrowser->clear();
634 ui->startButton->setEnabled(
false);
635 ui->stopButton->setEnabled(
false);
636 ui->restartButton->setEnabled(
false);
637 ui->addParameterButton->setEnabled(
false);
638 ui->toolButton->setEnabled(
false);
639 ui->linkedInfoLabel->setVisible(
false);
640 ui->makeLocalButton->setVisible(
false);
644 statusUpdateRelevant =
false;
650 ui->dataLabel->setText(QString::fromStdString(package->getName()));
654 lastScenarioItem =
nullptr;
656 statusUpdateRelevant =
false;
658 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
659 ui->stateLabel->setText(
"No Status");
661 ui->startButton->setEnabled(
false);
662 ui->stopButton->setEnabled(
false);
663 ui->restartButton->setEnabled(
false);
664 ui->addParameterButton->setEnabled(
false);
665 ui->addParameterButton->setMenu(
nullptr);
667 ui->toolButton->setEnabled(
false);
670 variantManager->clear();
671 static_cast<OptionalVariantFactory*
>(variantFactory.get())->setElementName(QString::fromStdString(package->getName()));
672 ui->propertyBrowser->clear();
675 QLatin1String(
"Package"));
680 nameItem->
setValue(QString::fromStdString(package->getName()));
684 packagePathItem->
setValue(QString::fromStdString(package->getPath()));
687 ui->propertyBrowser->addProperty(packageTopItem);
688 ui->propertyBrowser->setRootIsDecorated(
false);
691 void DetailedApplicationView::show_or_hide_property(
QtProperty* prop,
bool visible)
693 for (
auto& item : ui->propertyBrowser->items(prop))
695 ui->propertyBrowser->setItemVisible(item, visible);
699 bool DetailedApplicationView::show_or_hide_subproperties(
QtProperty* parent_prop,
const QString& text)
701 if (parent_prop ==
nullptr)
706 bool active_subproperty =
false;
711 if (!ui->showInactiveProperties->isChecked())
716 this->show_or_hide_property(prop,
false);
721 if (prop->
propertyName().contains(text, Qt::CaseInsensitive) || prop->
valueText().contains(text, Qt::CaseInsensitive) || text ==
"")
723 this->show_or_hide_property(prop,
true);
724 active_subproperty =
true;
728 this->show_or_hide_property(prop,
false);
735 active_subproperty = this->show_or_hide_subproperties(prop, text) || active_subproperty;
738 if (active_subproperty)
740 this->show_or_hide_property(parent_prop,
true);
744 this->show_or_hide_property(parent_prop,
false);
746 return active_subproperty;
749 void DetailedApplicationView::on_searchBar_textEdited(
const QString& text)
751 for (
auto prop : ui->propertyBrowser->properties())
753 this->show_or_hide_subproperties(prop, text);
757 void DetailedApplicationView::on_showInactiveProperties_stateChanged(
int)
759 ARMARX_INFO <<
"Checkbox Statechanged with text " << ui->searchBar->text().toStdString();
760 this->on_searchBar_textEdited(ui->searchBar->text());
763 void DetailedApplicationView::on_startButton_clicked()
768 void DetailedApplicationView::on_stopButton_clicked()
773 void DetailedApplicationView::on_restartButton_clicked()
778 void DetailedApplicationView::on_addParameterButton_clicked()
783 void DetailedApplicationView::on_addIceEnvButton_clicked()
789 void DetailedApplicationView::on_toolButton_clicked()
798 if (statusUpdateRelevant)
800 QPalette stateLabelPallet;
801 if (lastAppInstance.get() !=
nullptr)
803 ui->stateLabel->setText(QString::fromStdString(lastAppInstance->getStatus()));
805 if (lastAppInstance->getStatus().compare(
"Running") == 0)
807 ui->stateLabel->setStyleSheet(
"QLabel { color : green; }");
810 else if (lastAppInstance->getStatus().compare(
"Stopped") == 0)
812 ui->stateLabel->setStyleSheet(
"QLabel { color : red; }");
816 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
819 else if (lastScenario.get() !=
nullptr)
821 ui->stateLabel->setText(QString::fromStdString(lastScenario->getStatus()));
823 if (lastScenario->getStatus().compare(
"Running") == 0)
825 ui->stateLabel->setStyleSheet(
"QLabel { color : green; }");
828 else if (lastScenario->getStatus().compare(
"Stopped") == 0)
830 ui->stateLabel->setStyleSheet(
"QLabel { color : red; }");
832 else if (lastScenario->getStatus().compare(
"Mixed") == 0)
834 ui->stateLabel->setStyleSheet(
"QLabel { color : darkYellow; }");
838 ui->stateLabel->setStyleSheet(
"QLabel { color : black; }");
841 ui->stateLabel->setAutoFillBackground(
true);
842 ui->stateLabel->setPalette(stateLabelPallet);
846 void DetailedApplicationView::itemChanged(
QtProperty* property,
const QVariant&
value)
848 if (statusUpdateRelevant)
850 if (lastAppInstance.get() !=
nullptr)
857 property->
propertyName().compare(
"Executable Path") == 0 ||
859 property->
propertyName().compare(
"Pid (Stopped = -1)") == 0 ||
860 property->
propertyName().compare(
"Scenario Path") == 0 ||
862 property->
propertyName().compare(
"Package Path") == 0 ||
863 property->
propertyName().compare(
"Last Change At") == 0 ||
864 property->
propertyName().compare(
"Default Properties") == 0)
869 if (property->
propertyName().compare(
"Instance Name") == 0 && lastAppInstance->getInstanceName().compare(
value.toString().toStdString()))
871 lastAppInstance->setInstanceName(
value.toString().toStdString());
879 lastAppInstance->setEnabled(
true);
880 ui->startButton->setEnabled(
true);
881 ui->stopButton->setEnabled(
true);
882 ui->restartButton->setEnabled(
true);
883 if (lastScenarioItem !=
nullptr)
890 lastAppInstance->setEnabled(
false);
891 ui->startButton->setEnabled(
false);
892 ui->stopButton->setEnabled(
false);
893 ui->restartButton->setEnabled(
false);
894 if (lastScenarioItem !=
nullptr)
903 ARMARX_INFO <<
"Setting node name to " <<
property->valueText().toStdString();
904 lastAppInstance->setNodeName(property->
valueText().toStdString());
907 else if (property->
propertyName() ==
"Ice Auto Restart")
909 lastAppInstance->setIceAutoRestart(property->
valueText() ==
"True");
912 else if (property->
propertyName().compare(
"Instance Name") && properties->getProperty(property->
propertyName().toStdString()).compare(
value.toString().toStdString()))
914 lastAppInstance->modifyProperty(property->
propertyName().toStdString(), property->
valueText().toStdString());
915 if (
value.toString().compare(
"<set value!>")
916 &&
value.toString().compare(
"::NOT_DEFINED::")
917 &&
value.toString().compare(
"::_NOT_SET_::"))
919 lastAppInstance->setDefaultPropertyEnabled(property->
propertyName().toStdString(),
true);
920 variantManager->setAttribute(property, QLatin1String(
"enabled"),
true);
926 else if (lastScenario.get() !=
nullptr)
933 property->
propertyName().compare(
"Scenario Path") == 0 ||
935 property->
propertyName().compare(
"Package Path") == 0 ||
936 property->
propertyName().compare(
"Last Change At") == 0 ||
937 property->
propertyName().compare(
"Default Properties") == 0)
947 else if (property->
valueText() ==
"Remote")
956 lastScenario->setNodeName(property->
valueText().toStdString());
958 else if (properties->getProperty(property->
propertyName().toStdString()) !=
""
959 && properties->getProperty(property->
propertyName().toStdString()).compare(
value.toString().toStdString()))
961 lastScenario->getGlobalConfig()->defineOptionalProperty<std::string>(
property->propertyName().toStdString(),
"::NOT_DEFINED::",
"Custom Property");
962 lastScenario->getGlobalConfig()->getProperties()->setProperty(property->
propertyName().toStdString(),
property->valueText().toStdString());
966 else if (lastScenario->getIceEnviromentVariables()[
property->propertyName().toStdString()] !=
""
967 && lastScenario->getIceEnviromentVariables()[
property->propertyName().toStdString()] !=
value.toString().toStdString())
969 lastScenario->addIceEnviromentVariable(property->
propertyName().toStdString(),
value.toString().toStdString());
976 void DetailedApplicationView::itemAttributeChanged(
QtProperty* property,
const QString& attribute,
const QVariant& val)
978 if (statusUpdateRelevant)
980 if (lastAppInstance.get() !=
nullptr && attribute.compare(QLatin1String(
"enabled")) == 0)
982 lastAppInstance->setDefaultPropertyEnabled(property->
propertyName().toStdString(), val.toBool());
992 properties->getProperties()->setProperty(property->
propertyName().toStdString(),
"::_NOT_SET_::");
993 internalManager->
setValue(property,
"::_NOT_SET_::");
1007 void DetailedApplicationView::on_fileUpdate()
1009 if (lastAppInstance.get() !=
nullptr)
1013 if (lastAppInstance->isConfigWritable())
1015 lastAppInstance->resetConfigPath();
1016 lastAppInstance->save();
1021 else if (lastScenario.get() !=
nullptr)
1023 if (lastScenario->isScenarioFileWriteable())
1025 lastScenario->save();
1030 void DetailedApplicationView::on_reloadButton_clicked()
1032 if (statusUpdateRelevant)
1034 if (lastAppInstance.get() !=
nullptr)
1036 lastAppInstance->load();
1039 else if (lastScenario.get() !=
nullptr)
1041 lastScenario->reloadGlobalConf();
1047 void DetailedApplicationView::on_makeLocalButton_clicked()
1049 if (lastAppInstance)
1051 lastAppInstance->makeLocal();
1054 else if (lastScenario)
1056 lastScenario->makeLocalGlobalConfig();