Qt: Change settings windows from QDialog to QWidget

This commit is contained in:
Stenzek 2023-10-14 18:45:09 +10:00 committed by Connor McLaughlin
parent 19b3bd151e
commit 2ef5490297
54 changed files with 330 additions and 325 deletions

View File

@ -73,9 +73,9 @@ target_sources(pcsx2-qt PRIVATE
Settings/ControllerMacroEditWidget.ui Settings/ControllerMacroEditWidget.ui
Settings/ControllerMacroWidget.ui Settings/ControllerMacroWidget.ui
Settings/ControllerMouseSettingsDialog.ui Settings/ControllerMouseSettingsDialog.ui
Settings/ControllerSettingsDialog.cpp Settings/ControllerSettingsWindow.cpp
Settings/ControllerSettingsDialog.h Settings/ControllerSettingsWindow.h
Settings/ControllerSettingsDialog.ui Settings/ControllerSettingsWindow.ui
Settings/ControllerSettingWidgetBinder.h Settings/ControllerSettingWidgetBinder.h
Settings/DebugSettingsWidget.cpp Settings/DebugSettingsWidget.cpp
Settings/DebugSettingsWidget.h Settings/DebugSettingsWidget.h
@ -137,9 +137,9 @@ target_sources(pcsx2-qt PRIVATE
Settings/HddCreateQt.cpp Settings/HddCreateQt.cpp
Settings/HddCreateQt.h Settings/HddCreateQt.h
Settings/PatchDetailsWidget.ui Settings/PatchDetailsWidget.ui
Settings/SettingsDialog.cpp Settings/SettingsWindow.cpp
Settings/SettingsDialog.h Settings/SettingsWindow.h
Settings/SettingsDialog.ui Settings/SettingsWindow.ui
Settings/USBBindingWidget_DrivingForce.ui Settings/USBBindingWidget_DrivingForce.ui
Settings/USBBindingWidget_GTForce.ui Settings/USBBindingWidget_GTForce.ui
Settings/USBBindingWidget_GunCon2.ui Settings/USBBindingWidget_GunCon2.ui

View File

@ -26,7 +26,7 @@
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "Settings/AchievementLoginDialog.h" #include "Settings/AchievementLoginDialog.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/GameListSettingsWidget.h" #include "Settings/GameListSettingsWidget.h"
#include "Settings/InterfaceSettingsWidget.h" #include "Settings/InterfaceSettingsWidget.h"
#include "Tools/InputRecording/InputRecordingViewer.h" #include "Tools/InputRecording/InputRecordingViewer.h"
@ -117,13 +117,7 @@ MainWindow::~MainWindow()
{ {
// make sure the game list isn't refreshing, because it's on a separate thread // make sure the game list isn't refreshing, because it's on a separate thread
cancelGameListRefresh(); cancelGameListRefresh();
destroySubWindows();
if (m_debugger_window)
{
m_debugger_window->close();
m_debugger_window->deleteLater();
m_debugger_window = nullptr;
}
// we compare here, since recreate destroys the window later // we compare here, since recreate destroys the window later
if (g_main_window == this) if (g_main_window == this)
@ -320,7 +314,7 @@ void MainWindow::connectSignals()
connect(m_ui.actionToolbarSaveState, &QAction::triggered, this, [this]() { m_ui.menuSaveState->exec(QCursor::pos()); }); connect(m_ui.actionToolbarSaveState, &QAction::triggered, this, [this]() { m_ui.menuSaveState->exec(QCursor::pos()); });
connect(m_ui.actionToolbarSettings, &QAction::triggered, this, &MainWindow::onSettingsTriggeredFromToolbar); connect(m_ui.actionToolbarSettings, &QAction::triggered, this, &MainWindow::onSettingsTriggeredFromToolbar);
connect(m_ui.actionToolbarControllerSettings, &QAction::triggered, connect(m_ui.actionToolbarControllerSettings, &QAction::triggered,
[this]() { doControllerSettings(ControllerSettingsDialog::Category::GlobalSettings); }); [this]() { doControllerSettings(ControllerSettingsWindow::Category::GlobalSettings); });
connect(m_ui.actionToolbarScreenshot, &QAction::triggered, this, &MainWindow::onScreenshotActionTriggered); connect(m_ui.actionToolbarScreenshot, &QAction::triggered, this, &MainWindow::onScreenshotActionTriggered);
connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::close); connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::close);
connect(m_ui.actionScreenshot, &QAction::triggered, this, &MainWindow::onScreenshotActionTriggered); connect(m_ui.actionScreenshot, &QAction::triggered, this, &MainWindow::onScreenshotActionTriggered);
@ -338,11 +332,11 @@ void MainWindow::connectSignals()
connect(m_ui.actionFolderSettings, &QAction::triggered, [this]() { doSettings("Folders"); }); connect(m_ui.actionFolderSettings, &QAction::triggered, [this]() { doSettings("Folders"); });
connect(m_ui.actionAchievementSettings, &QAction::triggered, [this]() { doSettings("Achievements"); }); connect(m_ui.actionAchievementSettings, &QAction::triggered, [this]() { doSettings("Achievements"); });
connect(m_ui.actionControllerSettings, &QAction::triggered, connect(m_ui.actionControllerSettings, &QAction::triggered,
[this]() { doControllerSettings(ControllerSettingsDialog::Category::GlobalSettings); }); [this]() { doControllerSettings(ControllerSettingsWindow::Category::GlobalSettings); });
connect(m_ui.actionHotkeySettings, &QAction::triggered, connect(m_ui.actionHotkeySettings, &QAction::triggered,
[this]() { doControllerSettings(ControllerSettingsDialog::Category::HotkeySettings); }); [this]() { doControllerSettings(ControllerSettingsWindow::Category::HotkeySettings); });
connect(m_ui.actionAddGameDirectory, &QAction::triggered, connect(m_ui.actionAddGameDirectory, &QAction::triggered,
[this]() { getSettingsDialog()->getGameListSettingsWidget()->addSearchDirectory(this); }); [this]() { getSettingsWindow()->getGameListSettingsWidget()->addSearchDirectory(this); });
connect(m_ui.actionScanForNewGames, &QAction::triggered, [this]() { refreshGameList(false); }); connect(m_ui.actionScanForNewGames, &QAction::triggered, [this]() { refreshGameList(false); });
connect(m_ui.actionRescanAllGames, &QAction::triggered, [this]() { refreshGameList(true); }); connect(m_ui.actionRescanAllGames, &QAction::triggered, [this]() { refreshGameList(true); });
connect(m_ui.actionViewToolbar, &QAction::toggled, this, &MainWindow::onViewToolbarActionToggled); connect(m_ui.actionViewToolbar, &QAction::toggled, this, &MainWindow::onViewToolbarActionToggled);
@ -415,7 +409,7 @@ void MainWindow::connectSignals()
connect(m_game_list_widget, &GameListWidget::entryContextMenuRequested, this, &MainWindow::onGameListEntryContextMenuRequested, connect(m_game_list_widget, &GameListWidget::entryContextMenuRequested, this, &MainWindow::onGameListEntryContextMenuRequested,
Qt::QueuedConnection); Qt::QueuedConnection);
connect(m_game_list_widget, &GameListWidget::addGameDirectoryRequested, this, connect(m_game_list_widget, &GameListWidget::addGameDirectoryRequested, this,
[this]() { getSettingsDialog()->getGameListSettingsWidget()->addSearchDirectory(this); }); [this]() { getSettingsWindow()->getGameListSettingsWidget()->addSearchDirectory(this); });
} }
void MainWindow::connectVMThreadSignals(EmuThread* thread) void MainWindow::connectVMThreadSignals(EmuThread* thread)
@ -485,14 +479,14 @@ void MainWindow::recreate()
void MainWindow::recreateSettings() void MainWindow::recreateSettings()
{ {
QString current_category; QString current_category;
if (m_settings_dialog) if (m_setings_window)
{ {
const bool was_visible = m_settings_dialog->isVisible(); const bool was_visible = m_setings_window->isVisible();
current_category = m_settings_dialog->getCategory(); current_category = m_setings_window->getCategory();
m_settings_dialog->hide(); m_setings_window->hide();
m_settings_dialog->deleteLater(); m_setings_window->deleteLater();
m_settings_dialog = nullptr; m_setings_window = nullptr;
if (!was_visible) if (!was_visible)
return; return;
@ -518,7 +512,29 @@ void MainWindow::resetSettings(bool ui)
g_main_window->recreateSettings(); g_main_window->recreateSettings();
} }
void MainWindow::destroySubWindows()
{
if (m_debugger_window)
{
m_debugger_window->close();
m_debugger_window->deleteLater();
m_debugger_window = nullptr;
}
if (m_controller_settings_window)
{
m_controller_settings_window->close();
m_controller_settings_window->deleteLater();
m_controller_settings_window = nullptr;
}
if (m_setings_window)
{
m_setings_window->close();
m_setings_window->deleteLater();
m_setings_window = nullptr;
}
}
void MainWindow::onScreenshotActionTriggered() void MainWindow::onScreenshotActionTriggered()
{ {
@ -594,7 +610,7 @@ void MainWindow::onShowAdvancedSettingsToggled(bool checked)
m_ui.menuDebug->menuAction()->setVisible(checked); m_ui.menuDebug->menuAction()->setVisible(checked);
// just recreate the entire settings window, it's easier. // just recreate the entire settings window, it's easier.
if (m_settings_dialog) if (m_setings_window)
recreateSettings(); recreateSettings();
} }
@ -1174,7 +1190,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
if (action->isEnabled()) if (action->isEnabled())
{ {
connect(action, &QAction::triggered, [entry]() { connect(action, &QAction::triggered, [entry]() {
SettingsDialog::openGamePropertiesDialog(entry, entry->title, SettingsWindow::openGamePropertiesDialog(entry, entry->title,
(entry->type != GameList::EntryType::ELF) ? entry->serial : std::string(), (entry->type != GameList::EntryType::ELF) ? entry->serial : std::string(),
entry->crc); entry->crc);
}); });
@ -1191,7 +1207,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
connect(action, &QAction::triggered, [this, entry]() { setGameListEntryCoverImage(entry); }); connect(action, &QAction::triggered, [this, entry]() { setGameListEntryCoverImage(entry); });
connect(menu.addAction(tr("Exclude From List")), &QAction::triggered, connect(menu.addAction(tr("Exclude From List")), &QAction::triggered,
[this, entry]() { getSettingsDialog()->getGameListSettingsWidget()->addExcludedPath(entry->path); }); [this, entry]() { getSettingsWindow()->getGameListSettingsWidget()->addExcludedPath(entry->path); });
connect(menu.addAction(tr("Reset Play Time")), &QAction::triggered, [this, entry]() { clearGameListEntryPlayTime(entry); }); connect(menu.addAction(tr("Reset Play Time")), &QAction::triggered, [this, entry]() { clearGameListEntryPlayTime(entry); });
@ -1239,7 +1255,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
} }
connect(menu.addAction(tr("Add Search Directory...")), &QAction::triggered, connect(menu.addAction(tr("Add Search Directory...")), &QAction::triggered,
[this]() { getSettingsDialog()->getGameListSettingsWidget()->addSearchDirectory(this); }); [this]() { getSettingsWindow()->getGameListSettingsWidget()->addSearchDirectory(this); });
menu.exec(point); menu.exec(point);
} }
@ -1387,7 +1403,7 @@ void MainWindow::onViewGamePropertiesActionTriggered()
const GameList::Entry* entry = GameList::GetEntryForPath(path.toUtf8().constData()); const GameList::Entry* entry = GameList::GetEntryForPath(path.toUtf8().constData());
if (entry) if (entry)
{ {
SettingsDialog::openGamePropertiesDialog( SettingsWindow::openGamePropertiesDialog(
entry, entry->title, m_current_elf_override.isEmpty() ? entry->serial : std::string(), entry->crc); entry, entry->title, m_current_elf_override.isEmpty() ? entry->serial : std::string(), entry->crc);
return; return;
} }
@ -1403,12 +1419,12 @@ void MainWindow::onViewGamePropertiesActionTriggered()
// can't use serial for ELFs, because they might have a disc set // can't use serial for ELFs, because they might have a disc set
if (m_current_elf_override.isEmpty()) if (m_current_elf_override.isEmpty())
{ {
SettingsDialog::openGamePropertiesDialog( SettingsWindow::openGamePropertiesDialog(
nullptr, m_current_title.toStdString(), m_current_disc_serial.toStdString(), m_current_disc_crc); nullptr, m_current_title.toStdString(), m_current_disc_serial.toStdString(), m_current_disc_crc);
} }
else else
{ {
SettingsDialog::openGamePropertiesDialog( SettingsWindow::openGamePropertiesDialog(
nullptr, m_current_title.toStdString(), std::string(), m_current_disc_crc); nullptr, m_current_title.toStdString(), std::string(), m_current_disc_crc);
} }
} }
@ -1812,6 +1828,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
saveStateToConfig(); saveStateToConfig();
if (m_display_widget) if (m_display_widget)
g_emu_thread->stopFullscreenUI(); g_emu_thread->stopFullscreenUI();
destroySubWindows();
QMainWindow::closeEvent(event); QMainWindow::closeEvent(event);
return; return;
} }
@ -2267,13 +2284,13 @@ void MainWindow::restoreDisplayWindowGeometryFromConfig()
} }
} }
SettingsDialog* MainWindow::getSettingsDialog() SettingsWindow* MainWindow::getSettingsWindow()
{ {
if (!m_settings_dialog) if (!m_setings_window)
{ {
m_settings_dialog = new SettingsDialog(this); m_setings_window = new SettingsWindow();
connect(m_settings_dialog->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::themeChanged, this, &MainWindow::updateTheme); connect(m_setings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::themeChanged, this, &MainWindow::updateTheme);
connect(m_settings_dialog->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::languageChanged, this, [this]() { connect(m_setings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::languageChanged, this, [this]() {
// reopen settings dialog after it applies // reopen settings dialog after it applies
updateLanguage(); updateLanguage();
// If you doSettings now, on macOS, the window will somehow end up underneath the main window that was created above // If you doSettings now, on macOS, the window will somehow end up underneath the main window that was created above
@ -2284,21 +2301,16 @@ SettingsDialog* MainWindow::getSettingsDialog()
}); });
} }
return m_settings_dialog; return m_setings_window;
} }
void MainWindow::doSettings(const char* category /* = nullptr */) void MainWindow::doSettings(const char* category /* = nullptr */)
{ {
SettingsDialog* dlg = getSettingsDialog(); SettingsWindow* dlg = getSettingsWindow();
if (dlg->isVisible()) if (dlg->isVisible())
{
dlg->raise(); dlg->raise();
}
else else
{
dlg->setModal(false);
dlg->show(); dlg->show();
}
if (category) if (category)
dlg->setCategory(category); dlg->setCategory(category);
@ -2319,25 +2331,20 @@ void MainWindow::openDebugger()
dwnd->isVisible() ? dwnd->hide() : dwnd->show(); dwnd->isVisible() ? dwnd->hide() : dwnd->show();
} }
ControllerSettingsDialog* MainWindow::getControllerSettingsDialog() void MainWindow::doControllerSettings(ControllerSettingsWindow::Category category)
{ {
if (!m_controller_settings_dialog) if (m_controller_settings_window)
m_controller_settings_dialog = new ControllerSettingsDialog(this);
return m_controller_settings_dialog;
}
void MainWindow::doControllerSettings(ControllerSettingsDialog::Category category)
{
ControllerSettingsDialog* dlg = getControllerSettingsDialog();
if (!dlg->isVisible())
{ {
dlg->setModal(false); m_controller_settings_window->raise();
dlg->show(); }
else
{
m_controller_settings_window = new ControllerSettingsWindow();
m_controller_settings_window->show();
} }
if (category != ControllerSettingsDialog::Category::Count) if (category != ControllerSettingsWindow::Category::Count)
dlg->setCategory(category); m_controller_settings_window->setCategory(category);
} }
QString MainWindow::getDiscDevicePath(const QString& title) QString MainWindow::getDiscDevicePath(const QString& title)

