// Copyright 2016 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include #include #include #include "core/settings.h" namespace ConfigurationShared { constexpr int USE_GLOBAL_INDEX = 0; constexpr int USE_GLOBAL_SEPARATOR_INDEX = 1; constexpr int USE_GLOBAL_OFFSET = 2; enum class CheckState { Off, On, Global, Count, }; // Global-aware apply and set functions void ApplyPerGameSetting(Settings::Setting* setting, const QCheckBox* checkbox, const CheckState& tracker); void ApplyPerGameSetting(Settings::Setting* setting, const QCheckBox* checkbox); void ApplyPerGameSetting(Settings::Setting* setting, const QComboBox* combobox); void ApplyPerGameSetting(Settings::Setting* setting, const QComboBox* combobox); void ApplyPerGameSetting(Settings::Setting* setting, const QComboBox* combobox); void SetPerGameSetting(QCheckBox* checkbox, const Settings::Setting* setting); void SetPerGameSetting(QComboBox* combobox, const Settings::Setting* setting); void SetPerGameSetting(QComboBox* combobox, const Settings::Setting* setting); void SetPerGameSetting(QComboBox* combobox, const Settings::Setting* setting); void SetHighlight(QWidget* widget, const std::string& name, bool highlighted); void SetColoredTristate(QCheckBox* checkbox, const std::string& name, const Settings::Setting& setting, CheckState& tracker); void SetColoredTristate(QCheckBox* checkbox, const std::string& name, bool global, bool state, bool global_state, CheckState& tracker); void SetColoredComboBox(QComboBox* combobox, QWidget* target, const std::string& target_name, int global); void InsertGlobalItem(QComboBox* combobox); void InsertGlobalItem(QComboBox* combobox, int global_index); } // namespace ConfigurationShared