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