forked from czajowaty/virtual_monsbaia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.hpp
More file actions
41 lines (34 loc) · 931 Bytes
/
MainWindow.hpp
File metadata and controls
41 lines (34 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
#include "ADScene.hpp"
#include "BufferedPsxRam.hpp"
#include <QMainWindow>
#include <QTimer>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
protected:
void keyPressEvent(QKeyEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void mouseMoveEvent(QMouseEvent* event);
private slots:
void on_action_Open_triggered();
void onKeyboardControlsTimerTimeout();
private:
Ui::MainWindow *ui;
std::unique_ptr<BufferedPsxRam> psxRam_;
QByteArray psxVRam_;
ADScene adScene_;
QTimer keyboardControlsTimer_;
qint64 keyboardControlsTimerLastExecutionMs_;
bool isTrackingMouse_{false};
QPoint lastMousePosition_;
};
#endif // MAINWINDOW_HPP