From a2d2acf74116b5ea8f5557491f2b7b12847bd9fa Mon Sep 17 00:00:00 2001 From: Corwin McKnight Date: Wed, 3 May 2017 21:19:51 -0700 Subject: [PATCH 1/2] Qt: Add General Pane to Settings Replace SConfig references with Settings() --- Source/Core/DolphinQt2/CMakeLists.txt | 1 + .../Core/DolphinQt2/Config/SettingsWindow.cpp | 5 + Source/Core/DolphinQt2/DolphinQt2.vcxproj | 8 +- .../DolphinQt2/DolphinQt2.vcxproj.filters | 7 +- Source/Core/DolphinQt2/Settings.cpp | 30 +++ Source/Core/DolphinQt2/Settings.h | 8 + .../Core/DolphinQt2/Settings/GeneralPane.cpp | 181 ++++++++++++++++++ Source/Core/DolphinQt2/Settings/GeneralPane.h | 46 +++++ 8 files changed, 283 insertions(+), 3 deletions(-) create mode 100644 Source/Core/DolphinQt2/Settings/GeneralPane.cpp create mode 100644 Source/Core/DolphinQt2/Settings/GeneralPane.h diff --git a/Source/Core/DolphinQt2/CMakeLists.txt b/Source/Core/DolphinQt2/CMakeLists.txt index 966d05c458..8e5329b841 100644 --- a/Source/Core/DolphinQt2/CMakeLists.txt +++ b/Source/Core/DolphinQt2/CMakeLists.txt @@ -29,6 +29,7 @@ set(SRCS GameList/GameTracker.cpp GameList/ListProxyModel.cpp GameList/TableDelegate.cpp + Settings/GeneralPane.cpp Settings/InterfacePane.cpp ) diff --git a/Source/Core/DolphinQt2/Config/SettingsWindow.cpp b/Source/Core/DolphinQt2/Config/SettingsWindow.cpp index 5f02ce1eee..96b583d028 100644 --- a/Source/Core/DolphinQt2/Config/SettingsWindow.cpp +++ b/Source/Core/DolphinQt2/Config/SettingsWindow.cpp @@ -4,8 +4,10 @@ #include "DolphinQt2/Config/SettingsWindow.h" #include "DolphinQt2/Settings.h" +#include "DolphinQt2/Settings/GeneralPane.h" #include "DolphinQt2/Settings/InterfacePane.h" + SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent) { // Set Window Properties @@ -49,6 +51,8 @@ void SettingsWindow::SetupSettingsWidget() m_settings_outer = new QStackedWidget; m_settings_outer->setCurrentIndex(0); + // Panes initalised here + m_settings_outer->addWidget(new GeneralPane); m_settings_outer->addWidget(new InterfacePane); } @@ -83,6 +87,7 @@ void SettingsWindow::MakeCategoryList() m_categories->setMovement(QListView::Static); m_categories->setSpacing(0); + AddCategoryToList(tr("General"), dir.append(QStringLiteral("config.png"))); AddCategoryToList(tr("Interface"), dir.append(QStringLiteral("config.png"))); connect(m_categories, &QListWidget::currentItemChanged, this, &SettingsWindow::changePage); diff --git a/Source/Core/DolphinQt2/DolphinQt2.vcxproj b/Source/Core/DolphinQt2/DolphinQt2.vcxproj index 68b757cce6..a0f7cc3842 100644 --- a/Source/Core/DolphinQt2/DolphinQt2.vcxproj +++ b/Source/Core/DolphinQt2/DolphinQt2.vcxproj @@ -100,6 +100,7 @@ + @@ -112,9 +113,11 @@ + + @@ -125,7 +128,7 @@ - + @@ -147,8 +150,9 @@ + + -