View File

@ -24,8 +24,8 @@
#include <optional> #include <optional>
#include "Tools/InputRecording/InputRecordingViewer.h" #include "Tools/InputRecording/InputRecordingViewer.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/SettingsDialog.h" #include "Settings/SettingsWindow.h"
#include "Debugger/DebuggerWindow.h" #include "Debugger/DebuggerWindow.h"
#include "ui_MainWindow.h" #include "ui_MainWindow.h"
@ -35,7 +35,7 @@ class AutoUpdaterDialog;
class DisplayWidget; class DisplayWidget;
class DisplayContainer; class DisplayContainer;
class GameListWidget; class GameListWidget;
class ControllerSettingsDialog; class ControllerSettingsWindow;
class EmuThread; class EmuThread;
@ -218,6 +218,7 @@ private:
void connectSignals(); void connectSignals();
void recreate(); void recreate();
void recreateSettings(); void recreateSettings();
void destroySubWindows();
void registerForDeviceNotifications(); void registerForDeviceNotifications();
void unregisterForDeviceNotifications(); void unregisterForDeviceNotifications();
@ -250,7 +251,7 @@ private:
void destroyDisplayWidget(bool show_game_list); void destroyDisplayWidget(bool show_game_list);
void updateDisplayWidgetCursor(); void updateDisplayWidgetCursor();
SettingsDialog* getSettingsDialog(); SettingsWindow* getSettingsWindow();
void doSettings(const char* category = nullptr); void doSettings(const char* category = nullptr);
InputRecordingViewer* getInputRecordingViewer(); InputRecordingViewer* getInputRecordingViewer();
@ -258,8 +259,7 @@ private:
DebuggerWindow* getDebuggerWindow(); DebuggerWindow* getDebuggerWindow();
ControllerSettingsDialog* getControllerSettingsDialog(); void doControllerSettings(ControllerSettingsWindow::Category category = ControllerSettingsWindow::Category::Count);
void doControllerSettings(ControllerSettingsDialog::Category category = ControllerSettingsDialog::Category::Count);
QString getDiscDevicePath(const QString& title); QString getDiscDevicePath(const QString& title);
@ -282,9 +282,9 @@ private:
DisplayWidget* m_display_widget = nullptr; DisplayWidget* m_display_widget = nullptr;
DisplayContainer* m_display_container = nullptr; DisplayContainer* m_display_container = nullptr;
SettingsDialog* m_settings_dialog = nullptr; SettingsWindow* m_setings_window = nullptr;
ControllerSettingsWindow* m_controller_settings_window = nullptr;
InputRecordingViewer* m_input_recording_viewer = nullptr; InputRecordingViewer* m_input_recording_viewer = nullptr;
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;
AutoUpdaterDialog* m_auto_updater_dialog = nullptr; AutoUpdaterDialog* m_auto_updater_dialog = nullptr;
DebuggerWindow* m_debugger_window = nullptr; DebuggerWindow* m_debugger_window = nullptr;

View File

@ -41,7 +41,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "Settings/SettingsDialog.h" #include "Settings/SettingsWindow.h"
namespace SettingWidgetBinder namespace SettingWidgetBinder
{ {

View File

@ -18,7 +18,7 @@
#include "AchievementSettingsWidget.h" #include "AchievementSettingsWidget.h"
#include "AchievementLoginDialog.h" #include "AchievementLoginDialog.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "QtUtils.h" #include "QtUtils.h"
@ -30,7 +30,7 @@
#include <QtCore/QDateTime> #include <QtCore/QDateTime>
#include <QtWidgets/QMessageBox> #include <QtWidgets/QMessageBox>
AchievementSettingsWidget::AchievementSettingsWidget(SettingsDialog* dialog, QWidget* parent) AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -17,14 +17,14 @@
#include <QtWidgets/QWidget> #include <QtWidgets/QWidget>
#include "ui_AchievementSettingsWidget.h" #include "ui_AchievementSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class AchievementSettingsWidget : public QWidget class AchievementSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AchievementSettingsWidget(SettingsDialog* dialog, QWidget* parent); explicit AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AchievementSettingsWidget(); ~AchievementSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -41,5 +41,5 @@ private:
Ui::AchievementSettingsWidget m_ui; Ui::AchievementSettingsWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
}; };

View File

@ -22,9 +22,9 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent) AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -19,14 +19,14 @@
#include "ui_AdvancedSettingsWidget.h" #include "ui_AdvancedSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class AdvancedSettingsWidget : public QWidget class AdvancedSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent); AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AdvancedSettingsWidget(); ~AdvancedSettingsWidget();
private: private:
@ -34,7 +34,7 @@ private:
int getClampingModeIndex(int vunum) const; int getClampingModeIndex(int vunum) const;
void setClampingMode(int vunum, int index); void setClampingMode(int vunum, int index);
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::AdvancedSystemSettingsWidget m_ui; Ui::AdvancedSystemSettingsWidget m_ui;
}; };

View File

@ -26,7 +26,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
static constexpr s32 DEFAULT_SYNCHRONIZATION_MODE = 0; static constexpr s32 DEFAULT_SYNCHRONIZATION_MODE = 0;
static constexpr s32 DEFAULT_EXPANSION_MODE = 0; static constexpr s32 DEFAULT_EXPANSION_MODE = 0;
@ -39,7 +39,7 @@ static constexpr s32 DEFAULT_SOUNDTOUCH_SEQUENCE_LENGTH = 30;
static constexpr s32 DEFAULT_SOUNDTOUCH_SEEK_WINDOW = 20; static constexpr s32 DEFAULT_SOUNDTOUCH_SEEK_WINDOW = 20;
static constexpr s32 DEFAULT_SOUNDTOUCH_OVERLAP = 10; static constexpr s32 DEFAULT_SOUNDTOUCH_OVERLAP = 10;
AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent) AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -19,14 +19,14 @@
#include "ui_AudioSettingsWidget.h" #include "ui_AudioSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class AudioSettingsWidget : public QWidget class AudioSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent); AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AudioSettingsWidget(); ~AudioSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -45,7 +45,7 @@ private:
void populateOutputModules(); void populateOutputModules();
void updateVolumeLabel(); void updateVolumeLabel();
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::AudioSettingsWidget m_ui; Ui::AudioSettingsWidget m_ui;
u32 m_output_device_latency = 0; u32 m_output_device_latency = 0;
}; };

View File

@ -26,9 +26,9 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
BIOSSettingsWidget::BIOSSettingsWidget(SettingsDialog* dialog, QWidget* parent) BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -24,7 +24,7 @@
#include "ui_BIOSSettingsWidget.h" #include "ui_BIOSSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class QThread; class QThread;
// TODO: Move to core. // TODO: Move to core.
@ -43,7 +43,7 @@ class BIOSSettingsWidget : public QWidget
Q_OBJECT Q_OBJECT
public: public:
BIOSSettingsWidget(SettingsDialog* dialog, QWidget* parent); BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~BIOSSettingsWidget(); ~BIOSSettingsWidget();
class RefreshThread final : public QThread class RefreshThread final : public QThread
@ -71,7 +71,7 @@ private Q_SLOTS:
private: private:
Ui::BIOSSettingsWidget m_ui; Ui::BIOSSettingsWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
RefreshThread* m_refresh_thread = nullptr; RefreshThread* m_refresh_thread = nullptr;
}; };

View File

