2017-06-16 01:42:12 +02:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-16 01:42:12 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-04 15:33:19 -07:00
|
|
|
#include <string>
|
2023-11-11 14:02:08 -08:00
|
|
|
#include <utility>
|
2023-11-04 15:33:19 -07:00
|
|
|
#include <vector>
|
|
|
|
|
2020-10-17 00:05:43 -05:00
|
|
|
#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
|
2017-06-16 01:42:12 +02:00
|
|
|
|
2018-05-11 22:38:44 +02:00
|
|
|
#include "Common/Config/Config.h"
|
2017-06-16 01:42:12 +02:00
|
|
|
|
2023-04-24 20:36:43 -07:00
|
|
|
class ConfigChoice : public ToolTipComboBox
|
2017-06-16 01:42:12 +02:00
|
|
|
{
|
2018-05-13 16:16:20 -04:00
|
|
|
Q_OBJECT
|
2017-06-16 01:42:12 +02:00
|
|
|
public:
|
2023-04-24 20:36:43 -07:00
|
|
|
ConfigChoice(const QStringList& options, const Config::Info<int>& setting);
|
2017-06-16 01:42:12 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Update(int choice);
|
|
|
|
|
2020-05-02 14:39:40 +02:00
|
|
|
Config::Info<int> m_setting;
|
2017-06-16 01:42:12 +02:00
|
|
|
};
|
2023-11-04 15:33:19 -07:00
|
|
|
|
|
|
|
class ConfigStringChoice : public ToolTipComboBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ConfigStringChoice(const std::vector<std::string>& options,
|
|
|
|
const Config::Info<std::string>& setting);
|
2023-11-11 14:02:08 -08:00
|
|
|
ConfigStringChoice(const std::vector<std::pair<QString, QString>>& options,
|
|
|
|
const Config::Info<std::string>& setting);
|
2023-11-04 15:33:19 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Connect();
|
|
|
|
void Update(int index);
|
|
|
|
void Load();
|
|
|
|
|
|
|
|
Config::Info<std::string> m_setting;
|
2023-11-11 14:02:08 -08:00
|
|
|
bool m_text_is_data = false;
|
2023-11-04 15:33:19 -07:00
|
|
|
};
|