Moved ownership of hex viewer settings to TargetMemoryInspectionPane and corrected default settings
This commit is contained in:
@@ -12,6 +12,7 @@ using Bloom::Targets::TargetMemoryDescriptor;
|
|||||||
|
|
||||||
HexViewerWidget::HexViewerWidget(
|
HexViewerWidget::HexViewerWidget(
|
||||||
const TargetMemoryDescriptor& targetMemoryDescriptor,
|
const TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||||
|
HexViewerWidgetSettings& settings,
|
||||||
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
@@ -19,6 +20,7 @@ HexViewerWidget::HexViewerWidget(
|
|||||||
):
|
):
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
targetMemoryDescriptor(targetMemoryDescriptor),
|
targetMemoryDescriptor(targetMemoryDescriptor),
|
||||||
|
settings(settings),
|
||||||
focusedMemoryRegions(focusedMemoryRegions),
|
focusedMemoryRegions(focusedMemoryRegions),
|
||||||
excludedMemoryRegions(excludedMemoryRegions),
|
excludedMemoryRegions(excludedMemoryRegions),
|
||||||
insightWorker(insightWorker)
|
insightWorker(insightWorker)
|
||||||
@@ -74,9 +76,9 @@ HexViewerWidget::HexViewerWidget(
|
|||||||
);
|
);
|
||||||
this->byteItemGraphicsScene = this->byteItemGraphicsView->getScene();
|
this->byteItemGraphicsScene = this->byteItemGraphicsView->getScene();
|
||||||
|
|
||||||
this->setStackMemoryHighlightingEnabled(true);
|
this->setStackMemoryHighlightingEnabled(this->settings.highlightStackMemory);
|
||||||
this->setHoveredRowAndColumnHighlightingEnabled(true);
|
this->setHoveredRowAndColumnHighlightingEnabled(this->settings.highlightHoveredRowAndCol);
|
||||||
this->setFocusedMemoryHighlightingEnabled(true);
|
this->setFocusedMemoryHighlightingEnabled(this->settings.highlightFocusedMemory);
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this->highlightStackMemoryButton,
|
this->highlightStackMemoryButton,
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
HexViewerWidget(
|
HexViewerWidget(
|
||||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||||
|
HexViewerWidgetSettings& settings,
|
||||||
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
@@ -52,7 +53,7 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
InsightWorker& insightWorker;
|
InsightWorker& insightWorker;
|
||||||
|
|
||||||
HexViewerWidgetSettings settings = HexViewerWidgetSettings();
|
HexViewerWidgetSettings& settings;
|
||||||
|
|
||||||
QWidget* container = nullptr;
|
QWidget* container = nullptr;
|
||||||
QWidget* toolBar = nullptr;
|
QWidget* toolBar = nullptr;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ namespace Bloom::Widgets
|
|||||||
{
|
{
|
||||||
struct HexViewerWidgetSettings
|
struct HexViewerWidgetSettings
|
||||||
{
|
{
|
||||||
bool highlightStackMemory = false;
|
bool highlightStackMemory = true;
|
||||||
bool highlightFocusedMemory = false;
|
bool highlightFocusedMemory = true;
|
||||||
bool highlightHoveredRowAndCol = false;
|
bool highlightHoveredRowAndCol = true;
|
||||||
bool displayAsciiValues = false;
|
bool displayAsciiValues = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane(
|
|||||||
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
|
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
|
||||||
this->hexViewerWidget = new HexViewerWidget(
|
this->hexViewerWidget = new HexViewerWidget(
|
||||||
this->targetMemoryDescriptor,
|
this->targetMemoryDescriptor,
|
||||||
|
this->settings.hexViewerWidgetSettings,
|
||||||
this->settings.focusedMemoryRegions,
|
this->settings.focusedMemoryRegions,
|
||||||
this->settings.excludedMemoryRegions,
|
this->settings.excludedMemoryRegions,
|
||||||
this->insightWorker,
|
this->insightWorker,
|
||||||
|
|||||||
Reference in New Issue
Block a user