2017-06-13 15:16:41 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-13 15:16:41 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-02-28 00:10:18 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-09-15 11:34:41 +00:00
|
|
|
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
2020-02-12 22:49:17 +00:00
|
|
|
|
2017-06-13 15:16:41 +00:00
|
|
|
class QString;
|
2019-02-28 00:10:18 +00:00
|
|
|
class OutputReference;
|
|
|
|
class QPushButton;
|
2017-06-13 15:16:41 +00:00
|
|
|
|
|
|
|
namespace MappingCommon
|
|
|
|
{
|
2018-07-16 21:15:37 +00:00
|
|
|
enum class Quote
|
|
|
|
{
|
|
|
|
On,
|
|
|
|
Off
|
|
|
|
};
|
|
|
|
|
2017-06-13 15:16:41 +00:00
|
|
|
QString GetExpressionForControl(const QString& control_name,
|
|
|
|
const ciface::Core::DeviceQualifier& control_device,
|
2018-07-16 21:15:37 +00:00
|
|
|
const ciface::Core::DeviceQualifier& default_device,
|
|
|
|
Quote quote = Quote::On);
|
2019-02-28 00:10:18 +00:00
|
|
|
|
|
|
|
QString DetectExpression(QPushButton* button, ciface::Core::DeviceContainer& device_container,
|
|
|
|
const std::vector<std::string>& device_strings,
|
2018-07-16 21:15:37 +00:00
|
|
|
const ciface::Core::DeviceQualifier& default_device,
|
|
|
|
Quote quote = Quote::On);
|
2019-02-28 00:10:18 +00:00
|
|
|
|
|
|
|
void TestOutput(QPushButton* button, OutputReference* reference);
|
|
|
|
|
2020-02-12 22:49:17 +00:00
|
|
|
void RemoveSpuriousTriggerCombinations(std::vector<ciface::Core::DeviceContainer::InputDetection>*);
|
|
|
|
|
|
|
|
QString BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>&,
|
|
|
|
const ciface::Core::DeviceQualifier& default_device, Quote quote);
|
|
|
|
|
2018-07-16 21:15:37 +00:00
|
|
|
} // namespace MappingCommon
|