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