all repos — mgba @ 3227d74e4d434d497673e5a77589b674e811c969

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