@ -29,9 +29,9 @@
#include "pcsx2/SIO/Pad/Pad.h" #include "pcsx2/SIO/Pad/Pad.h"
#include "Settings/ControllerBindingWidgets.h" #include "Settings/ControllerBindingWidgets.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/ControllerSettingWidgetBinder.h" #include "Settings/ControllerSettingWidgetBinder.h"
#include "Settings/SettingsDialog.h" #include "Settings/SettingsWindow.h"
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
@ -40,7 +40,7 @@
#include "ui_USBBindingWidget_GTForce.h" #include "ui_USBBindingWidget_GTForce.h"
#include "ui_USBBindingWidget_GunCon2.h" #include "ui_USBBindingWidget_GunCon2.h"
ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog, u32 port) ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
, m_config_section(fmt::format("Pad{}", port + 1)) , m_config_section(fmt::format("Pad{}", port + 1))
@ -325,7 +325,7 @@ ControllerMacroEditWidget::ControllerMacroEditWidget(ControllerMacroWidget* pare
{ {
m_ui.setupUi(this); m_ui.setupUi(this);
ControllerSettingsDialog* dialog = m_bwidget->getDialog(); ControllerSettingsWindow* dialog = m_bwidget->getDialog();
const std::string& section = m_bwidget->getConfigSection(); const std::string& section = m_bwidget->getConfigSection();
const Pad::ControllerInfo* cinfo = Pad::GetControllerInfo(m_bwidget->getControllerType()); const Pad::ControllerInfo* cinfo = Pad::GetControllerInfo(m_bwidget->getControllerType());
if (!cinfo) if (!cinfo)
@ -445,7 +445,7 @@ void ControllerMacroEditWidget::updateFrequencyText()
void ControllerMacroEditWidget::updateBinds() void ControllerMacroEditWidget::updateBinds()
{ {
ControllerSettingsDialog* dialog = m_bwidget->getDialog(); ControllerSettingsWindow* dialog = m_bwidget->getDialog();
const Pad::ControllerInfo* cinfo = Pad::GetControllerInfo(m_bwidget->getControllerType()); const Pad::ControllerInfo* cinfo = Pad::GetControllerInfo(m_bwidget->getControllerType());
if (!cinfo) if (!cinfo)
return; return;
@ -495,7 +495,7 @@ void ControllerMacroEditWidget::updateBinds()
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
ControllerCustomSettingsWidget::ControllerCustomSettingsWidget(std::span<const SettingInfo> settings, std::string config_section, ControllerCustomSettingsWidget::ControllerCustomSettingsWidget(std::span<const SettingInfo> settings, std::string config_section,
std::string config_prefix, const char* translation_ctx, ControllerSettingsDialog* dialog, QWidget* parent_widget) std::string config_prefix, const char* translation_ctx, ControllerSettingsWindow* dialog, QWidget* parent_widget)
: QWidget(parent_widget) : QWidget(parent_widget)
, m_settings(settings) , m_settings(settings)
, m_config_section(std::move(config_section)) , m_config_section(std::move(config_section))
@ -912,7 +912,7 @@ ControllerBindingWidget_Base* ControllerBindingWidget_Guitar::createInstance(Con
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
USBDeviceWidget::USBDeviceWidget(QWidget* parent, ControllerSettingsDialog* dialog, u32 port) USBDeviceWidget::USBDeviceWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
, m_config_section(fmt::format("USB{}", port + 1)) , m_config_section(fmt::format("USB{}", port + 1))

View File

@ -29,7 +29,7 @@
#include "ui_USBDeviceWidget.h" #include "ui_USBDeviceWidget.h"
class InputBindingWidget; class InputBindingWidget;
class ControllerSettingsDialog; class ControllerSettingsWindow;
class ControllerCustomSettingsWidget; class ControllerCustomSettingsWidget;
class ControllerMacroWidget; class ControllerMacroWidget;
class ControllerMacroEditWidget; class ControllerMacroEditWidget;
@ -42,12 +42,12 @@ class ControllerBindingWidget final : public QWidget
Q_OBJECT Q_OBJECT
public: public:
ControllerBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog, u32 port); ControllerBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port);
~ControllerBindingWidget(); ~ControllerBindingWidget();
QIcon getIcon() const; QIcon getIcon() const;
__fi ControllerSettingsDialog* getDialog() const { return m_dialog; } __fi ControllerSettingsWindow* getDialog() const { return m_dialog; }
__fi const std::string& getConfigSection() const { return m_config_section; } __fi const std::string& getConfigSection() const { return m_config_section; }
__fi Pad::ControllerType getControllerType() const { return m_controller_type; } __fi Pad::ControllerType getControllerType() const { return m_controller_type; }
__fi u32 getPortNumber() const { return m_port_number; } __fi u32 getPortNumber() const { return m_port_number; }
@ -67,7 +67,7 @@ private:
Ui::ControllerBindingWidget m_ui; Ui::ControllerBindingWidget m_ui;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
std::string m_config_section; std::string m_config_section;
Pad::ControllerType m_controller_type; Pad::ControllerType m_controller_type;
@ -97,7 +97,7 @@ private:
void createWidgets(ControllerBindingWidget* parent); void createWidgets(ControllerBindingWidget* parent);
Ui::ControllerMacroWidget m_ui; Ui::ControllerMacroWidget m_ui;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
std::array<ControllerMacroEditWidget*, NUM_MACROS> m_macros; std::array<ControllerMacroEditWidget*, NUM_MACROS> m_macros;
}; };
@ -142,7 +142,7 @@ class ControllerCustomSettingsWidget : public QWidget
public: public:
ControllerCustomSettingsWidget(std::span<const SettingInfo> settings, std::string config_section, std::string config_prefix, ControllerCustomSettingsWidget(std::span<const SettingInfo> settings, std::string config_section, std::string config_prefix,
const char* translation_ctx, ControllerSettingsDialog* dialog, QWidget* parent_widget); const char* translation_ctx, ControllerSettingsWindow* dialog, QWidget* parent_widget);
~ControllerCustomSettingsWidget(); ~ControllerCustomSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -154,7 +154,7 @@ private:
std::span<const SettingInfo> m_settings; std::span<const SettingInfo> m_settings;
std::string m_config_section; std::string m_config_section;
std::string m_config_prefix; std::string m_config_prefix;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
@ -168,7 +168,7 @@ public:
ControllerBindingWidget_Base(ControllerBindingWidget* parent); ControllerBindingWidget_Base(ControllerBindingWidget* parent);
virtual ~ControllerBindingWidget_Base(); virtual ~ControllerBindingWidget_Base();
__fi ControllerSettingsDialog* getDialog() const { return static_cast<ControllerBindingWidget*>(parent())->getDialog(); } __fi ControllerSettingsWindow* getDialog() const { return static_cast<ControllerBindingWidget*>(parent())->getDialog(); }
__fi const std::string& getConfigSection() const { return static_cast<ControllerBindingWidget*>(parent())->getConfigSection(); } __fi const std::string& getConfigSection() const { return static_cast<ControllerBindingWidget*>(parent())->getConfigSection(); }
__fi Pad::ControllerType getControllerType() const { return static_cast<ControllerBindingWidget*>(parent())->getControllerType(); } __fi Pad::ControllerType getControllerType() const { return static_cast<ControllerBindingWidget*>(parent())->getControllerType(); }
__fi u32 getPortNumber() const { return static_cast<ControllerBindingWidget*>(parent())->getPortNumber(); } __fi u32 getPortNumber() const { return static_cast<ControllerBindingWidget*>(parent())->getPortNumber(); }
@ -218,12 +218,12 @@ class USBDeviceWidget final : public QWidget
Q_OBJECT Q_OBJECT
public: public:
USBDeviceWidget(QWidget* parent, ControllerSettingsDialog* dialog, u32 port); USBDeviceWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port);
~USBDeviceWidget(); ~USBDeviceWidget();
QIcon getIcon() const; QIcon getIcon() const;
__fi ControllerSettingsDialog* getDialog() const { return m_dialog; } __fi ControllerSettingsWindow* getDialog() const { return m_dialog; }
__fi const std::string& getConfigSection() const { return m_config_section; } __fi const std::string& getConfigSection() const { return m_config_section; }
__fi const std::string& getDeviceType() const { return m_device_type; } __fi const std::string& getDeviceType() const { return m_device_type; }
__fi u32 getPortNumber() const { return m_port_number; } __fi u32 getPortNumber() const { return m_port_number; }
@ -244,7 +244,7 @@ private:
Ui::USBDeviceWidget m_ui; Ui::USBDeviceWidget m_ui;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
std::string m_config_section; std::string m_config_section;
std::string m_device_type; std::string m_device_type;
@ -263,7 +263,7 @@ public:
USBBindingWidget(USBDeviceWidget* parent); USBBindingWidget(USBDeviceWidget* parent);
~USBBindingWidget() override; ~USBBindingWidget() override;
__fi ControllerSettingsDialog* getDialog() const { return static_cast<USBDeviceWidget*>(parent())->getDialog(); } __fi ControllerSettingsWindow* getDialog() const { return static_cast<USBDeviceWidget*>(parent())->getDialog(); }
__fi const std::string& getConfigSection() const { return static_cast<USBDeviceWidget*>(parent())->getConfigSection(); } __fi const std::string& getConfigSection() const { return static_cast<USBDeviceWidget*>(parent())->getConfigSection(); }
__fi const std::string& getDeviceType() const { return static_cast<USBDeviceWidget*>(parent())->getDeviceType(); } __fi const std::string& getDeviceType() const { return static_cast<USBDeviceWidget*>(parent())->getDeviceType(); }
__fi u32 getPortNumber() const { return static_cast<USBDeviceWidget*>(parent())->getPortNumber(); } __fi u32 getPortNumber() const { return static_cast<USBDeviceWidget*>(parent())->getPortNumber(); }

View File

@ -16,7 +16,7 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "Settings/ControllerGlobalSettingsWidget.h" #include "Settings/ControllerGlobalSettingsWidget.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/ControllerSettingWidgetBinder.h" #include "Settings/ControllerSettingWidgetBinder.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
@ -24,7 +24,7 @@
#include "pcsx2/Input/InputManager.h" #include "pcsx2/Input/InputManager.h"
#include "pcsx2/Input/SDLInputSource.h" #include "pcsx2/Input/SDLInputSource.h"
ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog) ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {
@ -132,7 +132,7 @@ void ControllerGlobalSettingsWidget::mouseSettingsClicked()
dialog.exec(); dialog.exec();
} }
ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsDialog* dialog) ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog)
: QDialog(parent) : QDialog(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {
@ -159,7 +159,7 @@ void ControllerLEDSettingsDialog::linkButton(ColorPickerButton* button, u32 play
}); });
} }
ControllerMouseSettingsDialog::ControllerMouseSettingsDialog(QWidget* parent, ControllerSettingsDialog* dialog) ControllerMouseSettingsDialog::ControllerMouseSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog)
: QDialog(parent) : QDialog(parent)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -26,14 +26,14 @@
#include "ui_ControllerLEDSettingsDialog.h" #include "ui_ControllerLEDSettingsDialog.h"
#include "ui_ControllerMouseSettingsDialog.h" #include "ui_ControllerMouseSettingsDialog.h"
class ControllerSettingsDialog; class ControllerSettingsWindow;
class ControllerGlobalSettingsWidget : public QWidget class ControllerGlobalSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog); ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog);
~ControllerGlobalSettingsWidget(); ~ControllerGlobalSettingsWidget();
void addDeviceToList(const QString& identifier, const QString& name); void addDeviceToList(const QString& identifier, const QString& name);
@ -49,7 +49,7 @@ private Q_SLOTS:
private: private:
Ui::ControllerGlobalSettingsWidget m_ui; Ui::ControllerGlobalSettingsWidget m_ui;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
}; };
class ControllerLEDSettingsDialog : public QDialog class ControllerLEDSettingsDialog : public QDialog
@ -57,14 +57,14 @@ class ControllerLEDSettingsDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsDialog* dialog); ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog);
~ControllerLEDSettingsDialog(); ~ControllerLEDSettingsDialog();
private: private:
void linkButton(ColorPickerButton* button, u32 player_id); void linkButton(ColorPickerButton* button, u32 player_id);
Ui::ControllerLEDSettingsDialog m_ui; Ui::ControllerLEDSettingsDialog m_ui;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
}; };
class ControllerMouseSettingsDialog : public QDialog class ControllerMouseSettingsDialog : public QDialog
@ -72,7 +72,7 @@ class ControllerMouseSettingsDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
ControllerMouseSettingsDialog(QWidget* parent, ControllerSettingsDialog* dialog); ControllerMouseSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog);
~ControllerMouseSettingsDialog(); ~ControllerMouseSettingsDialog();
private: private:

View File

