Move parts of MappingCommon out of DolphinQt

Some of the functions in MappingCommon would be useful to use on
mobile in the future.
This commit is contained in:
JosJuice
2022-02-20 18:32:39 +01:00
parent 9af9e791f6
commit 1bc057614e
8 changed files with 204 additions and 154 deletions

View File

@ -7,6 +7,7 @@
#include <vector>
#include "InputCommon/ControllerInterface/CoreDevice.h"
#include "InputCommon/ControllerInterface/MappingCommon.h"
class QString;
class OutputReference;
@ -14,27 +15,11 @@ class QPushButton;
namespace MappingCommon
{
enum class Quote
{
On,
Off
};
QString GetExpressionForControl(const QString& control_name,
const ciface::Core::DeviceQualifier& control_device,
const ciface::Core::DeviceQualifier& default_device,
Quote quote = Quote::On);
QString DetectExpression(QPushButton* button, ciface::Core::DeviceContainer& device_container,
const std::vector<std::string>& device_strings,
const ciface::Core::DeviceQualifier& default_device,
Quote quote = Quote::On);
ciface::MappingCommon::Quote quote = ciface::MappingCommon::Quote::On);
void TestOutput(QPushButton* button, OutputReference* reference);
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);
} // namespace MappingCommon