all repos — mgba @ cb7c09e63d88ced801bac241eb4f4434c1a30f31

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#include <memory>
12
13#ifdef M_CORE_GB
14#include <mgba/gb/interface.h>
15#endif
16
17#include "ColorPicker.h"
18#include "Override.h"
19
20#include "ui_OverrideView.h"
21
22struct mCoreThread;
23
24namespace QGBA {
25
26class ConfigController;
27class CoreController;
28class Override;
29
30class OverrideView : public QDialog {
31Q_OBJECT
32
33public:
34	OverrideView(ConfigController* config, QWidget* parent = nullptr);
35
36	void setController(std::shared_ptr<CoreController> controller);
37
38public slots:
39	void saveOverride();
40
41private slots:
42	void updateOverrides();
43	void gameStarted();
44	void gameStopped();
45
46private:
47	Ui::OverrideView m_ui;
48
49	std::shared_ptr<CoreController> m_controller;
50	ConfigController* m_config;
51
52#ifdef M_CORE_GB
53	uint32_t m_gbColors[4]{};
54	ColorPicker m_colorPickers[4];
55
56	static QList<enum GBModel> s_gbModelList;
57	static QList<enum GBMemoryBankControllerType> s_mbcList;
58#endif
59};
60
61}
62
63#endif