@ -1,5 +1,5 @@
/* PCSX2 - PS2 Emulator for PCs /* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2022 PCSX2 Dev Team * Copyright (C) 2002-2023 PCSX2 Dev Team
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the terms * PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found- * of the GNU Lesser General Public License as published by the Free Software Found-
@ -16,7 +16,7 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "QtHost.h" #include "QtHost.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/ControllerGlobalSettingsWidget.h" #include "Settings/ControllerGlobalSettingsWidget.h"
#include "Settings/ControllerBindingWidgets.h" #include "Settings/ControllerBindingWidgets.h"
#include "Settings/HotkeySettingsWidget.h" #include "Settings/HotkeySettingsWidget.h"
@ -36,8 +36,8 @@
static constexpr const std::array<char, 4> s_mtap_slot_names = {{'A', 'B', 'C', 'D'}}; static constexpr const std::array<char, 4> s_mtap_slot_names = {{'A', 'B', 'C', 'D'}};
ControllerSettingsDialog::ControllerSettingsDialog(QWidget* parent /* = nullptr */) ControllerSettingsWindow::ControllerSettingsWindow()
: QDialog(parent) : QWidget(nullptr)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);
@ -47,27 +47,27 @@ ControllerSettingsDialog::ControllerSettingsDialog(QWidget* parent /* = nullptr
createWidgets(); createWidgets();
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &ControllerSettingsDialog::onCategoryCurrentRowChanged); connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &ControllerSettingsWindow::onCategoryCurrentRowChanged);
connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this, &ControllerSettingsDialog::onCurrentProfileChanged); connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this, &ControllerSettingsWindow::onCurrentProfileChanged);
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &ControllerSettingsDialog::close); connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &ControllerSettingsWindow::close);
connect(m_ui.newProfile, &QPushButton::clicked, this, &ControllerSettingsDialog::onNewProfileClicked); connect(m_ui.newProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onNewProfileClicked);
connect(m_ui.loadProfile, &QPushButton::clicked, this, &ControllerSettingsDialog::onLoadProfileClicked); connect(m_ui.loadProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onLoadProfileClicked);
connect(m_ui.deleteProfile, &QPushButton::clicked, this, &ControllerSettingsDialog::onDeleteProfileClicked); connect(m_ui.deleteProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onDeleteProfileClicked);
connect(m_ui.restoreDefaults, &QPushButton::clicked, this, &ControllerSettingsDialog::onRestoreDefaultsClicked); connect(m_ui.restoreDefaults, &QPushButton::clicked, this, &ControllerSettingsWindow::onRestoreDefaultsClicked);
connect(g_emu_thread, &EmuThread::onInputDevicesEnumerated, this, &ControllerSettingsDialog::onInputDevicesEnumerated); connect(g_emu_thread, &EmuThread::onInputDevicesEnumerated, this, &ControllerSettingsWindow::onInputDevicesEnumerated);
connect(g_emu_thread, &EmuThread::onInputDeviceConnected, this, &ControllerSettingsDialog::onInputDeviceConnected); connect(g_emu_thread, &EmuThread::onInputDeviceConnected, this, &ControllerSettingsWindow::onInputDeviceConnected);
connect(g_emu_thread, &EmuThread::onInputDeviceDisconnected, this, &ControllerSettingsDialog::onInputDeviceDisconnected); connect(g_emu_thread, &EmuThread::onInputDeviceDisconnected, this, &ControllerSettingsWindow::onInputDeviceDisconnected);
connect(g_emu_thread, &EmuThread::onVibrationMotorsEnumerated, this, &ControllerSettingsDialog::onVibrationMotorsEnumerated); connect(g_emu_thread, &EmuThread::onVibrationMotorsEnumerated, this, &ControllerSettingsWindow::onVibrationMotorsEnumerated);
// trigger a device enumeration to populate the device list // trigger a device enumeration to populate the device list
g_emu_thread->enumerateInputDevices(); g_emu_thread->enumerateInputDevices();
g_emu_thread->enumerateVibrationMotors(); g_emu_thread->enumerateVibrationMotors();
} }
ControllerSettingsDialog::~ControllerSettingsDialog() = default; ControllerSettingsWindow::~ControllerSettingsWindow() = default;
void ControllerSettingsDialog::setCategory(Category category) void ControllerSettingsWindow::setCategory(Category category)
{ {
switch (category) switch (category)
{ {
@ -89,17 +89,17 @@ void ControllerSettingsDialog::setCategory(Category category)
} }
} }
void ControllerSettingsDialog::onCategoryCurrentRowChanged(int row) void ControllerSettingsWindow::onCategoryCurrentRowChanged(int row)
{ {
m_ui.settingsContainer->setCurrentIndex(row); m_ui.settingsContainer->setCurrentIndex(row);
} }
void ControllerSettingsDialog::onCurrentProfileChanged(int index) void ControllerSettingsWindow::onCurrentProfileChanged(int index)
{ {
switchProfile((index == 0) ? 0 : m_ui.currentProfile->itemText(index)); switchProfile((index == 0) ? 0 : m_ui.currentProfile->itemText(index));
} }
void ControllerSettingsDialog::onNewProfileClicked() void ControllerSettingsWindow::onNewProfileClicked()
{ {
const QString profile_name(QInputDialog::getText(this, tr("Create Input Profile"), const QString profile_name(QInputDialog::getText(this, tr("Create Input Profile"),
tr("Custom input profiles are used to override the Shared input profile for specific games.\n" tr("Custom input profiles are used to override the Shared input profile for specific games.\n"
@ -154,7 +154,7 @@ void ControllerSettingsDialog::onNewProfileClicked()
switchProfile(profile_name); switchProfile(profile_name);
} }
void ControllerSettingsDialog::onLoadProfileClicked() void ControllerSettingsWindow::onLoadProfileClicked()
{ {
if (QMessageBox::question(this, tr("Load Input Profile"), if (QMessageBox::question(this, tr("Load Input Profile"),
tr("Are you sure you want to load the input profile named '%1'?\n\n" tr("Are you sure you want to load the input profile named '%1'?\n\n"
@ -178,7 +178,7 @@ void ControllerSettingsDialog::onLoadProfileClicked()
switchProfile({}); switchProfile({});
} }
void ControllerSettingsDialog::onDeleteProfileClicked() void ControllerSettingsWindow::onDeleteProfileClicked()
{ {
if (QMessageBox::question(this, tr("Delete Input Profile"), if (QMessageBox::question(this, tr("Delete Input Profile"),
tr("Are you sure you want to delete the input profile named '%1'?\n\n" tr("Are you sure you want to delete the input profile named '%1'?\n\n"
@ -200,7 +200,7 @@ void ControllerSettingsDialog::onDeleteProfileClicked()
switchProfile({}); switchProfile({});
} }
void ControllerSettingsDialog::onRestoreDefaultsClicked() void ControllerSettingsWindow::onRestoreDefaultsClicked()
{ {
if (QMessageBox::question(this, tr("Restore Defaults"), if (QMessageBox::question(this, tr("Restore Defaults"),
tr("Are you sure you want to restore the default controller configuration?\n\n" tr("Are you sure you want to restore the default controller configuration?\n\n"
@ -223,21 +223,21 @@ void ControllerSettingsDialog::onRestoreDefaultsClicked()
switchProfile({}); switchProfile({});
} }
void ControllerSettingsDialog::onInputDevicesEnumerated(const QList<QPair<QString, QString>>& devices) void ControllerSettingsWindow::onInputDevicesEnumerated(const QList<QPair<QString, QString>>& devices)
{ {
m_device_list = devices; m_device_list = devices;
for (const QPair<QString, QString>& device : devices) for (const QPair<QString, QString>& device : devices)
m_global_settings->addDeviceToList(device.first, device.second); m_global_settings->addDeviceToList(device.first, device.second);
} }
void ControllerSettingsDialog::onInputDeviceConnected(const QString& identifier, const QString& device_name) void ControllerSettingsWindow::onInputDeviceConnected(const QString& identifier, const QString& device_name)
{ {
m_device_list.emplace_back(identifier, device_name); m_device_list.emplace_back(identifier, device_name);
m_global_settings->addDeviceToList(identifier, device_name); m_global_settings->addDeviceToList(identifier, device_name);
g_emu_thread->enumerateVibrationMotors(); g_emu_thread->enumerateVibrationMotors();
} }
void ControllerSettingsDialog::onInputDeviceDisconnected(const QString& identifier) void ControllerSettingsWindow::onInputDeviceDisconnected(const QString& identifier)
{ {
for (auto iter = m_device_list.begin(); iter != m_device_list.end(); ++iter) for (auto iter = m_device_list.begin(); iter != m_device_list.end(); ++iter)
{ {
@ -252,7 +252,7 @@ void ControllerSettingsDialog::onInputDeviceDisconnected(const QString& identifi
g_emu_thread->enumerateVibrationMotors(); g_emu_thread->enumerateVibrationMotors();
} }
void ControllerSettingsDialog::onVibrationMotorsEnumerated(const QList<InputBindingKey>& motors) void ControllerSettingsWindow::onVibrationMotorsEnumerated(const QList<InputBindingKey>& motors)
{ {
m_vibration_motors.clear(); m_vibration_motors.clear();
m_vibration_motors.reserve(motors.size()); m_vibration_motors.reserve(motors.size());
@ -265,7 +265,7 @@ void ControllerSettingsDialog::onVibrationMotorsEnumerated(const QList<InputBind
} }
} }
bool ControllerSettingsDialog::getBoolValue(const char* section, const char* key, bool default_value) const bool ControllerSettingsWindow::getBoolValue(const char* section, const char* key, bool default_value) const
{ {
if (m_profile_interface) if (m_profile_interface)
return m_profile_interface->GetBoolValue(section, key, default_value); return m_profile_interface->GetBoolValue(section, key, default_value);
@ -273,7 +273,7 @@ bool ControllerSettingsDialog::getBoolValue(const char* section, const char* key
return Host::GetBaseBoolSettingValue(section, key, default_value); return Host::GetBaseBoolSettingValue(section, key, default_value);
} }
s32 ControllerSettingsDialog::getIntValue(const char* section, const char* key, s32 default_value) const s32 ControllerSettingsWindow::getIntValue(const char* section, const char* key, s32 default_value) const
{ {
if (m_profile_interface) if (m_profile_interface)
return m_profile_interface->GetIntValue(section, key, default_value); return m_profile_interface->GetIntValue(section, key, default_value);
@ -281,7 +281,7 @@ s32 ControllerSettingsDialog::getIntValue(const char* section, const char* key,
return Host::GetBaseIntSettingValue(section, key, default_value); return Host::GetBaseIntSettingValue(section, key, default_value);
} }
std::string ControllerSettingsDialog::getStringValue(const char* section, const char* key, const char* default_value) const std::string ControllerSettingsWindow::getStringValue(const char* section, const char* key, const char* default_value) const
{ {
std::string value; std::string value;
if (m_profile_interface) if (m_profile_interface)
@ -291,7 +291,7 @@ std::string ControllerSettingsDialog::getStringValue(const char* section, const
return value; return value;
} }
void ControllerSettingsDialog::setBoolValue(const char* section, const char* key, bool value) void ControllerSettingsWindow::setBoolValue(const char* section, const char* key, bool value)
{ {
if (m_profile_interface) if (m_profile_interface)
{ {
@ -307,7 +307,7 @@ void ControllerSettingsDialog::setBoolValue(const char* section, const char* key
} }
} }
void ControllerSettingsDialog::setIntValue(const char* section, const char* key, s32 value) void ControllerSettingsWindow::setIntValue(const char* section, const char* key, s32 value)
{ {
if (m_profile_interface) if (m_profile_interface)
{ {
@ -323,7 +323,7 @@ void ControllerSettingsDialog::setIntValue(const char* section, const char* key,
} }
} }
void ControllerSettingsDialog::setStringValue(const char* section, const char* key, const char* value) void ControllerSettingsWindow::setStringValue(const char* section, const char* key, const char* value)
{ {
if (m_profile_interface) if (m_profile_interface)
{ {
@ -339,7 +339,7 @@ void ControllerSettingsDialog::setStringValue(const char* section, const char* k
} }
} }
void ControllerSettingsDialog::clearSettingValue(const char* section, const char* key) void ControllerSettingsWindow::clearSettingValue(const char* section, const char* key)
{ {
if (m_profile_interface) if (m_profile_interface)
{ {
@ -355,7 +355,7 @@ void ControllerSettingsDialog::clearSettingValue(const char* section, const char
} }
} }
void ControllerSettingsDialog::createWidgets() void ControllerSettingsWindow::createWidgets()
{ {
QSignalBlocker sb(m_ui.settingsContainer); QSignalBlocker sb(m_ui.settingsContainer);
QSignalBlocker sb2(m_ui.settingsCategory); QSignalBlocker sb2(m_ui.settingsCategory);
@ -381,7 +381,7 @@ void ControllerSettingsDialog::createWidgets()
m_ui.settingsCategory->setCurrentRow(0); m_ui.settingsCategory->setCurrentRow(0);
m_global_settings = new ControllerGlobalSettingsWidget(m_ui.settingsContainer, this); m_global_settings = new ControllerGlobalSettingsWidget(m_ui.settingsContainer, this);
m_ui.settingsContainer->addWidget(m_global_settings); m_ui.settingsContainer->addWidget(m_global_settings);
connect(m_global_settings, &ControllerGlobalSettingsWidget::bindingSetupChanged, this, &ControllerSettingsDialog::createWidgets); connect(m_global_settings, &ControllerGlobalSettingsWidget::bindingSetupChanged, this, &ControllerSettingsWindow::createWidgets);
for (const QPair<QString, QString>& dev : m_device_list) for (const QPair<QString, QString>& dev : m_device_list)
m_global_settings->addDeviceToList(dev.first, dev.second); m_global_settings->addDeviceToList(dev.first, dev.second);
} }
@ -448,7 +448,7 @@ void ControllerSettingsDialog::createWidgets()
m_ui.restoreDefaults->setEnabled(isEditingGlobalSettings()); m_ui.restoreDefaults->setEnabled(isEditingGlobalSettings());
} }
void ControllerSettingsDialog::updateListDescription(u32 global_slot, ControllerBindingWidget* widget) void ControllerSettingsWindow::updateListDescription(u32 global_slot, ControllerBindingWidget* widget)
{ {
for (int i = 0; i < m_ui.settingsCategory->count(); i++) for (int i = 0; i < m_ui.settingsCategory->count(); i++)
{ {
@ -472,7 +472,7 @@ void ControllerSettingsDialog::updateListDescription(u32 global_slot, Controller
} }
} }
void ControllerSettingsDialog::updateListDescription(u32 port, USBDeviceWidget* widget) void ControllerSettingsWindow::updateListDescription(u32 port, USBDeviceWidget* widget)
{ {
for (int i = 0; i < m_ui.settingsCategory->count(); i++) for (int i = 0; i < m_ui.settingsCategory->count(); i++)
{ {
@ -490,7 +490,7 @@ void ControllerSettingsDialog::updateListDescription(u32 port, USBDeviceWidget*
} }
} }
void ControllerSettingsDialog::refreshProfileList() void ControllerSettingsWindow::refreshProfileList()
{ {
const std::vector<std::string> names = Pad::GetInputProfileNames(); const std::vector<std::string> names = Pad::GetInputProfileNames();
@ -510,7 +510,7 @@ void ControllerSettingsDialog::refreshProfileList()
} }
} }
void ControllerSettingsDialog::switchProfile(const QString& name) void ControllerSettingsWindow::switchProfile(const QString& name)
{ {
QSignalBlocker sb(m_ui.currentProfile); QSignalBlocker sb(m_ui.currentProfile);

View File

@ -14,7 +14,7 @@
*/ */
#pragma once #pragma once
#include "ui_ControllerSettingsDialog.h" #include "ui_ControllerSettingsWindow.h"
#include "pcsx2/Input/InputManager.h" #include "pcsx2/Input/InputManager.h"
#include "pcsx2/USB/USB.h" #include "pcsx2/USB/USB.h"
@ -23,7 +23,7 @@
#include <QtCore/QPair> #include <QtCore/QPair>
#include <QtCore/QString> #include <QtCore/QString>
#include <QtCore/QStringList> #include <QtCore/QStringList>
#include <QtWidgets/QDialog> #include <QtWidgets/QWidget>
#include <array> #include <array>
#include <string> #include <string>
@ -34,7 +34,7 @@ class USBDeviceWidget;
class SettingsInterface; class SettingsInterface;
class ControllerSettingsDialog final : public QDialog class ControllerSettingsWindow final : public QWidget
{ {
Q_OBJECT Q_OBJECT
@ -52,8 +52,8 @@ public:
MAX_PORTS = 8 MAX_PORTS = 8
}; };
ControllerSettingsDialog(QWidget* parent = nullptr); ControllerSettingsWindow();
~ControllerSettingsDialog(); ~ControllerSettingsWindow();
__fi HotkeySettingsWidget* getHotkeySettingsWidget() const { return m_hotkey_settings; } __fi HotkeySettingsWidget* getHotkeySettingsWidget() const { return m_hotkey_settings; }
@ -101,7 +101,7 @@ private:
void refreshProfileList(); void refreshProfileList();
void switchProfile(const QString& name); void switchProfile(const QString& name);
Ui::ControllerSettingsDialog m_ui; Ui::ControllerSettingsWindow m_ui;
ControllerGlobalSettingsWidget* m_global_settings = nullptr; ControllerGlobalSettingsWidget* m_global_settings = nullptr;
std::array<ControllerBindingWidget*, MAX_PORTS> m_port_bindings{}; std::array<ControllerBindingWidget*, MAX_PORTS> m_port_bindings{};

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>ControllerSettingsDialog</class> <class>ControllerSettingsWindow</class>
<widget class="QDialog" name="ControllerSettingsDialog"> <widget class="QWidget" name="ControllerSettingsWindow">
<property name="windowModality"> <property name="windowIcon">
<enum>Qt::WindowModal</enum> <iconset>
<normalon>:/icons/AppIcon64.png</normalon>
</iconset>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>

View File

@ -25,7 +25,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
//Figure out lists //Figure out lists
//On export, we take list from settings (or are given it from the DEV9 panel) //On export, we take list from settings (or are given it from the DEV9 panel)

View File

@ -23,7 +23,7 @@
#include "DEV9UiCommon.h" #include "DEV9UiCommon.h"
class SettingsDialog; class SettingsWindow;
class DEV9DnsHostDialog : public QDialog class DEV9DnsHostDialog : public QDialog
{ {

View File

@ -30,7 +30,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "HddCreateQt.h" #include "HddCreateQt.h"
@ -58,7 +58,7 @@ static const char* s_dns_name[] = {
using PacketReader::IP::IP_Address; using PacketReader::IP::IP_Address;
DEV9SettingsWidget::DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent) DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog{dialog} , m_dialog{dialog}
{ {

View File

@ -24,7 +24,7 @@
#include "DEV9DnsHostDialog.h" #include "DEV9DnsHostDialog.h"
#include "DEV9/net.h" #include "DEV9/net.h"
class SettingsDialog; class SettingsWindow;
class DEV9SettingsWidget : public QWidget class DEV9SettingsWidget : public QWidget
{ {
@ -54,7 +54,7 @@ private Q_SLOTS:
void onHddCreateClicked(); void onHddCreateClicked();
public: public:
DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent); DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent);
~DEV9SettingsWidget(); ~DEV9SettingsWidget();
protected: protected:
@ -73,7 +73,7 @@ private:
void UpdateHddSizeUIEnabled(); void UpdateHddSizeUIEnabled();
void UpdateHddSizeUIValues(); void UpdateHddSizeUIValues();
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::DEV9SettingsWidget m_ui; Ui::DEV9SettingsWidget m_ui;

View File

@ -18,13 +18,13 @@
#include "DebugSettingsWidget.h" #include "DebugSettingsWidget.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "pcsx2/Host.h" #include "pcsx2/Host.h"
#include <QtWidgets/QMessageBox> #include <QtWidgets/QMessageBox>
DebugSettingsWidget::DebugSettingsWidget(SettingsDialog* dialog, QWidget* parent) DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -21,21 +21,21 @@
enum class GSRendererType : s8; enum class GSRendererType : s8;
class SettingsDialog; class SettingsWindow;
class DebugSettingsWidget : public QWidget class DebugSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
DebugSettingsWidget(SettingsDialog* dialog, QWidget* parent); DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~DebugSettingsWidget(); ~DebugSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
void onDrawDumpingChanged(); void onDrawDumpingChanged();
private: private:
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::DebugSettingsWidget m_ui; Ui::DebugSettingsWidget m_ui;
}; };

View File

@ -24,7 +24,7 @@
#include "EmulationSettingsWidget.h" #include "EmulationSettingsWidget.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
static constexpr int MINIMUM_EE_CYCLE_RATE = -3; static constexpr int MINIMUM_EE_CYCLE_RATE = -3;
static constexpr int MAXIMUM_EE_CYCLE_RATE = 3; static constexpr int MAXIMUM_EE_CYCLE_RATE = 3;
@ -32,7 +32,7 @@ static constexpr int DEFAULT_EE_CYCLE_RATE = 0;
static constexpr int DEFAULT_EE_CYCLE_SKIP = 0; static constexpr int DEFAULT_EE_CYCLE_SKIP = 0;
static constexpr u32 DEFAULT_FRAME_LATENCY = 2; static constexpr u32 DEFAULT_FRAME_LATENCY = 2;
EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget* parent) EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -19,14 +19,14 @@
#include "ui_EmulationSettingsWidget.h" #include "ui_EmulationSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class EmulationSettingsWidget : public QWidget class EmulationSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
EmulationSettingsWidget(SettingsDialog* dialog, QWidget* parent); EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~EmulationSettingsWidget(); ~EmulationSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -37,7 +37,7 @@ private:
void handleSpeedComboChange(QComboBox* cb, const char* section, const char* key); void handleSpeedComboChange(QComboBox* cb, const char* section, const char* key);
void updateOptimalFramePacing(); void updateOptimalFramePacing();
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::EmulationSettingsWidget m_ui; Ui::EmulationSettingsWidget m_ui;
}; };

