Duckstation/src/duckstation-qt/advancedsettingswidget.h

59 lines
1,002 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
2020-04-30 14:59:31 +00:00
#pragma once
#include <QtCore/QVector>
2020-04-30 14:59:31 +00:00
#include <QtWidgets/QWidget>
#include "ui_advancedsettingswidget.h"
class SettingsWindow;
2020-04-30 14:59:31 +00:00
class AdvancedSettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent);
2020-04-30 14:59:31 +00:00
~AdvancedSettingsWidget();
private:
struct TweakOption
{
enum class Type
{
Boolean,
IntRange
};
Type type;
QString description;
std::string key;
std::string section;
union
{
struct
{
bool default_value;
} boolean;
struct
{
int min_value;
int max_value;
int default_value;
} int_range;
};
};
SettingsWindow* m_dialog;
2020-04-30 14:59:31 +00:00
Ui::AdvancedSettingsWidget m_ui;
QVector<TweakOption> m_tweak_options;
void addTweakOptions();
void onResetToDefaultClicked();
2020-04-30 14:59:31 +00:00
};