all repos — mgba @ 77cf8699414b30b2901f941cd06810e1d5b2e7a8

mGBA Game Boy Advance Emulator

src/platform/qt/MemoryView.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_VIEW
 7#define QGBA_MEMORY_VIEW
 8
 9#include "MemoryModel.h"
10
11#include "ui_MemoryView.h"
12
13namespace QGBA {
14
15class GameController;
16
17class MemoryView : public QWidget {
18Q_OBJECT
19
20public:
21	MemoryView(GameController* controller, QWidget* parent = nullptr);
22
23public slots:
24	void update();
25	void jumpToAddress(uint32_t address) { m_ui.hexfield->jumpToAddress(address); }
26
27private slots:
28	void setIndex(int);
29	void setSegment(int);
30	void updateSelection(uint32_t start, uint32_t end);
31	void updateStatus();
32
33private:
34	Ui::MemoryView m_ui;
35
36	GameController* m_controller;
37	QPair<uint32_t, uint32_t> m_selection;
38};
39
40}
41
42#endif