25 #include <QFileDialog>
30 #include <ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/ui_StatechartEditorSettingsDialog.h>
39 connect(ui->btnAddPath, SIGNAL(clicked()),
this, SLOT(
selectNewPath()));
50 return ui->textEditSearchPaths->toPlainText().split(
";");
56 ui->cbLockRemoteStates->setChecked(locked);
62 return ui->cbLockRemoteStates->isChecked();
68 ui->textEditSearchPaths->setText(paths.join(
";"));
74 QFileDialog selectFolder(
this,
"Select new search folder");
76 selectFolder.setOption(QFileDialog::ReadOnly,
true);
77 selectFolder.setOption(QFileDialog::HideNameFilterDetails,
false);
78 selectFolder.setFileMode(QFileDialog::Directory);
80 urls << QUrl::fromLocalFile(
81 QDesktopServices::storageLocation(QDesktopServices::HomeLocation))
82 << QUrl::fromLocalFile(
83 QDesktopServices::storageLocation(QDesktopServices::DesktopLocation));
90 selectFolder.setSidebarUrls(urls);
92 if (selectFolder.exec() == QDialog::Accepted)
94 if (ui->textEditSearchPaths->toPlainText().isEmpty())
96 ui->textEditSearchPaths->setText(*selectFolder.selectedFiles().begin());
100 ui->textEditSearchPaths->setText(ui->textEditSearchPaths->toPlainText() +
";\n" +
101 *selectFolder.selectedFiles().begin());