Go to the documentation of this file.
7 #include <QtWidgets/QMainWindow>
8 #include "ui/ui_ramView.h"
9 #include "ui/ui_gotoDialog.h"
14 #include <QAbstractTableModel>
40 [[nodiscard]]
int rowCount(
const QModelIndex &parent)
const override;
42 [[nodiscard]]
int columnCount(
const QModelIndex &parent)
const override;
44 [[nodiscard]] QVariant
data(
const QModelIndex &index,
int role)
const override;
46 [[nodiscard]] QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
void gotoAddr()
Create a popup asking you where you want to jump to.
Definition: MemoryViewer.cpp:112
The memory bus is the component responsible of mapping addresses to components address and transmitti...
Definition: MemoryBus.hpp:22
ClosableWindow * _window
The QT window for this debugger.
Definition: MemoryViewer.hpp:55
QVariant data(const QModelIndex &index, int role) const override
Return a data representing the table cell.
Definition: MemoryViewer.cpp:33
MemoryViewerModel(Ram::Ram &memory, QObject *parent=nullptr)
Definition: MemoryViewer.cpp:16
SNES & _snes
SNES containing all rams to view.
Definition: MemoryViewer.hpp:57
void _internalGoto(bool isAbsolute)
Helper function to create the goto dialog.
Definition: MemoryViewer.cpp:122
const MemoryViewerModel & operator=(const MemoryViewerModel &)=delete
void gotoAbsoluteAddr()
Create a popup asking you where you want to jump to with the absolute mode selected.
Definition: MemoryViewer.cpp:117
Definition: ClosableWindow.hpp:12
int rowCount(const QModelIndex &parent) const override
The number of row the table has.
Definition: MemoryViewer.cpp:21
Ui::RamView _ui
The layout of the viewer.
Definition: MemoryViewer.hpp:61
Class responsible of the Memory Viewer.
Definition: MemoryViewer.hpp:50
unsigned uint24_t
Definition: Ints.hpp:10
Container of all the components of the SNES.
Definition: SNES.hpp:32
std::reference_wrapper< Ram::Ram > _memory
The ram to watch.
Definition: MemoryViewer.hpp:27
void changeRam(int id)
Callback called when a memory tab is selected.
Definition: MemoryViewer.cpp:87
~MemoryViewer() override=default
unsigned switchToAddrTab(uint24_t addr)
Select the memory tab corresponding to a 24 bit address (map the address via the bus).
Definition: MemoryViewer.cpp:153
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Override the headers to use hex values.
Definition: MemoryViewer.cpp:43
MemoryViewerModel _model
The Ram visualizer model for QT.
Definition: MemoryViewer.hpp:63
MemoryViewer(SNES &snes, Memory::MemoryBus &bus)
Definition: MemoryViewer.cpp:65
void focus()
Focus the memory viewer's window.
Definition: MemoryViewer.cpp:182
void setMemory(Ram::Ram &memory)
Change the ram currently watched.
Definition: MemoryViewer.cpp:58
int _headerIndentSize
The number of char inside the left header number.
Definition: MemoryViewer.hpp:29
The qt model that bind the ram to the view.
Definition: MemoryViewer.hpp:22
Memory::MemoryBus & _bus
The memory bus used to get the view for a given address.
Definition: MemoryViewer.hpp:59
~MemoryViewerModel() override=default
int columnCount(const QModelIndex &parent) const override
The number of column the table has.
Definition: MemoryViewer.cpp:26
MemoryViewer & operator=(const MemoryViewer &)=delete