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->bottomMenuBar = this->container->findChild<QWidget*>("bottom-menu-bar");
this->bottomPanel = this->container->findChild<PanelWidget*>("bottom-panel"); 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->footer = this->windowContainer->findChild<QWidget*>("footer");
this->targetStatusLabel = this->footer->findChild<QLabel*>("target-state"); this->targetStatusLabel = this->footer->findChild<QLabel*>("target-state");
this->programCounterValueLabel = this->footer->findChild<QLabel*>("target-program-counter-value"); 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) { void InsightWindow::resizeEvent(QResizeEvent* event) {
const auto windowSize = this->size(); const auto windowSize = this->size();

View File

@@ -49,6 +49,7 @@ namespace Bloom
void openGettingStartedUrl(); void openGettingStartedUrl();
void openAboutWindow(); void openAboutWindow();
void toggleTargetRegistersPane(); void toggleTargetRegistersPane();
void toggleRamInspectionPane();
signals: signals:
void refreshTargetPinStates(int variantId); void refreshTargetPinStates(int variantId);
@@ -83,13 +84,14 @@ namespace Bloom
Widgets::PanelWidget* leftPanel = nullptr; Widgets::PanelWidget* leftPanel = nullptr;
Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr; Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr;
QToolButton* targetRegistersButton = nullptr; QToolButton* targetRegistersButton = nullptr;
Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr;
QLabel* ioUnavailableWidget = nullptr; QLabel* ioUnavailableWidget = nullptr;
Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr;
Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr;
QWidget* bottomMenuBar = nullptr; QWidget* bottomMenuBar = nullptr;
Widgets::PanelWidget* bottomPanel = nullptr; Widgets::PanelWidget* bottomPanel = nullptr;
QToolButton* ramInspectionButton = nullptr;
QWidget* footer = nullptr; QWidget* footer = nullptr;
QLabel* targetStatusLabel = nullptr; QLabel* targetStatusLabel = nullptr;