From af58aca1a2b1878212de0ee305f910592980ea08 Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Wed, 25 Mar 2020 00:17:51 +0100
Subject: [PATCH] Implementing the toogle all
---
sources/Debugger/MemoryBusDebug.cpp | 24 ++++++++++++++++++++++++
ui/busView.ui | 18 ++++++++++++++++--
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/sources/Debugger/MemoryBusDebug.cpp b/sources/Debugger/MemoryBusDebug.cpp
index ef0fab9..17314cd 100644
--- a/sources/Debugger/MemoryBusDebug.cpp
+++ b/sources/Debugger/MemoryBusDebug.cpp
@@ -67,6 +67,17 @@ namespace ComSquare::Debugger
this->_proxy.filters[0].cgram = checked;
this->_proxy.refresh();
});
+ QMainWindow::connect(this->_ui.fromToggle, &QPushButton::pressed, [this]() {
+ this->_ui.fromWRAM->setChecked(!this->_proxy.filters[0].wram);
+ this->_ui.fromCPU->setChecked(!this->_proxy.filters[0].cpu);
+ this->_ui.fromAPU->setChecked(!this->_proxy.filters[0].apu);
+ this->_ui.fromPPU->setChecked(!this->_proxy.filters[0].ppu);
+ this->_ui.fromVRAM->setChecked(!this->_proxy.filters[0].vram);
+ this->_ui.fromOAM->setChecked(!this->_proxy.filters[0].oamram);
+ this->_ui.fromCG->setChecked(!this->_proxy.filters[0].cgram);
+ this->_ui.fromROM->setChecked(!this->_proxy.filters[0].rom);
+ this->_ui.fromSRAM->setChecked(!this->_proxy.filters[0].sram);
+ });
QMainWindow::connect(this->_ui.toAPU, &QCheckBox::toggled, [this](bool checked) {
this->_proxy.filters[1].apu = checked;
@@ -105,6 +116,17 @@ namespace ComSquare::Debugger
this->_model.clearLogs();
this->_proxy.refresh();
});
+ QMainWindow::connect(this->_ui.toToggle, &QPushButton::pressed, [this]() {
+ this->_ui.toWRAM->setChecked(!this->_proxy.filters[1].wram);
+ this->_ui.toCPU->setChecked(!this->_proxy.filters[1].cpu);
+ this->_ui.toAPU->setChecked(!this->_proxy.filters[1].apu);
+ this->_ui.toPPU->setChecked(!this->_proxy.filters[1].ppu);
+ this->_ui.toVRAM->setChecked(!this->_proxy.filters[1].vram);
+ this->_ui.toOAM->setChecked(!this->_proxy.filters[1].oamram);
+ this->_ui.toCG->setChecked(!this->_proxy.filters[1].cgram);
+ this->_ui.toROM->setChecked(!this->_proxy.filters[1].rom);
+ this->_ui.toSRAM->setChecked(!this->_proxy.filters[1].sram);
+ });
this->_window->show();
}
@@ -258,6 +280,8 @@ bool BusLoggerProxy::filterAcceptsRow(int sourceRow, const QModelIndex &) const
return this->filters[log.write].oamram;
case ComSquare::Component::SRam:
return this->filters[log.write].sram;
+ default:
+ return true;
}
}
diff --git a/ui/busView.ui b/ui/busView.ui
index 9b91312..d2b5cb5 100644
--- a/ui/busView.ui
+++ b/ui/busView.ui
@@ -69,7 +69,7 @@
false
-
+
-
@@ -196,6 +196,13 @@
+ -
+
+
+ Toggle all
+
+
+
@@ -210,7 +217,7 @@
false
-
+
-
@@ -346,6 +353,13 @@
+ -
+
+
+ Toggle all
+
+
+