all repos — mgba @ bc8175515bca1df94785300cd2de41a6f2495a29

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#ifndef QGBA_CHEATS_VIEW
 7#define QGBA_CHEATS_VIEW
 8
 9#include <QWidget>
10
11#include <functional>
12
13#include "CheatsModel.h"
14
15#include "ui_CheatsView.h"
16
17struct GBACheatDevice;
18
19namespace QGBA {
20
21class GameController;
22
23class CheatsView : public QWidget {
24Q_OBJECT
25
26public:
27	CheatsView(GameController* controller, QWidget* parent = nullptr);
28
29private slots:
30	void load();
31	void addSet();
32	void removeSet();
33
34private:
35	void enterCheat(std::function<bool(GBACheatSet*, const char*)> callback);
36
37	Ui::CheatsView m_ui;
38	GameController* m_controller;
39	CheatsModel m_model;
40};
41
42}
43
44#endif