mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Qt: Implement button mapping dialogs
This commit is contained in:
36
Source/Core/DolphinQt2/Config/Mapping/MappingButton.h
Normal file
36
Source/Core/DolphinQt2/Config/Mapping/MappingButton.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QPoint>
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
|
||||
class ControlReference;
|
||||
class MappingWidget;
|
||||
class QEvent;
|
||||
class QMouseEvent;
|
||||
|
||||
class MappingButton : public QPushButton
|
||||
{
|
||||
public:
|
||||
MappingButton(MappingWidget* widget, ControlReference* ref);
|
||||
|
||||
void Clear();
|
||||
void Update();
|
||||
|
||||
private:
|
||||
bool event(QEvent* event) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
|
||||
void OnButtonPressed();
|
||||
void OnButtonTimeout();
|
||||
void Connect();
|
||||
void SetBlockInputs(const bool block);
|
||||
|
||||
MappingWidget* m_parent;
|
||||
ControlReference* m_reference;
|
||||
bool m_block = false;
|
||||
};
|
Reference in New Issue
Block a user