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 mCheatDevice;
18
19namespace QGBA {
20
21class GameController;
22
23class CheatsView : public QWidget {
24Q_OBJECT
25
26public:
27 CheatsView(GameController* 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 GameController* m_controller;
42 CheatsModel m_model;
43};
44
45}
46
47#endif