blob: 7cac489ad03ef9637419d7b4382568c81955564c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "DolphinQt/QtUtils/ElidedButton.h"
class ControlReference;
class MappingWidget;
class MappingWindow;
class QEvent;
class QMouseEvent;
class MappingButton : public ElidedButton
{
Q_OBJECT
public:
enum class ControlType
{
NormalInput,
ModifierInput,
Output,
};
MappingButton(MappingWidget* widget, ControlReference* ref, ControlType type);
ControlReference* GetControlReference();
ControlType GetControlType() const;
signals:
void ConfigChanged();
void QueueNextButtonMapping();
private:
void Clear();
void AdvancedPressed();
void Clicked();
void mouseReleaseEvent(QMouseEvent* event) override;
MappingWindow* const m_mapping_window;
ControlReference* const m_reference;
const ControlType m_control_type;
};
|