all repos — mgba @ 10d5588d4cc543f07b4f6bf21e8a3bac63fb02f3

mGBA Game Boy Advance Emulator

src/platform/qt/MemoryModel.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_MEMORY_MODEL
 7#define QGBA_MEMORY_MODEL
 8
 9#include <QAbstractScrollArea>
10#include <QFont>
11#include <QSize>
12#include <QStaticText>
13#include <QVector>
14
15struct ARMCore;
16
17namespace QGBA {
18
19class GameController;
20
21class MemoryModel : public QAbstractScrollArea {
22Q_OBJECT
23
24public:
25	MemoryModel(QWidget* parent = nullptr);
26
27	void setController(GameController* controller);
28
29protected:
30	void resizeEvent(QResizeEvent*) override;
31	void paintEvent(QPaintEvent*) override;
32	void wheelEvent(QWheelEvent*) override;
33
34private:
35	void boundsCheck();
36
37	ARMCore* m_cpu;
38	QFont m_font;
39	int m_cellHeight;
40	int m_letterWidth;
41	int m_top;
42	QMargins m_margins;
43	QVector<QStaticText> m_staticNumbers;
44	QVector<QStaticText> m_staticAscii;
45};
46
47}
48
49#endif