MemoryViewWidget refactor memory table.

Don't re-create the table on every update.
This commit is contained in:
TryTwo
2022-09-30 15:01:56 -07:00
parent 9ca1c0f533
commit 6f4f4e057e
2 changed files with 241 additions and 233 deletions

View File

@ -49,6 +49,7 @@ public:
explicit MemoryViewWidget(QWidget* parent = nullptr);
void CreateTable();
void Update();
void UpdateFont();
void ToggleBreakpoint(u32 addr, bool row);
@ -72,9 +73,10 @@ private:
void OnCopyAddress(u32 addr);
void OnCopyHex(u32 addr);
void UpdateBreakpointTags();
void UpdateColumns(Type type, int first_column);
void UpdateColumns();
void ScrollbarActionTriggered(int action);
void ScrollbarSliderReleased();
QString ValueToString(u32 address, Type type);
MemoryViewTable* m_table;
QScrollBar* m_scrollbar;
@ -82,11 +84,12 @@ private:
Type m_type = Type::Hex32;
BPType m_bp_type = BPType::ReadWrite;
bool m_do_log = true;
u32 m_address = 0;
u32 m_address = 0x80000000;
int m_font_width = 0;
int m_font_vspace = 0;
int m_bytes_per_row = 16;
int m_alignment = 16;
int m_data_columns;
bool m_dual_view = false;
friend class MemoryViewTable;