New target memory inspection pane and hex viewer widget

This commit is contained in:
Nav
2021-10-17 20:44:40 +01:00
parent 52a9b27519
commit 7c65e182af
18 changed files with 1435 additions and 17 deletions

View File

@@ -27,6 +27,7 @@ using Bloom::Targets::TargetPinState;
using Bloom::Targets::TargetVariant;
using Bloom::Targets::TargetPackage;
using Bloom::Targets::TargetPinDescriptor;
using Bloom::Targets::TargetMemoryType;
InsightWindow::InsightWindow(InsightWorker& insightWorker): QMainWindow(nullptr), insightWorker(insightWorker) {
this->setObjectName("main-window");
@@ -239,10 +240,12 @@ void InsightWindow::toggleTargetRegistersPane() {
void InsightWindow::toggleRamInspectionPane() {
if (this->bottomPanel->isVisible()) {
this->ramInspectionPane->deactivate();
this->bottomPanel->hide();
this->ramInspectionButton->setChecked(false);
} else {
this->ramInspectionPane->activate();
this->bottomPanel->show();
this->ramInspectionButton->setChecked(true);
}
@@ -486,13 +489,26 @@ void InsightWindow::activate() {
auto leftPanelLayout = this->leftPanel->layout();
this->targetRegistersSidePane = new TargetRegistersPaneWidget(
this->targetDescriptor,
insightWorker,
this->insightWorker,
this->leftPanel
);
leftPanelLayout->addWidget(this->targetRegistersSidePane);
this->targetRegistersButton->setChecked(false);
this->targetRegistersButton->setDisabled(false);
auto bottomPanelLayout = this->bottomPanel->layout();
if (this->targetDescriptor.memoryDescriptorsByType.contains(TargetMemoryType::RAM)) {
auto& ramDescriptor = this->targetDescriptor.memoryDescriptorsByType.at(TargetMemoryType::RAM);
this->ramInspectionPane = new TargetMemoryInspectionPane(
ramDescriptor,
this->insightWorker,
this->bottomPanel
);
bottomPanelLayout->addWidget(this->ramInspectionPane);
this->ramInspectionButton->setChecked(false);
this->ramInspectionButton->setDisabled(false);
}
this->toggleUi(this->targetState != TargetState::STOPPED);
this->activated = true;
}