2022-12-04 11:03:45 +00:00
|
|
|
// 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
|
2020-09-06 10:49:13 +00:00
|
|
|
#include <QtCore/QVector>
|
2020-04-30 14:59:31 +00:00
|
|
|
#include <QtWidgets/QWidget>
|
|
|
|
|
|
|
|
#include "ui_advancedsettingswidget.h"
|
|
|
|
|
2023-11-06 13:01:38 +00:00
|
|
|
class SettingsWindow;
|
2020-04-30 14:59:31 +00:00
|
|
|
|
|
|
|
class AdvancedSettingsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-11-06 13:01:38 +00:00
|
|
|
explicit AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
2020-04-30 14:59:31 +00:00
|
|
|
~AdvancedSettingsWidget();
|
|
|
|
|
|
|
|
private:
|
2020-09-06 10:49:13 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-06 13:01:38 +00:00
|
|
|
SettingsWindow* m_dialog;
|
2022-07-11 13:03:29 +00:00
|
|
|
|
2020-04-30 14:59:31 +00:00
|
|
|
Ui::AdvancedSettingsWidget m_ui;
|
|
|
|
|
2020-09-06 10:49:13 +00:00
|
|
|
QVector<TweakOption> m_tweak_options;
|
2022-09-17 03:47:46 +00:00
|
|
|
|
|
|
|
void addTweakOptions();
|
|
|
|
void onResetToDefaultClicked();
|
2020-04-30 14:59:31 +00:00
|
|
|
};
|