mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Qt: Change settings dialogs to widgets/windows
Stops them breaking in Qt 6.6.
This commit is contained in:
parent
3ab27e7220
commit
ac825855f7
|
@ -55,9 +55,9 @@ set(SRCS
|
||||||
controllerledsettingsdialog.ui
|
controllerledsettingsdialog.ui
|
||||||
controllermacroeditwidget.ui
|
controllermacroeditwidget.ui
|
||||||
controllermacrowidget.ui
|
controllermacrowidget.ui
|
||||||
controllersettingsdialog.cpp
|
controllersettingswindow.cpp
|
||||||
controllersettingsdialog.h
|
controllersettingswindow.h
|
||||||
controllersettingsdialog.ui
|
controllersettingswindow.ui
|
||||||
controllersettingwidgetbinder.h
|
controllersettingwidgetbinder.h
|
||||||
coverdownloaddialog.cpp
|
coverdownloaddialog.cpp
|
||||||
coverdownloaddialog.h
|
coverdownloaddialog.h
|
||||||
|
@ -135,9 +135,9 @@ set(SRCS
|
||||||
qtutils.cpp
|
qtutils.cpp
|
||||||
qtutils.h
|
qtutils.h
|
||||||
resource.h
|
resource.h
|
||||||
settingsdialog.cpp
|
settingswindow.cpp
|
||||||
settingsdialog.h
|
settingswindow.h
|
||||||
settingsdialog.ui
|
settingswindow.ui
|
||||||
settingwidgetbinder.h
|
settingwidgetbinder.h
|
||||||
setupwizarddialog.cpp
|
setupwizarddialog.cpp
|
||||||
setupwizarddialog.h
|
setupwizarddialog.h
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "achievementlogindialog.h"
|
#include "achievementlogindialog.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "core/achievements.h"
|
#include "core/achievements.h"
|
||||||
|
@ -16,7 +16,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), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -5,14 +5,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:
|
||||||
|
@ -29,5 +29,5 @@ private:
|
||||||
|
|
||||||
Ui::AchievementSettingsWidget m_ui;
|
Ui::AchievementSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#include "core/gpu_types.h"
|
#include "core/gpu_types.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
static QCheckBox* addBooleanTweakOption(SettingsDialog* dialog, QTableWidget* table, QString name, std::string section,
|
static QCheckBox* addBooleanTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
|
||||||
std::string key, bool default_value)
|
std::string key, bool default_value)
|
||||||
{
|
{
|
||||||
const int row = table->rowCount();
|
const int row = table->rowCount();
|
||||||
|
@ -39,7 +39,7 @@ static QCheckBox* setBooleanTweakOption(QTableWidget* table, int row, bool value
|
||||||
return cb;
|
return cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QSpinBox* addIntRangeTweakOption(SettingsDialog* dialog, QTableWidget* table, QString name, std::string section,
|
static QSpinBox* addIntRangeTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
|
||||||
std::string key, int min_value, int max_value, int default_value)
|
std::string key, int min_value, int max_value, int default_value)
|
||||||
{
|
{
|
||||||
const int row = table->rowCount();
|
const int row = table->rowCount();
|
||||||
|
@ -72,7 +72,7 @@ static QSpinBox* setIntRangeTweakOption(QTableWidget* table, int row, int value)
|
||||||
return cb;
|
return cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDoubleSpinBox* addFloatRangeTweakOption(SettingsDialog* dialog, QTableWidget* table, QString name,
|
static QDoubleSpinBox* addFloatRangeTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name,
|
||||||
std::string section, std::string key, float min_value, float max_value,
|
std::string section, std::string key, float min_value, float max_value,
|
||||||
float step_value, float default_value)
|
float step_value, float default_value)
|
||||||
{
|
{
|
||||||
|
@ -109,7 +109,7 @@ static QDoubleSpinBox* setFloatRangeTweakOption(QTableWidget* table, int row, fl
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static QComboBox* addChoiceTweakOption(SettingsDialog* dialog, QTableWidget* table, QString name, std::string section,
|
static QComboBox* addChoiceTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
|
||||||
std::string key, std::optional<T> (*parse_callback)(const char*),
|
std::string key, std::optional<T> (*parse_callback)(const char*),
|
||||||
const char* (*get_value_callback)(T), const char* (*get_display_callback)(T),
|
const char* (*get_value_callback)(T), const char* (*get_display_callback)(T),
|
||||||
u32 num_values, T default_value)
|
u32 num_values, T default_value)
|
||||||
|
@ -145,7 +145,7 @@ static void setChoiceTweakOption(QTableWidget* table, int row, T value)
|
||||||
cb->setCurrentIndex(static_cast<int>(value));
|
cb->setCurrentIndex(static_cast<int>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addMSAATweakOption(SettingsDialog* dialog, QTableWidget* table, const QString& name)
|
static void addMSAATweakOption(SettingsWindow* dialog, QTableWidget* table, const QString& name)
|
||||||
{
|
{
|
||||||
const int row = table->rowCount();
|
const int row = table->rowCount();
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ static void addMSAATweakOption(SettingsDialog* dialog, QTableWidget* table, cons
|
||||||
table->setCellWidget(row, 1, msaa);
|
table->setCellWidget(row, 1, msaa);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addDirectoryOption(SettingsDialog* dialog, QTableWidget* table, const QString& name, std::string section,
|
static void addDirectoryOption(SettingsWindow* dialog, QTableWidget* table, const QString& name, std::string section,
|
||||||
std::string key)
|
std::string key)
|
||||||
{
|
{
|
||||||
const int row = table->rowCount();
|
const int row = table->rowCount();
|
||||||
|
@ -221,7 +221,7 @@ static void setDirectoryOption(QTableWidget* table, int row, const char* value)
|
||||||
valuew->setText(QString::fromUtf8(value));
|
valuew->setText(QString::fromUtf8(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -7,14 +7,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:
|
||||||
explicit AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~AdvancedSettingsWidget();
|
~AdvancedSettingsWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -47,7 +47,7 @@ private:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
|
|
||||||
Ui::AdvancedSettingsWidget m_ui;
|
Ui::AdvancedSettingsWidget m_ui;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "audiosettingswidget.h"
|
#include "audiosettingswidget.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "core/spu.h"
|
#include "core/spu.h"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent) : QWidget(parent), m_dialog(dialog)
|
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent) : QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,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:
|
||||||
explicit AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~AudioSettingsWidget();
|
~AudioSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -29,5 +29,5 @@ private Q_SLOTS:
|
||||||
private:
|
private:
|
||||||
Ui::AudioSettingsWidget m_ui;
|
Ui::AudioSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "biossettingswidget.h"
|
#include "biossettingswidget.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "core/bios.h"
|
#include "core/bios.h"
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
#include <QtWidgets/QFileDialog>
|
#include <QtWidgets/QFileDialog>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
BIOSSettingsWidget::BIOSSettingsWidget(SettingsDialog* dialog, QWidget* parent) : QWidget(parent), m_dialog(dialog)
|
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent) : QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "ui_biossettingswidget.h"
|
#include "ui_biossettingswidget.h"
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
enum class ConsoleRegion;
|
enum class ConsoleRegion;
|
||||||
namespace BIOS {
|
namespace BIOS {
|
||||||
|
@ -19,7 +19,7 @@ class BIOSSettingsWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BIOSSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~BIOSSettingsWidget();
|
~BIOSSettingsWidget();
|
||||||
|
|
||||||
static void populateDropDownForRegion(ConsoleRegion region, QComboBox* cb,
|
static void populateDropDownForRegion(ConsoleRegion region, QComboBox* cb,
|
||||||
|
@ -34,5 +34,5 @@ private Q_SLOTS:
|
||||||
private:
|
private:
|
||||||
Ui::BIOSSettingsWidget m_ui;
|
Ui::BIOSSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
#include "consolesettingswidget.h"
|
#include "consolesettingswidget.h"
|
||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
#include "util/cd_image.h"
|
#include "util/cd_image.h"
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <QtWidgets/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
|
|
||||||
ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
#include "ui_consolesettingswidget.h"
|
#include "ui_consolesettingswidget.h"
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class ConsoleSettingsWidget : public QWidget
|
class ConsoleSettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConsoleSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~ConsoleSettingsWidget();
|
~ConsoleSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -28,5 +28,5 @@ private:
|
||||||
|
|
||||||
Ui::ConsoleSettingsWidget m_ui;
|
Ui::ConsoleSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "controllerbindingwidgets.h"
|
#include "controllerbindingwidgets.h"
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "controllersettingwidgetbinder.h"
|
#include "controllersettingwidgetbinder.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "core/controller.h"
|
#include "core/controller.h"
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
Log_SetChannel(ControllerBindingWidget);
|
Log_SetChannel(ControllerBindingWidget);
|
||||||
|
|
||||||
ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog, u32 port)
|
ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port)
|
||||||
: QWidget(parent), m_dialog(dialog), m_config_section(Controller::GetSettingsSection(port)), m_port_number(port)
|
: QWidget(parent), m_dialog(dialog), m_config_section(Controller::GetSettingsSection(port)), m_port_number(port)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
@ -344,7 +344,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 Controller::ControllerInfo* cinfo = Controller::GetControllerInfo(m_bwidget->getControllerType());
|
const Controller::ControllerInfo* cinfo = Controller::GetControllerInfo(m_bwidget->getControllerType());
|
||||||
if (!cinfo)
|
if (!cinfo)
|
||||||
|
@ -448,7 +448,7 @@ void ControllerMacroEditWidget::updateFrequencyText()
|
||||||
|
|
||||||
void ControllerMacroEditWidget::updateBinds()
|
void ControllerMacroEditWidget::updateBinds()
|
||||||
{
|
{
|
||||||
ControllerSettingsDialog* dialog = m_bwidget->getDialog();
|
ControllerSettingsWindow* dialog = m_bwidget->getDialog();
|
||||||
const Controller::ControllerInfo* cinfo = Controller::GetControllerInfo(m_bwidget->getControllerType());
|
const Controller::ControllerInfo* cinfo = Controller::GetControllerInfo(m_bwidget->getControllerType());
|
||||||
if (!cinfo)
|
if (!cinfo)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
|
|
||||||
class InputBindingWidget;
|
class InputBindingWidget;
|
||||||
class ControllerSettingsDialog;
|
class ControllerSettingsWindow;
|
||||||
class ControllerCustomSettingsWidget;
|
class ControllerCustomSettingsWidget;
|
||||||
class ControllerMacroWidget;
|
class ControllerMacroWidget;
|
||||||
class ControllerMacroEditWidget;
|
class ControllerMacroEditWidget;
|
||||||
|
@ -35,12 +35,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;
|
||||||
|
|
||||||
ALWAYS_INLINE ControllerSettingsDialog* getDialog() const { return m_dialog; }
|
ALWAYS_INLINE ControllerSettingsWindow* getDialog() const { return m_dialog; }
|
||||||
ALWAYS_INLINE const std::string& getConfigSection() const { return m_config_section; }
|
ALWAYS_INLINE const std::string& getConfigSection() const { return m_config_section; }
|
||||||
ALWAYS_INLINE ControllerType getControllerType() const { return m_controller_type; }
|
ALWAYS_INLINE ControllerType getControllerType() const { return m_controller_type; }
|
||||||
ALWAYS_INLINE u32 getPortNumber() const { return m_port_number; }
|
ALWAYS_INLINE u32 getPortNumber() const { return m_port_number; }
|
||||||
|
@ -62,7 +62,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;
|
||||||
ControllerType m_controller_type;
|
ControllerType m_controller_type;
|
||||||
|
@ -91,7 +91,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public:
|
||||||
ControllerBindingWidget_Base(ControllerBindingWidget* parent);
|
ControllerBindingWidget_Base(ControllerBindingWidget* parent);
|
||||||
virtual ~ControllerBindingWidget_Base();
|
virtual ~ControllerBindingWidget_Base();
|
||||||
|
|
||||||
ALWAYS_INLINE ControllerSettingsDialog* getDialog() const
|
ALWAYS_INLINE ControllerSettingsWindow* getDialog() const
|
||||||
{
|
{
|
||||||
return static_cast<ControllerBindingWidget*>(parent())->getDialog();
|
return static_cast<ControllerBindingWidget*>(parent())->getDialog();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "controllerglobalsettingswidget.h"
|
#include "controllerglobalsettingswidget.h"
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "controllersettingwidgetbinder.h"
|
#include "controllersettingwidgetbinder.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "util/sdl_input_source.h"
|
#include "util/sdl_input_source.h"
|
||||||
|
|
||||||
ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog)
|
ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
@ -108,7 +108,7 @@ void ControllerGlobalSettingsWidget::updateSDLOptionsEnabled()
|
||||||
m_ui.ledSettings->setEnabled(enabled);
|
m_ui.ledSettings->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsDialog* dialog)
|
ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog)
|
||||||
: QDialog(parent), m_dialog(dialog)
|
: QDialog(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
#include "ui_controllerglobalsettingswidget.h"
|
#include "ui_controllerglobalsettingswidget.h"
|
||||||
#include "ui_controllerledsettingsdialog.h"
|
#include "ui_controllerledsettingsdialog.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);
|
||||||
|
@ -36,7 +36,7 @@ private:
|
||||||
void ledSettingsClicked();
|
void ledSettingsClicked();
|
||||||
|
|
||||||
Ui::ControllerGlobalSettingsWidget m_ui;
|
Ui::ControllerGlobalSettingsWidget m_ui;
|
||||||
ControllerSettingsDialog* m_dialog;
|
ControllerSettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ControllerLEDSettingsDialog : public QDialog
|
class ControllerLEDSettingsDialog : public QDialog
|
||||||
|
@ -44,12 +44,12 @@ 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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "controllerbindingwidgets.h"
|
#include "controllerbindingwidgets.h"
|
||||||
#include "controllerglobalsettingswidget.h"
|
#include "controllerglobalsettingswidget.h"
|
||||||
#include "hotkeysettingswidget.h"
|
#include "hotkeysettingswidget.h"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
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 */) : QDialog(parent)
|
ControllerSettingsWindow::ControllerSettingsWindow() : QWidget()
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
|
@ -34,31 +34,31 @@ ControllerSettingsDialog::ControllerSettingsDialog(QWidget* parent /* = nullptr
|
||||||
|
|
||||||
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this,
|
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this,
|
||||||
&ControllerSettingsDialog::onCategoryCurrentRowChanged);
|
&ControllerSettingsWindow::onCategoryCurrentRowChanged);
|
||||||
connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this,
|
connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this,
|
||||||
&ControllerSettingsDialog::onCurrentProfileChanged);
|
&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,
|
connect(g_emu_thread, &EmuThread::onInputDevicesEnumerated, this,
|
||||||
&ControllerSettingsDialog::onInputDevicesEnumerated);
|
&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,
|
connect(g_emu_thread, &EmuThread::onInputDeviceDisconnected, this,
|
||||||
&ControllerSettingsDialog::onInputDeviceDisconnected);
|
&ControllerSettingsWindow::onInputDeviceDisconnected);
|
||||||
connect(g_emu_thread, &EmuThread::onVibrationMotorsEnumerated, this,
|
connect(g_emu_thread, &EmuThread::onVibrationMotorsEnumerated, this,
|
||||||
&ControllerSettingsDialog::onVibrationMotorsEnumerated);
|
&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)
|
||||||
{
|
{
|
||||||
|
@ -80,17 +80,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(
|
const QString profile_name(
|
||||||
QInputDialog::getText(this, tr("Create Input Profile"), tr("Enter the name for the new input profile:")));
|
QInputDialog::getText(this, tr("Create Input Profile"), tr("Enter the name for the new input profile:")));
|
||||||
|
@ -142,7 +142,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"
|
||||||
|
@ -164,7 +164,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"
|
||||||
|
@ -186,7 +186,7 @@ void ControllerSettingsDialog::onDeleteProfileClicked()
|
||||||
switchProfile({});
|
switchProfile({});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControllerSettingsDialog::onRestoreDefaultsClicked()
|
void ControllerSettingsWindow::onRestoreDefaultsClicked()
|
||||||
{
|
{
|
||||||
if (QMessageBox::question(
|
if (QMessageBox::question(
|
||||||
this, tr("Restore Defaults"),
|
this, tr("Restore Defaults"),
|
||||||
|
@ -204,21 +204,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)
|
||||||
{
|
{
|
||||||
|
@ -233,7 +233,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());
|
||||||
|
@ -246,7 +246,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);
|
||||||
|
@ -254,7 +254,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);
|
||||||
|
@ -262,7 +262,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,
|
std::string ControllerSettingsWindow::getStringValue(const char* section, const char* key,
|
||||||
const char* default_value) const
|
const char* default_value) const
|
||||||
{
|
{
|
||||||
std::string value;
|
std::string value;
|
||||||
|
@ -273,7 +273,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)
|
||||||
{
|
{
|
||||||
|
@ -289,7 +289,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)
|
||||||
{
|
{
|
||||||
|
@ -305,7 +305,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)
|
||||||
{
|
{
|
||||||
|
@ -321,7 +321,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)
|
||||||
{
|
{
|
||||||
|
@ -337,7 +337,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);
|
||||||
|
@ -364,7 +364,7 @@ void ControllerSettingsDialog::createWidgets()
|
||||||
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,
|
connect(m_global_settings, &ControllerGlobalSettingsWidget::bindingSetupChanged, this,
|
||||||
&ControllerSettingsDialog::createWidgets);
|
&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);
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,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++)
|
||||||
{
|
{
|
||||||
|
@ -446,7 +446,7 @@ void ControllerSettingsDialog::updateListDescription(u32 global_slot, Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void ControllerSettingsDialog::refreshProfileList()
|
void ControllerSettingsWindow::refreshProfileList()
|
||||||
{
|
{
|
||||||
const std::vector<std::string> names(InputManager::GetInputProfileNames());
|
const std::vector<std::string> names(InputManager::GetInputProfileNames());
|
||||||
|
|
||||||
|
@ -465,7 +465,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);
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "common/types.h"
|
|
||||||
|
#include "ui_controllersettingswindow.h"
|
||||||
|
|
||||||
#include "util/input_manager.h"
|
#include "util/input_manager.h"
|
||||||
#include "ui_controllersettingsdialog.h"
|
|
||||||
|
#include "common/types.h"
|
||||||
|
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QPair>
|
#include <QtCore/QPair>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
|
@ -19,7 +23,7 @@ class HotkeySettingsWidget;
|
||||||
|
|
||||||
class SettingsInterface;
|
class SettingsInterface;
|
||||||
|
|
||||||
class ControllerSettingsDialog final : public QDialog
|
class ControllerSettingsWindow final : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -37,8 +41,8 @@ public:
|
||||||
MAX_PORTS = 8
|
MAX_PORTS = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
ControllerSettingsDialog(QWidget* parent = nullptr);
|
ControllerSettingsWindow();
|
||||||
~ControllerSettingsDialog();
|
~ControllerSettingsWindow();
|
||||||
|
|
||||||
ALWAYS_INLINE HotkeySettingsWidget* getHotkeySettingsWidget() const { return m_hotkey_settings; }
|
ALWAYS_INLINE HotkeySettingsWidget* getHotkeySettingsWidget() const { return m_hotkey_settings; }
|
||||||
|
|
||||||
|
@ -85,7 +89,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{};
|
|
@ -1,10 +1,7 @@
|
||||||
<?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">
|
|
||||||
<enum>Qt::WindowModal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
|
@ -5,7 +5,7 @@
|
||||||
#include "core/gpu.h"
|
#include "core/gpu.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#include "util/vulkan_device.h"
|
#include "util/vulkan_device.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DisplaySettingsWidget::DisplaySettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
DisplaySettingsWidget::DisplaySettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
#include "ui_displaysettingswidget.h"
|
#include "ui_displaysettingswidget.h"
|
||||||
|
|
||||||
class PostProcessingChainConfigWidget;
|
class PostProcessingChainConfigWidget;
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class DisplaySettingsWidget : public QWidget
|
class DisplaySettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DisplaySettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
DisplaySettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~DisplaySettingsWidget();
|
~DisplaySettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -29,5 +29,5 @@ private:
|
||||||
|
|
||||||
Ui::DisplaySettingsWidget m_ui;
|
Ui::DisplaySettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<ClCompile Include="consolesettingswidget.cpp" />
|
<ClCompile Include="consolesettingswidget.cpp" />
|
||||||
<ClCompile Include="controllerbindingwidgets.cpp" />
|
<ClCompile Include="controllerbindingwidgets.cpp" />
|
||||||
<ClCompile Include="controllerglobalsettingswidget.cpp" />
|
<ClCompile Include="controllerglobalsettingswidget.cpp" />
|
||||||
<ClCompile Include="controllersettingsdialog.cpp" />
|
<ClCompile Include="controllersettingswindow.cpp" />
|
||||||
<ClCompile Include="coverdownloaddialog.cpp" />
|
<ClCompile Include="coverdownloaddialog.cpp" />
|
||||||
<ClCompile Include="emulationsettingswidget.cpp" />
|
<ClCompile Include="emulationsettingswidget.cpp" />
|
||||||
<ClCompile Include="debuggermodels.cpp" />
|
<ClCompile Include="debuggermodels.cpp" />
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<ClCompile Include="qtkeycodes.cpp" />
|
<ClCompile Include="qtkeycodes.cpp" />
|
||||||
<ClCompile Include="qtprogresscallback.cpp" />
|
<ClCompile Include="qtprogresscallback.cpp" />
|
||||||
<ClCompile Include="qtutils.cpp" />
|
<ClCompile Include="qtutils.cpp" />
|
||||||
<ClCompile Include="settingsdialog.cpp" />
|
<ClCompile Include="settingswindow.cpp" />
|
||||||
<ClCompile Include="setupwizarddialog.cpp" />
|
<ClCompile Include="setupwizarddialog.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<QtMoc Include="collapsiblewidget.h" />
|
<QtMoc Include="collapsiblewidget.h" />
|
||||||
<QtMoc Include="controllerbindingwidgets.h" />
|
<QtMoc Include="controllerbindingwidgets.h" />
|
||||||
<QtMoc Include="controllerglobalsettingswidget.h" />
|
<QtMoc Include="controllerglobalsettingswidget.h" />
|
||||||
<QtMoc Include="controllersettingsdialog.h" />
|
<QtMoc Include="controllersettingswindow.h" />
|
||||||
<QtMoc Include="colorpickerbutton.h" />
|
<QtMoc Include="colorpickerbutton.h" />
|
||||||
<ClInclude Include="controllersettingwidgetbinder.h" />
|
<ClInclude Include="controllersettingwidgetbinder.h" />
|
||||||
<QtMoc Include="memoryviewwidget.h" />
|
<QtMoc Include="memoryviewwidget.h" />
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<QtMoc Include="qthost.h" />
|
<QtMoc Include="qthost.h" />
|
||||||
<QtMoc Include="foldersettingswidget.h" />
|
<QtMoc Include="foldersettingswidget.h" />
|
||||||
<ClInclude Include="qtutils.h" />
|
<ClInclude Include="qtutils.h" />
|
||||||
<QtMoc Include="settingsdialog.h" />
|
<QtMoc Include="settingswindow.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUi Include="aboutdialog.ui">
|
<QtUi Include="aboutdialog.ui">
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
<QtUi Include="mainwindow.ui">
|
<QtUi Include="mainwindow.ui">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
</QtUi>
|
</QtUi>
|
||||||
<QtUi Include="settingsdialog.ui">
|
<QtUi Include="settingswindow.ui">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
</QtUi>
|
</QtUi>
|
||||||
<QtUi Include="displaysettingswidget.ui">
|
<QtUi Include="displaysettingswidget.ui">
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
<QtUi Include="controllerglobalsettingswidget.ui">
|
<QtUi Include="controllerglobalsettingswidget.ui">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
</QtUi>
|
</QtUi>
|
||||||
<QtUi Include="controllersettingsdialog.ui">
|
<QtUi Include="controllersettingswindow.ui">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
</QtUi>
|
</QtUi>
|
||||||
<QtUi Include="controllermacrowidget.ui">
|
<QtUi Include="controllermacrowidget.ui">
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<ClCompile Include="$(IntDir)moc_consolesettingswidget.cpp" />
|
<ClCompile Include="$(IntDir)moc_consolesettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_controllerbindingwidgets.cpp" />
|
<ClCompile Include="$(IntDir)moc_controllerbindingwidgets.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_controllerglobalsettingswidget.cpp" />
|
<ClCompile Include="$(IntDir)moc_controllerglobalsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_controllersettingsdialog.cpp" />
|
<ClCompile Include="$(IntDir)moc_controllersettingswindow.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_coverdownloaddialog.cpp" />
|
<ClCompile Include="$(IntDir)moc_coverdownloaddialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_displaywidget.cpp" />
|
<ClCompile Include="$(IntDir)moc_displaywidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_emulationsettingswidget.cpp" />
|
<ClCompile Include="$(IntDir)moc_emulationsettingswidget.cpp" />
|
||||||
|
@ -268,7 +268,7 @@
|
||||||
<ClCompile Include="$(IntDir)moc_postprocessingsettingswidget.cpp" />
|
<ClCompile Include="$(IntDir)moc_postprocessingsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_qthost.cpp" />
|
<ClCompile Include="$(IntDir)moc_qthost.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_qtprogresscallback.cpp" />
|
<ClCompile Include="$(IntDir)moc_qtprogresscallback.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_settingsdialog.cpp" />
|
<ClCompile Include="$(IntDir)moc_settingswindow.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_setupwizarddialog.cpp" />
|
<ClCompile Include="$(IntDir)moc_setupwizarddialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)qrc_resources.cpp" />
|
<ClCompile Include="$(IntDir)qrc_resources.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -3,99 +3,189 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="mainwindow.cpp" />
|
<ClCompile Include="mainwindow.cpp" />
|
||||||
<ClCompile Include="gamelistwidget.cpp" />
|
<ClCompile Include="gamelistwidget.cpp" />
|
||||||
<ClCompile Include="settingsdialog.cpp" />
|
<ClCompile Include="settingswindow.cpp" />
|
||||||
<ClCompile Include="consolesettingswidget.cpp" />
|
<ClCompile Include="consolesettingswidget.cpp" />
|
||||||
<ClCompile Include="qthost.cpp" />
|
<ClCompile Include="qthost.cpp" />
|
||||||
<ClCompile Include="gamelistsettingswidget.cpp" />
|
<ClCompile Include="gamelistsettingswidget.cpp" />
|
||||||
<ClCompile Include="qtutils.cpp" />
|
<ClCompile Include="qtutils.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_consolesettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_gamelistsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_gamelistwidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_mainwindow.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_qthost.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_settingsdialog.cpp" />
|
|
||||||
<ClCompile Include="inputbindingwidgets.cpp" />
|
<ClCompile Include="inputbindingwidgets.cpp" />
|
||||||
<ClCompile Include="hotkeysettingswidget.cpp" />
|
<ClCompile Include="hotkeysettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_hotkeysettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_inputbindingwidgets.cpp" />
|
|
||||||
<ClCompile Include="audiosettingswidget.cpp" />
|
<ClCompile Include="audiosettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_audiosettingswidget.cpp" />
|
|
||||||
<ClCompile Include="displaywidget.cpp" />
|
<ClCompile Include="displaywidget.cpp" />
|
||||||
<ClCompile Include="qtprogresscallback.cpp" />
|
<ClCompile Include="qtprogresscallback.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_qtprogresscallback.cpp" />
|
|
||||||
<ClCompile Include="generalsettingswidget.cpp" />
|
<ClCompile Include="generalsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_generalsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="advancedsettingswidget.cpp" />
|
<ClCompile Include="advancedsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_advancedsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="gdbconnection.cpp" />
|
<ClCompile Include="gdbconnection.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_gdbconnection.cpp" />
|
|
||||||
<ClCompile Include="gdbserver.cpp" />
|
<ClCompile Include="gdbserver.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_gdbserver.cpp" />
|
|
||||||
<ClCompile Include="aboutdialog.cpp" />
|
<ClCompile Include="aboutdialog.cpp" />
|
||||||
<ClCompile Include="memorycardsettingswidget.cpp" />
|
<ClCompile Include="memorycardsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_aboutdialog.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_memorycardsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)qrc_resources.cpp" />
|
<ClCompile Include="$(IntDir)qrc_resources.cpp" />
|
||||||
<ClCompile Include="inputbindingdialog.cpp" />
|
<ClCompile Include="inputbindingdialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_inputbindingdialog.cpp" />
|
|
||||||
<ClCompile Include="gamelistmodel.cpp" />
|
<ClCompile Include="gamelistmodel.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_gamelistmodel.cpp" />
|
|
||||||
<ClCompile Include="gamelistsearchdirectoriesmodel.cpp" />
|
<ClCompile Include="gamelistsearchdirectoriesmodel.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_gamelistsearchdirectoriesmodel.cpp" />
|
|
||||||
<ClCompile Include="autoupdaterdialog.cpp" />
|
<ClCompile Include="autoupdaterdialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_autoupdaterdialog.cpp" />
|
|
||||||
<ClCompile Include="biossettingswidget.cpp" />
|
<ClCompile Include="biossettingswidget.cpp" />
|
||||||
<ClCompile Include="enhancementsettingswidget.cpp" />
|
<ClCompile Include="enhancementsettingswidget.cpp" />
|
||||||
<ClCompile Include="displaysettingswidget.cpp" />
|
<ClCompile Include="displaysettingswidget.cpp" />
|
||||||
<ClCompile Include="memorycardeditordialog.cpp" />
|
<ClCompile Include="memorycardeditordialog.cpp" />
|
||||||
<ClCompile Include="postprocessingsettingswidget.cpp" />
|
<ClCompile Include="postprocessingsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_biossettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_enhancementsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_displaysettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_memorycardeditordialog.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_postprocessingsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="cheatmanagerdialog.cpp" />
|
<ClCompile Include="cheatmanagerdialog.cpp" />
|
||||||
<ClCompile Include="cheatcodeeditordialog.cpp" />
|
<ClCompile Include="cheatcodeeditordialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_cheatmanagerdialog.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_cheatcodeeditordialog.cpp" />
|
|
||||||
<ClCompile Include="debuggerwindow.cpp" />
|
<ClCompile Include="debuggerwindow.cpp" />
|
||||||
<ClCompile Include="debuggermodels.cpp" />
|
<ClCompile Include="debuggermodels.cpp" />
|
||||||
<ClCompile Include="memoryviewwidget.cpp" />
|
<ClCompile Include="memoryviewwidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_debuggermodels.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_memoryviewwidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_debuggerwindow.cpp" />
|
|
||||||
<ClCompile Include="emulationsettingswidget.cpp" />
|
<ClCompile Include="emulationsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_emulationsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="achievementsettingswidget.cpp" />
|
<ClCompile Include="achievementsettingswidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_achievementsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="achievementlogindialog.cpp" />
|
<ClCompile Include="achievementlogindialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_achievementlogindialog.cpp" />
|
|
||||||
<ClCompile Include="collapsiblewidget.cpp" />
|
<ClCompile Include="collapsiblewidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_collapsiblewidget.cpp" />
|
|
||||||
<ClCompile Include="qtkeycodes.cpp" />
|
<ClCompile Include="qtkeycodes.cpp" />
|
||||||
<ClCompile Include="controllerglobalsettingswidget.cpp" />
|
<ClCompile Include="controllerglobalsettingswidget.cpp" />
|
||||||
<ClCompile Include="controllersettingsdialog.cpp" />
|
<ClCompile Include="controllersettingswindow.cpp" />
|
||||||
<ClCompile Include="controllerbindingwidgets.cpp" />
|
<ClCompile Include="controllerbindingwidgets.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_controllerbindingwidgets.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_controllerglobalsettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_controllersettingsdialog.cpp" />
|
|
||||||
<ClCompile Include="gamelistrefreshthread.cpp" />
|
<ClCompile Include="gamelistrefreshthread.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_gamelistrefreshthread.cpp" />
|
|
||||||
<ClCompile Include="foldersettingswidget.cpp" />
|
<ClCompile Include="foldersettingswidget.cpp" />
|
||||||
<ClCompile Include="gamesummarywidget.cpp" />
|
<ClCompile Include="gamesummarywidget.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_displaywidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_foldersettingswidget.cpp" />
|
|
||||||
<ClCompile Include="$(IntDir)moc_gamesummarywidget.cpp" />
|
|
||||||
<ClCompile Include="qttranslations.cpp" />
|
<ClCompile Include="qttranslations.cpp" />
|
||||||
<ClCompile Include="coverdownloaddialog.cpp" />
|
<ClCompile Include="coverdownloaddialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_coverdownloaddialog.cpp" />
|
|
||||||
<ClCompile Include="colorpickerbutton.cpp" />
|
<ClCompile Include="colorpickerbutton.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_colorpickerbutton.cpp" />
|
|
||||||
<ClCompile Include="pch.cpp" />
|
<ClCompile Include="pch.cpp" />
|
||||||
<ClCompile Include="setupwizarddialog.cpp" />
|
<ClCompile Include="setupwizarddialog.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_setupwizarddialog.cpp" />
|
|
||||||
<ClCompile Include="logwindow.cpp" />
|
<ClCompile Include="logwindow.cpp" />
|
||||||
<ClCompile Include="$(IntDir)moc_logwindow.cpp" />
|
<ClCompile Include="$(IntDir)moc_aboutdialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_achievementlogindialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_achievementsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_advancedsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_audiosettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_autoupdaterdialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_biossettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_cheatcodeeditordialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_cheatmanagerdialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_collapsiblewidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_colorpickerbutton.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_consolesettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_controllerbindingwidgets.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_controllerglobalsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_controllersettingswindow.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_coverdownloaddialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_debuggermodels.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_debuggerwindow.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_displaysettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_displaywidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_emulationsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_enhancementsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_foldersettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamelistmodel.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamelistrefreshthread.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamelistsearchdirectoriesmodel.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamelistsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamelistwidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gamesummarywidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gdbconnection.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_gdbserver.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_generalsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_hotkeysettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_inputbindingdialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_inputbindingwidgets.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_logwindow.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_mainwindow.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_memorycardeditordialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_memorycardsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_memoryviewwidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_postprocessingsettingswidget.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_qthost.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_qtprogresscallback.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_settingswindow.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(IntDir)moc_setupwizarddialog.cpp">
|
||||||
|
<Filter>moc</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="qtutils.h" />
|
<ClInclude Include="qtutils.h" />
|
||||||
|
@ -111,6 +201,9 @@
|
||||||
<Filter Include="translations">
|
<Filter Include="translations">
|
||||||
<UniqueIdentifier>{4230e20b-2aff-4c86-966c-b620263a371d}</UniqueIdentifier>
|
<UniqueIdentifier>{4230e20b-2aff-4c86-966c-b620263a371d}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="moc">
|
||||||
|
<UniqueIdentifier>{9c2685f7-0991-4a58-98a5-c548b97d0dd8}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="consolesettingswidget.h" />
|
<QtMoc Include="consolesettingswidget.h" />
|
||||||
|
@ -118,7 +211,7 @@
|
||||||
<QtMoc Include="gamelistwidget.h" />
|
<QtMoc Include="gamelistwidget.h" />
|
||||||
<QtMoc Include="mainwindow.h" />
|
<QtMoc Include="mainwindow.h" />
|
||||||
<QtMoc Include="qthost.h" />
|
<QtMoc Include="qthost.h" />
|
||||||
<QtMoc Include="settingsdialog.h" />
|
<QtMoc Include="settingswindow.h" />
|
||||||
<QtMoc Include="hotkeysettingswidget.h" />
|
<QtMoc Include="hotkeysettingswidget.h" />
|
||||||
<QtMoc Include="inputbindingwidgets.h" />
|
<QtMoc Include="inputbindingwidgets.h" />
|
||||||
<QtMoc Include="audiosettingswidget.h" />
|
<QtMoc Include="audiosettingswidget.h" />
|
||||||
|
@ -150,7 +243,7 @@
|
||||||
<QtMoc Include="collapsiblewidget.h" />
|
<QtMoc Include="collapsiblewidget.h" />
|
||||||
<QtMoc Include="controllerbindingwidgets.h" />
|
<QtMoc Include="controllerbindingwidgets.h" />
|
||||||
<QtMoc Include="controllerglobalsettingswidget.h" />
|
<QtMoc Include="controllerglobalsettingswidget.h" />
|
||||||
<QtMoc Include="controllersettingsdialog.h" />
|
<QtMoc Include="controllersettingswindow.h" />
|
||||||
<QtMoc Include="gamelistrefreshthread.h" />
|
<QtMoc Include="gamelistrefreshthread.h" />
|
||||||
<QtMoc Include="gamesummarywidget.h" />
|
<QtMoc Include="gamesummarywidget.h" />
|
||||||
<QtMoc Include="foldersettingswidget.h" />
|
<QtMoc Include="foldersettingswidget.h" />
|
||||||
|
@ -163,7 +256,7 @@
|
||||||
<QtUi Include="consolesettingswidget.ui" />
|
<QtUi Include="consolesettingswidget.ui" />
|
||||||
<QtUi Include="gamelistsettingswidget.ui" />
|
<QtUi Include="gamelistsettingswidget.ui" />
|
||||||
<QtUi Include="mainwindow.ui" />
|
<QtUi Include="mainwindow.ui" />
|
||||||
<QtUi Include="settingsdialog.ui" />
|
<QtUi Include="settingswindow.ui" />
|
||||||
<QtUi Include="audiosettingswidget.ui" />
|
<QtUi Include="audiosettingswidget.ui" />
|
||||||
<QtUi Include="generalsettingswidget.ui" />
|
<QtUi Include="generalsettingswidget.ui" />
|
||||||
<QtUi Include="advancedsettingswidget.ui" />
|
<QtUi Include="advancedsettingswidget.ui" />
|
||||||
|
@ -184,7 +277,7 @@
|
||||||
<QtUi Include="controllerbindingwidget.ui" />
|
<QtUi Include="controllerbindingwidget.ui" />
|
||||||
<QtUi Include="controllerbindingwidget_analog_controller.ui" />
|
<QtUi Include="controllerbindingwidget_analog_controller.ui" />
|
||||||
<QtUi Include="controllerglobalsettingswidget.ui" />
|
<QtUi Include="controllerglobalsettingswidget.ui" />
|
||||||
<QtUi Include="controllersettingsdialog.ui" />
|
<QtUi Include="controllersettingswindow.ui" />
|
||||||
<QtUi Include="controllerbindingwidget_digital_controller.ui" />
|
<QtUi Include="controllerbindingwidget_digital_controller.ui" />
|
||||||
<QtUi Include="emptygamelistwidget.ui" />
|
<QtUi Include="emptygamelistwidget.ui" />
|
||||||
<QtUi Include="gamelistwidget.ui" />
|
<QtUi Include="gamelistwidget.ui" />
|
||||||
|
@ -197,8 +290,8 @@
|
||||||
<QtUi Include="controllermacroeditwidget.ui" />
|
<QtUi Include="controllermacroeditwidget.ui" />
|
||||||
<QtUi Include="controllerbindingwidget_mouse.ui" />
|
<QtUi Include="controllerbindingwidget_mouse.ui" />
|
||||||
<QtUi Include="coverdownloaddialog.ui" />
|
<QtUi Include="coverdownloaddialog.ui" />
|
||||||
<QtUi Include="controllerledsettingsdialog.ui" />
|
|
||||||
<QtUi Include="setupwizarddialog.ui" />
|
<QtUi Include="setupwizarddialog.ui" />
|
||||||
|
<QtUi Include="controllerledsettingsdialog.ui" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Natvis Include="qt5.natvis" />
|
<Natvis Include="qt5.natvis" />
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "emulationsettingswidget.h"
|
#include "emulationsettingswidget.h"
|
||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -7,14 +7,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:
|
||||||
explicit EmulationSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~EmulationSettingsWidget();
|
~EmulationSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -28,5 +28,5 @@ private:
|
||||||
|
|
||||||
Ui::EmulationSettingsWidget m_ui;
|
Ui::EmulationSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#include "core/gpu.h"
|
#include "core/gpu.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
#include "ui_enhancementsettingswidget.h"
|
#include "ui_enhancementsettingswidget.h"
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class EnhancementSettingsWidget : public QWidget
|
class EnhancementSettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EnhancementSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
EnhancementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~EnhancementSettingsWidget();
|
~EnhancementSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -27,5 +27,5 @@ private:
|
||||||
|
|
||||||
Ui::EnhancementSettingsWidget m_ui;
|
Ui::EnhancementSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "foldersettingswidget.h"
|
#include "foldersettingswidget.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
FolderSettingsWidget::FolderSettingsWidget(SettingsDialog* dialog, QWidget* parent) : QWidget(parent)
|
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,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:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
GameListSettingsWidget::GameListSettingsWidget(SettingsDialog* dialog, QWidget* parent) : QWidget(parent)
|
GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "ui_gamelistsettingswidget.h"
|
#include "ui_gamelistsettingswidget.h"
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
class GameListSearchDirectoriesModel;
|
class GameListSearchDirectoriesModel;
|
||||||
|
|
||||||
class GameListSettingsWidget : public QWidget
|
class GameListSettingsWidget : public QWidget
|
||||||
|
@ -15,7 +15,7 @@ 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);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "gamesummarywidget.h"
|
#include "gamesummarywidget.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtprogresscallback.h"
|
#include "qtprogresscallback.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
|
|
||||||
#include "core/game_database.h"
|
#include "core/game_database.h"
|
||||||
#include "core/game_list.h"
|
#include "core/game_list.h"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
|
|
||||||
GameSummaryWidget::GameSummaryWidget(const std::string& path, const std::string& serial, DiscRegion region,
|
GameSummaryWidget::GameSummaryWidget(const std::string& path, const std::string& serial, DiscRegion region,
|
||||||
const GameDatabase::Entry* entry, SettingsDialog* dialog, QWidget* parent)
|
const GameDatabase::Entry* entry, SettingsWindow* dialog, QWidget* parent)
|
||||||
: m_dialog(dialog)
|
: m_dialog(dialog)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace GameDatabase {
|
||||||
struct Entry;
|
struct Entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class GameSummaryWidget : public QWidget
|
class GameSummaryWidget : public QWidget
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ class GameSummaryWidget : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameSummaryWidget(const std::string& path, const std::string& serial, DiscRegion region,
|
GameSummaryWidget(const std::string& path, const std::string& serial, DiscRegion region,
|
||||||
const GameDatabase::Entry* entry, SettingsDialog* dialog, QWidget* parent);
|
const GameDatabase::Entry* entry, SettingsWindow* dialog, QWidget* parent);
|
||||||
~GameSummaryWidget();
|
~GameSummaryWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -34,7 +34,7 @@ private:
|
||||||
void populateTracksInfo();
|
void populateTracksInfo();
|
||||||
|
|
||||||
Ui::GameSummaryWidget m_ui;
|
Ui::GameSummaryWidget m_ui;
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
|
|
||||||
std::string m_path;
|
std::string m_path;
|
||||||
std::string m_redump_search_keyword;
|
std::string m_redump_search_keyword;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "scmversion/scmversion.h"
|
#include "scmversion/scmversion.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
const char* GeneralSettingsWidget::THEME_NAMES[] = {
|
const char* GeneralSettingsWidget::THEME_NAMES[] = {
|
||||||
|
@ -25,7 +25,7 @@ const char* GeneralSettingsWidget::THEME_VALUES[] = {
|
||||||
|
|
||||||
const char* GeneralSettingsWidget::DEFAULT_THEME_NAME = "darkfusion";
|
const char* GeneralSettingsWidget::DEFAULT_THEME_NAME = "darkfusion";
|
||||||
|
|
||||||
GeneralSettingsWidget::GeneralSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
GeneralSettingsWidget::GeneralSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
#include "ui_generalsettingswidget.h"
|
#include "ui_generalsettingswidget.h"
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class GeneralSettingsWidget : public QWidget
|
class GeneralSettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GeneralSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
explicit GeneralSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~GeneralSettingsWidget();
|
~GeneralSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -23,7 +23,7 @@ private Q_SLOTS:
|
||||||
private:
|
private:
|
||||||
Ui::GeneralSettingsWidget m_ui;
|
Ui::GeneralSettingsWidget m_ui;
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const char* THEME_NAMES[];
|
static const char* THEME_NAMES[];
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "hotkeysettingswidget.h"
|
#include "hotkeysettingswidget.h"
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "util/input_manager.h"
|
#include "util/input_manager.h"
|
||||||
#include "inputbindingwidgets.h"
|
#include "inputbindingwidgets.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <QtWidgets/QScrollArea>
|
#include <QtWidgets/QScrollArea>
|
||||||
|
|
||||||
HotkeySettingsWidget::HotkeySettingsWidget(QWidget* parent, ControllerSettingsDialog* dialog)
|
HotkeySettingsWidget::HotkeySettingsWidget(QWidget* parent, ControllerSettingsWindow* dialog)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
createUi();
|
createUi();
|
||||||
|
|
|
@ -12,21 +12,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;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "inputbindingwidgets.h"
|
#include "inputbindingwidgets.h"
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "inputbindingdialog.h"
|
#include "inputbindingdialog.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
|
@ -401,7 +401,7 @@ InputVibrationBindingWidget::InputVibrationBindingWidget(QWidget* parent)
|
||||||
connect(this, &QPushButton::clicked, this, &InputVibrationBindingWidget::onClicked);
|
connect(this, &QPushButton::clicked, this, &InputVibrationBindingWidget::onClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputVibrationBindingWidget::InputVibrationBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog,
|
InputVibrationBindingWidget::InputVibrationBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog,
|
||||||
std::string section_name, std::string key_name)
|
std::string section_name, std::string key_name)
|
||||||
{
|
{
|
||||||
setMinimumWidth(225);
|
setMinimumWidth(225);
|
||||||
|
@ -416,7 +416,7 @@ InputVibrationBindingWidget::~InputVibrationBindingWidget()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputVibrationBindingWidget::setKey(ControllerSettingsDialog* dialog, std::string section_name,
|
void InputVibrationBindingWidget::setKey(ControllerSettingsWindow* dialog, std::string section_name,
|
||||||
std::string key_name)
|
std::string key_name)
|
||||||
{
|
{
|
||||||
m_dialog = dialog;
|
m_dialog = dialog;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
class QTimer;
|
class QTimer;
|
||||||
|
|
||||||
class ControllerSettingsDialog;
|
class ControllerSettingsWindow;
|
||||||
class SettingsInterface;
|
class SettingsInterface;
|
||||||
|
|
||||||
class InputBindingWidget : public QPushButton
|
class InputBindingWidget : public QPushButton
|
||||||
|
@ -77,11 +77,11 @@ class InputVibrationBindingWidget : public QPushButton
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InputVibrationBindingWidget(QWidget* parent);
|
InputVibrationBindingWidget(QWidget* parent);
|
||||||
InputVibrationBindingWidget(QWidget* parent, ControllerSettingsDialog* dialog, std::string section_name,
|
InputVibrationBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, std::string section_name,
|
||||||
std::string key_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();
|
||||||
|
@ -97,5 +97,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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "memorycardeditordialog.h"
|
#include "memorycardeditordialog.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "core/achievements.h"
|
#include "core/achievements.h"
|
||||||
|
@ -130,6 +130,7 @@ MainWindow::~MainWindow()
|
||||||
Assert(!m_display_widget);
|
Assert(!m_display_widget);
|
||||||
Assert(!m_debugger_window);
|
Assert(!m_debugger_window);
|
||||||
cancelGameListRefresh();
|
cancelGameListRefresh();
|
||||||
|
destroySubWindows();
|
||||||
|
|
||||||
// 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)
|
||||||
|
@ -730,6 +731,30 @@ void MainWindow::recreate()
|
||||||
g_emu_thread->reloadInputSources();
|
g_emu_thread->reloadInputSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_settings_window)
|
||||||
|
{
|
||||||
|
m_settings_window->close();
|
||||||
|
m_settings_window->deleteLater();
|
||||||
|
m_settings_window = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu)
|
void MainWindow::populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu)
|
||||||
{
|
{
|
||||||
QAction* resume_action = menu->addAction(tr("Resume"));
|
QAction* resume_action = menu->addAction(tr("Resume"));
|
||||||
|
@ -1269,7 +1294,7 @@ void MainWindow::onViewGamePropertiesActionTriggered()
|
||||||
if (path.empty() || serial.empty())
|
if (path.empty() || serial.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SettingsDialog::openGamePropertiesDialog(path, serial, System::GetDiscRegion());
|
SettingsWindow::openGamePropertiesDialog(path, serial, System::GetDiscRegion());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onGitHubRepositoryActionTriggered()
|
void MainWindow::onGitHubRepositoryActionTriggered()
|
||||||
|
@ -1368,7 +1393,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
|
||||||
{
|
{
|
||||||
QAction* action = menu.addAction(tr("Properties..."));
|
QAction* action = menu.addAction(tr("Properties..."));
|
||||||
connect(action, &QAction::triggered,
|
connect(action, &QAction::triggered,
|
||||||
[entry]() { SettingsDialog::openGamePropertiesDialog(entry->path, entry->serial, entry->region); });
|
[entry]() { SettingsWindow::openGamePropertiesDialog(entry->path, entry->serial, entry->region); });
|
||||||
|
|
||||||
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {
|
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {
|
||||||
const QFileInfo fi(QString::fromStdString(entry->path));
|
const QFileInfo fi(QString::fromStdString(entry->path));
|
||||||
|
@ -1951,9 +1976,9 @@ void MainWindow::connectSignals()
|
||||||
connect(m_ui.actionEmulationSettings, &QAction::triggered, [this]() { doSettings("Emulation"); });
|
connect(m_ui.actionEmulationSettings, &QAction::triggered, [this]() { doSettings("Emulation"); });
|
||||||
connect(m_ui.actionGameListSettings, &QAction::triggered, [this]() { doSettings("Game List"); });
|
connect(m_ui.actionGameListSettings, &QAction::triggered, [this]() { doSettings("Game List"); });
|
||||||
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.actionControllerSettings, &QAction::triggered,
|
connect(m_ui.actionControllerSettings, &QAction::triggered,
|
||||||
[this]() { doControllerSettings(ControllerSettingsDialog::Category::GlobalSettings); });
|
[this]() { doControllerSettings(ControllerSettingsWindow::Category::GlobalSettings); });
|
||||||
connect(m_ui.actionMemoryCardSettings, &QAction::triggered, [this]() { doSettings("Memory Cards"); });
|
connect(m_ui.actionMemoryCardSettings, &QAction::triggered, [this]() { doSettings("Memory Cards"); });
|
||||||
connect(m_ui.actionDisplaySettings, &QAction::triggered, [this]() { doSettings("Display"); });
|
connect(m_ui.actionDisplaySettings, &QAction::triggered, [this]() { doSettings("Display"); });
|
||||||
connect(m_ui.actionEnhancementSettings, &QAction::triggered, [this]() { doSettings("Enhancements"); });
|
connect(m_ui.actionEnhancementSettings, &QAction::triggered, [this]() { doSettings("Enhancements"); });
|
||||||
|
@ -1972,7 +1997,8 @@ void MainWindow::connectSignals()
|
||||||
connect(m_ui.actionGitHubRepository, &QAction::triggered, this, &MainWindow::onGitHubRepositoryActionTriggered);
|
connect(m_ui.actionGitHubRepository, &QAction::triggered, this, &MainWindow::onGitHubRepositoryActionTriggered);
|
||||||
connect(m_ui.actionIssueTracker, &QAction::triggered, this, &MainWindow::onIssueTrackerActionTriggered);
|
connect(m_ui.actionIssueTracker, &QAction::triggered, this, &MainWindow::onIssueTrackerActionTriggered);
|
||||||
connect(m_ui.actionDiscordServer, &QAction::triggered, this, &MainWindow::onDiscordServerActionTriggered);
|
connect(m_ui.actionDiscordServer, &QAction::triggered, this, &MainWindow::onDiscordServerActionTriggered);
|
||||||
connect(m_ui.actionViewThirdPartyNotices, &QAction::triggered, this, [this]() { AboutDialog::showThirdPartyNotices(this); });
|
connect(m_ui.actionViewThirdPartyNotices, &QAction::triggered, this,
|
||||||
|
[this]() { AboutDialog::showThirdPartyNotices(this); });
|
||||||
connect(m_ui.actionAboutQt, &QAction::triggered, qApp, &QApplication::aboutQt);
|
connect(m_ui.actionAboutQt, &QAction::triggered, qApp, &QApplication::aboutQt);
|
||||||
connect(m_ui.actionAbout, &QAction::triggered, this, &MainWindow::onAboutActionTriggered);
|
connect(m_ui.actionAbout, &QAction::triggered, this, &MainWindow::onAboutActionTriggered);
|
||||||
connect(m_ui.actionCheckForUpdates, &QAction::triggered, this, &MainWindow::onCheckForUpdatesActionTriggered);
|
connect(m_ui.actionCheckForUpdates, &QAction::triggered, this, &MainWindow::onCheckForUpdatesActionTriggered);
|
||||||
|
@ -2219,20 +2245,28 @@ void MainWindow::setIconThemeFromSettings()
|
||||||
QIcon::setThemeName(dark ? QStringLiteral("white") : QStringLiteral("black"));
|
QIcon::setThemeName(dark ? QStringLiteral("white") : QStringLiteral("black"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSettingsResetToDefault()
|
void MainWindow::onSettingsResetToDefault(bool system, bool controller)
|
||||||
{
|
{
|
||||||
if (m_settings_dialog)
|
if (system && m_settings_window)
|
||||||
{
|
{
|
||||||
const bool shown = m_settings_dialog->isVisible();
|
const bool had_settings_window = m_settings_window->isVisible();
|
||||||
|
m_settings_window->close();
|
||||||
|
m_settings_window->deleteLater();
|
||||||
|
m_settings_window = nullptr;
|
||||||
|
|
||||||
m_settings_dialog->hide();
|
if (had_settings_window)
|
||||||
m_settings_dialog->deleteLater();
|
doSettings();
|
||||||
m_settings_dialog = new SettingsDialog(this);
|
|
||||||
if (shown)
|
|
||||||
{
|
|
||||||
m_settings_dialog->setModal(false);
|
|
||||||
m_settings_dialog->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (controller && m_controller_settings_window)
|
||||||
|
{
|
||||||
|
const bool had_controller_settings_window = m_controller_settings_window->isVisible();
|
||||||
|
m_controller_settings_window->close();
|
||||||
|
m_controller_settings_window->deleteLater();
|
||||||
|
m_controller_settings_window = nullptr;
|
||||||
|
|
||||||
|
if (had_controller_settings_window)
|
||||||
|
doControllerSettings(ControllerSettingsWindow::Category::GlobalSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDebugMenuCPUExecutionMode();
|
updateDebugMenuCPUExecutionMode();
|
||||||
|
@ -2285,55 +2319,49 @@ void MainWindow::restoreDisplayWindowGeometryFromConfig()
|
||||||
container->resize(640, 480);
|
container->resize(640, 480);
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsDialog* MainWindow::getSettingsDialog()
|
SettingsWindow* MainWindow::getSettingsDialog()
|
||||||
{
|
{
|
||||||
if (!m_settings_dialog)
|
if (!m_settings_window)
|
||||||
m_settings_dialog = new SettingsDialog(this);
|
m_settings_window = new SettingsWindow();
|
||||||
|
|
||||||
return m_settings_dialog;
|
return m_settings_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::doSettings(const char* category /* = nullptr */)
|
void MainWindow::doSettings(const char* category /* = nullptr */)
|
||||||
{
|
{
|
||||||
SettingsDialog* dlg = getSettingsDialog();
|
SettingsWindow* dlg = getSettingsDialog();
|
||||||
if (!dlg->isVisible())
|
if (!dlg->isVisible())
|
||||||
{
|
{
|
||||||
dlg->setModal(false);
|
|
||||||
dlg->show();
|
dlg->show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dlg->raise();
|
dlg->raise();
|
||||||
|
dlg->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category)
|
if (category)
|
||||||
dlg->setCategory(category);
|
dlg->setCategory(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllerSettingsDialog* MainWindow::getControllerSettingsDialog()
|
|
||||||
{
|
|
||||||
if (!m_controller_settings_dialog)
|
|
||||||
m_controller_settings_dialog = new ControllerSettingsDialog(this);
|
|
||||||
|
|
||||||
return m_controller_settings_dialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::doControllerSettings(
|
void MainWindow::doControllerSettings(
|
||||||
ControllerSettingsDialog::Category category /*= ControllerSettingsDialog::Category::Count*/)
|
ControllerSettingsWindow::Category category /*= ControllerSettingsDialog::Category::Count*/)
|
||||||
{
|
{
|
||||||
ControllerSettingsDialog* dlg = getControllerSettingsDialog();
|
if (!m_controller_settings_window)
|
||||||
if (!dlg->isVisible())
|
m_controller_settings_window = new ControllerSettingsWindow();
|
||||||
|
|
||||||
|
if (!m_controller_settings_window->isVisible())
|
||||||
{
|
{
|
||||||
dlg->setModal(false);
|
m_controller_settings_window->show();
|
||||||
dlg->show();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dlg->raise();
|
m_controller_settings_window->raise();
|
||||||
|
m_controller_settings_window->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category != ControllerSettingsDialog::Category::Count)
|
if (category != ControllerSettingsWindow::Category::Count)
|
||||||
dlg->setCategory(category);
|
m_controller_settings_window->setCategory(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateDebugMenuCPUExecutionMode()
|
void MainWindow::updateDebugMenuCPUExecutionMode()
|
||||||
|
@ -2426,6 +2454,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
{
|
{
|
||||||
saveGeometryToConfig();
|
saveGeometryToConfig();
|
||||||
g_emu_thread->stopFullscreenUI();
|
g_emu_thread->stopFullscreenUI();
|
||||||
|
destroySubWindows();
|
||||||
QMainWindow::closeEvent(event);
|
QMainWindow::closeEvent(event);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "controllersettingsdialog.h"
|
#include "controllersettingswindow.h"
|
||||||
#include "displaywidget.h"
|
#include "displaywidget.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include "core/types.h"
|
#include "core/types.h"
|
||||||
|
@ -121,7 +121,7 @@ private Q_SLOTS:
|
||||||
void focusDisplayWidget();
|
void focusDisplayWidget();
|
||||||
void onMouseModeRequested(bool relative_mode, bool hide_cursor);
|
void onMouseModeRequested(bool relative_mode, bool hide_cursor);
|
||||||
|
|
||||||
void onSettingsResetToDefault();
|
void onSettingsResetToDefault(bool system, bool controller);
|
||||||
void onSystemStarting();
|
void onSystemStarting();
|
||||||
void onSystemStarted();
|
void onSystemStarted();
|
||||||
void onSystemDestroyed();
|
void onSystemDestroyed();
|
||||||
|
@ -227,11 +227,10 @@ private:
|
||||||
void updateDisplayWidgetCursor();
|
void updateDisplayWidgetCursor();
|
||||||
void updateDisplayRelatedActions(bool has_surface, bool render_to_main, bool fullscreen);
|
void updateDisplayRelatedActions(bool has_surface, bool render_to_main, bool fullscreen);
|
||||||
|
|
||||||
SettingsDialog* getSettingsDialog();
|
SettingsWindow* getSettingsDialog();
|
||||||
void doSettings(const char* category = nullptr);
|
void doSettings(const char* category = nullptr);
|
||||||
|
|
||||||
ControllerSettingsDialog* getControllerSettingsDialog();
|
void doControllerSettings(ControllerSettingsWindow::Category category = ControllerSettingsWindow::Category::Count);
|
||||||
void doControllerSettings(ControllerSettingsDialog::Category category = ControllerSettingsDialog::Category::Count);
|
|
||||||
|
|
||||||
void updateDebugMenuCPUExecutionMode();
|
void updateDebugMenuCPUExecutionMode();
|
||||||
void updateDebugMenuGPURenderer();
|
void updateDebugMenuGPURenderer();
|
||||||
|
@ -244,6 +243,7 @@ private:
|
||||||
void updateTheme();
|
void updateTheme();
|
||||||
void reloadThemeSpecificImages();
|
void reloadThemeSpecificImages();
|
||||||
void recreate();
|
void recreate();
|
||||||
|
void destroySubWindows();
|
||||||
|
|
||||||
void registerForDeviceNotifications();
|
void registerForDeviceNotifications();
|
||||||
void unregisterForDeviceNotifications();
|
void unregisterForDeviceNotifications();
|
||||||
|
@ -280,8 +280,8 @@ private:
|
||||||
|
|
||||||
QMenu* m_settings_toolbar_menu = nullptr;
|
QMenu* m_settings_toolbar_menu = nullptr;
|
||||||
|
|
||||||
SettingsDialog* m_settings_dialog = nullptr;
|
SettingsWindow* m_settings_window = nullptr;
|
||||||
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;
|
ControllerSettingsWindow* m_controller_settings_window = nullptr;
|
||||||
|
|
||||||
AutoUpdaterDialog* m_auto_updater_dialog = nullptr;
|
AutoUpdaterDialog* m_auto_updater_dialog = nullptr;
|
||||||
MemoryCardEditorDialog* m_memory_card_editor_dialog = nullptr;
|
MemoryCardEditorDialog* m_memory_card_editor_dialog = nullptr;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
#include "common/small_string.h"
|
#include "common/small_string.h"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
static constexpr char MEMORY_CARD_IMAGE_FILTER[] =
|
static constexpr char MEMORY_CARD_IMAGE_FILTER[] =
|
||||||
QT_TRANSLATE_NOOP("MemoryCardSettingsWidget", "All Memory Card Types (*.mcd *.mcr *.mc)");
|
QT_TRANSLATE_NOOP("MemoryCardSettingsWidget", "All Memory Card Types (*.mcd *.mcr *.mc)");
|
||||||
|
|
||||||
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
createUi(dialog);
|
createUi(dialog);
|
||||||
|
@ -30,7 +30,7 @@ MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsDialog* dialog, QWidg
|
||||||
|
|
||||||
MemoryCardSettingsWidget::~MemoryCardSettingsWidget() = default;
|
MemoryCardSettingsWidget::~MemoryCardSettingsWidget() = default;
|
||||||
|
|
||||||
void MemoryCardSettingsWidget::createUi(SettingsDialog* dialog)
|
void MemoryCardSettingsWidget::createUi(SettingsWindow* dialog)
|
||||||
{
|
{
|
||||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
@ -113,7 +113,7 @@ void MemoryCardSettingsWidget::createUi(SettingsDialog* dialog)
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryCardSettingsWidget::createPortSettingsUi(SettingsDialog* dialog, int index, PortSettingsUI* ui)
|
void MemoryCardSettingsWidget::createPortSettingsUi(SettingsWindow* dialog, int index, PortSettingsUI* ui)
|
||||||
{
|
{
|
||||||
ui->container = new QGroupBox(tr("Memory Card %1").arg(index + 1), this);
|
ui->container = new QGroupBox(tr("Memory Card %1").arg(index + 1), this);
|
||||||
ui->layout = new QVBoxLayout(ui->container);
|
ui->layout = new QVBoxLayout(ui->container);
|
||||||
|
|
|
@ -12,18 +12,18 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
|
|
||||||
class MemoryCardSettingsWidget : public QWidget
|
class MemoryCardSettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~MemoryCardSettingsWidget();
|
~MemoryCardSettingsWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
|
|
||||||
struct PortSettingsUI
|
struct PortSettingsUI
|
||||||
{
|
{
|
||||||
|
@ -33,8 +33,8 @@ private:
|
||||||
QLineEdit* memory_card_path;
|
QLineEdit* memory_card_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
void createUi(SettingsDialog* dialog);
|
void createUi(SettingsWindow* dialog);
|
||||||
void createPortSettingsUi(SettingsDialog* dialog, int index, PortSettingsUI* ui);
|
void createPortSettingsUi(SettingsWindow* dialog, int index, PortSettingsUI* ui);
|
||||||
void onBrowseMemoryCardPathClicked(int index);
|
void onBrowseMemoryCardPathClicked(int index);
|
||||||
void onResetMemoryCardPathClicked(int index);
|
void onResetMemoryCardPathClicked(int index);
|
||||||
void onMemoryCardPathChanged(int index);
|
void onMemoryCardPathChanged(int index);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <QtWidgets/QSlider>
|
#include <QtWidgets/QSlider>
|
||||||
|
|
||||||
PostProcessingSettingsWidget::PostProcessingSettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
PostProcessingSettingsWidget::PostProcessingSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||||
: QWidget(parent), m_dialog(dialog)
|
: QWidget(parent), m_dialog(dialog)
|
||||||
{
|
{
|
||||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <QtWidgets/QWidget>
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
class SettingsDialog;
|
class SettingsWindow;
|
||||||
class PostProcessingShaderConfigWidget;
|
class PostProcessingShaderConfigWidget;
|
||||||
|
|
||||||
class PostProcessingSettingsWidget : public QWidget
|
class PostProcessingSettingsWidget : public QWidget
|
||||||
|
@ -19,7 +19,7 @@ class PostProcessingSettingsWidget : public QWidget
|
||||||
friend PostProcessingShaderConfigWidget;
|
friend PostProcessingShaderConfigWidget;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PostProcessingSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
PostProcessingSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
~PostProcessingSettingsWidget();
|
~PostProcessingSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
@ -42,7 +42,7 @@ private:
|
||||||
void updateList(const SettingsInterface& si);
|
void updateList(const SettingsInterface& si);
|
||||||
void updateList();
|
void updateList();
|
||||||
|
|
||||||
SettingsDialog* m_dialog;
|
SettingsWindow* m_dialog;
|
||||||
|
|
||||||
Ui::PostProcessingSettingsWidget m_ui;
|
Ui::PostProcessingSettingsWidget m_ui;
|
||||||
|
|
||||||
|
|
|
@ -386,7 +386,7 @@ void EmuThread::setDefaultSettings(bool system /* = true */, bool controller /*
|
||||||
applySettings(false);
|
applySettings(false);
|
||||||
|
|
||||||
if (system)
|
if (system)
|
||||||
emit settingsResetToDefault();
|
emit settingsResetToDefault(system, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtHost::SetDefaultSettings(SettingsInterface& si, bool system, bool controller)
|
void QtHost::SetDefaultSettings(SettingsInterface& si, bool system, bool controller)
|
||||||
|
|
|
@ -121,7 +121,7 @@ Q_SIGNALS:
|
||||||
void errorReported(const QString& title, const QString& message);
|
void errorReported(const QString& title, const QString& message);
|
||||||
bool messageConfirmed(const QString& title, const QString& message);
|
bool messageConfirmed(const QString& title, const QString& message);
|
||||||
void debuggerMessageReported(const QString& message);
|
void debuggerMessageReported(const QString& message);
|
||||||
void settingsResetToDefault();
|
void settingsResetToDefault(bool system, bool controller);
|
||||||
void onInputDevicesEnumerated(const QList<QPair<QString, QString>>& devices);
|
void onInputDevicesEnumerated(const QList<QPair<QString, QString>>& devices);
|
||||||
void onInputDeviceConnected(const QString& identifier, const QString& device_name);
|
void onInputDeviceConnected(const QString& identifier, const QString& device_name);
|
||||||
void onInputDeviceDisconnected(const QString& identifier);
|
void onInputDeviceDisconnected(const QString& identifier);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
#include "advancedsettingswidget.h"
|
#include "advancedsettingswidget.h"
|
||||||
#include "audiosettingswidget.h"
|
#include "audiosettingswidget.h"
|
||||||
#include "biossettingswidget.h"
|
#include "biossettingswidget.h"
|
||||||
|
@ -31,19 +31,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) : QDialog(parent)
|
SettingsWindow::SettingsWindow() : QWidget()
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
addPages();
|
addPages();
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsDialog::SettingsDialog(const std::string& path, const std::string& serial, DiscRegion region,
|
SettingsWindow::SettingsWindow(const std::string& path, const std::string& serial, DiscRegion region,
|
||||||
const GameDatabase::Entry* entry, std::unique_ptr<SettingsInterface> sif,
|
const GameDatabase::Entry* entry, std::unique_ptr<SettingsInterface> sif)
|
||||||
QWidget* parent)
|
: QWidget(), m_sif(std::move(sif))
|
||||||
: QDialog(parent), m_sif(std::move(sif))
|
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
@ -57,13 +56,13 @@ SettingsDialog::SettingsDialog(const std::string& path, const std::string& seria
|
||||||
s_open_game_properties_dialogs.push_back(this);
|
s_open_game_properties_dialogs.push_back(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsDialog::~SettingsDialog()
|
SettingsWindow::~SettingsWindow()
|
||||||
{
|
{
|
||||||
if (isPerGameSettings())
|
if (isPerGameSettings())
|
||||||
s_open_game_properties_dialogs.removeOne(this);
|
s_open_game_properties_dialogs.removeOne(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::addPages()
|
void SettingsWindow::addPages()
|
||||||
{
|
{
|
||||||
addWidget(m_general_settings = new GeneralSettingsWidget(this, m_ui.settingsContainer), tr("General"),
|
addWidget(m_general_settings = new GeneralSettingsWidget(this, m_ui.settingsContainer), tr("General"),
|
||||||
QStringLiteral("settings-3-line"),
|
QStringLiteral("settings-3-line"),
|
||||||
|
@ -164,13 +163,13 @@ void SettingsDialog::addPages()
|
||||||
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.buttonBox, &QDialogButtonBox::rejected, this, &SettingsDialog::accept);
|
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &SettingsWindow::close);
|
||||||
connect(m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, this,
|
connect(m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, this,
|
||||||
&SettingsDialog::onRestoreDefaultsClicked);
|
&SettingsWindow::onRestoreDefaultsClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
|
@ -184,7 +183,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::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(tr(category));
|
const QString translated_category(tr(category));
|
||||||
|
@ -200,14 +199,14 @@ void SettingsDialog::setCategory(const char* category)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::onCategoryCurrentRowChanged(int row)
|
void SettingsWindow::onCategoryCurrentRowChanged(int row)
|
||||||
{
|
{
|
||||||
DebugAssert(row < static_cast<int>(MAX_SETTINGS_WIDGETS));
|
DebugAssert(row < static_cast<int>(MAX_SETTINGS_WIDGETS));
|
||||||
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()
|
||||||
{
|
{
|
||||||
if (QMessageBox::question(this, tr("Confirm Restore Defaults"),
|
if (QMessageBox::question(this, tr("Confirm Restore Defaults"),
|
||||||
tr("Are you sure you want to restore the default settings? Any preferences will be lost."),
|
tr("Are you sure you want to restore the default settings? Any preferences will be lost."),
|
||||||
|
@ -219,7 +218,7 @@ void SettingsDialog::onRestoreDefaultsClicked()
|
||||||
g_emu_thread->setDefaultSettings(true, false);
|
g_emu_thread->setDefaultSettings(true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text)
|
void SettingsWindow::registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text)
|
||||||
{
|
{
|
||||||
// construct rich text with formatted description
|
// construct rich text with formatted description
|
||||||
QString full_text;
|
QString full_text;
|
||||||
|
@ -236,7 +235,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)
|
||||||
{
|
{
|
||||||
|
@ -256,10 +255,10 @@ bool SettingsDialog::eventFilter(QObject* object, QEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QDialog::eventFilter(object, event);
|
return QWidget::eventFilter(object, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
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))
|
||||||
|
@ -268,7 +267,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))
|
||||||
|
@ -277,7 +276,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))
|
||||||
|
@ -286,7 +285,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,
|
std::string SettingsWindow::getEffectiveStringValue(const char* section, const char* key,
|
||||||
const char* default_value) const
|
const char* default_value) const
|
||||||
{
|
{
|
||||||
std::string value;
|
std::string value;
|
||||||
|
@ -295,7 +294,7 @@ std::string SettingsDialog::getEffectiveStringValue(const char* section, const c
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::CheckState SettingsDialog::getCheckState(const char* section, const char* key, bool default_value)
|
Qt::CheckState SettingsWindow::getCheckState(const char* section, const char* key, bool default_value)
|
||||||
{
|
{
|
||||||
bool value;
|
bool value;
|
||||||
if (m_sif)
|
if (m_sif)
|
||||||
|
@ -311,7 +310,7 @@ Qt::CheckState SettingsDialog::getCheckState(const char* section, const char* ke
|
||||||
return value ? Qt::Checked : Qt::Unchecked;
|
return value ? Qt::Checked : Qt::Unchecked;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<bool> SettingsDialog::getBoolValue(const char* section, const char* key,
|
std::optional<bool> SettingsWindow::getBoolValue(const char* section, const char* key,
|
||||||
std::optional<bool> default_value) const
|
std::optional<bool> default_value) const
|
||||||
{
|
{
|
||||||
std::optional<bool> value;
|
std::optional<bool> value;
|
||||||
|
@ -331,7 +330,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> SettingsWindow::getIntValue(const char* section, const char* key,
|
||||||
std::optional<int> default_value) const
|
std::optional<int> default_value) const
|
||||||
{
|
{
|
||||||
std::optional<int> value;
|
std::optional<int> value;
|
||||||
|
@ -351,7 +350,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> SettingsWindow::getFloatValue(const char* section, const char* key,
|
||||||
std::optional<float> default_value) const
|
std::optional<float> default_value) const
|
||||||
{
|
{
|
||||||
std::optional<float> value;
|
std::optional<float> value;
|
||||||
|
@ -371,7 +370,7 @@ std::optional<float> SettingsDialog::getFloatValue(const char* section, const ch
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::string> SettingsDialog::getStringValue(const char* section, const char* key,
|
std::optional<std::string> SettingsWindow::getStringValue(const char* section, const char* key,
|
||||||
std::optional<const char*> default_value) const
|
std::optional<const char*> default_value) const
|
||||||
{
|
{
|
||||||
std::optional<std::string> value;
|
std::optional<std::string> value;
|
||||||
|
@ -391,7 +390,7 @@ std::optional<std::string> SettingsDialog::getStringValue(const char* section, c
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
@ -408,7 +407,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)
|
||||||
{
|
{
|
||||||
|
@ -425,7 +424,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)
|
||||||
{
|
{
|
||||||
|
@ -442,7 +441,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)
|
||||||
{
|
{
|
||||||
|
@ -459,7 +458,7 @@ void SettingsDialog::setStringSettingValue(const char* section, const char* 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)
|
||||||
{
|
{
|
||||||
|
@ -475,10 +474,10 @@ void SettingsDialog::removeSettingValue(const char* section, const char* key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region)
|
void SettingsWindow::openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region)
|
||||||
{
|
{
|
||||||
// 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_game_serial == serial)
|
if (dialog->m_game_serial == serial)
|
||||||
{
|
{
|
||||||
|
@ -499,8 +498,7 @@ void SettingsDialog::openGamePropertiesDialog(const std::string& path, const std
|
||||||
.arg(dentry ? QtUtils::StringViewToQString(dentry->title) : QStringLiteral("<UNKNOWN>"))
|
.arg(dentry ? QtUtils::StringViewToQString(dentry->title) : QStringLiteral("<UNKNOWN>"))
|
||||||
.arg(QtUtils::StringViewToQString(serial)));
|
.arg(QtUtils::StringViewToQString(serial)));
|
||||||
|
|
||||||
SettingsDialog* dialog = new SettingsDialog(path, serial, region, dentry, std::move(sif), g_main_window);
|
SettingsWindow* dialog = new SettingsWindow(path, serial, region, dentry, std::move(sif));
|
||||||
dialog->setWindowTitle(window_title);
|
dialog->setWindowTitle(window_title);
|
||||||
dialog->setModal(false);
|
|
||||||
dialog->show();
|
dialog->show();
|
||||||
}
|
}
|
|
@ -1,9 +1,11 @@
|
||||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "ui_settingswindow.h"
|
||||||
|
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
#include "ui_settingsdialog.h"
|
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtWidgets/QDialog>
|
#include <QtWidgets/QDialog>
|
||||||
|
@ -31,15 +33,15 @@ class AchievementSettingsWidget;
|
||||||
class FolderSettingsWidget;
|
class FolderSettingsWidget;
|
||||||
class AdvancedSettingsWidget;
|
class AdvancedSettingsWidget;
|
||||||
|
|
||||||
class SettingsDialog final : public QDialog
|
class SettingsWindow final : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SettingsDialog(QWidget* parent);
|
SettingsWindow();
|
||||||
SettingsDialog(const std::string& path, const std::string& serial, DiscRegion region,
|
SettingsWindow(const std::string& path, const std::string& serial, DiscRegion region,
|
||||||
const GameDatabase::Entry* entry, std::unique_ptr<SettingsInterface> sif, QWidget* parent);
|
const GameDatabase::Entry* entry, std::unique_ptr<SettingsInterface> sif);
|
||||||
~SettingsDialog();
|
~SettingsWindow();
|
||||||
|
|
||||||
static void openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region);
|
static void openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region);
|
||||||
|
|
||||||
|
@ -101,7 +103,7 @@ private:
|
||||||
void addPages();
|
void addPages();
|
||||||
void addWidget(QWidget* widget, QString title, QString icon, QString help_text);
|
void addWidget(QWidget* widget, QString title, QString icon, QString help_text);
|
||||||
|
|
||||||
Ui::SettingsDialog m_ui;
|
Ui::SettingsWindow m_ui;
|
||||||
|
|
||||||
std::unique_ptr<SettingsInterface> m_sif;
|
std::unique_ptr<SettingsInterface> m_sif;
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
<?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">
|
|
||||||
<enum>Qt::WindowModal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "qthost.h"
|
#include "qthost.h"
|
||||||
#include "qtutils.h"
|
#include "qtutils.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingswindow.h"
|
||||||
|
|
||||||
#include "core/host.h"
|
#include "core/host.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
|
|
Loading…
Reference in a new issue