diff --git a/sources/Debugger/cgramDebug.cpp b/sources/Debugger/cgramDebug.cpp index af897b3..8733de5 100644 --- a/sources/Debugger/cgramDebug.cpp +++ b/sources/Debugger/cgramDebug.cpp @@ -9,26 +9,26 @@ #include "../Exceptions/InvalidAction.hpp" #include "../Exceptions/InvalidAddress.hpp" -namespace ComSquare::cgramDebugger +namespace ComSquare::Debugger { cgramDebug::cgramDebug(SNES &snes, ComSquare::PPU::PPU &ppu) : _window(new ClosableWindow(*this, &cgramDebug::disableViewer)), _snes(snes), _ui(), _model(), - _ppu(ppu), + _ppu(ppu) { this->_window->setContextMenuPolicy(Qt::NoContextMenu); this->_window->setAttribute(Qt::WA_QuitOnClose, false); this->_window->setAttribute(Qt::WA_DeleteOnClose); - this->_ui.setupUi(this->_window); + /*this->_ui.setupUi(this->_window); this->_ui.log->setModel(&this->_model); this->_ui.log->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); //this->_ui.log->horizontalHeader()->setStretchLastSection(true); this->_ui.log->horizontalHeader()->setSectionsMovable(false); for (int i = 0; i < this->_model.column; i++) - this->_ui.log->setColumnWidth(i, this->_ui.log->width()); + this->_ui.log->setColumnWidth(i, this->_ui.log->width());*/ this->_window->show(); } @@ -71,5 +71,5 @@ QVariant cgramModel::data(const QModelIndex &index, int role) const if (role != Qt::DisplayRole) return QVariant(); if (role == Qt::BackgroundRole) - + return 1; } \ No newline at end of file diff --git a/sources/Debugger/cgramDebug.hpp b/sources/Debugger/cgramDebug.hpp index 1f23d1c..a41e5f2 100644 --- a/sources/Debugger/cgramDebug.hpp +++ b/sources/Debugger/cgramDebug.hpp @@ -49,7 +49,7 @@ public: }; -namespace ComSquare::cgramDebugger +namespace ComSquare::Debugger { //! @brief window that allow the user to view all data going through the memory bus. class cgramDebug { @@ -59,7 +59,7 @@ namespace ComSquare::cgramDebugger //! @brief A reference to the snes (to disable the debugger). SNES &_snes; //! @brief A widget that contain the whole UI. - Ui::cgramView _ui; + Ui::CgramView _ui; //! @brief The Log visualizer model for QT. cgramModel _model; //! @brief A reference to the ppu @@ -76,13 +76,13 @@ namespace ComSquare::cgramDebugger //! @brief Read data at the CGRAM address send it to the debugger. //! @param addr The address to read from. //! @return The color value in BGR, looks like this xbbbbbgggggrrrrr. - uint16_t read(uint8_t addr) override; + uint16_t read(uint8_t addr); //! @brief Focus the debugger's window. void focus(); //! @brief Return true if the Bus is overloaded with debugging features. - bool isDebugger() override; + bool isDebugger(); }; } diff --git a/sources/SNES.cpp b/sources/SNES.cpp index ffc3d67..2547b8f 100644 --- a/sources/SNES.cpp +++ b/sources/SNES.cpp @@ -9,6 +9,7 @@ #include "Debugger/CPUDebug.hpp" #include "Debugger/APUDebug.hpp" #include "Debugger/MemoryBusDebug.hpp" +#include "Debugger/cgramDebug.hpp" #endif diff --git a/ui/cgramView.ui b/ui/cgramView.ui index 317cd78..a110630 100644 --- a/ui/cgramView.ui +++ b/ui/cgramView.ui @@ -1,7 +1,7 @@ - MainWindow - + CgramView + 0