dolphin/Source/Core/DolphinQt/Config/Mapping/MappingWidget.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.2 KiB
C
Raw Normal View History

2017-05-20 15:53:17 +00:00
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include <vector>
#include <QString>
#include <QWidget>
2019-08-01 13:28:04 +00:00
constexpr int WIDGET_MAX_WIDTH = 112;
2017-05-20 15:53:17 +00:00
class ControlGroupBox;
class InputConfig;
class MappingButton;
class MappingNumeric;
class MappingWindow;
class QPushButton;
2017-05-20 15:53:17 +00:00
class QGroupBox;
namespace ControllerEmu
{
class Control;
class ControlGroup;
class EmulatedController;
class NumericSettingBase;
} // namespace ControllerEmu
2017-05-20 15:53:17 +00:00
2019-03-15 01:27:49 +00:00
constexpr int INDICATOR_UPDATE_FREQ = 30;
2017-05-20 15:53:17 +00:00
class MappingWidget : public QWidget
{
Q_OBJECT
public:
explicit MappingWidget(MappingWindow* window);
ControllerEmu::EmulatedController* GetController() const;
2017-05-20 15:53:17 +00:00
MappingWindow* GetParent() const;
virtual void LoadSettings() = 0;
virtual void SaveSettings() = 0;
virtual InputConfig* GetConfig() = 0;
2019-03-15 01:27:49 +00:00
signals:
2017-05-20 15:53:17 +00:00
void Update();
2019-03-15 01:27:49 +00:00
void ConfigChanged();
2017-05-20 15:53:17 +00:00
protected:
int GetPort() const;
QGroupBox* CreateGroupBox(ControllerEmu::ControlGroup* group);
2017-05-20 15:53:17 +00:00
QGroupBox* CreateGroupBox(const QString& name, ControllerEmu::ControlGroup* group);
QPushButton* CreateSettingAdvancedMappingButton(ControllerEmu::NumericSettingBase& setting);
2017-05-20 15:53:17 +00:00
private:
MappingWindow* m_parent;
};