all repos — mgba @ 0579ececb343b13c5be40dc4f1ce60fb5a8812c6

mGBA Game Boy Advance Emulator

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

 1#ifndef QGBA_LOAD_SAVE_STATE
 2#define QGBA_LOAD_SAVE_STATE
 3
 4#include <QWidget>
 5
 6#include "ui_LoadSaveState.h"
 7
 8namespace QGBA {
 9
10class GameController;
11class SavestateButton;
12
13enum class LoadSave {
14	LOAD,
15	SAVE
16};
17
18class LoadSaveState : public QWidget {
19Q_OBJECT
20
21public:
22	const static int NUM_SLOTS = 9;
23
24	LoadSaveState(GameController* controller, QWidget* parent = nullptr);
25
26	void setMode(LoadSave mode);
27
28protected:
29	virtual bool eventFilter(QObject*, QEvent*) override;
30
31private:
32	void loadState(int slot);
33	void triggerState(int slot);
34
35	Ui::LoadSaveState m_ui;
36	GameController* m_controller;
37	SavestateButton* m_slots[NUM_SLOTS];
38	LoadSave m_mode;
39
40	int m_currentFocus;
41	QPixmap m_currentImage;
42};
43
44}
45
46#endif