all repos — mgba @ b73f6314ca08eca05c5d64e8b6184f93a2cad261

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;
11
12enum class LoadSave {
13	LOAD,
14	SAVE
15};
16
17class LoadSaveState : public QWidget {
18Q_OBJECT
19
20public:
21
22	const static int NUM_SLOTS = 9;
23
24	LoadSaveState(GameController* controller, QWidget* parent = nullptr);
25
26	void setMode(LoadSave mode);
27
28private:
29	void loadState(int slot);
30	void triggerState(int slot);
31
32	Ui::LoadSaveState m_ui;
33	GameController* m_controller;
34	QPushButton* m_slots[NUM_SLOTS];
35	LoadSave m_mode;
36
37	QPixmap m_currentImage;
38};
39
40}
41
42#endif