mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DolphinQt: JIT Widget Refresh
Fulfilling a certain six-year-old todo.
This commit is contained in:
@ -4,42 +4,128 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <memory>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class BreakpointWidget;
|
||||
class ClickableStatusBar;
|
||||
class CodeWidget;
|
||||
namespace Core
|
||||
{
|
||||
enum class State;
|
||||
class System;
|
||||
} // namespace Core
|
||||
struct JitBlock;
|
||||
class JitBlockProxyModel;
|
||||
class JitBlockTableModel;
|
||||
namespace JitBlockTableModelColumn
|
||||
{
|
||||
enum EnumType : int;
|
||||
}
|
||||
namespace JitBlockTableModelUserRole
|
||||
{
|
||||
enum EnumType : int;
|
||||
}
|
||||
class MemoryWidget;
|
||||
class QCloseEvent;
|
||||
class QFont;
|
||||
class QLineEdit;
|
||||
class QMenu;
|
||||
class QPlainTextEdit;
|
||||
class QPushButton;
|
||||
class QShowEvent;
|
||||
class QSplitter;
|
||||
class QTextBrowser;
|
||||
class QTableWidget;
|
||||
class QPushButton;
|
||||
class HostDisassembler;
|
||||
class QTableView;
|
||||
|
||||
class JITWidget : public QDockWidget
|
||||
class JITWidget final : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JITWidget(QWidget* parent = nullptr);
|
||||
~JITWidget();
|
||||
|
||||
void Compare(u32 address);
|
||||
using Column = JitBlockTableModelColumn::EnumType;
|
||||
using UserRole = JitBlockTableModelUserRole::EnumType;
|
||||
|
||||
signals:
|
||||
void HideSignal();
|
||||
void ShowSignal();
|
||||
void SetCodeAddress(u32 address);
|
||||
|
||||
public:
|
||||
explicit JITWidget(Core::System& system, QWidget* parent = nullptr);
|
||||
~JITWidget() override;
|
||||
|
||||
JITWidget(const JITWidget&) = delete;
|
||||
JITWidget(JITWidget&&) = delete;
|
||||
JITWidget& operator=(const JITWidget&) = delete;
|
||||
JITWidget& operator=(JITWidget&&) = delete;
|
||||
|
||||
// Always connected slots (external signals)
|
||||
void OnRequestPPCComparison(u32 address, bool translate_address);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
void CreateWidgets();
|
||||
void ConnectWidgets();
|
||||
|
||||
void closeEvent(QCloseEvent*) override;
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void hideEvent(QHideEvent* event) override;
|
||||
|
||||
QTableWidget* m_table_widget;
|
||||
QTextBrowser* m_ppc_asm_widget;
|
||||
QTextBrowser* m_host_asm_widget;
|
||||
void UpdateProfilingButton();
|
||||
void UpdateOtherButtons(Core::State state);
|
||||
void UpdateDebugFont(const QFont& font);
|
||||
void ClearDisassembly();
|
||||
void ShowFreeMemoryStatus();
|
||||
void UpdateContent(Core::State state);
|
||||
void CrossDisassemble(const JitBlock& block);
|
||||
void CrossDisassemble(const QModelIndex& index);
|
||||
void CrossDisassemble();
|
||||
void TableEraseBlocks();
|
||||
|
||||
// Setup and teardown
|
||||
void LoadQSettings();
|
||||
void SaveQSettings() const;
|
||||
void ConnectSlots();
|
||||
void DisconnectSlots();
|
||||
void Show();
|
||||
void Hide();
|
||||
|
||||
// Always connected slots (external signals)
|
||||
void OnVisibilityToggled(bool visible);
|
||||
void OnDebugModeToggled(bool visible);
|
||||
|
||||
// Always connected slots (internal signals)
|
||||
void OnToggleProfiling(bool enabled);
|
||||
void OnClearCache();
|
||||
void OnWipeProfiling();
|
||||
void OnTableCurrentChanged(const QModelIndex& current, const QModelIndex& previous);
|
||||
void OnTableDoubleClicked(const QModelIndex& index);
|
||||
void OnTableContextMenu(const QPoint& pos);
|
||||
void OnTableHeaderContextMenu(const QPoint& pos);
|
||||
void OnTableMenuViewCode();
|
||||
void OnTableMenuEraseBlocks();
|
||||
void OnStatusBarPressed();
|
||||
|
||||
// Conditionally connected slots (external signals)
|
||||
void OnJitCacheCleared();
|
||||
void OnUpdateDisasmDialog();
|
||||
void OnPPCSymbolsUpdated();
|
||||
void OnPPCBreakpointsChanged();
|
||||
void OnConfigChanged();
|
||||
void OnDebugFontChanged(const QFont& font);
|
||||
void OnEmulationStateChanged(Core::State state);
|
||||
|
||||
Core::System& m_system;
|
||||
|
||||
QLineEdit* m_pm_address_covered_line_edit;
|
||||
QPushButton* m_clear_cache_button;
|
||||
QPushButton* m_toggle_profiling_button;
|
||||
QPushButton* m_wipe_profiling_button;
|
||||
QTableView* m_table_view;
|
||||
JitBlockProxyModel* m_table_proxy;
|
||||
JitBlockTableModel* m_table_model;
|
||||
QPlainTextEdit* m_ppc_asm_widget;
|
||||
QPlainTextEdit* m_host_near_asm_widget;
|
||||
QPlainTextEdit* m_host_far_asm_widget;
|
||||
QSplitter* m_table_splitter;
|
||||
QSplitter* m_asm_splitter;
|
||||
QPushButton* m_refresh_button;
|
||||
QSplitter* m_disasm_splitter;
|
||||
ClickableStatusBar* m_status_bar;
|
||||
|
||||
std::unique_ptr<HostDisassembler> m_disassembler;
|
||||
u32 m_address = 0;
|
||||
QMenu* m_table_context_menu;
|
||||
QMenu* m_column_visibility_menu;
|
||||
};
|
||||
|
Reference in New Issue
Block a user