mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Qt/Debugger: Implement "Registers" window
This commit is contained in:
46
Source/Core/DolphinQt2/Debugger/RegisterWidget.h
Normal file
46
Source/Core/DolphinQt2/Debugger/RegisterWidget.h
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <QDockWidget>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "DolphinQt2/Debugger/RegisterColumn.h"
|
||||
|
||||
class QTableWidget;
|
||||
class QCloseEvent;
|
||||
|
||||
class RegisterWidget : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit RegisterWidget(QWidget* parent = nullptr);
|
||||
~RegisterWidget();
|
||||
|
||||
signals:
|
||||
void RequestTableUpdate();
|
||||
void UpdateTable();
|
||||
void UpdateValue(QTableWidgetItem* item);
|
||||
void UpdateValueType(QTableWidgetItem* item);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent*) override;
|
||||
|
||||
private:
|
||||
void CreateWidgets();
|
||||
void ConnectWidgets();
|
||||
void PopulateTable();
|
||||
|
||||
void ShowContextMenu();
|
||||
void OnItemChanged(QTableWidgetItem* item);
|
||||
|
||||
void AddRegister(int row, int column, RegisterType type, std::string register_name,
|
||||
std::function<u32()> get_reg, std::function<void(u32)> set_reg);
|
||||
|
||||
QTableWidget* m_table;
|
||||
bool m_updating = false;
|
||||
};
|
Reference in New Issue
Block a user