mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-22 22:45:52 +00:00
Cleaning up all debuggers
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user