Debian Codegraph @

Source/Core/DolphinQt/Debugger/RegisterWidget.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <functional>
7
8 #include <QDockWidget>
9
10 #include "Common/CommonTypes.h"
11 #include "DolphinQt/Debugger/RegisterColumn.h"
12
13 class QTableWidget;
14 class QCloseEvent;
15 class QShowEvent;
16 namespace Core
17 {
18 class System;
19 }
20
21 class RegisterWidget : public QDockWidget
22 {
23 Q_OBJECT
24 public:
25 explicit RegisterWidget(QWidget* parent = nullptr);
26 ~RegisterWidget() override;
27
28 signals:
29 void RequestTableUpdate();
30 void RequestViewInCode(u32 addr);
31 void RequestViewInMemory(u32 addr);
32 void RequestMemoryBreakpoint(u32 addr);
33 void RequestWatch(QString name, u32 addr);
34 void UpdateTable();
35 void UpdateValue(QTableWidgetItem* item);
36 void UpdateValueType(QTableWidgetItem* item);
37
38 protected:
39 void closeEvent(QCloseEvent*) override;
40 void showEvent(QShowEvent* event) override;
41
42 private:
43 void CreateWidgets();
44 void ConnectWidgets();
45 void PopulateTable();
46
47 void ShowContextMenu();
48 void OnItemChanged(QTableWidgetItem* item);
49 void OnDebugFontChanged(const QFont& font);
50
51 void AddRegister(int row, int column, RegisterType type, const std::string& register_name,
52 std::function<u64()> get_reg, std::function<void(u64)> set_reg);
53
54 void AutoStep(const std::string& reg) const;
55 void Update();
56
57 Core::System& m_system;
58
59 QTableWidget* m_table;
60 bool m_updating = false;
61 };