mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-26 20:58:28 -05:00
MemoryWidget: Add symbols and Notes.
Add option to hide them. Add box to search. Add ability to edit data symbols and notes in MemoryViewWidget.
This commit is contained in:
@@ -24,6 +24,8 @@ class CPUThreadGuard;
|
||||
class System;
|
||||
} // namespace Core
|
||||
|
||||
class PPCSymbolDB;
|
||||
|
||||
// Captures direct editing of the table.
|
||||
class TableEditDelegate : public QStyledItemDelegate
|
||||
{
|
||||
@@ -76,14 +78,23 @@ public:
|
||||
Full,
|
||||
Addresses,
|
||||
Values,
|
||||
Symbols,
|
||||
Auto,
|
||||
};
|
||||
|
||||
enum class EditSymbolType
|
||||
{
|
||||
AddNote,
|
||||
EditNote,
|
||||
EditRegion,
|
||||
};
|
||||
|
||||
explicit MemoryViewWidget(Core::System& system, QWidget* parent = nullptr);
|
||||
|
||||
void CreateTable();
|
||||
void UpdateDispatcher(UpdateType type = UpdateType::Addresses);
|
||||
void Update();
|
||||
void UpdateSymbols();
|
||||
void UpdateOnFrameEnd();
|
||||
void GetValues();
|
||||
void UpdateFont(const QFont& font);
|
||||
@@ -98,6 +109,7 @@ public:
|
||||
void SetBPType(BPType type);
|
||||
void SetAddress(u32 address);
|
||||
void SetFocus() const;
|
||||
void ShowSymbols(bool enable);
|
||||
|
||||
void SetBPLoggingEnabled(bool enabled);
|
||||
|
||||
@@ -108,6 +120,7 @@ signals:
|
||||
void ActivateSearch();
|
||||
|
||||
private:
|
||||
void OnEditSymbol(EditSymbolType type, u32 addr);
|
||||
void OnContextMenu(const QPoint& pos);
|
||||
void OnCopyAddress(u32 addr);
|
||||
void OnCopyHex(u32 addr);
|
||||
@@ -116,9 +129,11 @@ private:
|
||||
void UpdateColumns();
|
||||
void ScrollbarActionTriggered(int action);
|
||||
void ScrollbarSliderReleased();
|
||||
|
||||
std::optional<QString> ValueToString(const Core::CPUThreadGuard& guard, u32 address, Type type);
|
||||
|
||||
Core::System& m_system;
|
||||
PPCSymbolDB& m_ppc_symbol_db;
|
||||
|
||||
MemoryViewTable* m_table;
|
||||
QScrollBar* m_scrollbar;
|
||||
@@ -137,6 +152,7 @@ private:
|
||||
int m_alignment = 16;
|
||||
int m_data_columns;
|
||||
bool m_dual_view = false;
|
||||
bool m_show_symbols = true;
|
||||
std::mutex m_updating;
|
||||
QColor m_highlight_color = QColor(120, 255, 255, 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user