all repos — mgba @ 63411728135bde082913d36c67f42ab2f1d703fc

mGBA Game Boy Advance Emulator

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

 1#ifndef QGBA_WINDOW
 2#define QGBA_WINDOW
 3
 4#include <QAudioOutput>
 5#include <QMainWindow>
 6
 7extern "C" {
 8#include "gba.h"
 9}
10
11#include "GameController.h"
12#include "Display.h"
13
14namespace QGBA {
15
16class GDBController;
17
18class Window : public QMainWindow {
19Q_OBJECT
20
21public:
22	Window(QWidget* parent = 0);
23	static GBAKey mapKey(int qtKey);
24
25signals:
26	void startDrawing(const uint32_t*, GBAThread*);
27	void shutdown();
28
29public slots:
30	void selectROM();
31
32#ifdef USE_GDB_STUB
33	void gdbOpen();
34#endif
35
36protected:
37	virtual void keyPressEvent(QKeyEvent* event);
38	virtual void keyReleaseEvent(QKeyEvent* event);
39	virtual void closeEvent(QCloseEvent*) override;
40
41private slots:
42	void gameStarted(GBAThread*);
43	void setupAudio(GBAAudio*);
44
45private:
46	void setupMenu(QMenuBar*);
47	GameController* m_controller;
48	Display* m_display;
49	QList<QAction*> m_gameActions;
50
51#ifdef USE_GDB_STUB
52	GDBController* m_gdbController;
53#endif
54};
55
56}
57
58#endif