diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index ccb736d9..8bdbe5cd 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -129,6 +129,10 @@ InsightWindow::InsightWindow(InsightWorker& insightWorker): QMainWindow(nullptr) this->bottomMenuBar = this->container->findChild("bottom-menu-bar"); this->bottomPanel = this->container->findChild("bottom-panel"); + this->ramInspectionButton = this->container->findChild("ram-inspection-btn"); + + connect(this->ramInspectionButton, &QToolButton::clicked, this, &InsightWindow::toggleRamInspectionPane); + this->footer = this->windowContainer->findChild("footer"); this->targetStatusLabel = this->footer->findChild("target-state"); this->programCounterValueLabel = this->footer->findChild("target-program-counter-value"); @@ -233,6 +237,17 @@ void InsightWindow::toggleTargetRegistersPane() { } } +void InsightWindow::toggleRamInspectionPane() { + if (this->bottomPanel->isVisible()) { + this->bottomPanel->hide(); + this->ramInspectionButton->setChecked(false); + + } else { + this->bottomPanel->show(); + this->ramInspectionButton->setChecked(true); + } +} + void InsightWindow::resizeEvent(QResizeEvent* event) { const auto windowSize = this->size(); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp index 6e9da7b6..ab9a0d65 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp @@ -49,6 +49,7 @@ namespace Bloom void openGettingStartedUrl(); void openAboutWindow(); void toggleTargetRegistersPane(); + void toggleRamInspectionPane(); signals: void refreshTargetPinStates(int variantId); @@ -83,13 +84,14 @@ namespace Bloom Widgets::PanelWidget* leftPanel = nullptr; Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr; QToolButton* targetRegistersButton = nullptr; - Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr; QLabel* ioUnavailableWidget = nullptr; + Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr; QWidget* bottomMenuBar = nullptr; Widgets::PanelWidget* bottomPanel = nullptr; + QToolButton* ramInspectionButton = nullptr; QWidget* footer = nullptr; QLabel* targetStatusLabel = nullptr;