2022-05-15 02:06:02 +02:00
|
|
|
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-07-09 22:42:09 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-05-05 23:30:59 -04:00
|
|
|
#include <forward_list>
|
|
|
|
|
#include <iterator>
|
|
|
|
|
#include <memory>
|
2020-07-09 22:42:09 -04:00
|
|
|
#include <QCheckBox>
|
|
|
|
|
#include <QComboBox>
|
2023-05-05 19:49:51 -04:00
|
|
|
#include <QWidget>
|
|
|
|
|
#include <qobjectdefs.h>
|
2021-04-14 16:07:40 -07:00
|
|
|
#include "common/settings.h"
|
2023-05-07 09:48:26 -04:00
|
|
|
#include "yuzu/configuration/shared_translation.h"
|
2020-07-09 22:42:09 -04:00
|
|
|
|
|
|
|
|
namespace ConfigurationShared {
|
|
|
|
|
|
2023-05-05 19:49:51 -04:00
|
|
|
class Tab : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2023-05-05 23:30:59 -04:00
|
|
|
explicit Tab(std::shared_ptr<std::forward_list<Tab*>> group_, QWidget* parent = nullptr);
|
2023-05-05 19:49:51 -04:00
|
|
|
~Tab();
|
|
|
|
|
|
|
|
|
|
virtual void ApplyConfiguration() = 0;
|
|
|
|
|
virtual void SetConfiguration() = 0;
|
2023-05-05 23:30:59 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::shared_ptr<std::forward_list<Tab*>> group;
|
2023-05-05 19:49:51 -04:00
|
|
|
};
|
|
|
|
|
|
2020-07-09 22:42:09 -04:00
|
|
|
constexpr int USE_GLOBAL_INDEX = 0;
|
|
|
|
|
constexpr int USE_GLOBAL_SEPARATOR_INDEX = 1;
|
|
|
|
|
constexpr int USE_GLOBAL_OFFSET = 2;
|
|
|
|
|
|
2021-05-15 21:19:54 -04:00
|
|
|
// CheckBoxes require a tracker for their state since we emulate a tristate CheckBox
|
2020-07-14 15:40:02 -04:00
|
|
|
enum class CheckState {
|
2021-05-15 21:19:54 -04:00
|
|
|
Off, // Checkbox overrides to off/false
|
|
|
|
|
On, // Checkbox overrides to on/true
|
|
|
|
|
Global, // Checkbox defers to the global state
|
|
|
|
|
Count, // Simply the number of states, not a valid checkbox state
|
2020-07-13 17:08:24 -04:00
|
|
|
};
|
|
|
|
|
|
2020-07-09 22:42:09 -04:00
|
|
|
} // namespace ConfigurationShared
|