mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-06 19:32:18 +00:00
Remplacing the DMA viewer by a registers viewer
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user