all repos — mgba @ 0bd9ae087e149599e352bbee24c4de23e6247ec5

mGBA Game Boy Advance Emulator

src/platform/qt/CheatsModel.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_MODEL
 7#define QGBA_CHEATS_MODEL
 8
 9#include <QAbstractItemModel>
10
11struct GBACheatDevice;
12
13namespace QGBA {
14
15class CheatsModel : public QAbstractItemModel {
16Q_OBJECT
17
18public:
19	CheatsModel(GBACheatDevice* m_device, QObject* parent = nullptr);
20
21	virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
22
23	virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override;
24	virtual QModelIndex parent(const QModelIndex& index) const override;
25
26	virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override;
27	virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
28
29	void loadFile(const QString& path);
30
31private:
32	GBACheatDevice* m_device;
33};
34
35}
36
37#endif