Cleaning up all debuggers

This commit is contained in:
Anonymus Raccoon
2020-03-23 23:07:15 +01:00
parent 75f9ffad8e
commit 09cd825bed
19 changed files with 266 additions and 105 deletions
+17 -3
View File
@@ -8,19 +8,33 @@
#include <QtWidgets/QMainWindow>
#include "../Memory/MemoryBus.hpp"
#include "../../ui/ui_busView.h"
#include "ClosableWindow.hpp"
namespace ComSquare::Debugger
{
//! @brief window that allow the user to view all data going through the memory bus.
class MemoryBusDebug : public Memory::MemoryBus, public QMainWindow {
class MemoryBusDebug : public Memory::MemoryBus {
private:
//! @brief The QT window for this debugger.
ClosableWindow<MemoryBusDebug> *_window;
//! @brief A reference to the snes (to disable the debugger).
SNES &_snes;
//! @brief A widget that contain the whole UI.
Ui::BusView _ui;
public slots:
//! @brief Called when the window is closed. Turn off the debugger and revert to a basic CPU.
void disableViewer();
public:
explicit MemoryBusDebug(const Memory::MemoryBus &bus);
explicit MemoryBusDebug(SNES &snes, const Memory::MemoryBus &bus);
MemoryBusDebug(const MemoryBusDebug &) = delete;
MemoryBusDebug &operator=(const MemoryBusDebug &) = delete;
~MemoryBusDebug() override = default;
~MemoryBusDebug() = default;
//! @brief Focus the debugger's window.
void focus();
//! @brief Return true if the Bus is overloaded with debugging features.
bool isDebugger() override;
};
}