mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #13736 from jordan-woyak/main-config-gfx
DolphinQt: Move graphics config to main Settings window.
This commit is contained in:
@ -32,4 +32,5 @@ void ControllersPane::CreateMainLayout()
|
||||
layout->addWidget(gamecube_controllers);
|
||||
layout->addWidget(m_wiimote_controllers);
|
||||
layout->addWidget(common);
|
||||
layout->addStretch(1);
|
||||
}
|
||||
|
@ -28,10 +28,7 @@
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
|
||||
#include "DolphinQt/Config/GameConfigEdit.h"
|
||||
#include "DolphinQt/Config/Graphics/AdvancedWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/EnhancementsWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/GeneralWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/HacksWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/QtUtils/QtUtils.h"
|
||||
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
|
||||
|
||||
@ -197,21 +194,10 @@ void GameConfigWidget::CreateWidgets()
|
||||
auto* tab_widget = new QTabWidget;
|
||||
tab_widget->addTab(general_widget, tr("General"));
|
||||
|
||||
// GFX settings tabs. Placed in a QWidget for consistent margins.
|
||||
auto* gfx_tab_holder = new QWidget;
|
||||
auto* gfx_layout = new QVBoxLayout;
|
||||
gfx_tab_holder->setLayout(gfx_layout);
|
||||
tab_widget->addTab(gfx_tab_holder, tr("Graphics"));
|
||||
auto* const gfx_widget = new GraphicsPane{nullptr, m_layer.get()};
|
||||
tab_widget->addTab(gfx_widget, tr("Graphics"));
|
||||
|
||||
auto* gfx_tabs = new QTabWidget;
|
||||
|
||||
gfx_tabs->addTab(GetWrappedWidget(new GeneralWidget(this, m_layer.get())), tr("General"));
|
||||
gfx_tabs->addTab(GetWrappedWidget(new EnhancementsWidget(this, m_layer.get())),
|
||||
tr("Enhancements"));
|
||||
gfx_tabs->addTab(GetWrappedWidget(new HacksWidget(this, m_layer.get())), tr("Hacks"));
|
||||
gfx_tabs->addTab(GetWrappedWidget(new AdvancedWidget(this, m_layer.get())), tr("Advanced"));
|
||||
const int editor_index = tab_widget->addTab(advanced_widget, tr("Editor"));
|
||||
gfx_layout->addWidget(gfx_tabs);
|
||||
|
||||
connect(tab_widget, &QTabWidget::currentChanged, this, [this, editor_index](int index) {
|
||||
// Update the ini editor after editing other tabs.
|
||||
|
@ -18,43 +18,28 @@
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
|
||||
#include "DolphinQt/Config/GameConfigWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
AdvancedWidget::AdvancedWidget(GraphicsWindow* parent)
|
||||
AdvancedWidget::AdvancedWidget(GraphicsPane* gfx_pane) : m_game_layer{gfx_pane->GetConfigLayer()}
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
|
||||
connect(parent, &GraphicsWindow::BackendChanged, this, &AdvancedWidget::OnBackendChanged);
|
||||
connect(gfx_pane, &GraphicsPane::BackendChanged, this, &AdvancedWidget::OnBackendChanged);
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
||||
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
||||
});
|
||||
connect(m_manual_texture_sampling, &QCheckBox::toggled,
|
||||
[parent] { emit parent->UseFastTextureSamplingChanged(); });
|
||||
[gfx_pane] { emit gfx_pane->UseFastTextureSamplingChanged(); });
|
||||
|
||||
OnBackendChanged();
|
||||
OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance()));
|
||||
}
|
||||
|
||||
AdvancedWidget::AdvancedWidget(GameConfigWidget* parent, Config::Layer* layer) : m_game_layer(layer)
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
||||
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
||||
});
|
||||
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()) !=
|
||||
Core::State::Uninitialized);
|
||||
}
|
||||
|
||||
void AdvancedWidget::CreateWidgets()
|
||||
{
|
||||
const bool local_edit = m_game_layer != nullptr;
|
||||
|
@ -8,8 +8,7 @@
|
||||
class ConfigBool;
|
||||
class ConfigChoice;
|
||||
class ConfigInteger;
|
||||
class GameConfigWidget;
|
||||
class GraphicsWindow;
|
||||
class GraphicsPane;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
@ -20,8 +19,7 @@ class AdvancedWidget final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AdvancedWidget(GraphicsWindow* parent);
|
||||
AdvancedWidget(GameConfigWidget* parent, Config::Layer* layer);
|
||||
explicit AdvancedWidget(GraphicsPane* gfx_pane);
|
||||
|
||||
private:
|
||||
void CreateWidgets();
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "DolphinQt/Config/Graphics/EnhancementsWidget.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
@ -21,18 +19,18 @@
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
|
||||
#include "DolphinQt/Config/GameConfigWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/ColorCorrectionConfigWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipPushButton.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
|
||||
EnhancementsWidget::EnhancementsWidget(GraphicsPane* gfx_pane)
|
||||
: m_game_layer{gfx_pane->GetConfigLayer()}
|
||||
{
|
||||
CreateWidgets();
|
||||
LoadPPShaders();
|
||||
@ -40,27 +38,15 @@ EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
|
||||
AddDescriptions();
|
||||
|
||||
// BackendChanged is called by parent on window creation.
|
||||
connect(parent, &GraphicsWindow::BackendChanged, this, &EnhancementsWidget::OnBackendChanged);
|
||||
connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this, [this] {
|
||||
connect(gfx_pane, &GraphicsPane::BackendChanged, this, &EnhancementsWidget::OnBackendChanged);
|
||||
connect(gfx_pane, &GraphicsPane::UseFastTextureSamplingChanged, this, [this] {
|
||||
m_texture_filtering_combo->setEnabled(ReadSetting(Config::GFX_HACK_FAST_TEXTURE_SAMPLING));
|
||||
});
|
||||
connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this, [this] {
|
||||
connect(gfx_pane, &GraphicsPane::UseGPUTextureDecodingChanged, this, [this] {
|
||||
m_arbitrary_mipmap_detection->setEnabled(!ReadSetting(Config::GFX_ENABLE_GPU_TEXTURE_DECODING));
|
||||
});
|
||||
}
|
||||
|
||||
EnhancementsWidget::EnhancementsWidget(GameConfigWidget* parent, Config::Layer* layer)
|
||||
: m_game_layer(layer)
|
||||
{
|
||||
CreateWidgets();
|
||||
LoadPPShaders();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this,
|
||||
&EnhancementsWidget::OnConfigChanged);
|
||||
}
|
||||
|
||||
constexpr int ANISO_1x = Common::ToUnderlying(AnisotropicFilteringMode::Force1x);
|
||||
constexpr int ANISO_2X = Common::ToUnderlying(AnisotropicFilteringMode::Force2x);
|
||||
constexpr int ANISO_4X = Common::ToUnderlying(AnisotropicFilteringMode::Force4x);
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class ConfigBool;
|
||||
@ -12,11 +10,9 @@ class ConfigChoice;
|
||||
class ConfigComplexChoice;
|
||||
class ConfigStringChoice;
|
||||
class ConfigSlider;
|
||||
class GameConfigWidget;
|
||||
class GraphicsWindow;
|
||||
class GraphicsPane;
|
||||
class QPushButton;
|
||||
class ToolTipPushButton;
|
||||
enum class StereoMode : int;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
@ -29,8 +25,7 @@ class EnhancementsWidget final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EnhancementsWidget(GraphicsWindow* parent);
|
||||
EnhancementsWidget(GameConfigWidget* parent, Config::Layer* layer);
|
||||
explicit EnhancementsWidget(GraphicsPane* gfx_pane);
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
|
||||
#include "DolphinQt/Config/GameConfigWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
@ -32,26 +32,19 @@
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
GeneralWidget::GeneralWidget(GraphicsWindow* parent)
|
||||
GeneralWidget::GeneralWidget(GraphicsPane* gfx_pane) : m_game_layer{gfx_pane->GetConfigLayer()}
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
|
||||
connect(parent, &GraphicsWindow::BackendChanged, this, &GeneralWidget::OnBackendChanged);
|
||||
connect(gfx_pane, &GraphicsPane::BackendChanged, this, &GeneralWidget::OnBackendChanged);
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
||||
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
||||
});
|
||||
OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance()));
|
||||
}
|
||||
|
||||
GeneralWidget::GeneralWidget(GameConfigWidget* parent, Config::Layer* layer) : m_game_layer(layer)
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
}
|
||||
|
||||
void GeneralWidget::CreateWidgets()
|
||||
{
|
||||
auto* main_layout = new QVBoxLayout;
|
||||
|
@ -12,13 +12,8 @@ class ConfigChoice;
|
||||
class ConfigInteger;
|
||||
class ConfigRadioInt;
|
||||
class ConfigStringChoice;
|
||||
class GameConfigWidget;
|
||||
class GraphicsWindow;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class GraphicsPane;
|
||||
class QLabel;
|
||||
class QRadioButton;
|
||||
class QGridLayout;
|
||||
class ToolTipComboBox;
|
||||
|
||||
namespace Config
|
||||
@ -30,8 +25,7 @@ class GeneralWidget final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GeneralWidget(GraphicsWindow* parent);
|
||||
GeneralWidget(GameConfigWidget* parent, Config::Layer* layer);
|
||||
explicit GeneralWidget(GraphicsPane* gfx_pane);
|
||||
|
||||
signals:
|
||||
void BackendChanged(const QString& backend);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QEvent>
|
||||
@ -23,34 +23,32 @@
|
||||
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
|
||||
GraphicsWindow::GraphicsWindow(MainWindow* parent) : QDialog(parent), m_main_window(parent)
|
||||
GraphicsPane::GraphicsPane(MainWindow* main_window, Config::Layer* config_layer)
|
||||
: m_main_window(main_window), m_config_layer{config_layer}
|
||||
{
|
||||
CreateMainLayout();
|
||||
|
||||
setWindowTitle(tr("Graphics"));
|
||||
|
||||
OnBackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
||||
|
||||
QtUtils::AdjustSizeWithinScreen(this);
|
||||
}
|
||||
|
||||
void GraphicsWindow::CreateMainLayout()
|
||||
Config::Layer* GraphicsPane::GetConfigLayer()
|
||||
{
|
||||
auto* const main_layout = new QVBoxLayout();
|
||||
auto* const tab_widget = new QTabWidget();
|
||||
auto* const button_box = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||
return m_config_layer;
|
||||
}
|
||||
|
||||
connect(button_box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
void GraphicsPane::CreateMainLayout()
|
||||
{
|
||||
auto* const main_layout = new QVBoxLayout{this};
|
||||
auto* const tab_widget = new QTabWidget;
|
||||
|
||||
main_layout->addWidget(tab_widget);
|
||||
main_layout->addWidget(button_box);
|
||||
|
||||
auto* const general_widget = new GeneralWidget(this);
|
||||
auto* const enhancements_widget = new EnhancementsWidget(this);
|
||||
auto* const hacks_widget = new HacksWidget(this);
|
||||
auto* const advanced_widget = new AdvancedWidget(this);
|
||||
|
||||
connect(general_widget, &GeneralWidget::BackendChanged, this, &GraphicsWindow::OnBackendChanged);
|
||||
connect(general_widget, &GeneralWidget::BackendChanged, this, &GraphicsPane::OnBackendChanged);
|
||||
|
||||
QWidget* const wrapped_general = GetWrappedWidget(general_widget);
|
||||
QWidget* const wrapped_enhancements = GetWrappedWidget(enhancements_widget);
|
||||
@ -61,16 +59,13 @@ void GraphicsWindow::CreateMainLayout()
|
||||
tab_widget->addTab(wrapped_enhancements, tr("Enhancements"));
|
||||
tab_widget->addTab(wrapped_hacks, tr("Hacks"));
|
||||
tab_widget->addTab(wrapped_advanced, tr("Advanced"));
|
||||
|
||||
setLayout(main_layout);
|
||||
}
|
||||
|
||||
void GraphicsWindow::OnBackendChanged(const QString& backend_name)
|
||||
void GraphicsPane::OnBackendChanged(const QString& backend_name)
|
||||
{
|
||||
VideoBackendBase::PopulateBackendInfo(m_main_window->GetWindowSystemInfo());
|
||||
|
||||
setWindowTitle(
|
||||
tr("%1 Graphics Configuration").arg(tr(g_video_backend->GetDisplayName().c_str())));
|
||||
// TODO: Game properties graphics config does not properly handle backend info.
|
||||
if (m_main_window != nullptr)
|
||||
VideoBackendBase::PopulateBackendInfo(m_main_window->GetWindowSystemInfo());
|
||||
|
||||
emit BackendChanged(backend_name);
|
||||
}
|
@ -3,24 +3,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <QHash>
|
||||
#include <QWidget>
|
||||
|
||||
class AdvancedWidget;
|
||||
class EnhancementsWidget;
|
||||
class HacksWidget;
|
||||
class GeneralWidget;
|
||||
class MainWindow;
|
||||
class QLabel;
|
||||
class QTabWidget;
|
||||
class QDialogButtonBox;
|
||||
class SoftwareRendererWidget;
|
||||
|
||||
class GraphicsWindow final : public QDialog
|
||||
namespace Config
|
||||
{
|
||||
class Layer;
|
||||
} // namespace Config
|
||||
|
||||
class GraphicsPane final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GraphicsWindow(MainWindow* parent);
|
||||
explicit GraphicsPane(MainWindow* main_window, Config::Layer* config_layer);
|
||||
|
||||
Config::Layer* GetConfigLayer();
|
||||
|
||||
signals:
|
||||
void BackendChanged(const QString& backend);
|
||||
@ -32,4 +30,5 @@ private:
|
||||
void OnBackendChanged(const QString& backend);
|
||||
|
||||
MainWindow* const m_main_window;
|
||||
Config::Layer* const m_config_layer;
|
||||
};
|
@ -15,27 +15,20 @@
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
|
||||
#include "DolphinQt/Config/GameConfigWidget.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
HacksWidget::HacksWidget(GraphicsWindow* parent)
|
||||
HacksWidget::HacksWidget(GraphicsPane* gfx_pane) : m_game_layer{gfx_pane->GetConfigLayer()}
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
|
||||
connect(parent, &GraphicsWindow::BackendChanged, this, &HacksWidget::OnBackendChanged);
|
||||
connect(gfx_pane, &GraphicsPane::BackendChanged, this, &HacksWidget::OnBackendChanged);
|
||||
OnBackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
||||
connect(m_gpu_texture_decoding, &QCheckBox::toggled,
|
||||
[parent] { emit parent->UseGPUTextureDecodingChanged(); });
|
||||
}
|
||||
|
||||
HacksWidget::HacksWidget(GameConfigWidget* parent, Config::Layer* layer) : m_game_layer(layer)
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
[gfx_pane] { emit gfx_pane->UseGPUTextureDecodingChanged(); });
|
||||
}
|
||||
|
||||
void HacksWidget::CreateWidgets()
|
||||
|
@ -8,10 +8,7 @@
|
||||
class ConfigBool;
|
||||
class ConfigSlider;
|
||||
class ConfigSliderLabel;
|
||||
class GameConfigWidget;
|
||||
class GraphicsWindow;
|
||||
class QLabel;
|
||||
class ToolTipSlider;
|
||||
class GraphicsPane;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
@ -22,8 +19,7 @@ class HacksWidget final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HacksWidget(GraphicsWindow* parent);
|
||||
HacksWidget(GameConfigWidget* parent, Config::Layer* layer);
|
||||
explicit HacksWidget(GraphicsPane* gfx_pane);
|
||||
|
||||
private:
|
||||
void OnBackendChanged(const QString& backend_name);
|
||||
|
@ -7,11 +7,14 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QListWidget>
|
||||
#include <QStackedWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Common/EnumUtils.h"
|
||||
|
||||
#include "DolphinQt/Config/ControllersPane.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/MainWindow.h"
|
||||
#include "DolphinQt/QtUtils/QtUtils.h"
|
||||
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
|
||||
#include "DolphinQt/Settings/AdvancedPane.h"
|
||||
@ -130,12 +133,13 @@ void StackedSettingsWindow::ActivatePane(int index)
|
||||
m_navigation_list->setCurrentRow(index);
|
||||
}
|
||||
|
||||
SettingsWindow::SettingsWindow(QWidget* parent) : StackedSettingsWindow{parent}
|
||||
SettingsWindow::SettingsWindow(MainWindow* parent) : StackedSettingsWindow{parent}
|
||||
{
|
||||
setWindowTitle(tr("Settings"));
|
||||
|
||||
// If you change the order, don't forget to update the SettingsWindowPaneIndex enum.
|
||||
AddWrappedPane(new GeneralPane, tr("General"));
|
||||
AddPane(new GraphicsPane{parent, nullptr}, tr("Graphics"));
|
||||
AddWrappedPane(new ControllersPane, tr("Controllers"));
|
||||
AddWrappedPane(new InterfacePane, tr("Interface"));
|
||||
AddWrappedPane(new AudioPane, tr("Audio"));
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
class QStackedWidget;
|
||||
class QListWidget;
|
||||
class MainWindow;
|
||||
|
||||
// A settings window with a QListWidget to switch between panes of a QStackedWidget.
|
||||
class StackedSettingsWindow : public QDialog
|
||||
@ -34,6 +35,7 @@ private:
|
||||
enum class SettingsWindowPaneIndex : int
|
||||
{
|
||||
General = 0,
|
||||
Graphics,
|
||||
Controllers,
|
||||
Interface,
|
||||
Audio,
|
||||
@ -47,7 +49,7 @@ class SettingsWindow final : public StackedSettingsWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SettingsWindow(QWidget* parent = nullptr);
|
||||
explicit SettingsWindow(MainWindow* parent);
|
||||
|
||||
void SelectPane(SettingsWindowPaneIndex);
|
||||
};
|
||||
|
Reference in New Issue
Block a user