mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
e149ad4f0a
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#include <QDockWidget>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "DolphinQt/Debugger/RegisterColumn.h"
|
|
|
|
class QTableWidget;
|
|
class QCloseEvent;
|
|
class QShowEvent;
|
|
|
|
class RegisterWidget : public QDockWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit RegisterWidget(QWidget* parent = nullptr);
|
|
~RegisterWidget();
|
|
|
|
signals:
|
|
void RequestTableUpdate();
|
|
void RequestViewInCode(u32 addr);
|
|
void RequestViewInMemory(u32 addr);
|
|
void RequestMemoryBreakpoint(u32 addr);
|
|
void RequestWatch(QString name, u32 addr);
|
|
void UpdateTable();
|
|
void UpdateValue(QTableWidgetItem* item);
|
|
void UpdateValueType(QTableWidgetItem* item);
|
|
|
|
protected:
|
|
void closeEvent(QCloseEvent*) override;
|
|
void showEvent(QShowEvent* event) 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<u64()> get_reg, std::function<void(u64)> set_reg);
|
|
|
|
void Update();
|
|
|
|
QTableWidget* m_table;
|
|
bool m_updating = false;
|
|
};
|