From b0a14cfe7f0075d0758371276b7f6384856aa6ff Mon Sep 17 00:00:00 2001 From: chrisvj Date: Sat, 3 Jan 2015 15:51:14 -0800 Subject: citra-qt: Renamed all .hxx headers to .h --- src/citra_qt/debugger/callstack.cpp | 2 +- src/citra_qt/debugger/callstack.h | 23 ++++++ src/citra_qt/debugger/callstack.hxx | 23 ------ src/citra_qt/debugger/disassembler.cpp | 6 +- src/citra_qt/debugger/disassembler.h | 77 ++++++++++++++++++++ src/citra_qt/debugger/disassembler.hxx | 77 -------------------- src/citra_qt/debugger/graphics.cpp | 2 +- src/citra_qt/debugger/graphics.h | 43 +++++++++++ src/citra_qt/debugger/graphics.hxx | 43 ----------- src/citra_qt/debugger/graphics_breakpoints.cpp | 4 +- src/citra_qt/debugger/graphics_breakpoints.h | 53 ++++++++++++++ src/citra_qt/debugger/graphics_breakpoints.hxx | 53 -------------- src/citra_qt/debugger/graphics_breakpoints_p.h | 38 ++++++++++ src/citra_qt/debugger/graphics_breakpoints_p.hxx | 38 ---------- src/citra_qt/debugger/graphics_cmdlists.cpp | 4 +- src/citra_qt/debugger/graphics_cmdlists.h | 83 +++++++++++++++++++++ src/citra_qt/debugger/graphics_cmdlists.hxx | 83 --------------------- src/citra_qt/debugger/graphics_framebuffer.cpp | 4 +- src/citra_qt/debugger/graphics_framebuffer.h | 92 ++++++++++++++++++++++++ src/citra_qt/debugger/graphics_framebuffer.hxx | 92 ------------------------ src/citra_qt/debugger/ramview.cpp | 2 +- src/citra_qt/debugger/ramview.h | 16 +++++ src/citra_qt/debugger/ramview.hxx | 16 ----- src/citra_qt/debugger/registers.cpp | 2 +- src/citra_qt/debugger/registers.h | 29 ++++++++ src/citra_qt/debugger/registers.hxx | 29 -------- 26 files changed, 467 insertions(+), 467 deletions(-) create mode 100644 src/citra_qt/debugger/callstack.h delete mode 100644 src/citra_qt/debugger/callstack.hxx create mode 100644 src/citra_qt/debugger/disassembler.h delete mode 100644 src/citra_qt/debugger/disassembler.hxx create mode 100644 src/citra_qt/debugger/graphics.h delete mode 100644 src/citra_qt/debugger/graphics.hxx create mode 100644 src/citra_qt/debugger/graphics_breakpoints.h delete mode 100644 src/citra_qt/debugger/graphics_breakpoints.hxx create mode 100644 src/citra_qt/debugger/graphics_breakpoints_p.h delete mode 100644 src/citra_qt/debugger/graphics_breakpoints_p.hxx create mode 100644 src/citra_qt/debugger/graphics_cmdlists.h delete mode 100644 src/citra_qt/debugger/graphics_cmdlists.hxx create mode 100644 src/citra_qt/debugger/graphics_framebuffer.h delete mode 100644 src/citra_qt/debugger/graphics_framebuffer.hxx create mode 100644 src/citra_qt/debugger/ramview.h delete mode 100644 src/citra_qt/debugger/ramview.hxx create mode 100644 src/citra_qt/debugger/registers.h delete mode 100644 src/citra_qt/debugger/registers.hxx (limited to 'src/citra_qt/debugger') diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index 4a47ad46..bcc5d214 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp @@ -4,7 +4,7 @@ #include -#include "callstack.hxx" +#include "callstack.h" #include "core/core.h" #include "core/arm/arm_interface.h" diff --git a/src/citra_qt/debugger/callstack.h b/src/citra_qt/debugger/callstack.h new file mode 100644 index 00000000..4f4f7482 --- /dev/null +++ b/src/citra_qt/debugger/callstack.h @@ -0,0 +1,23 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include +#include "ui_callstack.h" + +class QStandardItemModel; + +class CallstackWidget : public QDockWidget +{ + Q_OBJECT + +public: + CallstackWidget(QWidget* parent = 0); + +public slots: + void OnCPUStepped(); + +private: + Ui::CallStack ui; + QStandardItemModel* callstack_model; +}; diff --git a/src/citra_qt/debugger/callstack.hxx b/src/citra_qt/debugger/callstack.hxx deleted file mode 100644 index 4f4f7482..00000000 --- a/src/citra_qt/debugger/callstack.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include -#include "ui_callstack.h" - -class QStandardItemModel; - -class CallstackWidget : public QDockWidget -{ - Q_OBJECT - -public: - CallstackWidget(QWidget* parent = 0); - -public slots: - void OnCPUStepped(); - -private: - Ui::CallStack ui; - QStandardItemModel* callstack_model; -}; diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 636a0f18..8db73752 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -2,10 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "disassembler.hxx" +#include "disassembler.h" -#include "../bootmanager.hxx" -#include "../hotkeys.hxx" +#include "../bootmanager.h" +#include "../hotkeys.h" #include "common/common.h" #include "core/mem_map.h" diff --git a/src/citra_qt/debugger/disassembler.h b/src/citra_qt/debugger/disassembler.h new file mode 100644 index 00000000..6d3cef10 --- /dev/null +++ b/src/citra_qt/debugger/disassembler.h @@ -0,0 +1,77 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include +#include +#include "ui_disassembler.h" + +#include "common/common.h" +#include "common/break_points.h" + +class QAction; +class EmuThread; + +class DisassemblerModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + DisassemblerModel(QObject* parent); + + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex& child) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + + QModelIndex IndexFromAbsoluteAddress(unsigned int address) const; + const BreakPoints& GetBreakPoints() const; + +public slots: + void ParseFromAddress(unsigned int address); + void OnSelectionChanged(const QModelIndex&); + void OnSetOrUnsetBreakpoint(); + void SetNextInstruction(unsigned int address); + +private: + unsigned int base_address; + unsigned int code_size; + unsigned int program_counter; + + QModelIndex selection; + + // TODO: Make BreakPoints less crappy (i.e. const-correct) so that this needn't be mutable. + mutable BreakPoints breakpoints; +}; + +class DisassemblerWidget : public QDockWidget +{ + Q_OBJECT + +public: + DisassemblerWidget(QWidget* parent, EmuThread& emu_thread); + + void Init(); + +public slots: + void OnContinue(); + void OnStep(); + void OnStepInto(); + void OnPause(); + void OnToggleStartStop(); + + void OnCPUStepped(); + +private: + // returns -1 if no row is selected + int SelectedRow(); + + Ui::DockWidget disasm_ui; + + DisassemblerModel* model; + + u32 base_addr; + + EmuThread& emu_thread; +}; diff --git a/src/citra_qt/debugger/disassembler.hxx b/src/citra_qt/debugger/disassembler.hxx deleted file mode 100644 index 6d3cef10..00000000 --- a/src/citra_qt/debugger/disassembler.hxx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include -#include -#include "ui_disassembler.h" - -#include "common/common.h" -#include "common/break_points.h" - -class QAction; -class EmuThread; - -class DisassemblerModel : public QAbstractItemModel -{ - Q_OBJECT - -public: - DisassemblerModel(QObject* parent); - - QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; - QModelIndex parent(const QModelIndex& child) const override; - int columnCount(const QModelIndex& parent = QModelIndex()) const override; - int rowCount(const QModelIndex& parent = QModelIndex()) const override; - QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; - - QModelIndex IndexFromAbsoluteAddress(unsigned int address) const; - const BreakPoints& GetBreakPoints() const; - -public slots: - void ParseFromAddress(unsigned int address); - void OnSelectionChanged(const QModelIndex&); - void OnSetOrUnsetBreakpoint(); - void SetNextInstruction(unsigned int address); - -private: - unsigned int base_address; - unsigned int code_size; - unsigned int program_counter; - - QModelIndex selection; - - // TODO: Make BreakPoints less crappy (i.e. const-correct) so that this needn't be mutable. - mutable BreakPoints breakpoints; -}; - -class DisassemblerWidget : public QDockWidget -{ - Q_OBJECT - -public: - DisassemblerWidget(QWidget* parent, EmuThread& emu_thread); - - void Init(); - -public slots: - void OnContinue(); - void OnStep(); - void OnStepInto(); - void OnPause(); - void OnToggleStartStop(); - - void OnCPUStepped(); - -private: - // returns -1 if no row is selected - int SelectedRow(); - - Ui::DockWidget disasm_ui; - - DisassemblerModel* model; - - u32 base_addr; - - EmuThread& emu_thread; -}; diff --git a/src/citra_qt/debugger/graphics.cpp b/src/citra_qt/debugger/graphics.cpp index 9633d367..7424671f 100644 --- a/src/citra_qt/debugger/graphics.cpp +++ b/src/citra_qt/debugger/graphics.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "graphics.hxx" +#include "graphics.h" #include #include #include diff --git a/src/citra_qt/debugger/graphics.h b/src/citra_qt/debugger/graphics.h new file mode 100644 index 00000000..8119b4c8 --- /dev/null +++ b/src/citra_qt/debugger/graphics.h @@ -0,0 +1,43 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include + +#include "video_core/gpu_debugger.h" + +class GPUCommandStreamItemModel : public QAbstractListModel, public GraphicsDebugger::DebuggerObserver +{ + Q_OBJECT + +public: + GPUCommandStreamItemModel(QObject* parent); + + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + +public: + void GXCommandProcessed(int total_command_count) override; + +public slots: + void OnGXCommandFinishedInternal(int total_command_count); + +signals: + void GXCommandFinished(int total_command_count); + +private: + int command_count; +}; + +class GPUCommandStreamWidget : public QDockWidget +{ + Q_OBJECT + +public: + GPUCommandStreamWidget(QWidget* parent = 0); + +private: +}; diff --git a/src/citra_qt/debugger/graphics.hxx b/src/citra_qt/debugger/graphics.hxx deleted file mode 100644 index 8119b4c8..00000000 --- a/src/citra_qt/debugger/graphics.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include -#include - -#include "video_core/gpu_debugger.h" - -class GPUCommandStreamItemModel : public QAbstractListModel, public GraphicsDebugger::DebuggerObserver -{ - Q_OBJECT - -public: - GPUCommandStreamItemModel(QObject* parent); - - int rowCount(const QModelIndex& parent = QModelIndex()) const override; - QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; - -public: - void GXCommandProcessed(int total_command_count) override; - -public slots: - void OnGXCommandFinishedInternal(int total_command_count); - -signals: - void GXCommandFinished(int total_command_count); - -private: - int command_count; -}; - -class GPUCommandStreamWidget : public QDockWidget -{ - Q_OBJECT - -public: - GPUCommandStreamWidget(QWidget* parent = 0); - -private: -}; diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp index 170aa736..262e2e77 100644 --- a/src/citra_qt/debugger/graphics_breakpoints.cpp +++ b/src/citra_qt/debugger/graphics_breakpoints.cpp @@ -8,8 +8,8 @@ #include #include -#include "graphics_breakpoints.hxx" -#include "graphics_breakpoints_p.hxx" +#include "graphics_breakpoints.h" +#include "graphics_breakpoints_p.h" BreakPointModel::BreakPointModel(std::shared_ptr debug_context, QObject* parent) : QAbstractListModel(parent), context_weak(debug_context), diff --git a/src/citra_qt/debugger/graphics_breakpoints.h b/src/citra_qt/debugger/graphics_breakpoints.h new file mode 100644 index 00000000..5b9ba324 --- /dev/null +++ b/src/citra_qt/debugger/graphics_breakpoints.h @@ -0,0 +1,53 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +#include +#include + +#include "video_core/debug_utils/debug_utils.h" + +class QLabel; +class QPushButton; +class QTreeView; + +class BreakPointModel; + +class GraphicsBreakPointsWidget : public QDockWidget, Pica::DebugContext::BreakPointObserver { + Q_OBJECT + + using Event = Pica::DebugContext::Event; + +public: + GraphicsBreakPointsWidget(std::shared_ptr debug_context, + QWidget* parent = nullptr); + + void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; + void OnPicaResume() override; + +public slots: + void OnBreakPointHit(Pica::DebugContext::Event event, void* data); + void OnResumeRequested(); + void OnResumed(); + void OnBreakpointSelectionChanged(const QModelIndex&); + void OnToggleBreakpointEnabled(); + +signals: + void Resumed(); + void BreakPointHit(Pica::DebugContext::Event event, void* data); + void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); + +private: + void UpdateToggleBreakpointButton(const QModelIndex& index); + + QLabel* status_text; + QPushButton* resume_button; + QPushButton* toggle_breakpoint_button; + + BreakPointModel* breakpoint_model; + QTreeView* breakpoint_list; +}; diff --git a/src/citra_qt/debugger/graphics_breakpoints.hxx b/src/citra_qt/debugger/graphics_breakpoints.hxx deleted file mode 100644 index 5b9ba324..00000000 --- a/src/citra_qt/debugger/graphics_breakpoints.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include - -#include -#include - -#include "video_core/debug_utils/debug_utils.h" - -class QLabel; -class QPushButton; -class QTreeView; - -class BreakPointModel; - -class GraphicsBreakPointsWidget : public QDockWidget, Pica::DebugContext::BreakPointObserver { - Q_OBJECT - - using Event = Pica::DebugContext::Event; - -public: - GraphicsBreakPointsWidget(std::shared_ptr debug_context, - QWidget* parent = nullptr); - - void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; - void OnPicaResume() override; - -public slots: - void OnBreakPointHit(Pica::DebugContext::Event event, void* data); - void OnResumeRequested(); - void OnResumed(); - void OnBreakpointSelectionChanged(const QModelIndex&); - void OnToggleBreakpointEnabled(); - -signals: - void Resumed(); - void BreakPointHit(Pica::DebugContext::Event event, void* data); - void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); - -private: - void UpdateToggleBreakpointButton(const QModelIndex& index); - - QLabel* status_text; - QPushButton* resume_button; - QPushButton* toggle_breakpoint_button; - - BreakPointModel* breakpoint_model; - QTreeView* breakpoint_list; -}; diff --git a/src/citra_qt/debugger/graphics_breakpoints_p.h b/src/citra_qt/debugger/graphics_breakpoints_p.h new file mode 100644 index 00000000..232bfc86 --- /dev/null +++ b/src/citra_qt/debugger/graphics_breakpoints_p.h @@ -0,0 +1,38 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +#include + +#include "video_core/debug_utils/debug_utils.h" + +class BreakPointModel : public QAbstractListModel { + Q_OBJECT + +public: + enum { + Role_IsEnabled = Qt::UserRole, + }; + + BreakPointModel(std::shared_ptr context, QObject* parent); + + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + +public slots: + void OnBreakPointHit(Pica::DebugContext::Event event); + void OnResumed(); + +private: + std::weak_ptr context_weak; + bool at_breakpoint; + Pica::DebugContext::Event active_breakpoint; +}; diff --git a/src/citra_qt/debugger/graphics_breakpoints_p.hxx b/src/citra_qt/debugger/graphics_breakpoints_p.hxx deleted file mode 100644 index 232bfc86..00000000 --- a/src/citra_qt/debugger/graphics_breakpoints_p.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include - -#include - -#include "video_core/debug_utils/debug_utils.h" - -class BreakPointModel : public QAbstractListModel { - Q_OBJECT - -public: - enum { - Role_IsEnabled = Qt::UserRole, - }; - - BreakPointModel(std::shared_ptr context, QObject* parent); - - int columnCount(const QModelIndex& parent = QModelIndex()) const override; - int rowCount(const QModelIndex& parent = QModelIndex()) const override; - QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - - bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); - -public slots: - void OnBreakPointHit(Pica::DebugContext::Event event); - void OnResumed(); - -private: - std::weak_ptr context_weak; - bool at_breakpoint; - Pica::DebugContext::Event active_breakpoint; -}; diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 708b805a..4a6159fd 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -16,9 +16,9 @@ #include "video_core/debug_utils/debug_utils.h" -#include "graphics_cmdlists.hxx" +#include "graphics_cmdlists.h" -#include "util/spinbox.hxx" +#include "util/spinbox.h" QImage LoadTexture(u8* src, const Pica::DebugUtils::TextureInfo& info) { QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); diff --git a/src/citra_qt/debugger/graphics_cmdlists.h b/src/citra_qt/debugger/graphics_cmdlists.h new file mode 100644 index 00000000..a465d044 --- /dev/null +++ b/src/citra_qt/debugger/graphics_cmdlists.h @@ -0,0 +1,83 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include + +#include "video_core/gpu_debugger.h" +#include "video_core/debug_utils/debug_utils.h" + +class QPushButton; +class QTreeView; + +class GPUCommandListModel : public QAbstractListModel +{ + Q_OBJECT + +public: + enum { + CommandIdRole = Qt::UserRole, + }; + + GPUCommandListModel(QObject* parent); + + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + +public slots: + void OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace); + +private: + Pica::DebugUtils::PicaTrace pica_trace; +}; + +class GPUCommandListWidget : public QDockWidget +{ + Q_OBJECT + +public: + GPUCommandListWidget(QWidget* parent = 0); + +public slots: + void OnToggleTracing(); + void OnCommandDoubleClicked(const QModelIndex&); + + void SetCommandInfo(const QModelIndex&); + +signals: + void TracingFinished(const Pica::DebugUtils::PicaTrace&); + +private: + std::unique_ptr pica_trace; + + QTreeView* list_widget; + QWidget* command_info_widget; + QPushButton* toggle_tracing; +}; + +class TextureInfoDockWidget : public QDockWidget { + Q_OBJECT + +public: + TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr); + +signals: + void UpdatePixmap(const QPixmap& pixmap); + +private slots: + void OnAddressChanged(qint64 value); + void OnFormatChanged(int value); + void OnWidthChanged(int value); + void OnHeightChanged(int value); + void OnStrideChanged(int value); + +private: + QPixmap ReloadPixmap() const; + + Pica::DebugUtils::TextureInfo info; +}; diff --git a/src/citra_qt/debugger/graphics_cmdlists.hxx b/src/citra_qt/debugger/graphics_cmdlists.hxx deleted file mode 100644 index a465d044..00000000 --- a/src/citra_qt/debugger/graphics_cmdlists.hxx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include -#include - -#include "video_core/gpu_debugger.h" -#include "video_core/debug_utils/debug_utils.h" - -class QPushButton; -class QTreeView; - -class GPUCommandListModel : public QAbstractListModel -{ - Q_OBJECT - -public: - enum { - CommandIdRole = Qt::UserRole, - }; - - GPUCommandListModel(QObject* parent); - - int columnCount(const QModelIndex& parent = QModelIndex()) const override; - int rowCount(const QModelIndex& parent = QModelIndex()) const override; - QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - -public slots: - void OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace); - -private: - Pica::DebugUtils::PicaTrace pica_trace; -}; - -class GPUCommandListWidget : public QDockWidget -{ - Q_OBJECT - -public: - GPUCommandListWidget(QWidget* parent = 0); - -public slots: - void OnToggleTracing(); - void OnCommandDoubleClicked(const QModelIndex&); - - void SetCommandInfo(const QModelIndex&); - -signals: - void TracingFinished(const Pica::DebugUtils::PicaTrace&); - -private: - std::unique_ptr pica_trace; - - QTreeView* list_widget; - QWidget* command_info_widget; - QPushButton* toggle_tracing; -}; - -class TextureInfoDockWidget : public QDockWidget { - Q_OBJECT - -public: - TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr); - -signals: - void UpdatePixmap(const QPixmap& pixmap); - -private slots: - void OnAddressChanged(qint64 value); - void OnFormatChanged(int value); - void OnWidthChanged(int value); - void OnHeightChanged(int value); - void OnStrideChanged(int value); - -private: - QPixmap ReloadPixmap() const; - - Pica::DebugUtils::TextureInfo info; -}; diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp index 7ef699f3..caa6896f 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.cpp +++ b/src/citra_qt/debugger/graphics_framebuffer.cpp @@ -13,9 +13,9 @@ #include "video_core/color.h" #include "video_core/pica.h" -#include "graphics_framebuffer.hxx" +#include "graphics_framebuffer.h" -#include "util/spinbox.hxx" +#include "util/spinbox.h" BreakPointObserverDock::BreakPointObserverDock(std::shared_ptr debug_context, const QString& title, QWidget* parent) diff --git a/src/citra_qt/debugger/graphics_framebuffer.h b/src/citra_qt/debugger/graphics_framebuffer.h new file mode 100644 index 00000000..02813525 --- /dev/null +++ b/src/citra_qt/debugger/graphics_framebuffer.h @@ -0,0 +1,92 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +#include "video_core/debug_utils/debug_utils.h" + +class QComboBox; +class QLabel; +class QSpinBox; + +class CSpinBox; + +// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots. +// This is because the Pica breakpoint callbacks are called from a non-GUI thread, while +// the widget usually wants to perform reactions in the GUI thread. +class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver { + Q_OBJECT + +public: + BreakPointObserverDock(std::shared_ptr debug_context, const QString& title, + QWidget* parent = nullptr); + + void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; + void OnPicaResume() override; + +private slots: + virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0; + virtual void OnResumed() = 0; + +signals: + void Resumed(); + void BreakPointHit(Pica::DebugContext::Event event, void* data); +}; + +class GraphicsFramebufferWidget : public BreakPointObserverDock { + Q_OBJECT + + using Event = Pica::DebugContext::Event; + + enum class Source { + PicaTarget = 0, + Custom = 1, + + // TODO: Add GPU framebuffer sources! + }; + + enum class Format { + RGBA8 = 0, + RGB8 = 1, + RGBA5551 = 2, + RGB565 = 3, + RGBA4 = 4, + }; + +public: + GraphicsFramebufferWidget(std::shared_ptr debug_context, QWidget* parent = nullptr); + +public slots: + void OnFramebufferSourceChanged(int new_value); + void OnFramebufferAddressChanged(qint64 new_value); + void OnFramebufferWidthChanged(unsigned int new_value); + void OnFramebufferHeightChanged(unsigned int new_value); + void OnFramebufferFormatChanged(int new_value); + void OnUpdate(); + +private slots: + void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override; + void OnResumed() override; + +signals: + void Update(); + +private: + + QComboBox* framebuffer_source_list; + CSpinBox* framebuffer_address_control; + QSpinBox* framebuffer_width_control; + QSpinBox* framebuffer_height_control; + QComboBox* framebuffer_format_control; + + QLabel* framebuffer_picture_label; + + Source framebuffer_source; + unsigned framebuffer_address; + unsigned framebuffer_width; + unsigned framebuffer_height; + Format framebuffer_format; +}; diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx deleted file mode 100644 index 02813525..00000000 --- a/src/citra_qt/debugger/graphics_framebuffer.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include - -#include "video_core/debug_utils/debug_utils.h" - -class QComboBox; -class QLabel; -class QSpinBox; - -class CSpinBox; - -// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots. -// This is because the Pica breakpoint callbacks are called from a non-GUI thread, while -// the widget usually wants to perform reactions in the GUI thread. -class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver { - Q_OBJECT - -public: - BreakPointObserverDock(std::shared_ptr debug_context, const QString& title, - QWidget* parent = nullptr); - - void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; - void OnPicaResume() override; - -private slots: - virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0; - virtual void OnResumed() = 0; - -signals: - void Resumed(); - void BreakPointHit(Pica::DebugContext::Event event, void* data); -}; - -class GraphicsFramebufferWidget : public BreakPointObserverDock { - Q_OBJECT - - using Event = Pica::DebugContext::Event; - - enum class Source { - PicaTarget = 0, - Custom = 1, - - // TODO: Add GPU framebuffer sources! - }; - - enum class Format { - RGBA8 = 0, - RGB8 = 1, - RGBA5551 = 2, - RGB565 = 3, - RGBA4 = 4, - }; - -public: - GraphicsFramebufferWidget(std::shared_ptr debug_context, QWidget* parent = nullptr); - -public slots: - void OnFramebufferSourceChanged(int new_value); - void OnFramebufferAddressChanged(qint64 new_value); - void OnFramebufferWidthChanged(unsigned int new_value); - void OnFramebufferHeightChanged(unsigned int new_value); - void OnFramebufferFormatChanged(int new_value); - void OnUpdate(); - -private slots: - void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override; - void OnResumed() override; - -signals: - void Update(); - -private: - - QComboBox* framebuffer_source_list; - CSpinBox* framebuffer_address_control; - QSpinBox* framebuffer_width_control; - QSpinBox* framebuffer_height_control; - QComboBox* framebuffer_format_control; - - QLabel* framebuffer_picture_label; - - Source framebuffer_source; - unsigned framebuffer_address; - unsigned framebuffer_width; - unsigned framebuffer_height; - Format framebuffer_format; -}; diff --git a/src/citra_qt/debugger/ramview.cpp b/src/citra_qt/debugger/ramview.cpp index d3ff69a6..2b199bad 100644 --- a/src/citra_qt/debugger/ramview.cpp +++ b/src/citra_qt/debugger/ramview.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "ramview.hxx" +#include "ramview.h" #include "common/common.h" #include "core/mem_map.h" diff --git a/src/citra_qt/debugger/ramview.h b/src/citra_qt/debugger/ramview.h new file mode 100644 index 00000000..18423036 --- /dev/null +++ b/src/citra_qt/debugger/ramview.h @@ -0,0 +1,16 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "qhexedit.h" + +class GRamView : public QHexEdit +{ + Q_OBJECT + +public: + GRamView(QWidget* parent = NULL); + +public slots: + void OnCPUStepped(); +}; diff --git a/src/citra_qt/debugger/ramview.hxx b/src/citra_qt/debugger/ramview.hxx deleted file mode 100644 index 18423036..00000000 --- a/src/citra_qt/debugger/ramview.hxx +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "qhexedit.h" - -class GRamView : public QHexEdit -{ - Q_OBJECT - -public: - GRamView(QWidget* parent = NULL); - -public slots: - void OnCPUStepped(); -}; diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index f798495b..e982dfb3 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "registers.hxx" +#include "registers.h" #include "core/core.h" #include "core/arm/arm_interface.h" diff --git a/src/citra_qt/debugger/registers.h b/src/citra_qt/debugger/registers.h new file mode 100644 index 00000000..ac8429f2 --- /dev/null +++ b/src/citra_qt/debugger/registers.h @@ -0,0 +1,29 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "ui_registers.h" + +#include +#include + +class QTreeWidget; + +class RegistersWidget : public QDockWidget +{ + Q_OBJECT + +public: + RegistersWidget(QWidget* parent = NULL); + +public slots: + void OnCPUStepped(); + +private: + Ui::ARMRegisters cpu_regs_ui; + + QTreeWidget* tree; + + QTreeWidgetItem* registers; + QTreeWidgetItem* CSPR; +}; diff --git a/src/citra_qt/debugger/registers.hxx b/src/citra_qt/debugger/registers.hxx deleted file mode 100644 index ac8429f2..00000000 --- a/src/citra_qt/debugger/registers.hxx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "ui_registers.h" - -#include -#include - -class QTreeWidget; - -class RegistersWidget : public QDockWidget -{ - Q_OBJECT - -public: - RegistersWidget(QWidget* parent = NULL); - -public slots: - void OnCPUStepped(); - -private: - Ui::ARMRegisters cpu_regs_ui; - - QTreeWidget* tree; - - QTreeWidgetItem* registers; - QTreeWidgetItem* CSPR; -}; -- cgit v1.2.3