2017-06-15 23:43:14 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-03-16 13:10:22 +00:00
|
|
|
#include <array>
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Config/Graphics/GraphicsWidget.h"
|
2017-06-15 23:43:14 +00:00
|
|
|
|
2020-10-17 05:06:34 +00:00
|
|
|
class GraphicsBool;
|
|
|
|
class GraphicsChoice;
|
|
|
|
class GraphicsRadioInt;
|
2017-06-15 23:43:14 +00:00
|
|
|
class GraphicsWindow;
|
|
|
|
class QCheckBox;
|
|
|
|
class QComboBox;
|
2018-03-16 13:10:22 +00:00
|
|
|
class QRadioButton;
|
2017-06-15 23:43:14 +00:00
|
|
|
class QGridLayout;
|
2020-10-17 05:06:34 +00:00
|
|
|
class ToolTipComboBox;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
namespace X11Utils
|
|
|
|
{
|
|
|
|
class XRRConfiguration;
|
|
|
|
}
|
|
|
|
|
|
|
|
class GeneralWidget final : public GraphicsWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent);
|
|
|
|
signals:
|
|
|
|
void BackendChanged(const QString& backend);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void LoadSettings() override;
|
|
|
|
void SaveSettings() override;
|
|
|
|
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void AddDescriptions();
|
|
|
|
|
|
|
|
void OnBackendChanged(const QString& backend_name);
|
|
|
|
void OnEmulationStateChanged(bool running);
|
|
|
|
|
|
|
|
// Video
|
|
|
|
QGridLayout* m_video_layout;
|
2020-10-17 05:06:34 +00:00
|
|
|
ToolTipComboBox* m_backend_combo;
|
|
|
|
ToolTipComboBox* m_adapter_combo;
|
|
|
|
GraphicsChoice* m_aspect_combo;
|
|
|
|
GraphicsBool* m_enable_vsync;
|
|
|
|
GraphicsBool* m_enable_fullscreen;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
// Options
|
2020-10-17 05:06:34 +00:00
|
|
|
GraphicsBool* m_show_fps;
|
|
|
|
GraphicsBool* m_show_ping;
|
|
|
|
GraphicsBool* m_log_render_time;
|
|
|
|
GraphicsBool* m_autoadjust_window_size;
|
|
|
|
GraphicsBool* m_show_messages;
|
|
|
|
GraphicsBool* m_render_main_window;
|
|
|
|
std::array<GraphicsRadioInt*, 4> m_shader_compilation_mode{};
|
|
|
|
GraphicsBool* m_wait_for_shaders;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
X11Utils::XRRConfiguration* m_xrr_config;
|
|
|
|
};
|