Moved refresh button out of HexViewerWidget, to MemoryInspectionPaneWidget
Added auto-refresh configuration menu Added checked/unchecked icons
This commit is contained in:
@@ -100,6 +100,8 @@ qt_add_resources(
|
|||||||
"./UserInterfaces/InsightWindow/Images/down-arrow.svg"
|
"./UserInterfaces/InsightWindow/Images/down-arrow.svg"
|
||||||
"./UserInterfaces/InsightWindow/Images/detach-pane-icon.svg"
|
"./UserInterfaces/InsightWindow/Images/detach-pane-icon.svg"
|
||||||
"./UserInterfaces/InsightWindow/Images/attach-pane-icon.svg"
|
"./UserInterfaces/InsightWindow/Images/attach-pane-icon.svg"
|
||||||
|
"./UserInterfaces/InsightWindow/Images/checked-action-icon.svg"
|
||||||
|
"./UserInterfaces/InsightWindow/Images/unchecked-action-icon.svg"
|
||||||
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg"
|
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg"
|
||||||
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg"
|
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg"
|
||||||
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg"
|
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg"
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="14"
|
||||||
|
viewBox="0 0 4.2333335 3.7041667"
|
||||||
|
version="1.1"
|
||||||
|
id="svg974"
|
||||||
|
sodipodi:docname="checked-action-icon.svg"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs968" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#343532"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="32"
|
||||||
|
inkscape:cx="5.8125"
|
||||||
|
inkscape:cy="2.828125"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-height="1353"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="34"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="true"
|
||||||
|
inkscape:snap-bbox-edge-midpoints="true"
|
||||||
|
inkscape:pagecheckerboard="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata971">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Main"
|
||||||
|
style="display:inline">
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:none;fill-opacity:1;stroke:none;stroke-width:0.546629;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect1537-3-6-4-3-6"
|
||||||
|
width="2.8929155"
|
||||||
|
height="1.8345821"
|
||||||
|
x="1.5962507"
|
||||||
|
y="1.5962507" />
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:#838382;fill-opacity:1;stroke:none;stroke-width:0.683152;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect1537-3-6-4-3-7"
|
||||||
|
width="1.5875001"
|
||||||
|
height="1.0583334"
|
||||||
|
x="1.3229166"
|
||||||
|
y="1.3229166" />
|
||||||
|
<path
|
||||||
|
id="rect1537-3-6-4-3-7-6"
|
||||||
|
style="display:inline;fill:#838382;fill-opacity:1;stroke:none;stroke-width:0.989981;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 0.26458333,0.26458333 V 3.4395834 H 3.9687501 V 0.26458333 Z M 0.79375004,0.79375002 H 3.4395834 V 2.9104167 H 0.79375004 Z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="14"
|
||||||
|
viewBox="0 0 4.2333335 3.7041667"
|
||||||
|
version="1.1"
|
||||||
|
id="svg974"
|
||||||
|
sodipodi:docname="unchecked-action-icon.svg"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs968" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#343532"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="32"
|
||||||
|
inkscape:cx="5.8125"
|
||||||
|
inkscape:cy="2.828125"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1353"
|
||||||
|
inkscape:window-x="2560"
|
||||||
|
inkscape:window-y="34"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="true"
|
||||||
|
inkscape:snap-bbox-edge-midpoints="true"
|
||||||
|
inkscape:pagecheckerboard="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata971">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Main"
|
||||||
|
style="display:inline">
|
||||||
|
<path
|
||||||
|
id="rect1537-3-6-4-3-7"
|
||||||
|
style="display:inline;fill:#838382;fill-opacity:1;stroke:none;stroke-width:3.74166;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 1 1 L 1 13 L 15 13 L 15 1 L 1 1 z M 3 3 L 13 3 L 13 11 L 3 11 L 3 3 z "
|
||||||
|
transform="scale(0.26458334)" />
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:none;fill-opacity:1;stroke:none;stroke-width:0.546629;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect1537-3-6-4-3-6"
|
||||||
|
width="2.8929155"
|
||||||
|
height="1.8345821"
|
||||||
|
x="1.5962507"
|
||||||
|
y="1.5962507" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -69,6 +69,18 @@ QMenu::separator {
|
|||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMenu::indicator {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::indicator:non-exclusive:checked {
|
||||||
|
image: url(":/compiled/src/Insight/UserInterfaces/InsightWindow/Images/checked-action-icon.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::indicator:non-exclusive:unchecked {
|
||||||
|
image: url(":/compiled/src/Insight/UserInterfaces/InsightWindow/Images/unchecked-action-icon.svg");
|
||||||
|
}
|
||||||
|
|
||||||
QMenu#help-menu::separator {
|
QMenu#help-menu::separator {
|
||||||
margin: 1px 0;
|
margin: 1px 0;
|
||||||
}
|
}
|
||||||
@@ -174,7 +186,16 @@ QPushButton:disabled {
|
|||||||
color: #8d8d90;
|
color: #8d8d90;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QToolButton::menu-indicator {
|
||||||
|
image: none;
|
||||||
|
}
|
||||||
|
|
||||||
Bloom--Widgets--LabeledSeparator {
|
Bloom--Widgets--LabeledSeparator {
|
||||||
qproperty-lineColor: #454545;
|
qproperty-lineColor: #454545;
|
||||||
color: #a6a6a6;
|
color: #a6a6a6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bloom--Widgets--SvgToolButton QMenu::item {
|
||||||
|
padding-left: 10px;
|
||||||
|
min-width: 250px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -284,27 +284,34 @@ QScrollBar::sub-line:vertical {
|
|||||||
color: #afb1b3;
|
color: #afb1b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#target-memory-inspection-pane #lh-side-bar {
|
#target-memory-inspection-pane #top-bar {
|
||||||
border-right: 1px solid #41423f;
|
border-bottom: 1px solid #41423f;
|
||||||
}
|
}
|
||||||
|
|
||||||
#target-memory-inspection-pane #rh-side-bar {
|
#target-memory-inspection-pane #top-bar QToolButton {
|
||||||
border-left: 1px solid #41423f;
|
|
||||||
}
|
|
||||||
|
|
||||||
#target-memory-inspection-pane #lh-side-bar QToolButton,
|
|
||||||
#target-memory-inspection-pane #rh-side-bar QToolButton {
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
qproperty-buttonWidth: 23;
|
qproperty-buttonWidth: 24;
|
||||||
|
qproperty-buttonHeight: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
#target-memory-inspection-pane #top-bar QToolButton:hover {
|
||||||
|
background-color: #454541;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#target-memory-inspection-pane #top-bar #manage-memory-regions-btn {
|
||||||
|
qproperty-buttonWidth: 26;
|
||||||
qproperty-buttonHeight: 21;
|
qproperty-buttonHeight: 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
#target-memory-inspection-pane #lh-side-bar QToolButton:hover,
|
#target-memory-inspection-pane #top-bar #separator {
|
||||||
#target-memory-inspection-pane #rh-side-bar QToolButton:hover {
|
background-color: transparent;
|
||||||
background-color: #454541;
|
border-right: 1px solid #41423f;
|
||||||
border: none;
|
padding: 0;
|
||||||
|
min-width: 1px;
|
||||||
|
max-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar,
|
#hex-viewer-container #tool-bar,
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace Bloom::Widgets
|
|||||||
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
|
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
|
||||||
this->bottomBar = this->container->findChild<QWidget*>("bottom-bar");
|
this->bottomBar = this->container->findChild<QWidget*>("bottom-bar");
|
||||||
|
|
||||||
this->refreshButton = this->toolBar->findChild<SvgToolButton*>("refresh-memory-btn");
|
|
||||||
this->highlightStackMemoryButton = this->toolBar->findChild<SvgToolButton*>(
|
this->highlightStackMemoryButton = this->toolBar->findChild<SvgToolButton*>(
|
||||||
"highlight-stack-memory-btn"
|
"highlight-stack-memory-btn"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ namespace Bloom::Widgets
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SvgToolButton* refreshButton = nullptr;
|
|
||||||
|
|
||||||
HexViewerWidget(
|
HexViewerWidget(
|
||||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||||
HexViewerWidgetSettings& settings,
|
HexViewerWidgetSettings& settings,
|
||||||
|
|||||||
@@ -29,22 +29,6 @@
|
|||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="SvgToolButton" name="refresh-memory-btn">
|
|
||||||
<property name="svgFilePath">
|
|
||||||
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh.svg</string>
|
|
||||||
</property>
|
|
||||||
<property name="disabledSvgFilePath">
|
|
||||||
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Refresh Memory</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="separator"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontal-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
<property name="sizeHint">
|
<property name="sizeHint">
|
||||||
|
|||||||
@@ -49,6 +49,10 @@
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region-selector-tool-bar Bloom--Widgets--SvgToolButton QMenu::item {
|
||||||
|
padding-left: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
#region-selector-tool-bar #separator {
|
#region-selector-tool-bar #separator {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-right: 1px solid #41423f;
|
border-right: 1px solid #41423f;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "TargetMemoryInspectionPane.hpp"
|
#include "TargetMemoryInspectionPane.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||||
@@ -64,10 +64,16 @@ namespace Bloom::Widgets
|
|||||||
// Quick sanity check to ensure the validity of persisted settings.
|
// Quick sanity check to ensure the validity of persisted settings.
|
||||||
this->sanitiseSettings();
|
this->sanitiseSettings();
|
||||||
|
|
||||||
auto* subContainerLayout = this->container->findChild<QHBoxLayout*>("sub-container-layout");
|
auto* containerLayout = this->container->findChild<QVBoxLayout*>("container-layout");
|
||||||
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
|
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
|
||||||
|
|
||||||
|
this->refreshButton = this->container->findChild<SvgToolButton*>("refresh-memory-btn");
|
||||||
|
this->refreshOnTargetStopAction = this->refreshButton->findChild<QAction*>("refresh-target-stopped");
|
||||||
|
this->refreshOnActivationAction = this->refreshButton->findChild<QAction*>("refresh-activation");
|
||||||
|
|
||||||
this->detachPaneButton = this->container->findChild<SvgToolButton*>("detach-pane-btn");
|
this->detachPaneButton = this->container->findChild<SvgToolButton*>("detach-pane-btn");
|
||||||
this->attachPaneButton = this->container->findChild<SvgToolButton*>("attach-pane-btn");
|
this->attachPaneButton = this->container->findChild<SvgToolButton*>("attach-pane-btn");
|
||||||
|
|
||||||
this->hexViewerWidget = new HexViewerWidget(
|
this->hexViewerWidget = new HexViewerWidget(
|
||||||
this->targetMemoryDescriptor,
|
this->targetMemoryDescriptor,
|
||||||
this->settings.hexViewerWidgetSettings,
|
this->settings.hexViewerWidgetSettings,
|
||||||
@@ -78,7 +84,9 @@ namespace Bloom::Widgets
|
|||||||
);
|
);
|
||||||
this->hexViewerWidget->setDisabled(true);
|
this->hexViewerWidget->setDisabled(true);
|
||||||
|
|
||||||
subContainerLayout->insertWidget(1, this->hexViewerWidget);
|
containerLayout->addWidget(this->hexViewerWidget);
|
||||||
|
|
||||||
|
this->setRefreshOnTargetStopEnabled(this->settings.refreshOnTargetStop);
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this,
|
this,
|
||||||
@@ -115,6 +123,33 @@ namespace Bloom::Widgets
|
|||||||
&TargetMemoryInspectionPane::openMemoryRegionManagerWindow
|
&TargetMemoryInspectionPane::openMemoryRegionManagerWindow
|
||||||
);
|
);
|
||||||
|
|
||||||
|
QObject::connect(
|
||||||
|
this->refreshButton,
|
||||||
|
&QToolButton::clicked,
|
||||||
|
this,
|
||||||
|
[this] {
|
||||||
|
this->refreshMemoryValues();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
QObject::connect(
|
||||||
|
this->refreshOnTargetStopAction,
|
||||||
|
&QAction::triggered,
|
||||||
|
this,
|
||||||
|
[this] (bool checked) {
|
||||||
|
this->setRefreshOnTargetStopEnabled(checked);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
QObject::connect(
|
||||||
|
this->refreshOnActivationAction,
|
||||||
|
&QAction::triggered,
|
||||||
|
this,
|
||||||
|
[this] (bool checked) {
|
||||||
|
this->setRefreshOnActivationEnabled(checked);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this->detachPaneButton,
|
this->detachPaneButton,
|
||||||
&QToolButton::clicked,
|
&QToolButton::clicked,
|
||||||
@@ -149,20 +184,11 @@ namespace Bloom::Widgets
|
|||||||
this,
|
this,
|
||||||
&TargetMemoryInspectionPane::onProgrammingModeDisabled
|
&TargetMemoryInspectionPane::onProgrammingModeDisabled
|
||||||
);
|
);
|
||||||
|
|
||||||
QObject::connect(
|
|
||||||
this->hexViewerWidget->refreshButton,
|
|
||||||
&QToolButton::clicked,
|
|
||||||
this,
|
|
||||||
[this] {
|
|
||||||
this->refreshMemoryValues();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function<void(void)>> callback) {
|
void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function<void(void)>> callback) {
|
||||||
this->hexViewerWidget->refreshButton->setDisabled(true);
|
this->refreshButton->setDisabled(true);
|
||||||
this->hexViewerWidget->refreshButton->startSpin();
|
this->refreshButton->startSpin();
|
||||||
|
|
||||||
auto excludedAddressRanges = std::set<Targets::TargetMemoryAddressRange>();
|
auto excludedAddressRanges = std::set<Targets::TargetMemoryAddressRange>();
|
||||||
std::transform(
|
std::transform(
|
||||||
@@ -210,10 +236,10 @@ namespace Bloom::Widgets
|
|||||||
&InsightWorkerTask::finished,
|
&InsightWorkerTask::finished,
|
||||||
this,
|
this,
|
||||||
[this] {
|
[this] {
|
||||||
this->hexViewerWidget->refreshButton->stopSpin();
|
this->refreshButton->stopSpin();
|
||||||
|
|
||||||
if (this->targetState == Targets::TargetState::STOPPED) {
|
if (this->targetState == Targets::TargetState::STOPPED) {
|
||||||
this->hexViewerWidget->refreshButton->setDisabled(false);
|
this->refreshButton->setDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -241,7 +267,10 @@ namespace Bloom::Widgets
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TargetMemoryInspectionPane::postActivate() {
|
void TargetMemoryInspectionPane::postActivate() {
|
||||||
if (this->targetState == Targets::TargetState::STOPPED) {
|
if (
|
||||||
|
this->settings.refreshOnActivation
|
||||||
|
&& this->targetState == Targets::TargetState::STOPPED
|
||||||
|
) {
|
||||||
this->refreshMemoryValues([this] {
|
this->refreshMemoryValues([this] {
|
||||||
this->hexViewerWidget->setDisabled(false);
|
this->hexViewerWidget->setDisabled(false);
|
||||||
});
|
});
|
||||||
@@ -319,15 +348,30 @@ namespace Bloom::Widgets
|
|||||||
this->targetState = newState;
|
this->targetState = newState;
|
||||||
|
|
||||||
if (newState == TargetState::STOPPED && this->activated) {
|
if (newState == TargetState::STOPPED && this->activated) {
|
||||||
|
if (this->settings.refreshOnTargetStop) {
|
||||||
this->refreshMemoryValues([this] {
|
this->refreshMemoryValues([this] {
|
||||||
this->hexViewerWidget->setDisabled(false);
|
this->hexViewerWidget->setDisabled(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this->hexViewerWidget->setDisabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (newState == TargetState::RUNNING) {
|
} else if (newState == TargetState::RUNNING) {
|
||||||
this->hexViewerWidget->setDisabled(true);
|
this->hexViewerWidget->setDisabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TargetMemoryInspectionPane::setRefreshOnTargetStopEnabled(bool enabled) {
|
||||||
|
this->refreshOnTargetStopAction->setChecked(enabled);
|
||||||
|
this->settings.refreshOnTargetStop = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetMemoryInspectionPane::setRefreshOnActivationEnabled(bool enabled) {
|
||||||
|
this->refreshOnActivationAction->setChecked(enabled);
|
||||||
|
this->settings.refreshOnActivation = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
void TargetMemoryInspectionPane::onMemoryRead(const Targets::TargetMemoryBuffer& buffer) {
|
void TargetMemoryInspectionPane::onMemoryRead(const Targets::TargetMemoryBuffer& buffer) {
|
||||||
this->hexViewerWidget->updateValues(buffer);
|
this->hexViewerWidget->updateValues(buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
QWidget* titleBar = nullptr;
|
QWidget* titleBar = nullptr;
|
||||||
SvgToolButton* manageMemoryRegionsButton = nullptr;
|
SvgToolButton* manageMemoryRegionsButton = nullptr;
|
||||||
|
|
||||||
|
SvgToolButton* refreshButton = nullptr;
|
||||||
|
QAction* refreshOnTargetStopAction = nullptr;
|
||||||
|
QAction* refreshOnActivationAction = nullptr;
|
||||||
|
|
||||||
SvgToolButton* detachPaneButton = nullptr;
|
SvgToolButton* detachPaneButton = nullptr;
|
||||||
SvgToolButton* attachPaneButton = nullptr;
|
SvgToolButton* attachPaneButton = nullptr;
|
||||||
HexViewerWidget* hexViewerWidget = nullptr;
|
HexViewerWidget* hexViewerWidget = nullptr;
|
||||||
@@ -63,6 +68,8 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
void sanitiseSettings();
|
void sanitiseSettings();
|
||||||
void onTargetStateChanged(Targets::TargetState newState);
|
void onTargetStateChanged(Targets::TargetState newState);
|
||||||
|
void setRefreshOnTargetStopEnabled(bool enabled);
|
||||||
|
void setRefreshOnActivationEnabled(bool enabled);
|
||||||
void onMemoryRead(const Targets::TargetMemoryBuffer& buffer);
|
void onMemoryRead(const Targets::TargetMemoryBuffer& buffer);
|
||||||
void openMemoryRegionManagerWindow();
|
void openMemoryRegionManagerWindow();
|
||||||
void onMemoryRegionsChange();
|
void onMemoryRegionsChange();
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ namespace Bloom::Widgets
|
|||||||
struct TargetMemoryInspectionPaneSettings
|
struct TargetMemoryInspectionPaneSettings
|
||||||
{
|
{
|
||||||
bool activated = false;
|
bool activated = false;
|
||||||
|
bool refreshOnTargetStop = true;
|
||||||
|
bool refreshOnActivation = true;
|
||||||
|
|
||||||
HexViewerWidgetSettings hexViewerWidgetSettings;
|
HexViewerWidgetSettings hexViewerWidgetSettings;
|
||||||
|
|
||||||
std::vector<FocusedMemoryRegion> focusedMemoryRegions;
|
std::vector<FocusedMemoryRegion> focusedMemoryRegions;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout" name="container-layout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -43,25 +43,17 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="sub-container-layout">
|
<widget class="QWidget" name="top-bar">
|
||||||
<property name="spacing">
|
<property name="minimumHeight">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item alignment="Qt::AlignLeft">
|
|
||||||
<widget class="QWidget" name="lh-side-bar">
|
|
||||||
<property name="minimumWidth">
|
|
||||||
<number>30</number>
|
<number>30</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumWidth">
|
<property name="maximumHeight">
|
||||||
<number>30</number>
|
<number>30</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="lh-side-bar-layout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -69,15 +61,18 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="vertical-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
<property name="sizeHint">
|
<property name="sizeHint">
|
||||||
<size>
|
<size>
|
||||||
<height>3</height>
|
<width>5</width>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item>
|
||||||
<widget class="SvgToolButton" name="manage-memory-regions-btn">
|
<widget class="SvgToolButton" name="manage-memory-regions-btn">
|
||||||
<property name="svgFilePath">
|
<property name="svgFilePath">
|
||||||
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-focused-regions.svg</string>
|
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-focused-regions.svg</string>
|
||||||
@@ -88,39 +83,57 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="vertical-spacer">
|
<widget class="QFrame" name="separator"/>
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item>
|
||||||
|
<widget class="SvgToolButton" name="refresh-memory-btn">
|
||||||
|
<property name="svgFilePath">
|
||||||
|
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh.svg</string>
|
||||||
|
</property>
|
||||||
|
<property name="disabledSvgFilePath">
|
||||||
|
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Refresh Memory (right-click for auto-refresh options)</string>
|
||||||
|
</property>
|
||||||
|
<property name="popupMode">
|
||||||
|
<enum>QToolButton::InstantPopup</enum>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="refresh-menu">
|
||||||
|
<addaction name="refresh-target-stopped"/>
|
||||||
|
<addaction name="refresh-activation"/>
|
||||||
|
<action name="refresh-target-stopped">
|
||||||
|
<property name="text">
|
||||||
|
<string>After target execution stops</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="refresh-activation">
|
||||||
|
<property name="text">
|
||||||
|
<string>After opening this pane</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
|
||||||
<widget class="QWidget" name="rh-side-bar">
|
|
||||||
<property name="minimumWidth">
|
|
||||||
<number>30</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximumWidth">
|
|
||||||
<number>30</number>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="rh-side-bar-layout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="vertical-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
<property name="sizeHint">
|
<property name="orientation">
|
||||||
<size>
|
<enum>Qt::Horizontal</enum>
|
||||||
<height>3</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
@@ -148,18 +161,20 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="vertical-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
<property name="orientation">
|
<property name="sizeHint">
|
||||||
<enum>Qt::Vertical</enum>
|
<size>
|
||||||
|
<width>5</width>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user