all repos — mgba @ a2c1ef2fcc0d3aab083962eb1efa09feee819c54

mGBA Game Boy Advance Emulator

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

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_OVERRIDE_VIEW
 7#define QGBA_OVERRIDE_VIEW
 8
 9#include <QDialog>
10
11#ifdef M_CORE_GB
12#include <mgba/gb/interface.h>
13#endif
14
15#include "ui_OverrideView.h"
16
17struct mCoreThread;
18
19namespace QGBA {
20
21class ConfigController;
22class GameController;
23class Override;
24
25class OverrideView : public QDialog {
26Q_OBJECT
27
28public:
29	OverrideView(GameController* controller, ConfigController* config, QWidget* parent = nullptr);
30
31public slots:
32	void saveOverride();
33
34private slots:
35	void updateOverrides();
36	void gameStarted(mCoreThread*);
37	void gameStopped();
38
39protected:
40	bool eventFilter(QObject* obj, QEvent* event) override;
41
42private:
43	Ui::OverrideView m_ui;
44
45	GameController* m_controller;
46	ConfigController* m_config;
47
48#ifdef M_CORE_GB
49	uint32_t m_gbColors[4]{};
50
51	static QList<enum GBModel> s_gbModelList;
52	static QList<enum GBMemoryBankControllerType> s_mbcList;
53#endif
54};
55
56}
57
58#endif