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

45 lines
870 B
C
Raw Normal View History

2017-05-20 17:53:17 +02:00
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2017-05-20 17:53:17 +02:00
#pragma once
2018-07-07 00:40:15 +02:00
#include "DolphinQt/QtUtils/ElidedButton.h"
2017-05-20 17:53:17 +02:00
class ControlReference;
class MappingWidget;
class MappingWindow;
2017-05-20 17:53:17 +02:00
class QEvent;
class QMouseEvent;
class MappingButton : public ElidedButton
2017-05-20 17:53:17 +02:00
{
Q_OBJECT
2017-05-20 17:53:17 +02:00
public:
enum class ControlType
{
NormalInput,
ModifierInput,
Output,
};
MappingButton(MappingWidget* widget, ControlReference* ref, ControlType type);
2017-05-20 17:53:17 +02:00
ControlReference* GetControlReference();
ControlType GetControlType() const;
signals:
void ConfigChanged();
void QueueNextButtonMapping();
2017-05-20 17:53:17 +02:00
2019-03-14 20:27:49 -05:00
private:
void Clear();
void AdvancedPressed();
void Clicked();
2017-05-20 17:53:17 +02:00
void mouseReleaseEvent(QMouseEvent* event) override;
MappingWindow* const m_mapping_window;
ControlReference* const m_reference;
const ControlType m_control_type;
2017-05-20 17:53:17 +02:00
};