Bottom panel toggling via RAM inspection button

This commit is contained in:
Nav
2021-10-06 23:29:05 +01:00
parent c2ff87fd8d
commit 87801bcc20
2 changed files with 18 additions and 1 deletions

View File

@@ -129,6 +129,10 @@ InsightWindow::InsightWindow(InsightWorker& insightWorker): QMainWindow(nullptr)
this->bottomMenuBar = this->container->findChild<QWidget*>("bottom-menu-bar");
this->bottomPanel = this->container->findChild<PanelWidget*>("bottom-panel");
this->ramInspectionButton = this->container->findChild<QToolButton*>("ram-inspection-btn");
connect(this->ramInspectionButton, &QToolButton::clicked, this, &InsightWindow::toggleRamInspectionPane);
this->footer = this->windowContainer->findChild<QWidget*>("footer");
this->targetStatusLabel = this->footer->findChild<QLabel*>("target-state");
this->programCounterValueLabel = this->footer->findChild<QLabel*>("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();