biossettingswidget.h (942B)
1 // SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com> 2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) 3 4 #pragma once 5 #include "core/types.h" 6 #include <QtWidgets/QWidget> 7 8 #include "ui_biossettingswidget.h" 9 10 class SettingsWindow; 11 12 enum class ConsoleRegion; 13 namespace BIOS { 14 struct ImageInfo; 15 } 16 17 class BIOSSettingsWidget : public QWidget 18 { 19 Q_OBJECT 20 21 public: 22 explicit BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent); 23 ~BIOSSettingsWidget(); 24 25 static void populateDropDownForRegion(ConsoleRegion region, QComboBox* cb, 26 std::vector<std::pair<std::string, const BIOS::ImageInfo*>>& images, 27 bool per_game); 28 static void setDropDownValue(QComboBox* cb, const std::optional<std::string>& name, bool per_game); 29 30 private Q_SLOTS: 31 void refreshList(); 32 33 private: 34 Ui::BIOSSettingsWidget m_ui; 35 36 SettingsWindow* m_dialog; 37 };