all repos — mgba @ 83f649dc9cbc056090fe83f056f2114ba72c9857

mGBA Game Boy Advance Emulator

src/platform/qt/CheatsView.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 <QWidget>
 9
10#include <functional>
11#include <memory>
12
13#include "CheatsModel.h"
14
15#include "ui_CheatsView.h"
16
17struct mCheatDevice;
18
19namespace QGBA {
20
21class CoreController;
22
23class CheatsView : public QWidget {
24Q_OBJECT
25
26public:
27	CheatsView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
28
29	virtual bool eventFilter(QObject*, QEvent*) override;
30
31private slots:
32	void load();
33	void save();
34	void addSet();
35	void removeSet();
36
37private:
38	void enterCheat(int codeType);
39
40	Ui::CheatsView m_ui;
41	std::shared_ptr<CoreController> m_controller;
42	CheatsModel m_model;
43};
44
45}