all repos — mgba @ 22245617f434049f4646916d1b2930d376503b0d

mGBA Game Boy Advance Emulator

src/platform/qt/ShortcutView.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_SHORTCUT_VIEW
 7#define QGBA_SHORTCUT_VIEW
 8
 9#include <QWidget>
10
11#include "ui_ShortcutView.h"
12
13namespace QGBA {
14
15class ShortcutController;
16
17class ShortcutView : public QWidget {
18Q_OBJECT
19
20public:
21	ShortcutView(QWidget* parent = nullptr);
22
23	void setController(ShortcutController* controller);
24
25protected:
26	virtual bool event(QEvent* event) override;
27	virtual bool eventFilter(QObject* obj, QEvent* event) override;
28
29private slots:
30	void load(const QModelIndex&);
31	void clear();
32	void updateKey(const QKeySequence&);
33	void updateButton(int button);
34
35private:
36	Ui::ShortcutView m_ui;
37
38	ShortcutController* m_controller;
39};
40
41}
42
43#endif