Files
eden/src/yuzu/configuration/configuration_shared.h
T

45 lines
1.1 KiB
C++
Raw Normal View History

2022-05-15 02:06:02 +02:00
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
2023-05-05 23:30:59 -04:00
#include <forward_list>
#include <iterator>
#include <memory>
#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"
#include "yuzu/configuration/shared_translation.h"
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
};
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
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
};
} // namespace ConfigurationShared