View File

@ -20,9 +20,9 @@
#include "FolderSettingsWidget.h" #include "FolderSettingsWidget.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
FolderSettingsWidget::FolderSettingsWidget(SettingsDialog* dialog, QWidget* parent) FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
SettingsInterface* sif = dialog->getSettingsInterface(); SettingsInterface* sif = dialog->getSettingsInterface();

View File

@ -19,14 +19,14 @@
#include "ui_FolderSettingsWidget.h" #include "ui_FolderSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class FolderSettingsWidget : public QWidget class FolderSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
FolderSettingsWidget(SettingsDialog* dialog, QWidget* parent); FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~FolderSettingsWidget(); ~FolderSettingsWidget();
private: private:

View File

@ -20,14 +20,14 @@
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "Settings/GameCheatSettingsWidget.h" #include "Settings/GameCheatSettingsWidget.h"
#include "Settings/SettingsDialog.h" #include "Settings/SettingsWindow.h"
#include "pcsx2/GameList.h" #include "pcsx2/GameList.h"
#include "pcsx2/Patch.h" #include "pcsx2/Patch.h"
#include "common/HeterogeneousContainers.h" #include "common/HeterogeneousContainers.h"
GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsDialog* dialog, QWidget* parent) GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog) : m_dialog(dialog)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -32,14 +32,14 @@ namespace GameList
struct Entry; struct Entry;
} }
class SettingsDialog; class SettingsWindow;
class GameCheatSettingsWidget : public QWidget class GameCheatSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GameCheatSettingsWidget(SettingsDialog* dialog, QWidget* parent); GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GameCheatSettingsWidget(); ~GameCheatSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -57,7 +57,7 @@ private:
void reloadList(); void reloadList();
Ui::GameCheatSettingsWidget m_ui; Ui::GameCheatSettingsWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
UnorderedStringMap<QTreeWidgetItem*> m_parent_map; UnorderedStringMap<QTreeWidgetItem*> m_parent_map;
std::vector<Patch::PatchInfo> m_patches; std::vector<Patch::PatchInfo> m_patches;

View File

@ -22,9 +22,9 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
GameFixSettingsWidget::GameFixSettingsWidget(SettingsDialog* dialog, QWidget* parent) GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
SettingsInterface* sif = dialog->getSettingsInterface(); SettingsInterface* sif = dialog->getSettingsInterface();

View File

@ -19,14 +19,14 @@
#include "ui_GameFixSettingsWidget.h" #include "ui_GameFixSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class GameFixSettingsWidget : public QWidget class GameFixSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GameFixSettingsWidget(SettingsDialog* dialog, QWidget* parent); GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GameFixSettingsWidget(); ~GameFixSettingsWidget();
private: private:

View File

@ -31,7 +31,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
GameListSettingsWidget::GameListSettingsWidget(SettingsDialog* dialog, QWidget* parent) GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -19,14 +19,14 @@
#include "ui_GameListSettingsWidget.h" #include "ui_GameListSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class GameListSettingsWidget : public QWidget class GameListSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GameListSettingsWidget(SettingsDialog* dialog, QWidget* parent); GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GameListSettingsWidget(); ~GameListSettingsWidget();
bool addExcludedPath(const std::string& path); bool addExcludedPath(const std::string& path);

View File

@ -19,7 +19,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "Settings/GamePatchSettingsWidget.h" #include "Settings/GamePatchSettingsWidget.h"
#include "Settings/SettingsDialog.h" #include "Settings/SettingsWindow.h"
#include "pcsx2/GameList.h" #include "pcsx2/GameList.h"
#include "pcsx2/Patch.h" #include "pcsx2/Patch.h"
@ -29,7 +29,7 @@
#include <algorithm> #include <algorithm>
GamePatchDetailsWidget::GamePatchDetailsWidget(std::string name, const std::string& author, GamePatchDetailsWidget::GamePatchDetailsWidget(std::string name, const std::string& author,
const std::string& description, bool enabled, SettingsDialog* dialog, QWidget* parent) const std::string& description, bool enabled, SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
, m_name(name) , m_name(name)
@ -61,7 +61,7 @@ void GamePatchDetailsWidget::onEnabledStateChanged(int state)
g_emu_thread->reloadGameSettings(); g_emu_thread->reloadGameSettings();
} }
GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsDialog* dialog, QWidget* parent) GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog) : m_dialog(dialog)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -27,7 +27,7 @@ namespace GameList
struct Entry; struct Entry;
} }
class SettingsDialog; class SettingsWindow;
class GamePatchDetailsWidget : public QWidget class GamePatchDetailsWidget : public QWidget
{ {
@ -35,7 +35,7 @@ class GamePatchDetailsWidget : public QWidget
public: public:
GamePatchDetailsWidget(std::string name, const std::string& author, const std::string& description, bool enabled, GamePatchDetailsWidget(std::string name, const std::string& author, const std::string& description, bool enabled,
SettingsDialog* dialog, QWidget* parent); SettingsWindow* dialog, QWidget* parent);
~GamePatchDetailsWidget(); ~GamePatchDetailsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -43,7 +43,7 @@ private Q_SLOTS:
private: private:
Ui::GamePatchDetailsWidget m_ui; Ui::GamePatchDetailsWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
std::string m_name; std::string m_name;
}; };
@ -52,7 +52,7 @@ class GamePatchSettingsWidget : public QWidget
Q_OBJECT Q_OBJECT
public: public:
GamePatchSettingsWidget(SettingsDialog* dialog, QWidget* parent); GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GamePatchSettingsWidget(); ~GamePatchSettingsWidget();
private Q_SLOTS: private Q_SLOTS:
@ -62,5 +62,5 @@ private:
void reloadList(); void reloadList();
Ui::GamePatchSettingsWidget m_ui; Ui::GamePatchSettingsWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
}; };

View File

@ -17,7 +17,7 @@
#include "pcsx2/SIO/Pad/Pad.h" #include "pcsx2/SIO/Pad/Pad.h"
#include "GameSummaryWidget.h" #include "GameSummaryWidget.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "QtHost.h" #include "QtHost.h"
#include "QtProgressCallback.h" #include "QtProgressCallback.h"
@ -38,7 +38,7 @@
#include <QtWidgets/QFileDialog> #include <QtWidgets/QFileDialog>
#include <QtWidgets/QMessageBox> #include <QtWidgets/QMessageBox>
GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsDialog* dialog, QWidget* parent) GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog) : m_dialog(dialog)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -24,14 +24,14 @@ namespace GameList
struct Entry; struct Entry;
} }
class SettingsDialog; class SettingsWindow;
class GameSummaryWidget : public QWidget class GameSummaryWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GameSummaryWidget(const GameList::Entry* entry, SettingsDialog* dialog, QWidget* parent); GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent);
~GameSummaryWidget(); ~GameSummaryWidget();
private Q_SLOTS: private Q_SLOTS:
@ -53,7 +53,7 @@ private:
void setCustomRegion(int region); void setCustomRegion(int region);
Ui::GameSummaryWidget m_ui; Ui::GameSummaryWidget m_ui;
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
std::string m_entry_path; std::string m_entry_path;
std::string m_redump_search_keyword; std::string m_redump_search_keyword;
}; };

