mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 09:28:03 -05:00
configuration: Use a mapping of setting value to name
Makes comboboxes always correspond to the value of the setting they're modifying.
This commit is contained in:
@ -1,21 +1,23 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <forward_list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <typeindex>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace ConfigurationShared {
|
||||
using TranslationMap = std::map<u32, std::pair<QString, QString>>;
|
||||
using ComboboxTranslations = std::vector<std::pair<u32, QString>>;
|
||||
using ComboboxTranslationMap = std::map<std::type_index, ComboboxTranslations>;
|
||||
|
||||
std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent);
|
||||
|
||||
std::forward_list<QString> ComboboxEnumeration(std::type_index type, QWidget* parent);
|
||||
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent);
|
||||
|
||||
} // namespace ConfigurationShared
|
||||
|
Reference in New Issue
Block a user