2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2020-09-22 13:08:07 +00:00
|
|
|
#pragma once
|
|
|
|
#include "core/types.h"
|
|
|
|
#include <QtWidgets/QWidget>
|
|
|
|
|
|
|
|
#include "ui_biossettingswidget.h"
|
|
|
|
|
|
|
|
class SettingsDialog;
|
|
|
|
|
2022-07-11 13:03:29 +00:00
|
|
|
enum class ConsoleRegion;
|
|
|
|
namespace BIOS {
|
|
|
|
struct ImageInfo;
|
|
|
|
}
|
|
|
|
|
2020-09-22 13:08:07 +00:00
|
|
|
class BIOSSettingsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-07-11 13:03:29 +00:00
|
|
|
explicit BIOSSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
2020-09-22 13:08:07 +00:00
|
|
|
~BIOSSettingsWidget();
|
|
|
|
|
2023-09-02 07:27:34 +00:00
|
|
|
static void populateDropDownForRegion(ConsoleRegion region, QComboBox* cb,
|
|
|
|
std::vector<std::pair<std::string, const BIOS::ImageInfo*>>& images,
|
|
|
|
bool per_game);
|
|
|
|
static void setDropDownValue(QComboBox* cb, const std::optional<std::string>& name, bool per_game);
|
|
|
|
static std::vector<std::pair<std::string, const BIOS::ImageInfo*>> getList(const char* directory);
|
|
|
|
|
2020-09-23 12:53:51 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void refreshList();
|
|
|
|
|
2020-09-22 13:08:07 +00:00
|
|
|
private:
|
|
|
|
Ui::BIOSSettingsWidget m_ui;
|
|
|
|
|
2022-07-11 13:03:29 +00:00
|
|
|
SettingsDialog* m_dialog;
|
2020-09-22 13:08:07 +00:00
|
|
|
};
|