View File

@ -18,7 +18,7 @@
#include "GraphicsSettingsWidget.h" #include "GraphicsSettingsWidget.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include <QtWidgets/QMessageBox> #include <QtWidgets/QMessageBox>
#include "pcsx2/Host.h" #include "pcsx2/Host.h"
@ -67,7 +67,7 @@ static constexpr int DEFAULT_INTERLACE_MODE = 0;
static constexpr int DEFAULT_TV_SHADER_MODE = 0; static constexpr int DEFAULT_TV_SHADER_MODE = 0;
static constexpr int DEFAULT_CAS_SHARPNESS = 50; static constexpr int DEFAULT_CAS_SHARPNESS = 50;
GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* parent) GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -21,14 +21,14 @@
enum class GSRendererType : s8; enum class GSRendererType : s8;
class SettingsDialog; class SettingsWindow;
class GraphicsSettingsWidget : public QWidget class GraphicsSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* parent); GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GraphicsSettingsWidget(); ~GraphicsSettingsWidget();
Q_SIGNALS: Q_SIGNALS:
@ -56,7 +56,7 @@ private:
void updateRendererDependentOptions(); void updateRendererDependentOptions();
void resetManualHardwareFixes(); void resetManualHardwareFixes();
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::GraphicsSettingsWidget m_ui; Ui::GraphicsSettingsWidget m_ui;

View File

@ -16,7 +16,7 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "Settings/HotkeySettingsWidget.h" #include "Settings/HotkeySettingsWidget.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "InputBindingWidget.h" #include "InputBindingWidget.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
@ -29,7 +29,7 @@
#include <QtWidgets/QScrollArea> #include <QtWidgets/QScrollArea>
#include <QtWidgets/QVBoxLayout> #include <QtWidgets/QVBoxLayout>
HotkeySettingsWidget::HotkeySettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog) HotkeySettingsWidget::HotkeySettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {

View File

@ -24,21 +24,21 @@ class QScrollArea;
class QGridLayout; class QGridLayout;
class QVBoxLayout; class QVBoxLayout;
class ControllerSettingsDialog; class ControllerSettingsWindow;
class HotkeySettingsWidget : public QWidget class HotkeySettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
HotkeySettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog); HotkeySettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog);
~HotkeySettingsWidget(); ~HotkeySettingsWidget();
private: private:
void createUi(); void createUi();
void createButtons(); void createButtons();
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
QScrollArea* m_scroll_area = nullptr; QScrollArea* m_scroll_area = nullptr;
QWidget* m_container = nullptr; QWidget* m_container = nullptr;
QVBoxLayout* m_layout = nullptr; QVBoxLayout* m_layout = nullptr;

View File

@ -29,7 +29,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "Settings/ControllerSettingsDialog.h" #include "Settings/ControllerSettingsWindow.h"
#include "Settings/InputBindingDialog.h" #include "Settings/InputBindingDialog.h"
#include "Settings/InputBindingWidget.h" #include "Settings/InputBindingWidget.h"
@ -416,7 +416,7 @@ InputVibrationBindingWidget::InputVibrationBindingWidget(QWidget* parent)
} }
InputVibrationBindingWidget::InputVibrationBindingWidget( InputVibrationBindingWidget::InputVibrationBindingWidget(
QWidget* parent, ControllerSettingsDialog* dialog, std::string section_name, std::string key_name) QWidget* parent, ControllerSettingsWindow* dialog, std::string section_name, std::string key_name)
{ {
setMinimumWidth(225); setMinimumWidth(225);
setMaximumWidth(225); setMaximumWidth(225);
@ -430,7 +430,7 @@ InputVibrationBindingWidget::~InputVibrationBindingWidget()
{ {
} }
void InputVibrationBindingWidget::setKey(ControllerSettingsDialog* dialog, std::string section_name, std::string key_name) void InputVibrationBindingWidget::setKey(ControllerSettingsWindow* dialog, std::string section_name, std::string key_name)
{ {
m_dialog = dialog; m_dialog = dialog;
m_section_name = std::move(section_name); m_section_name = std::move(section_name);

View File

@ -25,7 +25,7 @@
class QTimer; class QTimer;
class ControllerSettingsDialog; class ControllerSettingsWindow;
class SettingsInterface; class SettingsInterface;
class InputBindingWidget : public QPushButton class InputBindingWidget : public QPushButton
@ -92,10 +92,10 @@ class InputVibrationBindingWidget : public QPushButton
public: public:
InputVibrationBindingWidget(QWidget* parent); InputVibrationBindingWidget(QWidget* parent);
InputVibrationBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog, std::string section_name, std::string key_name); InputVibrationBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, std::string section_name, std::string key_name);
~InputVibrationBindingWidget(); ~InputVibrationBindingWidget();
void setKey(ControllerSettingsDialog* dialog, std::string section_name, std::string key_name); void setKey(ControllerSettingsWindow* dialog, std::string section_name, std::string key_name);
public Q_SLOTS: public Q_SLOTS:
void clearBinding(); void clearBinding();
@ -111,5 +111,5 @@ private:
std::string m_key_name; std::string m_key_name;
std::string m_binding; std::string m_binding;
ControllerSettingsDialog* m_dialog; ControllerSettingsWindow* m_dialog;
}; };

View File

@ -19,7 +19,7 @@
#include "AutoUpdaterDialog.h" #include "AutoUpdaterDialog.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "QtHost.h" #include "QtHost.h"
const char* InterfaceSettingsWidget::THEME_NAMES[] = { const char* InterfaceSettingsWidget::THEME_NAMES[] = {
@ -69,7 +69,7 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = {
"Custom", "Custom",
nullptr}; nullptr};
InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget* parent) InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
SettingsInterface* sif = dialog->getSettingsInterface(); SettingsInterface* sif = dialog->getSettingsInterface();

View File

@ -19,14 +19,14 @@
#include "ui_InterfaceSettingsWidget.h" #include "ui_InterfaceSettingsWidget.h"
class SettingsDialog; class SettingsWindow;
class InterfaceSettingsWidget : public QWidget class InterfaceSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
InterfaceSettingsWidget(SettingsDialog* dialog, QWidget* parent); InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~InterfaceSettingsWidget(); ~InterfaceSettingsWidget();
Q_SIGNALS: Q_SIGNALS:

View File

@ -30,7 +30,7 @@
#include "QtHost.h" #include "QtHost.h"
#include "QtUtils.h" #include "QtUtils.h"
#include "SettingWidgetBinder.h" #include "SettingWidgetBinder.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "pcsx2/SIO/Memcard/MemoryCardFile.h" #include "pcsx2/SIO/Memcard/MemoryCardFile.h"
@ -41,7 +41,7 @@ static std::string getSlotFilenameKey(u32 slot)
return StringUtil::StdStringFromFormat("Slot%u_Filename", slot + 1); return StringUtil::StdStringFromFormat("Slot%u_Filename", slot + 1);
} }
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent) MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_dialog(dialog) , m_dialog(dialog)
{ {
@ -442,7 +442,7 @@ void MemoryCardListWidget::mouseMoveEvent(QMouseEvent* event)
drag->exec(Qt::CopyAction); drag->exec(Qt::CopyAction);
} }
void MemoryCardListWidget::refresh(SettingsDialog* dialog) void MemoryCardListWidget::refresh(SettingsWindow* dialog)
{ {
clear(); clear();

View File

@ -25,7 +25,7 @@
#include <QtWidgets/QToolButton> #include <QtWidgets/QToolButton>
#include <QtWidgets/QListWidget> #include <QtWidgets/QListWidget>
class SettingsDialog; class SettingsWindow;
struct AvailableMcdInfo; struct AvailableMcdInfo;
@ -36,7 +36,7 @@ public:
explicit MemoryCardListWidget(QWidget* parent); explicit MemoryCardListWidget(QWidget* parent);
~MemoryCardListWidget() override; ~MemoryCardListWidget() override;
void refresh(SettingsDialog* dialog); void refresh(SettingsWindow* dialog);
protected: protected:
void mousePressEvent(QMouseEvent* event) override; void mousePressEvent(QMouseEvent* event) override;
@ -78,7 +78,7 @@ public:
MAX_SLOTS = 2 MAX_SLOTS = 2
}; };
MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent); MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~MemoryCardSettingsWidget(); ~MemoryCardSettingsWidget();
protected: protected:
@ -115,7 +115,7 @@ private:
void renameCard(); void renameCard();
void convertCard(); void convertCard();
SettingsDialog* m_dialog; SettingsWindow* m_dialog;
Ui::MemoryCardSettingsWidget m_ui; Ui::MemoryCardSettingsWidget m_ui;
std::array<SlotGroup, MAX_SLOTS> m_slots; std::array<SlotGroup, MAX_SLOTS> m_slots;

View File

