Remplacing the DMA viewer by a registers viewer

This commit is contained in:
Anonymus Raccoon
2020-05-28 14:51:44 +02:00
parent 5e0f6104fe
commit 3fb36e1be3
9 changed files with 119 additions and 170 deletions
-32
View File
@@ -1,32 +0,0 @@
//
// Created by anonymus-raccoon on 5/28/20.
//
#include "DMADebug.hpp"
#include "../../../SNES.hpp"
namespace ComSquare::Debugger
{
DMADebug::DMADebug(SNES &snes)
: _window(new ClosableWindow<DMADebug>(*this, &DMADebug::disableDebugger)),
_ui(),
_snes(snes)
{
this->_window->setContextMenuPolicy(Qt::NoContextMenu);
this->_window->setAttribute(Qt::WA_QuitOnClose, false);
this->_window->setAttribute(Qt::WA_DeleteOnClose);
this->_ui.setupUi(this->_window);
this->_window->show();
}
void DMADebug::focus()
{
this->_window->activateWindow();
}
void DMADebug::disableDebugger()
{
this->_snes.disableDMADebugging();
}
}
-43
View File
@@ -1,43 +0,0 @@
//
// Created by anonymus-raccoon on 5/28/20.
//
#ifndef COMSQUARE_DMADEBUG_HPP
#define COMSQUARE_DMADEBUG_HPP
#include <QtCore/QObject>
#include "../../ClosableWindow.hpp"
#include "../../../../ui/ui_dmaView.h"
namespace ComSquare
{
class SNES;
namespace Debugger
{
class DMADebug : public QObject {
private:
//! @brief The QT window for this debugger.
ClosableWindow <DMADebug> *_window;
//! @brief A widget that contain the whole UI.
Ui::DMAView _ui;
//! @brief The snes instance to read/write to DMA channels.
SNES &_snes;
public:
//! @brief Called when the window is closed. Turn off the debugger.
void disableDebugger();
explicit DMADebug(SNES &snes);
DMADebug(
const DMADebug &) = delete;
DMADebug &operator=(const DMADebug &) = delete;
~DMADebug() =default;
//! @brief Focus the debugger's window.
void focus();
};
};
}
#endif //COMSQUARE_DMADEBUG_HPP