29 #include <ArmarXGui/gui-plugins/ScenarioManager/gui/ui_packageadderview.h>
31 #include <QMessageBox>
39 ui->okButton->setDefault(
true);
47 void PackageAdderView::on_okButton_clicked()
51 emit
created(ui->packageName->text().toStdString());
57 msgBox.setText(
"Please insert a valid package name");
62 void PackageAdderView::on_cancelButton_clicked()
67 void PackageAdderView::on_packageName_textChanged(
const QString& text)
69 std::optional<std::string> configDir;
70 if (not text.isEmpty())
73 if (pFinder.packageFound())
75 configDir = pFinder.getConfigDir();
79 if (configDir.has_value())
81 ui->packagePath->setText(QString::fromStdString(configDir.value()));
82 ui->foundPackageLabel->setPixmap(QPixmap(
":/icons/user-online.svg"));
88 ui->packagePath->setText(
"Cannot find package");
89 ui->foundPackageLabel->setPixmap(QPixmap(
":/icons/dialog-cancel-5.svg"));