@ -35,7 +35,7 @@
#include "Settings/HotkeySettingsWidget.h" #include "Settings/HotkeySettingsWidget.h"
#include "Settings/InterfaceSettingsWidget.h" #include "Settings/InterfaceSettingsWidget.h"
#include "Settings/MemoryCardSettingsWidget.h" #include "Settings/MemoryCardSettingsWidget.h"
#include "SettingsDialog.h" #include "SettingsWindow.h"
#include "pcsx2/Achievements.h" #include "pcsx2/Achievements.h"
#include "pcsx2/GameList.h" #include "pcsx2/GameList.h"
@ -49,18 +49,18 @@
#include <QtWidgets/QMessageBox> #include <QtWidgets/QMessageBox>
#include <QtWidgets/QTextEdit> #include <QtWidgets/QTextEdit>
static QList<SettingsDialog*> s_open_game_properties_dialogs; static QList<SettingsWindow*> s_open_game_properties_dialogs;
SettingsDialog::SettingsDialog(QWidget* parent) SettingsWindow::SettingsWindow()
: QDialog(parent) : QWidget(nullptr)
, m_disc_crc(0) , m_disc_crc(0)
{ {
setupUi(nullptr); setupUi(nullptr);
} }
SettingsDialog::SettingsDialog(QWidget* parent, std::unique_ptr<INISettingsInterface> sif, const GameList::Entry* game, SettingsWindow::SettingsWindow(std::unique_ptr<INISettingsInterface> sif, const GameList::Entry* game,
std::string serial, u32 disc_crc, QString filename) std::string serial, u32 disc_crc, QString filename)
: QDialog(parent) : QWidget(nullptr)
, m_sif(std::move(sif)) , m_sif(std::move(sif))
, m_filename(std::move(filename)) , m_filename(std::move(filename))
, m_game_list_filename(game ? game->path : std::string()) , m_game_list_filename(game ? game->path : std::string())
@ -72,12 +72,12 @@ SettingsDialog::SettingsDialog(QWidget* parent, std::unique_ptr<INISettingsInter
s_open_game_properties_dialogs.push_back(this); s_open_game_properties_dialogs.push_back(this);
} }
SettingsInterface* SettingsDialog::getSettingsInterface() const SettingsInterface* SettingsWindow::getSettingsInterface() const
{ {
return m_sif.get(); return m_sif.get();
} }
void SettingsDialog::setupUi(const GameList::Entry* game) void SettingsWindow::setupUi(const GameList::Entry* game)
{ {
const bool show_advanced_settings = QtHost::ShouldShowAdvancedSettings(); const bool show_advanced_settings = QtHost::ShouldShowAdvancedSettings();
@ -225,35 +225,35 @@ void SettingsDialog::setupUi(const GameList::Entry* game)
m_ui.settingsCategory->setCurrentRow(0); m_ui.settingsCategory->setCurrentRow(0);
m_ui.settingsContainer->setCurrentIndex(0); m_ui.settingsContainer->setCurrentIndex(0);
m_ui.helpText->setText(m_category_help_text[0]); m_ui.helpText->setText(m_category_help_text[0]);
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &SettingsDialog::onCategoryCurrentRowChanged); connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &SettingsWindow::onCategoryCurrentRowChanged);
connect(m_ui.closeButton, &QPushButton::clicked, this, &SettingsDialog::close); connect(m_ui.closeButton, &QPushButton::clicked, this, &SettingsWindow::close);
if (m_ui.restoreDefaultsButton) if (m_ui.restoreDefaultsButton)
connect(m_ui.restoreDefaultsButton, &QPushButton::clicked, this, &SettingsDialog::onRestoreDefaultsClicked); connect(m_ui.restoreDefaultsButton, &QPushButton::clicked, this, &SettingsWindow::onRestoreDefaultsClicked);
if (m_ui.copyGlobalSettingsButton) if (m_ui.copyGlobalSettingsButton)
connect(m_ui.copyGlobalSettingsButton, &QPushButton::clicked, this, &SettingsDialog::onCopyGlobalSettingsClicked); connect(m_ui.copyGlobalSettingsButton, &QPushButton::clicked, this, &SettingsWindow::onCopyGlobalSettingsClicked);
if (m_ui.clearGameSettingsButton) if (m_ui.clearGameSettingsButton)
connect(m_ui.clearGameSettingsButton, &QPushButton::clicked, this, &SettingsDialog::onClearSettingsClicked); connect(m_ui.clearGameSettingsButton, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
} }
SettingsDialog::~SettingsDialog() SettingsWindow::~SettingsWindow()
{ {
if (isPerGameSettings()) if (isPerGameSettings())
s_open_game_properties_dialogs.removeOne(this); s_open_game_properties_dialogs.removeOne(this);
} }
void SettingsDialog::closeEvent(QCloseEvent*) void SettingsWindow::closeEvent(QCloseEvent*)
{ {
// we need to clean up ourselves, since we're not modal // we need to clean up ourselves, since we're not modal
if (isPerGameSettings()) if (isPerGameSettings())
deleteLater(); deleteLater();
} }
QString SettingsDialog::getCategory() const QString SettingsWindow::getCategory() const
{ {
return m_ui.settingsCategory->item(m_ui.settingsCategory->currentRow())->text(); return m_ui.settingsCategory->item(m_ui.settingsCategory->currentRow())->text();
} }
void SettingsDialog::setCategory(const char* category) void SettingsWindow::setCategory(const char* category)
{ {
// the titles in the category list will be translated. // the titles in the category list will be translated.
const QString translated_category(qApp->translate("SettingsDialog", category)); const QString translated_category(qApp->translate("SettingsDialog", category));
@ -269,13 +269,13 @@ void SettingsDialog::setCategory(const char* category)
} }
} }
void SettingsDialog::onCategoryCurrentRowChanged(int row) void SettingsWindow::onCategoryCurrentRowChanged(int row)
{ {
m_ui.settingsContainer->setCurrentIndex(row); m_ui.settingsContainer->setCurrentIndex(row);
m_ui.helpText->setText(m_category_help_text[row]); m_ui.helpText->setText(m_category_help_text[row]);
} }
void SettingsDialog::onRestoreDefaultsClicked() void SettingsWindow::onRestoreDefaultsClicked()
{ {
QMessageBox msgbox(this); QMessageBox msgbox(this);
msgbox.setIcon(QMessageBox::Question); msgbox.setIcon(QMessageBox::Question);
@ -293,7 +293,7 @@ void SettingsDialog::onRestoreDefaultsClicked()
g_main_window->resetSettings(ui_cb->isChecked()); g_main_window->resetSettings(ui_cb->isChecked());
} }
void SettingsDialog::onCopyGlobalSettingsClicked() void SettingsWindow::onCopyGlobalSettingsClicked()
{ {
if (!isPerGameSettings()) if (!isPerGameSettings())
return; return;
@ -316,7 +316,7 @@ void SettingsDialog::onCopyGlobalSettingsClicked()
QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration copied from global settings.")); QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration copied from global settings."));
} }
void SettingsDialog::onClearSettingsClicked() void SettingsWindow::onClearSettingsClicked()
{ {
if (!isPerGameSettings()) if (!isPerGameSettings())
return; return;
@ -335,7 +335,7 @@ void SettingsDialog::onClearSettingsClicked()
QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration cleared.")); QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration cleared."));
} }
SettingsDialog* SettingsDialog::reopen() SettingsWindow* SettingsWindow::reopen()
{ {
// This doesn't work for global settings, because MainWindow maintains a pointer. // This doesn't work for global settings, because MainWindow maintains a pointer.
if (!m_sif) if (!m_sif)
@ -350,15 +350,14 @@ SettingsDialog* SettingsDialog::reopen()
auto lock = GameList::GetLock(); auto lock = GameList::GetLock();
const GameList::Entry* game = m_game_list_filename.empty() ? nullptr : GameList::GetEntryForPath(m_game_list_filename.c_str()); const GameList::Entry* game = m_game_list_filename.empty() ? nullptr : GameList::GetEntryForPath(m_game_list_filename.c_str());
SettingsDialog* dlg = new SettingsDialog(g_main_window, std::move(new_sif), game, m_serial, m_disc_crc, m_filename); SettingsWindow* dlg = new SettingsWindow(std::move(new_sif), game, m_serial, m_disc_crc, m_filename);
dlg->QDialog::setWindowTitle(windowTitle()); dlg->QWidget::setWindowTitle(windowTitle());
dlg->setModal(false);
dlg->show(); dlg->show();
return dlg; return dlg;
} }
void SettingsDialog::addWidget(QWidget* widget, QString title, QString icon, QString help_text) void SettingsWindow::addWidget(QWidget* widget, QString title, QString icon, QString help_text)
{ {
const int index = m_ui.settingsCategory->count(); const int index = m_ui.settingsCategory->count();
@ -372,7 +371,7 @@ void SettingsDialog::addWidget(QWidget* widget, QString title, QString icon, QSt
m_category_help_text[index] = std::move(help_text); m_category_help_text[index] = std::move(help_text);
} }
void SettingsDialog::registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text) void SettingsWindow::registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text)
{ {
if (!object) if (!object)
return; return;
@ -392,7 +391,7 @@ void SettingsDialog::registerWidgetHelp(QObject* object, QString title, QString
object->installEventFilter(this); object->installEventFilter(this);
} }
bool SettingsDialog::eventFilter(QObject* object, QEvent* event) bool SettingsWindow::eventFilter(QObject* object, QEvent* event)
{ {
if (event->type() == QEvent::Enter) if (event->type() == QEvent::Enter)
{ {
@ -412,22 +411,18 @@ bool SettingsDialog::eventFilter(QObject* object, QEvent* event)
} }
} }
return QDialog::eventFilter(object, event); return QWidget::eventFilter(object, event);
} }
void SettingsDialog::setWindowTitle(const QString& title) void SettingsWindow::setWindowTitle(const QString& title)
{ {
if (m_filename.isEmpty()) if (m_filename.isEmpty())
{ QWidget::setWindowTitle(title);
QDialog::setWindowTitle(title);
}
else else
{ QWidget::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename));
QDialog::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename));
}
} }
bool SettingsDialog::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const bool SettingsWindow::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const
{ {
bool value; bool value;
if (m_sif && m_sif->GetBoolValue(section, key, &value)) if (m_sif && m_sif->GetBoolValue(section, key, &value))
@ -436,7 +431,7 @@ bool SettingsDialog::getEffectiveBoolValue(const char* section, const char* key,
return Host::GetBaseBoolSettingValue(section, key, default_value); return Host::GetBaseBoolSettingValue(section, key, default_value);
} }
int SettingsDialog::getEffectiveIntValue(const char* section, const char* key, int default_value) const int SettingsWindow::getEffectiveIntValue(const char* section, const char* key, int default_value) const
{ {
int value; int value;
if (m_sif && m_sif->GetIntValue(section, key, &value)) if (m_sif && m_sif->GetIntValue(section, key, &value))
@ -445,7 +440,7 @@ int SettingsDialog::getEffectiveIntValue(const char* section, const char* key, i
return Host::GetBaseIntSettingValue(section, key, default_value); return Host::GetBaseIntSettingValue(section, key, default_value);
} }
float SettingsDialog::getEffectiveFloatValue(const char* section, const char* key, float default_value) const float SettingsWindow::getEffectiveFloatValue(const char* section, const char* key, float default_value) const
{ {
float value; float value;
if (m_sif && m_sif->GetFloatValue(section, key, &value)) if (m_sif && m_sif->GetFloatValue(section, key, &value))
@ -454,7 +449,7 @@ float SettingsDialog::getEffectiveFloatValue(const char* section, const char* ke
return Host::GetBaseFloatSettingValue(section, key, default_value); return Host::GetBaseFloatSettingValue(section, key, default_value);
} }
std::string SettingsDialog::getEffectiveStringValue(const char* section, const char* key, const char* default_value) const std::string SettingsWindow::getEffectiveStringValue(const char* section, const char* key, const char* default_value) const
{ {
std::string value; std::string value;
if (!m_sif || !m_sif->GetStringValue(section, key, &value)) if (!m_sif || !m_sif->GetStringValue(section, key, &value))
@ -462,7 +457,7 @@ std::string SettingsDialog::getEffectiveStringValue(const char* section, const c
return value; return value;
} }
std::optional<bool> SettingsDialog::getBoolValue(const char* section, const char* key, std::optional<bool> default_value) const std::optional<bool> SettingsWindow::getBoolValue(const char* section, const char* key, std::optional<bool> default_value) const
{ {
std::optional<bool> value; std::optional<bool> value;
if (m_sif) if (m_sif)
@ -481,7 +476,7 @@ std::optional<bool> SettingsDialog::getBoolValue(const char* section, const char
return value; return value;
} }
std::optional<int> SettingsDialog::getIntValue(const char* section, const char* key, std::optional<int> default_value) const std::optional<int> SettingsWindow::getIntValue(const char* section, const char* key, std::optional<int> default_value) const
{ {
std::optional<int> value; std::optional<int> value;
if (m_sif) if (m_sif)
@ -500,7 +495,7 @@ std::optional<int> SettingsDialog::getIntValue(const char* section, const char*
return value; return value;
} }
std::optional<float> SettingsDialog::getFloatValue(const char* section, const char* key, std::optional<float> default_value) const std::optional<float> SettingsWindow::getFloatValue(const char* section, const char* key, std::optional<float> default_value) const
{ {
std::optional<float> value; std::optional<float> value;
if (m_sif) if (m_sif)
@ -519,7 +514,7 @@ std::optional<float> SettingsDialog::getFloatValue(const char* section, const ch
return value; return value;
} }
std::optional<std::string> SettingsDialog::getStringValue( std::optional<std::string> SettingsWindow::getStringValue(
const char* section, const char* key, std::optional<const char*> default_value) const const char* section, const char* key, std::optional<const char*> default_value) const
{ {
std::optional<std::string> value; std::optional<std::string> value;
@ -539,7 +534,7 @@ std::optional<std::string> SettingsDialog::getStringValue(
return value; return value;
} }
void SettingsDialog::setBoolSettingValue(const char* section, const char* key, std::optional<bool> value) void SettingsWindow::setBoolSettingValue(const char* section, const char* key, std::optional<bool> value)
{ {
if (m_sif) if (m_sif)
{ {
@ -555,7 +550,7 @@ void SettingsDialog::setBoolSettingValue(const char* section, const char* key, s
} }
} }
void SettingsDialog::setIntSettingValue(const char* section, const char* key, std::optional<int> value) void SettingsWindow::setIntSettingValue(const char* section, const char* key, std::optional<int> value)
{ {
if (m_sif) if (m_sif)
{ {
@ -571,7 +566,7 @@ void SettingsDialog::setIntSettingValue(const char* section, const char* key, st
} }
} }
void SettingsDialog::setFloatSettingValue(const char* section, const char* key, std::optional<float> value) void SettingsWindow::setFloatSettingValue(const char* section, const char* key, std::optional<float> value)
{ {
if (m_sif) if (m_sif)
{ {
@ -587,7 +582,7 @@ void SettingsDialog::setFloatSettingValue(const char* section, const char* key,
} }
} }
void SettingsDialog::setStringSettingValue(const char* section, const char* key, std::optional<const char*> value) void SettingsWindow::setStringSettingValue(const char* section, const char* key, std::optional<const char*> value)
{ {
if (m_sif) if (m_sif)
{ {
@ -603,7 +598,7 @@ void SettingsDialog::setStringSettingValue(const char* section, const char* key,
} }
} }
bool SettingsDialog::containsSettingValue(const char* section, const char* key) const bool SettingsWindow::containsSettingValue(const char* section, const char* key) const
{ {
if (m_sif) if (m_sif)
return m_sif->ContainsValue(section, key); return m_sif->ContainsValue(section, key);
@ -611,7 +606,7 @@ bool SettingsDialog::containsSettingValue(const char* section, const char* key)
return Host::ContainsBaseSettingValue(section, key); return Host::ContainsBaseSettingValue(section, key);
} }
void SettingsDialog::removeSettingValue(const char* section, const char* key) void SettingsWindow::removeSettingValue(const char* section, const char* key)
{ {
if (m_sif) if (m_sif)
{ {
@ -627,10 +622,10 @@ void SettingsDialog::removeSettingValue(const char* section, const char* key)
} }
} }
void SettingsDialog::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc) void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc)
{ {
// check for an existing dialog with this crc // check for an existing dialog with this crc
for (SettingsDialog* dialog : s_open_game_properties_dialogs) for (SettingsWindow* dialog : s_open_game_properties_dialogs)
{ {
if (dialog->m_disc_crc == disc_crc) if (dialog->m_disc_crc == disc_crc)
{ {
@ -645,9 +640,8 @@ void SettingsDialog::openGamePropertiesDialog(const GameList::Entry* game, const
if (FileSystem::FileExists(sif->GetFileName().c_str())) if (FileSystem::FileExists(sif->GetFileName().c_str()))
sif->Load(); sif->Load();
SettingsDialog* dialog = new SettingsDialog(g_main_window, std::move(sif), game, std::move(serial), disc_crc, QtUtils::StringViewToQString(Path::GetFileName(filename))); SettingsWindow* dialog = new SettingsWindow(std::move(sif), game, std::move(serial), disc_crc, QtUtils::StringViewToQString(Path::GetFileName(filename)));
dialog->setWindowTitle(QtUtils::StringViewToQString(title)); dialog->setWindowTitle(QtUtils::StringViewToQString(title));
dialog->setModal(false);
dialog->show(); dialog->show();
} }

View File

@ -1,5 +1,5 @@
/* PCSX2 - PS2 Emulator for PCs /* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2022 PCSX2 Dev Team * Copyright (C) 2002-2023 PCSX2 Dev Team
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the terms * PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found- * of the GNU Lesser General Public License as published by the Free Software Found-
@ -14,10 +14,10 @@
*/ */
#pragma once #pragma once
#include "ui_SettingsDialog.h" #include "ui_SettingsWindow.h"
#include <QtCore/QMap> #include <QtCore/QMap>
#include <QtCore/QString> #include <QtCore/QString>
#include <QtWidgets/QDialog> #include <QtWidgets/QWidget>
#include <array> #include <array>
#include <memory> #include <memory>
@ -45,15 +45,15 @@ class AchievementSettingsWidget;
class AdvancedSettingsWidget; class AdvancedSettingsWidget;
class DebugSettingsWidget; class DebugSettingsWidget;
class SettingsDialog final : public QDialog class SettingsWindow final : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit SettingsDialog(QWidget* parent); explicit SettingsWindow();
SettingsDialog(QWidget* parent, std::unique_ptr<INISettingsInterface> sif, const GameList::Entry* game, std::string serial, SettingsWindow(std::unique_ptr<INISettingsInterface> sif, const GameList::Entry* game, std::string serial,
u32 disc_crc, QString filename = QString()); u32 disc_crc, QString filename = QString());
~SettingsDialog(); ~SettingsWindow();
static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc); static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc);
@ -125,11 +125,11 @@ private:
void addWidget(QWidget* widget, QString title, QString icon, QString help_text); void addWidget(QWidget* widget, QString title, QString icon, QString help_text);
SettingsDialog* reopen(); SettingsWindow* reopen();
std::unique_ptr<INISettingsInterface> m_sif; std::unique_ptr<INISettingsInterface> m_sif;
Ui::SettingsDialog m_ui; Ui::SettingsWindow m_ui;
InterfaceSettingsWidget* m_interface_settings = nullptr; InterfaceSettingsWidget* m_interface_settings = nullptr;
GameListSettingsWidget* m_game_list_settings = nullptr; GameListSettingsWidget* m_game_list_settings = nullptr;

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>SettingsDialog</class> <class>SettingsWindow</class>
<widget class="QDialog" name="SettingsDialog"> <widget class="QWidget" name="SettingsWindow">
<property name="windowModality"> <property name="windowIcon">
<enum>Qt::WindowModal</enum> <iconset>
<normalon>:/icons/AppIcon64.png</normalon>
</iconset>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>

View File

@ -111,13 +111,13 @@
<ClCompile Include="Settings\GameListSettingsWidget.cpp" /> <ClCompile Include="Settings\GameListSettingsWidget.cpp" />
<ClCompile Include="Settings\GraphicsSettingsWidget.cpp" /> <ClCompile Include="Settings\GraphicsSettingsWidget.cpp" />
<ClCompile Include="Settings\InterfaceSettingsWidget.cpp" /> <ClCompile Include="Settings\InterfaceSettingsWidget.cpp" />
<ClCompile Include="Settings\SettingsDialog.cpp" /> <ClCompile Include="Settings\SettingsWindow.cpp" />
<ClCompile Include="Settings\AdvancedSettingsWidget.cpp" /> <ClCompile Include="Settings\AdvancedSettingsWidget.cpp" />
<ClCompile Include="Settings\GameFixSettingsWidget.cpp" /> <ClCompile Include="Settings\GameFixSettingsWidget.cpp" />
<ClCompile Include="Settings\HotkeySettingsWidget.cpp" /> <ClCompile Include="Settings\HotkeySettingsWidget.cpp" />
<ClCompile Include="Settings\InputBindingDialog.cpp" /> <ClCompile Include="Settings\InputBindingDialog.cpp" />
<ClCompile Include="Settings\InputBindingWidget.cpp" /> <ClCompile Include="Settings\InputBindingWidget.cpp" />
<ClCompile Include="Settings\ControllerSettingsDialog.cpp" /> <ClCompile Include="Settings\ControllerSettingsWindow.cpp" />
<ClCompile Include="Settings\AudioSettingsWidget.cpp" /> <ClCompile Include="Settings\AudioSettingsWidget.cpp" />
<ClCompile Include="Settings\MemoryCardConvertDialog.cpp" /> <ClCompile Include="Settings\MemoryCardConvertDialog.cpp" />
<ClCompile Include="Settings\MemoryCardSettingsWidget.cpp" /> <ClCompile Include="Settings\MemoryCardSettingsWidget.cpp" />
@ -151,13 +151,13 @@
<QtMoc Include="Settings\BIOSSettingsWidget.h" /> <QtMoc Include="Settings\BIOSSettingsWidget.h" />
<QtMoc Include="Settings\EmulationSettingsWidget.h" /> <QtMoc Include="Settings\EmulationSettingsWidget.h" />
<QtMoc Include="Settings\GraphicsSettingsWidget.h" /> <QtMoc Include="Settings\GraphicsSettingsWidget.h" />
<QtMoc Include="Settings\SettingsDialog.h" /> <QtMoc Include="Settings\SettingsWindow.h" />
<QtMoc Include="Settings\AdvancedSettingsWidget.h" /> <QtMoc Include="Settings\AdvancedSettingsWidget.h" />
<QtMoc Include="Settings\GameFixSettingsWidget.h" /> <QtMoc Include="Settings\GameFixSettingsWidget.h" />
<QtMoc Include="Settings\HotkeySettingsWidget.h" /> <QtMoc Include="Settings\HotkeySettingsWidget.h" />
<QtMoc Include="Settings\InputBindingDialog.h" /> <QtMoc Include="Settings\InputBindingDialog.h" />
<QtMoc Include="Settings\InputBindingWidget.h" /> <QtMoc Include="Settings\InputBindingWidget.h" />
<QtMoc Include="Settings\ControllerSettingsDialog.h" /> <QtMoc Include="Settings\ControllerSettingsWindow.h" />
<QtMoc Include="Settings\AudioSettingsWidget.h" /> <QtMoc Include="Settings\AudioSettingsWidget.h" />
<QtMoc Include="Settings\MemoryCardConvertDialog.h" /> <QtMoc Include="Settings\MemoryCardConvertDialog.h" />
<QtMoc Include="Settings\MemoryCardSettingsWidget.h" /> <QtMoc Include="Settings\MemoryCardSettingsWidget.h" />
@ -212,13 +212,13 @@
<ClCompile Include="$(IntDir)Settings\moc_BIOSSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_BIOSSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_ControllerBindingWidgets.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_ControllerBindingWidgets.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_ControllerGlobalSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_ControllerGlobalSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_ControllerSettingsDialog.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_ControllerSettingsWindow.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_MemoryCardCreateDialog.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_MemoryCardCreateDialog.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_EmulationSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_EmulationSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GameListSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_GameListSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GraphicsSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_GraphicsSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_InterfaceSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_InterfaceSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_SettingsDialog.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_SettingsWindow.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GameCheatSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_GameCheatSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GameFixSettingsWidget.cpp" /> <ClCompile Include="$(IntDir)Settings\moc_GameFixSettingsWidget.cpp" />
@ -274,7 +274,7 @@
<QtUi Include="GameList\GameListWidget.ui"> <QtUi Include="GameList\GameListWidget.ui">
<FileType>Document</FileType> <FileType>Document</FileType>
</QtUi> </QtUi>
<QtUi Include="Settings\SettingsDialog.ui"> <QtUi Include="Settings\SettingsWindow.ui">
<FileType>Document</FileType> <FileType>Document</FileType>
</QtUi> </QtUi>
<QtUi Include="Settings\GameListSettingsWidget.ui"> <QtUi Include="Settings\GameListSettingsWidget.ui">
@ -301,7 +301,7 @@
<QtUi Include="Settings\InputBindingDialog.ui"> <QtUi Include="Settings\InputBindingDialog.ui">
<FileType>Document</FileType> <FileType>Document</FileType>
</QtUi> </QtUi>
<QtUi Include="Settings\ControllerSettingsDialog.ui"> <QtUi Include="Settings\ControllerSettingsWindow.ui">
<FileType>Document</FileType> <FileType>Document</FileType>
</QtUi> </QtUi>
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui"> <QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui">

View File

@ -66,7 +66,7 @@
<ClCompile Include="Settings\InterfaceSettingsWidget.cpp"> <ClCompile Include="Settings\InterfaceSettingsWidget.cpp">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Settings\SettingsDialog.cpp"> <ClCompile Include="Settings\SettingsWindow.cpp">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_BIOSSettingsWidget.cpp"> <ClCompile Include="$(IntDir)Settings\moc_BIOSSettingsWidget.cpp">
@ -84,7 +84,7 @@
<ClCompile Include="$(IntDir)Settings\moc_InterfaceSettingsWidget.cpp"> <ClCompile Include="$(IntDir)Settings\moc_InterfaceSettingsWidget.cpp">
<Filter>moc</Filter> <Filter>moc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_SettingsDialog.cpp"> <ClCompile Include="$(IntDir)Settings\moc_SettingsWindow.cpp">
<Filter>moc</Filter> <Filter>moc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp"> <ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp">
@ -130,7 +130,7 @@
<ClCompile Include="$(IntDir)moc_AboutDialog.cpp"> <ClCompile Include="$(IntDir)moc_AboutDialog.cpp">
<Filter>moc</Filter> <Filter>moc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_ControllerSettingsDialog.cpp"> <ClCompile Include="$(IntDir)Settings\moc_ControllerSettingsWindow.cpp">
<Filter>moc</Filter> <Filter>moc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(IntDir)GameList\moc_GameListModel.cpp"> <ClCompile Include="$(IntDir)GameList\moc_GameListModel.cpp">
@ -142,7 +142,7 @@
<ClCompile Include="$(IntDir)GameList\moc_GameListWidget.cpp"> <ClCompile Include="$(IntDir)GameList\moc_GameListWidget.cpp">
<Filter>moc</Filter> <Filter>moc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Settings\ControllerSettingsDialog.cpp"> <ClCompile Include="Settings\ControllerSettingsWindow.cpp">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Settings\ControllerBindingWidgets.cpp"> <ClCompile Include="Settings\ControllerBindingWidgets.cpp">
@ -374,7 +374,7 @@
<QtMoc Include="Settings\InterfaceSettingsWidget.h"> <QtMoc Include="Settings\InterfaceSettingsWidget.h">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="Settings\SettingsDialog.h"> <QtMoc Include="Settings\SettingsWindow.h">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="Settings\AdvancedSettingsWidget.h"> <QtMoc Include="Settings\AdvancedSettingsWidget.h">
@ -402,7 +402,7 @@
<QtMoc Include="GameList\GameListRefreshThread.h"> <QtMoc Include="GameList\GameListRefreshThread.h">
<Filter>GameList</Filter> <Filter>GameList</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="Settings\ControllerSettingsDialog.h"> <QtMoc Include="Settings\ControllerSettingsWindow.h">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="Settings\ControllerBindingWidgets.h"> <QtMoc Include="Settings\ControllerBindingWidgets.h">
@ -513,7 +513,7 @@
<QtUi Include="Settings\InterfaceSettingsWidget.ui"> <QtUi Include="Settings\InterfaceSettingsWidget.ui">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtUi> </QtUi>
<QtUi Include="Settings\SettingsDialog.ui"> <QtUi Include="Settings\SettingsWindow.ui">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtUi> </QtUi>
<QtUi Include="Settings\AdvancedSettingsWidget.ui"> <QtUi Include="Settings\AdvancedSettingsWidget.ui">
@ -525,7 +525,7 @@
<QtUi Include="Settings\InputBindingDialog.ui"> <QtUi Include="Settings\InputBindingDialog.ui">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtUi> </QtUi>
<QtUi Include="Settings\ControllerSettingsDialog.ui"> <QtUi Include="Settings\ControllerSettingsWindow.ui">
<Filter>Settings</Filter> <Filter>Settings</Filter>
</QtUi> </QtUi>
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui"> <QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui">