Qt: Redesign graphics settings panel

Add screenshot format/type.
This commit is contained in:
Stenzek
2024-03-02 19:08:38 +10:00
parent b8127facdc
commit 04b837a418
38 changed files with 2467 additions and 1572 deletions

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#include "settingswindow.h"
@ -8,13 +8,12 @@
#include "consolesettingswidget.h"
#include "achievementsettingswidget.h"
#include "displaysettingswidget.h"
#include "emulationsettingswidget.h"
#include "enhancementsettingswidget.h"
#include "foldersettingswidget.h"
#include "gamelistsettingswidget.h"
#include "gamesummarywidget.h"
#include "generalsettingswidget.h"
#include "graphicssettingswidget.h"
#include "interfacesettingswidget.h"
#include "mainwindow.h"
#include "memorycardsettingswidget.h"
#include "postprocessingsettingswidget.h"
@ -78,9 +77,9 @@ void SettingsWindow::closeEvent(QCloseEvent* event)
void SettingsWindow::addPages()
{
addWidget(
m_general_settings = new GeneralSettingsWidget(this, m_ui.settingsContainer), tr("General"),
m_general_settings = new InterfaceSettingsWidget(this, m_ui.settingsContainer), tr("Interface"),
QStringLiteral("settings-3-line"),
tr("<strong>General Settings</strong><hr>These options control how the emulator looks and "
tr("<strong>Interface Settings</strong><hr>These options control how the emulator looks and "
"behaves.<br><br>Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
if (!isPerGameSettings())
@ -112,17 +111,11 @@ void SettingsWindow::addPages()
QStringLiteral("memcard-line"),
tr("<strong>Memory Card Settings</strong><hr>This page lets you control what mode the memory card emulation will "
"function in, and where the images for these cards will be stored on disk."));
addWidget(
m_display_settings = new DisplaySettingsWidget(this, m_ui.settingsContainer), tr("Display"),
QStringLiteral("image-fill"),
tr("<strong>Display Settings</strong><hr>These options control the how the frames generated by the console are "
"displayed on the screen."));
addWidget(
m_enhancement_settings = new EnhancementSettingsWidget(this, m_ui.settingsContainer), tr("Enhancements"),
QStringLiteral("sparkle-fill"),
tr("<strong>Enhancement Settings</strong><hr>These options control enhancements which can improve visuals compared "
"to the original console. Mouse over each option for additional information, and Shift+Wheel to scroll this "
"panel."));
addWidget(m_graphics_settings = new GraphicsSettingsWidget(this, m_ui.settingsContainer), tr("Graphics"),
QStringLiteral("image-fill"),
tr("<strong>Graphics Settings</strong><hr>These options control how the graphics of the emulated console "
"are rendered. Not all options are available for the software renderer. Mouse over each option for "
"additional information, and Shift+Wheel to scroll this panel."));
addWidget(
m_post_processing_settings = new PostProcessingSettingsWidget(this, m_ui.settingsContainer), tr("Post-Processing"),
QStringLiteral("sun-fill"),
@ -168,6 +161,9 @@ void SettingsWindow::addPages()
tr("<strong>Advanced Settings</strong><hr>These options control logging and internal behavior of the "
"emulator. Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
connect(m_advanced_settings, &AdvancedSettingsWidget::onShowDebugOptionsChanged, m_graphics_settings,
&GraphicsSettingsWidget::onShowDebugSettingsChanged);
if (isPerGameSettings())
{
m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults)->setVisible(false);
@ -500,6 +496,14 @@ void SettingsWindow::setStringSettingValue(const char* section, const char* key,
}
}
bool SettingsWindow::containsSettingValue(const char* section, const char* key) const
{
if (m_sif)
return m_sif->ContainsValue(section, key);
else
return Host::ContainsBaseSettingValue(section, key);
}
void SettingsWindow::removeSettingValue(const char* section, const char* key)
{
if (m_sif)