23 #include "iwadandwadspickerdialog.h"
25 #include "filefilter.h"
26 #include "gui/commongui.h"
27 #include "ui_iwadandwadspickerdialog.h"
28 #include <QFileDialog>
31 DClass<IwadAndWadsPickerDialog> :
public Ui::IwadAndWadsPickerDialog
42 d->btnBrowseExecutable->setIcon(style()->standardIcon(QStyle::SP_DirOpenIcon));
45 IwadAndWadsPickerDialog::~IwadAndWadsPickerDialog()
49 QString IwadAndWadsPickerDialog::executable()
const
51 return d->executableInput->currentText();
54 void IwadAndWadsPickerDialog::setExecutables(
const QStringList &paths)
56 for (
const QString &path : paths)
58 if (d->executableInput->findText(path) < 0)
59 d->executableInput->addItem(path);
63 void IwadAndWadsPickerDialog::browseExecutable()
65 QString path = QFileDialog::getOpenFileName(
this, tr(
"Doomseeker - Browse executable"),
66 executable(), FileFilter::executableFilesFilter());
69 d->executableInput->setCurrentText(path);
70 if (d->executableInput->findText(path) < 0)
71 d->executableInput->addItem(path);
77 return d->wadsPicker->filePaths();
82 return d->iwadPicker->currentIwad();
87 d->iwadPicker->setIwadByName(iwad);