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 Window : public QMainWindow {
17Q_OBJECT
18
19public:
20 Window(QWidget* parent = 0);
21 static GBAKey mapKey(int qtKey);
22
23signals:
24 void startDrawing(const uint32_t*, GBAThread*);
25 void shutdown();
26
27public slots:
28 void selectROM();
29
30protected:
31 virtual void keyPressEvent(QKeyEvent* event);
32 virtual void keyReleaseEvent(QKeyEvent* event);
33 virtual void closeEvent(QCloseEvent*) override;
34
35private slots:
36 void gameStarted(GBAThread*);
37 void setupAudio(GBAAudio*);
38
39private:
40 void setupMenu(QMenuBar*);
41 GameController* m_controller;
42 Display* m_display;
43 QList<QAction*> m_gameActions;
44};
45
46}
47
48#endif