23 #include "iwadandwadspickerdialog.h"
25 #include "filefilter.h"
26 #include "gui/commongui.h"
27 #include "ui_iwadandwadspickerdialog.h"
28 #include <QFileDialog>
30 DClass<IwadAndWadsPickerDialog> :
public Ui::IwadAndWadsPickerDialog
43 IwadAndWadsPickerDialog::~IwadAndWadsPickerDialog()
47 QString IwadAndWadsPickerDialog::executable()
const
49 return d->executableInput->currentText();
52 void IwadAndWadsPickerDialog::setExecutables(
const QStringList &paths)
54 for (
const QString &path : paths)
56 if (d->executableInput->findText(path) < 0)
57 d->executableInput->addItem(path);
61 void IwadAndWadsPickerDialog::browseExecutable()
63 QString path = QFileDialog::getOpenFileName(
this, tr(
"Doomseeker - Browse executable"),
64 executable(), FileFilter::executableFilesFilter());
67 d->executableInput->setCurrentText(path);
68 if (d->executableInput->findText(path) < 0)
69 d->executableInput->addItem(path);
75 return d->wadsPicker->filePaths();
80 return d->iwadPicker->currentIwad();
85 d->iwadPicker->setIwadByName(iwad);