Debian Codegraph @

Source/Core/DolphinQt/Debugger/ThreadWidget.h

raw symbols SCIP
1 // Copyright 2020 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <QDockWidget>
7
8 #include "Common/CommonTypes.h"
9 #include "Common/Debug/Threads.h"
10
11 class QCloseEvent;
12 class QGroupBox;
13 class QLineEdit;
14 class QShowEvent;
15 class QTableWidget;
16
17 class ThreadWidget : public QDockWidget
18 {
19 Q_OBJECT
20 public:
21 explicit ThreadWidget(QWidget* parent = nullptr);
22 ~ThreadWidget() override;
23
24 signals:
25 void RequestBreakpoint(u32 addr);
26 void RequestMemoryBreakpoint(u32 addr);
27 void RequestWatch(QString name, u32 addr);
28 void RequestViewInCode(u32 addr);
29 void RequestViewInMemory(u32 addr);
30
31 protected:
32 void closeEvent(QCloseEvent*) override;
33 void showEvent(QShowEvent* event) override;
34
35 private:
36 void CreateWidgets();
37 void ConnectWidgets();
38
39 QLineEdit* CreateLineEdit() const;
40 QGroupBox* CreateContextGroup();
41 QGroupBox* CreateActiveThreadQueueGroup();
42 QGroupBox* CreateThreadGroup();
43 QGroupBox* CreateThreadContextGroup();
44 QGroupBox* CreateThreadCallstackGroup();
45
46 void ShowContextMenu(QTableWidget* table);
47
48 void Update();
49 void UpdateThreadContext(const Common::Debug::PartialContext& context);
50 void UpdateThreadCallstack(const Core::CPUThreadGuard& guard,
51 const Common::Debug::PartialContext& context);
52 void OnSelectionChanged(int row);
53
54 QGroupBox* m_state;
55 QLineEdit* m_current_context;
56 QLineEdit* m_current_thread;
57 QLineEdit* m_default_thread;
58 QLineEdit* m_queue_head;
59 QLineEdit* m_queue_tail;
60 QTableWidget* m_thread_table;
61 QTableWidget* m_context_table;
62 QTableWidget* m_callstack_table;
63 Common::Debug::Threads m_threads;
64 };