Display annotations tool button
This commit is contained in:
@@ -414,7 +414,8 @@ QScrollBar::sub-line:vertical {
|
||||
|
||||
#hex-viewer-container #tool-bar #highlight-stack-memory-btn,
|
||||
#hex-viewer-container #tool-bar #highlight-focused-memory-btn,
|
||||
#hex-viewer-container #tool-bar #highlight-hovered-rows-columns-btn {
|
||||
#hex-viewer-container #tool-bar #highlight-hovered-rows-columns-btn,
|
||||
#hex-viewer-container #tool-bar #display-annotations-btn {
|
||||
qproperty-buttonWidth: 25;
|
||||
qproperty-buttonHeight: 21;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ HexViewerWidget::HexViewerWidget(
|
||||
this->highlightFocusedMemoryButton = this->container->findChild<SvgToolButton*>(
|
||||
"highlight-focused-memory-btn"
|
||||
);
|
||||
this->displayAnnotationsButton = this->container->findChild<SvgToolButton*>("display-annotations-btn");
|
||||
|
||||
this->toolBar->setContentsMargins(0, 0, 0, 0);
|
||||
this->toolBar->layout()->setContentsMargins(5, 0, 5, 1);
|
||||
@@ -79,6 +80,7 @@ HexViewerWidget::HexViewerWidget(
|
||||
this->setStackMemoryHighlightingEnabled(this->settings.highlightStackMemory);
|
||||
this->setHoveredRowAndColumnHighlightingEnabled(this->settings.highlightHoveredRowAndCol);
|
||||
this->setFocusedMemoryHighlightingEnabled(this->settings.highlightFocusedMemory);
|
||||
this->setAnnotationsEnabled(this->settings.displayAnnotations);
|
||||
|
||||
QObject::connect(
|
||||
this->highlightStackMemoryButton,
|
||||
@@ -107,6 +109,15 @@ HexViewerWidget::HexViewerWidget(
|
||||
}
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
this->displayAnnotationsButton,
|
||||
&QToolButton::clicked,
|
||||
this,
|
||||
[this] {
|
||||
this->setAnnotationsEnabled(!this->settings.displayAnnotations);
|
||||
}
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
&insightWorker,
|
||||
&InsightWorker::targetStateUpdated,
|
||||
@@ -167,3 +178,10 @@ void HexViewerWidget::setFocusedMemoryHighlightingEnabled(bool enabled) {
|
||||
|
||||
this->byteItemGraphicsScene->invalidateChildItemCaches();
|
||||
}
|
||||
|
||||
void HexViewerWidget::setAnnotationsEnabled(bool enabled) {
|
||||
this->displayAnnotationsButton->setChecked(enabled);
|
||||
this->settings.displayAnnotations = enabled;
|
||||
|
||||
this->byteItemGraphicsScene->adjustSize(true);
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace Bloom::Widgets
|
||||
SvgToolButton* highlightStackMemoryButton = nullptr;
|
||||
SvgToolButton* highlightFocusedMemoryButton = nullptr;
|
||||
SvgToolButton* highlightHoveredRowAndColumnButton = nullptr;
|
||||
SvgToolButton* displayAnnotationsButton = nullptr;
|
||||
|
||||
Targets::TargetState targetState = Targets::TargetState::UNKNOWN;
|
||||
|
||||
@@ -74,5 +75,6 @@ namespace Bloom::Widgets
|
||||
void setStackMemoryHighlightingEnabled(bool enabled);
|
||||
void setHoveredRowAndColumnHighlightingEnabled(bool enabled);
|
||||
void setFocusedMemoryHighlightingEnabled(bool enabled);
|
||||
void setAnnotationsEnabled(bool enabled);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="25"
|
||||
height="15"
|
||||
viewBox="0 0 6.6145835 3.96875"
|
||||
version="1.1"
|
||||
id="svg974"
|
||||
sodipodi:docname="display-annotations-disabled.svg"
|
||||
inkscape:version="1.0.1 (1.0.1+r75)">
|
||||
<defs
|
||||
id="defs968" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#343532"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.4"
|
||||
inkscape:cx="9.3040966"
|
||||
inkscape:cy="6.8943591"
|
||||
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" />
|
||||
<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" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Main"
|
||||
style="display:inline">
|
||||
<rect
|
||||
style="fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6"
|
||||
width="0.79374999"
|
||||
height="0.79374993"
|
||||
x="1.3229166"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-7"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="2.3812504"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-4"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="3.4395833"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-3"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="4.4979167"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-8"
|
||||
width="0.79374999"
|
||||
height="0.79374993"
|
||||
x="1.3229166"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-7-8"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="2.3812504"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-4-4"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="3.4395833"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426;opacity:0.5"
|
||||
id="rect1537-3-6-3-3"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="4.4979167"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="opacity:1;fill:#50504f;fill-opacity:1;stroke-width:0.175354"
|
||||
id="rect842"
|
||||
width="0.26458335"
|
||||
height="0.79374999"
|
||||
x="1.5875"
|
||||
y="1.3229165" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#50504f;fill-opacity:1;stroke-width:0.175354"
|
||||
id="rect842-3"
|
||||
width="0.26458335"
|
||||
height="0.79374999"
|
||||
x="4.7624998"
|
||||
y="1.3229165" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#50504f;fill-opacity:1;stroke-width:0.365028"
|
||||
id="rect842-6"
|
||||
width="3.4395835"
|
||||
height="0.26458335"
|
||||
x="1.5875"
|
||||
y="1.8520833" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="25"
|
||||
height="15"
|
||||
viewBox="0 0 6.6145835 3.96875"
|
||||
version="1.1"
|
||||
id="svg974"
|
||||
sodipodi:docname="display-annotations.svg"
|
||||
inkscape:version="1.0.1 (1.0.1+r75)">
|
||||
<defs
|
||||
id="defs968" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#343532"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.4"
|
||||
inkscape:cx="9.3040966"
|
||||
inkscape:cy="6.8943591"
|
||||
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" />
|
||||
<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" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Main"
|
||||
style="display:inline">
|
||||
<rect
|
||||
style="fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6"
|
||||
width="0.79374999"
|
||||
height="0.79374993"
|
||||
x="1.3229166"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-7"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="2.3812504"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-4"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="3.4395833"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-3"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="4.4979167"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-8"
|
||||
width="0.79374999"
|
||||
height="0.79374993"
|
||||
x="1.3229166"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-7-8"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="2.3812504"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-4-4"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="3.4395833"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.0552426"
|
||||
id="rect1537-3-6-3-3"
|
||||
width="0.79374999"
|
||||
height="0.79374999"
|
||||
x="4.4979167"
|
||||
y="2.6458335" />
|
||||
<rect
|
||||
style="opacity:1;fill:#6c6c6c;fill-opacity:1;stroke-width:0.175354"
|
||||
id="rect842"
|
||||
width="0.26458335"
|
||||
height="0.79374999"
|
||||
x="1.5875"
|
||||
y="1.3229165" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#6c6c6c;fill-opacity:1;stroke-width:0.175354"
|
||||
id="rect842-3"
|
||||
width="0.26458335"
|
||||
height="0.79374999"
|
||||
x="4.7624998"
|
||||
y="1.3229165" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#6c6c6c;fill-opacity:1;stroke-width:0.365028"
|
||||
id="rect842-6"
|
||||
width="3.4395835"
|
||||
height="0.26458335"
|
||||
x="1.5875"
|
||||
y="1.8520833" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
@@ -105,6 +105,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SvgToolButton" name="display-annotations-btn">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="svgFilePath">
|
||||
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/Images/display-annotations.svg</string>
|
||||
</property>
|
||||
<property name="disabledSvgFilePath">
|
||||
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/Images/display-annotations-disabled.svg</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Display Annotations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="separator"/>
|
||||
</item>
|
||||
@@ -160,13 +176,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<!-- <item>-->
|
||||
<!-- <spacer name="vertical-spacer">-->
|
||||
<!-- <property name="orientation">-->
|
||||
<!-- <enum>Qt::Vertical</enum>-->
|
||||
<!-- </property>-->
|
||||
<!-- </spacer>-->
|
||||
<!-- </item>-->
|
||||
</layout>
|
||||
</widget>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user