30 #include <QMessageBox>
34 #include <ArmarXGui/gui-plugins/ScenarioManager/gui/ui_packageadderview.h>
40 ui->okButton->setDefault(
true);
49 PackageAdderView::on_okButton_clicked()
53 emit
created(ui->packageName->text().toStdString());
59 msgBox.setText(
"Please insert a valid package name");
65 PackageAdderView::on_cancelButton_clicked()
71 PackageAdderView::on_packageName_textChanged(
const QString& text)
73 std::optional<std::string> configDir;
74 if (not text.isEmpty())
77 if (pFinder.packageFound())
79 configDir = pFinder.getConfigDir();
83 if (configDir.has_value())
85 ui->packagePath->setText(QString::fromStdString(configDir.value()));
86 ui->foundPackageLabel->setPixmap(QPixmap(
":/icons/user-online.svg"));
92 ui->packagePath->setText(
"Cannot find package");
93 ui->foundPackageLabel->setPixmap(QPixmap(
":/icons/dialog-cancel-5.svg"));