mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-20 14:01:44 +12:00
Some checks failed
Android Build / x64 (release) (push) Has been cancelled
Android Build / arm64 (release) (push) Has been cancelled
HTTP Server Build / build (push) Has been cancelled
Hydra Core Build / Windows (push) Has been cancelled
Hydra Core Build / MacOS (push) Has been cancelled
Hydra Core Build / Linux (push) Has been cancelled
Hydra Core Build / Android-x64 (push) Has been cancelled
Hydra Core Build / ARM-Libretro (push) Has been cancelled
Linux AppImage Build / build (push) Has been cancelled
Linux Build / build (push) Has been cancelled
MacOS Build / MacOS-arm64 (push) Has been cancelled
MacOS Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / Windows (push) Has been cancelled
Qt Build / MacOS-arm64 (push) Has been cancelled
Qt Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / Linux (push) Has been cancelled
Windows Build / build (push) Has been cancelled
iOS Simulator Build / build (push) Has been cancelled
MacOS Build / MacOS-Universal (push) Has been cancelled
Qt Build / MacOS-Universal (push) Has been cancelled
* Initial input UI draft Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * More keybinding work Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * Nit Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * More nits Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> --------- Co-authored-by: Paris Oplopoios <parisoplop@gmail.com>
32 lines
617 B
C++
32 lines
617 B
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QKeySequence>
|
|
#include <QMap>
|
|
#include <QPushButton>
|
|
|
|
#include "input_mappings.hpp"
|
|
|
|
class InputWindow : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
InputWindow(QWidget* parent = nullptr);
|
|
|
|
void loadFromMappings(const InputMappings& mappings);
|
|
void applyToMappings(InputMappings& mappings) const;
|
|
|
|
signals:
|
|
void mappingsChanged();
|
|
|
|
protected:
|
|
bool eventFilter(QObject* obj, QEvent* event) override;
|
|
|
|
private:
|
|
QMap<QString, QPushButton*> buttonMap;
|
|
QMap<QString, QKeySequence> keyMappings;
|
|
|
|
QString waitingForAction;
|
|
|
|
void startKeyCapture(const QString& action);
|
|
};
|