New target registers side pane

This commit is contained in:
Nav
2021-09-04 18:11:52 +01:00
parent 10a737e90c
commit dcd180e728
24 changed files with 2106 additions and 65 deletions

View File

@@ -141,10 +141,11 @@ add_executable(Bloom
src/Insight/InsightWorker/Tasks/InsightWorkerTask.cpp src/Insight/InsightWorker/Tasks/InsightWorkerTask.cpp
src/Insight/InsightWorker/Tasks/ReadTargetRegisters.cpp src/Insight/InsightWorker/Tasks/ReadTargetRegisters.cpp
src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.cpp src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.cpp
src/Insight/InsightWorker/Tasks/SetTargetPinState.cpp
# Target package widgets # Target package widgets
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp
@@ -154,6 +155,12 @@ add_executable(Bloom
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinBodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinBodyWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/BodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/BodyWidget.cpp
# Target register side pane
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/ItemWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp
) )
set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom) set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom)

View File

@@ -1,9 +1,12 @@
#include <QtUiTools> #include "InsightWindow.hpp"
#include <QtSvg/QtSvg> #include <QtSvg/QtSvg>
#include <utility> #include <utility>
#include "InsightWindow.hpp" #include "UiLoader.hpp"
#include "AboutWindow.hpp" #include "Widgets/SlidingHandleWidget.hpp"
#include "Widgets/RotatableLabel.hpp"
#include "Widgets/TargetWidgets/DIP/DualInlinePackageWidget.hpp" #include "Widgets/TargetWidgets/DIP/DualInlinePackageWidget.hpp"
#include "Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.hpp" #include "Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.hpp"
@@ -48,10 +51,13 @@ InsightWindow::InsightWindow(
throw Exception("Failed to open InsightWindow stylesheet file"); throw Exception("Failed to open InsightWindow stylesheet file");
} }
auto uiLoader = QUiLoader(this); auto uiLoader = UiLoader(this);
this->mainWindowWidget = uiLoader.load(&mainWindowUiFile); this->mainWindowWidget = uiLoader.load(&mainWindowUiFile);
this->mainWindowWidget->setStyleSheet(mainWindowStylesheet.readAll()); this->mainWindowWidget->setStyleSheet(mainWindowStylesheet.readAll());
mainWindowUiFile.close();
mainWindowStylesheet.close();
QApplication::setWindowIcon(QIcon( QApplication::setWindowIcon(QIcon(
QString::fromStdString(Paths::compiledResourcesPath() QString::fromStdString(Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg" + "/src/Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg"
@@ -77,12 +83,45 @@ InsightWindow::InsightWindow(
this->refreshIoInspectionButton = this->header->findChild<QToolButton*>("refresh-io-inspection-btn"); this->refreshIoInspectionButton = this->header->findChild<QToolButton*>("refresh-io-inspection-btn");
connect(this->refreshIoInspectionButton, &QToolButton::clicked, this, [this] { connect(this->refreshIoInspectionButton, &QToolButton::clicked, this, [this] {
// TODO: Move this into a member function - getting too big for a lambda
if (this->targetState == TargetState::STOPPED && this->selectedVariant != nullptr) { if (this->targetState == TargetState::STOPPED && this->selectedVariant != nullptr) {
this->toggleUi(true); this->toggleUi(true);
emit this->refreshTargetPinStates(this->selectedVariant->id); if (this->targetPackageWidget != nullptr) {
this->targetPackageWidget->setDisabled(true);
this->targetPackageWidget->refreshPinStates([this] {
if (this->targetState == TargetState::STOPPED) {
this->targetPackageWidget->setDisabled(false);
if (this->targetRegistersSidePane == nullptr || !this->targetRegistersSidePane->activated) {
this->toggleUi(false);
}
}
});
}
if (this->targetRegistersSidePane != nullptr && this->targetRegistersSidePane->activated) {
this->targetRegistersSidePane->refreshRegisterValues([this] {
this->toggleUi(false);
});
}
} }
}); });
this->leftPanel = this->mainWindowWidget->findChild<QWidget*>("left-panel");
this->leftPanelLayoutContainer = this->leftPanel->findChild<QWidget*>("left-panel-layout-container");
auto leftPanelSlider = this->mainWindowWidget->findChild<SlidingHandleWidget*>("left-panel-slider");
connect(leftPanelSlider, &SlidingHandleWidget::horizontalSlide, this, &InsightWindow::onLeftPanelHandleSlide);
this->targetRegistersButton = this->mainWindowWidget->findChild<QToolButton*>("target-registers-btn");
auto targetRegisterButtonLayout = this->targetRegistersButton->findChild<QVBoxLayout*>();
auto registersBtnLabel = new RotatableLabel(270, "Registers", this->targetRegistersButton);
registersBtnLabel->setObjectName("target-registers-btn-label");
registersBtnLabel->setContentsMargins(5,0,9,0);
targetRegisterButtonLayout->insertWidget(0, registersBtnLabel, 0, Qt::AlignTop);
connect(this->targetRegistersButton, &QToolButton::clicked, this, &InsightWindow::toggleTargetRegistersPane);
this->footer = this->mainWindowWidget->findChild<QWidget*>("footer"); this->footer = this->mainWindowWidget->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");
@@ -235,6 +274,17 @@ void InsightWindow::activate() {
this->ioUnavailableWidget->show(); this->ioUnavailableWidget->show();
} }
auto leftPanelLayout = this->leftPanelLayoutContainer->findChild<QVBoxLayout*>("left-panel-layout");
this->targetRegistersSidePane = new TargetRegistersPaneWidget(
this->targetDescriptor,
insightWorker,
this->leftPanelLayoutContainer
);
leftPanelLayout->addWidget(this->targetRegistersSidePane);
this->targetRegistersButton->setChecked(false);
this->targetRegistersButton->setDisabled(false);
this->toggleUi(this->targetState != TargetState::STOPPED); this->toggleUi(this->targetState != TargetState::STOPPED);
this->activated = true; this->activated = true;
} }
@@ -246,6 +296,14 @@ void InsightWindow::deactivate() {
this->targetPackageWidget = nullptr; this->targetPackageWidget = nullptr;
} }
if (this->targetRegistersSidePane != nullptr) {
this->targetRegistersSidePane->deactivate();
this->targetRegistersSidePane->deleteLater();
this->leftPanel->setVisible(false);
this->targetRegistersButton->setChecked(false);
this->targetRegistersButton->setDisabled(true);
}
this->ioUnavailableWidget->setText( this->ioUnavailableWidget->setText(
"Insight deactivated - Bloom has been disconnected from the target.\n\n" "Insight deactivated - Bloom has been disconnected from the target.\n\n"
"Bloom will attempt to reconnect upon the start of a new debug session." "Bloom will attempt to reconnect upon the start of a new debug session."
@@ -365,7 +423,12 @@ void InsightWindow::toggleUi(bool disable) {
this->refreshIoInspectionButton->setDisabled(disable); this->refreshIoInspectionButton->setDisabled(disable);
this->refreshIoInspectionButton->repaint(); this->refreshIoInspectionButton->repaint();
} }
}
void InsightWindow::onLeftPanelHandleSlide(int horizontalPosition) {
auto width = std::max(this->leftPanelMinWidth, this->leftPanel->width() + horizontalPosition);
this->leftPanel->setMaximumWidth(width);
this->leftPanel->setFixedWidth(width);
} }
void InsightWindow::onTargetControllerSuspended() { void InsightWindow::onTargetControllerSuspended() {
@@ -446,6 +509,20 @@ void InsightWindow::onTargetIoPortsUpdate() {
} }
} }
void InsightWindow::toggleTargetRegistersPane() {
if (this->targetRegistersSidePane->activated) {
this->targetRegistersSidePane->deactivate();
this->targetRegistersButton->setChecked(false);
/*
* Given that the target registers side pane is currently the only pane in the left panel, the panel will be
* empty so no need to leave it visible.
*/
this->leftPanel->setVisible(false);
} else {
this->targetRegistersSidePane->activate();
this->targetRegistersButton->setChecked(true);
this->leftPanel->setVisible(true);
} }
} }

View File

@@ -14,6 +14,7 @@
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
#include "Widgets/TargetWidgets/TargetPackageWidget.hpp" #include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
#include "Widgets/TargetRegistersPane/TargetRegistersPaneWidget.hpp"
#include "AboutWindow.hpp" #include "AboutWindow.hpp"
namespace Bloom namespace Bloom
@@ -41,6 +42,12 @@ namespace Bloom
QWidget* header = nullptr; QWidget* header = nullptr;
QToolButton* refreshIoInspectionButton = nullptr; QToolButton* refreshIoInspectionButton = nullptr;
QWidget* leftPanel = nullptr;
int leftPanelMinWidth = 300;
QWidget* leftPanelLayoutContainer = nullptr;
Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr;
QToolButton* targetRegistersButton = nullptr;
QWidget* ioContainerWidget = nullptr; QWidget* ioContainerWidget = nullptr;
QLabel* ioUnavailableWidget = nullptr; QLabel* ioUnavailableWidget = nullptr;
Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr;
@@ -78,6 +85,7 @@ namespace Bloom
void show(); void show();
public slots: public slots:
void onLeftPanelHandleSlide(int horizontalPosition);
void onTargetControllerSuspended(); void onTargetControllerSuspended();
void onTargetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor); void onTargetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor);
void onTargetStateUpdate(Targets::TargetState newState); void onTargetStateUpdate(Targets::TargetState newState);
@@ -87,6 +95,7 @@ namespace Bloom
void openReportIssuesUrl(); void openReportIssuesUrl();
static void openGettingStartedUrl(); static void openGettingStartedUrl();
void openAboutWindow(); void openAboutWindow();
void toggleTargetRegistersPane();
signals: signals:
void refreshTargetPinStates(int variantId); void refreshTargetPinStates(int variantId);

View File

@@ -1,6 +1,7 @@
* { * {
color: #afb1b3; color: #afb1b3;
font-family: 'Ubuntu', sans-serif; font-family: 'Ubuntu', sans-serif;
font-size: 14px;
} }
QMainWindow { QMainWindow {
@@ -11,10 +12,10 @@ QMainWindow {
position: relative; position: relative;
background-color: transparent; background-color: transparent;
max-height: 25px; max-height: 25px;
min-height: 25px;
width: auto; width: auto;
border-top: 1px solid #41423f; border-top: 1px solid #41423f;
border-top: 1px solid #41423f; border-bottom: 1px solid #2b2b2b;
border-bottom: 1px solid #2a2a2a;
} }
QMenuBar::item { QMenuBar::item {
@@ -62,7 +63,6 @@ QMenu::item {
} }
QMenu::item:selected { QMenu::item:selected {
background-color: #4d7bba;
background-color: #335883; background-color: #335883;
} }
@@ -70,50 +70,32 @@ QMenu::item:disabled {
color: #808484; color: #808484;
} }
QMenu#help-menu::separator { QMenu::separator {
border-top: 1px solid #41423f; border-top: 1px solid #41423f;
height: 1px; height: 1px;
}
QMenu#help-menu::separator {
margin: 1px 0; margin: 1px 0;
} }
#rhSideBar {
max-width: 25px;
background-color: transparent;
height: auto;
border-left: 1px solid #515151;
text-align: right;
}
#rhSideBar #inspectRamBtn {
position: relative;
max-width: 25px;
height: 25px;
color: #000;
border: none;
qproperty-icon: url(":/compiled/src/Insight/UserInterfaces/InsightWindow/Images/RAM.svg");
icon-size: 25px;
}
#rhSideBar #inspectRamBtn:hover {
background-color: #343536;
border: none;
}
#header-tool-bar { #header-tool-bar {
min-height: 25px; min-height: 27px;
min-width: 100%; margin-left: 10px;
}
#header-tool-bar QHBoxLayout {
margin-left: 10px;
} }
#header-tool-bar QToolButton { #header-tool-bar QToolButton {
background-color: transparent; background-color: transparent;
max-width: 25px; /*max-width: 26px;*/
max-height: 21px; /*max-height: 22px;*/
border: none; border: none;
padding: 0; padding: 0;
margin-top: 3px; qproperty-buttonWidth: 24;
margin-bottom: 3px; qproperty-buttonHeight: 20;
margin-left: 2px;
} }
#header-tool-bar QToolButton:hover { #header-tool-bar QToolButton:hover {
@@ -195,3 +177,126 @@ QToolTip {
color: #838386; color: #838386;
font-size: 14px; font-size: 14px;
} }
QScrollBar:vertical {
background-color: transparent;
width: 15px;
margin: 1px 1px 1px 5px;
}
QScrollBar:handle:vertical {
border: none;
background-color: rgba(69, 69, 66, 0.6);
}
QScrollBar:handle:vertical:hover {
background-color: rgba(69, 69, 66, 0.91);
}
QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical {
border: none;
background: none;
}
/* Left-side panel */
#left-side-menu-bar {
max-width: 22px;
background-color: transparent;
height: auto;
border-right: 1px solid #313131;
border-right: 1px solid #2b2b2b;
text-align: right;
}
#left-side-menu-bar #target-registers-btn {
position: relative;
max-width: 22px;
min-height: 95px;
border: none;
}
#left-side-menu-bar QToolButton:hover,
#left-side-menu-bar QToolButton:checked {
background-color: #2B2B29;
border: none;
}
#left-panel-layout-container {
border-right: 1px solid #2b2b2b;
}
/* Target Registers Pane */
#target-registers-side-pane {
/*min-width: 250px;*/
/*min-height: 200px;*/
/*height: 200px;*/
}
#target-registers-side-pane #tool-bar {
background-color: #353C41;
border-bottom: 1px solid #2b2b2b;
}
#target-registers-side-pane #title {
color: #afb1b3;
}
#target-registers-side-pane #tool-bar QToolButton {
background-color: transparent;
/*max-width: 26px;*/
/*max-height: 22px;*/
border: none;
padding: 0;
qproperty-buttonWidth: 23;
qproperty-buttonHeight: 21;
}
#target-registers-side-pane #tool-bar QToolButton:hover {
background-color: #40464e;
border: none;
padding: 0;
}
#target-registers-side-pane #search-bar {
background-color: #343532;
border-bottom: 1px solid #2b2b2b;
}
#target-registers-side-pane #search-input {
background-color: transparent;
/*font-size: 13px;*/
color: #9b9b9e;
}
#target-registers-side-pane QScrollArea {
background-color: transparent;
}
#target-registers-side-pane #item-container {
background-color: transparent;
}
#target-registers-side-pane #header {
border: none;
}
#target-registers-side-pane #register-group-header[selected=true],
#target-registers-side-pane #register-item[selected=true] {
background-color: #335883;
}
#target-registers-side-pane #register-item #value {
font-size: 13px;
color: #8a8a8d;
font-style: italic;
}
#target-registers-side-pane #register-item[selected=false] #value[changed=true] {
color: #547fba;
}
#target-registers-side-pane #register-item[selected=true] #value[changed=true] {
color: #8a8a8d;
}

View File

@@ -82,6 +82,103 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<widget class="QWidget" name="left-side-menu-bar">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="QToolButton" name="target-registers-btn">
<property name="toolTip">
<string>Target Registers</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="disabled">
<bool>true</bool>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="SvgWidget" name="target-registers-icon">
<property name="containerHeight">
<number>15</number>
</property>
<property name="containerWidth">
<number>22</number>
</property>
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers.svg</string>
</property>
<property name="disabledSvgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers-disabled.svg</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<spacer name="vSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="left-panel">
<property name="visible">
<bool>false</bool>
</property>
<property name="maximumWidth">
<number>300</number>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="left-panel-layout-container">
<layout class="QVBoxLayout" name="left-panel-layout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item>
<widget class="SlidingHandleWidget" name="left-panel-slider">
<property name="handleWidth">
<number>6</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QWidget" name="io-container"> <widget class="QWidget" name="io-container">
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
@@ -99,30 +196,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<!-- Target RAM inspection will be introduced in a later version -->
<!-- <item>-->
<!-- <widget class="QWidget" name="rhSideBar">-->
<!-- <property name="layoutDirection">-->
<!-- <enum>Qt::RightToLeft</enum>-->
<!-- </property>-->
<!-- <layout class="QVBoxLayout">-->
<!-- <property name="spacing">-->
<!-- <number>0</number>-->
<!-- </property>-->
<!-- <property name="margin">-->
<!-- <number>0</number>-->
<!-- </property>-->
<!-- <item alignment="Qt::AlignTop">-->
<!-- <widget class="QToolButton" name="inspectRamBtn">-->
<!-- <property name="toolTip">-->
<!-- <string>Inspect Target RAM</string>-->
<!-- </property>-->
<!-- </widget>-->
<!-- </item>-->
<!-- </layout>-->
<!-- </widget>-->
<!-- </item>-->
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@@ -0,0 +1,67 @@
<?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="14"
height="14"
viewBox="0 0 3.7041666 3.7041668"
version="1.1"
id="svg8"
inkscape:version="1.0.1 (1.0.1+r75)"
sodipodi:docname="arrow.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#343532"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="22.4"
inkscape:cx="13.808213"
inkscape:cy="8.6867491"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:window-width="3440"
inkscape:window-height="1353"
inkscape:window-x="2560"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-page="true" />
<metadata
id="metadata5">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="rect870"
style="fill:#c5c5c5;fill-opacity:0.54471;stroke:none;stroke-width:0.125699"
d="M 1.4404895,0.79375004 1.2053549,1.0288872 2.0285426,1.8520835 1.2053549,2.6752799 1.4404895,2.9104167 2.4988118,1.8520835 2.2636773,1.6169464 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,66 @@
<?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="15"
height="15"
viewBox="0 0 3.96875 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="collapse-all.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="44.8"
inkscape:cx="12.175843"
inkscape:cy="8.3518848"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="rect870-3"
style="fill:#c4c4c4;fill-opacity:0.717647;stroke:none;stroke-width:0.125699"
d="M 1.1611694,0.42633055 0.92604168,0.66145832 1.984375,1.7197917 2.2195028,1.4846638 3.0427083,0.66145832 2.8075805,0.42633055 1.984375,1.2495361 Z M 1.984375,2.2489584 0.92604168,3.3072917 1.1611694,3.5424195 1.984375,2.7192139 2.8075805,3.5424195 3.0427083,3.3072917 2.2195028,2.4840861 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,66 @@
<?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="15"
height="15"
viewBox="0 0 3.96875 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="expand-all.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="44.8"
inkscape:cx="21.16171"
inkscape:cy="8.9178232"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-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:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="rect870"
style="fill:#c4c4c4;fill-opacity:0.717647;stroke:none;stroke-width:0.125699"
d="M 1.984375,0.42633055 0.92604168,1.4846638 1.1611694,1.7197917 1.984375,0.89658609 2.8075805,1.7197917 3.0427083,1.4846638 2.2195028,0.66145832 Z M 1.1611694,2.2489584 0.92604168,2.4840861 1.984375,3.5424195 2.2195028,3.3072917 3.0427083,2.4840861 2.8075805,2.2489584 1.984375,3.0721639 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,99 @@
<?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="15"
height="15"
viewBox="0 0 3.96875 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="registerGroupIcon.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="44.8"
inkscape:cx="12.621176"
inkscape:cy="5.2952505"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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" />
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0781247"
id="rect1537"
width="1.5875"
height="0.79374999"
x="0.26458332"
y="0.52916664" />
<rect
style="fill:#c4c4c4;fill-opacity:0.54509807;stroke-width:0.0781246"
id="rect1537-5"
width="1.5875"
height="0.79374999"
x="2.1166666"
y="0.52916664" />
<rect
style="fill:#c5c5c5;fill-opacity:0.54471;stroke-width:0.0781246"
id="rect1537-6"
width="1.5875"
height="0.79374999"
x="0.26458332"
y="1.5875" />
<rect
style="fill:#c5c5c5;fill-opacity:0.54471;stroke-width:0.0781246"
id="rect1537-5-2"
width="1.5875"
height="0.79374999"
x="2.1166666"
y="1.5875" />
<rect
style="fill:#c4c4c4;fill-opacity:0.54509807;stroke-width:0.0781246"
id="rect1537-6-9"
width="1.5875"
height="0.79374999"
x="0.26458332"
y="2.6458333" />
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0781246"
id="rect1537-5-2-1"
width="1.5875"
height="0.79374999"
x="2.1166663"
y="2.6458333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,55 @@
<?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="400"
height="500"
viewBox="0 0 105.83333 132.29167"
version="1.1"
id="svg2152"
inkscape:version="1.0.1 (1.0.1+r75)"
sodipodi:docname="register-window-mockup.svg">
<defs
id="defs2146" />
<sodipodi:namedview
id="base"
pagecolor="#343532"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="359.49542"
inkscape:cy="255.39043"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:window-width="3440"
inkscape:window-height="1353"
inkscape:window-x="2560"
inkscape:window-y="34"
inkscape:window-maximized="1" />
<metadata
id="metadata2149">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,91 @@
<?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="15"
height="11"
viewBox="0 0 3.9687501 2.9104166"
version="1.1"
id="svg974"
sodipodi:docname="register.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="44.8"
inkscape:cx="12.621176"
inkscape:cy="3.0809648"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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"
lock-margins="false"
fit-margin-top="2"
fit-margin-bottom="2"
fit-margin-left="1"
fit-margin-right="1" />
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(1.3610131e-8,-1.0583333)">
<rect
style="fill:#c5c5c5;fill-opacity:0.54471;stroke-width:0.0781246"
id="rect1537-6"
width="1.5875"
height="0.79374999"
x="0.26458332"
y="1.5875" />
<rect
style="fill:#c4c4c4;fill-opacity:0.54509807;stroke-width:0.0781246"
id="rect1537-5-2"
width="1.5875"
height="0.79374999"
x="2.1166666"
y="1.5875" />
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0781246"
id="rect1537-6-9"
width="1.5875"
height="0.79374999"
x="0.26458332"
y="2.6458333" />
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0781246"
id="rect1537-5-2-1"
width="1.5875"
height="0.79374999"
x="2.1166663"
y="2.6458333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,138 @@
<?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="15"
height="15"
viewBox="0 0 3.9687501 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="search-registers.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="15.839192"
inkscape:cx="7.9283139"
inkscape:cy="-1.8995076"
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-bbox="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
fit-margin-left="2"
fit-margin-right="2"
fit-margin-top="2"
fit-margin-bottom="2"
lock-margins="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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
style="display:none;opacity:0.596"
transform="translate(-0.35569893,-0.55086873)"
sodipodi:insensitive="true">
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0700599"
id="rect1537"
width="1.404327"
height="0.72159094"
x="0.26458332"
y="0.52916664" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0700598"
id="rect1537-5"
width="1.404327"
height="0.72159094"
x="1.9029646"
y="0.52916664" />
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0700598"
id="rect1537-6"
width="1.404327"
height="0.72159094"
x="0.26458332"
y="1.4912878" />
<rect
style="fill:#7b5f31;fill-opacity:1;stroke-width:0.0700598"
id="rect1537-5-2"
width="1.404327"
height="0.72159094"
x="1.9029646"
y="1.4912878" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0700598"
id="rect1537-6-9"
width="1.404327"
height="0.72159094"
x="0.26458332"
y="2.453409" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0700598"
id="rect1537-5-2-1"
width="1.404327"
height="0.72159094"
x="1.9029644"
y="2.453409" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Magnifying glass"
transform="translate(-0.35569893,-0.55086873)">
<ellipse
style="fill:none;fill-opacity:0.545098;stroke:#838382;stroke-width:0.560136;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path1536"
cx="-0.13798741"
cy="3.113795"
rx="0.94102794"
ry="0.94102806"
transform="matrix(0.70709737,-0.70711619,0.70709737,0.70711619,0,0)" />
<rect
style="fill:#838382;fill-opacity:1;stroke:none;stroke-width:0.224143"
id="rect1538"
width="0.56013554"
height="0.98023731"
x="-0.41805497"
y="4.2450566"
transform="matrix(0.70709737,-0.70711619,0.70709737,0.70711619,0,0)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,99 @@
<?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="15"
height="15"
viewBox="0 0 3.96875 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="target-registers-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="44.8"
inkscape:cx="15.776708"
inkscape:cy="9.8955161"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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" />
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713178"
id="rect1537"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="0.52916664" />
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713177"
id="rect1537-5"
width="1.3229164"
height="0.79374999"
x="2.116667"
y="0.52916664" />
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713177"
id="rect1537-6"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="1.5875001" />
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713177"
id="rect1537-5-2"
width="1.3229164"
height="0.79374999"
x="2.116667"
y="1.5875001" />
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713177"
id="rect1537-6-9"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="2.6458333" />
<rect
style="fill:#c4c4c4;fill-opacity:0.30000001;stroke-width:0.0713177"
id="rect1537-5-2-1"
width="1.3229164"
height="0.79374999"
x="2.1166668"
y="2.6458333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,99 @@
<?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="15"
height="15"
viewBox="0 0 3.96875 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="targetRegistersIcon.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="44.8"
inkscape:cx="15.776708"
inkscape:cy="9.8955161"
inkscape:document-units="px"
inkscape:current-layer="layer1"
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" />
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0713178"
id="rect1537"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="0.52916664" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0713177"
id="rect1537-5"
width="1.3229164"
height="0.79374999"
x="2.116667"
y="0.52916664" />
<rect
style="fill:#c5c5c5;fill-opacity:0.54471;stroke-width:0.0713177"
id="rect1537-6"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="1.5875001" />
<rect
style="fill:#c5c5c5;fill-opacity:0.54471;stroke-width:0.0713177"
id="rect1537-5-2"
width="1.3229164"
height="0.79374999"
x="2.116667"
y="1.5875001" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0713177"
id="rect1537-6-9"
width="1.3229166"
height="0.79374999"
x="0.52916664"
y="2.6458333" />
<rect
style="fill:#c4c4c4;fill-opacity:0.545098;stroke-width:0.0713177"
id="rect1537-5-2-1"
width="1.3229164"
height="0.79374999"
x="2.1166668"
y="2.6458333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,28 @@
#include "ItemWidget.hpp"
#include <QStyle>
using namespace Bloom::Widgets;
ItemWidget::ItemWidget(QWidget* parent): ClickableWidget(parent) {
auto onClick = [this] {
this->setSelected(true);
};
this->connect(this, &ClickableWidget::clicked, this, onClick);
this->connect(this, &ClickableWidget::rightClicked, this, onClick);
this->setSelected(false);
}
void ItemWidget::setSelected(bool selected) {
this->setProperty("selected", selected);
this->style()->unpolish(this);
this->style()->polish(this);
if (selected) {
emit this->selected(this);
}
this->postSetSelected(selected);
}

View File

@@ -0,0 +1,22 @@
#pragma once
#include "../ClickableWidget.hpp"
namespace Bloom::Widgets
{
class ItemWidget: public ClickableWidget
{
Q_OBJECT
protected:
virtual void postSetSelected(bool selected) {};
public:
ItemWidget(QWidget *parent);
public slots:
void setSelected(bool selected);
signals:
void selected(ItemWidget*);
};
}

View File

@@ -0,0 +1,152 @@
#include "RegisterGroupWidget.hpp"
#include <QUiLoader>
#include <QStyle>
#include <utility>
#include "RegisterWidget.hpp"
#include "src/Helpers/Paths.hpp"
using namespace Bloom::Widgets;
using namespace Bloom::Exceptions;
using Bloom::Targets::TargetRegisterDescriptor;
RegisterGroupWidget::RegisterGroupWidget(
QString name,
const std::set<TargetRegisterDescriptor>& registerDescriptors,
InsightWorker& insightWorker,
TargetRegistersPaneWidget* parent
): ItemWidget(parent), name(std::move(name)) {
this->setObjectName(this->name);
this->headerWidget->setObjectName("register-group-header");
this->headerWidget->setFixedHeight(25);
auto headerLayout = new QHBoxLayout(this->headerWidget);
headerLayout->setContentsMargins(5, 0, 0, 0);
this->label->setText(this->name);
this->arrowIcon->setObjectName("arrow-icon");
auto static arrowIconPath = QString::fromStdString(
Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg"
);
this->arrowIcon->setSvgFilePath(arrowIconPath);
this->arrowIcon->setContainerHeight(15);
this->arrowIcon->setContainerWidth(14);
this->registerGroupIcon->setObjectName("register-group-icon");
auto static registerIconPath = QString::fromStdString(
Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register-group.svg"
);
this->registerGroupIcon->setSvgFilePath(registerIconPath);
this->registerGroupIcon->setContainerHeight(15);
this->registerGroupIcon->setContainerWidth(15);
headerLayout->addWidget(this->arrowIcon);
headerLayout->addWidget(this->registerGroupIcon);
headerLayout->addWidget(this->label);
auto bodyLayout = new QVBoxLayout(this->bodyWidget);
bodyLayout->setContentsMargins(0, 0,0,0);
bodyLayout->setSpacing(0);
for (auto& descriptor : registerDescriptors) {
if (!descriptor.name.has_value()) {
continue;
}
if (!descriptor.readable) {
continue;
}
auto registerWidget = new RegisterWidget(descriptor, insightWorker, this->bodyWidget);
bodyLayout->addWidget(registerWidget, 0, Qt::AlignmentFlag::AlignTop);
this->connect(
registerWidget,
&ItemWidget::selected,
parent,
&TargetRegistersPaneWidget::onItemSelectionChange
);
this->registerWidgets.insert(registerWidget);
this->registerWidgetsMappedByDescriptor.insert(std::pair(descriptor, registerWidget));
}
bodyLayout->addStretch(1);
this->layout->setContentsMargins(0,0,0,0);
this->layout->setSpacing(0);
this->layout->addWidget(this->headerWidget, 0, Qt::AlignmentFlag::AlignTop);
this->layout->addWidget(this->bodyWidget, 0, Qt::AlignmentFlag::AlignTop);
this->layout->addStretch(1);
this->collapse();
this->connect(this->headerWidget, &ClickableWidget::doubleClicked, [this] {
if (this->collapsed) {
this->expand();
} else {
this->collapse();
}
});
this->connect(
this->headerWidget,
&ItemWidget::selected,
parent,
&TargetRegistersPaneWidget::onItemSelectionChange
);
}
void RegisterGroupWidget::collapse() {
this->arrowIcon->setAngle(0);
this->bodyWidget->setVisible(false);
this->collapsed = true;
}
void RegisterGroupWidget::expand() {
this->arrowIcon->setAngle(90);
this->bodyWidget->setVisible(true);
this->collapsed = false;
}
void RegisterGroupWidget::setAllRegistersVisible(bool visible) {
for (auto& registerWidget : this->registerWidgets) {
registerWidget->setVisible(visible);
}
}
void RegisterGroupWidget::filterRegisters(const std::string& keyword) {
int matchingWidgetCount = 0;
for (auto& registerWidget : this->registerWidgets) {
if (keyword.empty()
|| (registerWidget->descriptor.name.value().find(keyword) != std::string::npos)
) {
matchingWidgetCount++;
registerWidget->setVisible(true);
} else {
registerWidget->setVisible(false);
}
}
if (matchingWidgetCount == 0) {
this->collapse();
this->setVisible(false);
} else {
this->setVisible(true);
if (!keyword.empty()) {
this->expand();
} else {
this->collapse();
}
}
}

View File

@@ -0,0 +1,52 @@
#pragma once
#include <QWidget>
#include <unordered_set>
#include <QVBoxLayout>
#include <QLabel>
#include <QSize>
#include <set>
#include <string>
#include "TargetRegistersPaneWidget.hpp"
#include "ItemWidget.hpp"
#include "src/Insight/InsightWorker/InsightWorker.hpp"
#include "../ClickableWidget.hpp"
#include "../SvgWidget.hpp"
namespace Bloom::Widgets
{
class RegisterWidget;
class RegisterGroupWidget: public ItemWidget
{
Q_OBJECT
private:
QVBoxLayout* layout = new QVBoxLayout(this);
ItemWidget* headerWidget = new ItemWidget(this);
SvgWidget* arrowIcon = new SvgWidget(this->headerWidget);
SvgWidget* registerGroupIcon = new SvgWidget(this->headerWidget);
QLabel* label = new QLabel(this->headerWidget);
QWidget* bodyWidget = new QWidget(this);
public:
QString name;
bool collapsed = true;
std::set<RegisterWidget*> registerWidgets;
std::map<Targets::TargetRegisterDescriptor, RegisterWidget*> registerWidgetsMappedByDescriptor;
RegisterGroupWidget(
QString name,
const std::set<Targets::TargetRegisterDescriptor>& registerDescriptors,
InsightWorker& insightWorker,
TargetRegistersPaneWidget* parent
);
void collapse();
void expand();
void setAllRegistersVisible(bool visible);
void filterRegisters(const std::string& keyword);
};
}

View File

@@ -0,0 +1,192 @@
#include "RegisterWidget.hpp"
#include <QApplication>
#include <QClipboard>
#include <QMenu>
#include <utility>
#include <QStyle>
#include "src/Helpers/Paths.hpp"
#include "src/Exceptions/Exception.hpp"
#include "src/Insight/InsightWorker/Tasks/ReadTargetRegisters.hpp"
using namespace Bloom::Widgets;
using namespace Bloom::Exceptions;
using Bloom::Targets::TargetRegisterDescriptor;
RegisterWidget::RegisterWidget(
TargetRegisterDescriptor descriptor,
InsightWorker& insightWorker,
QWidget *parent
): ItemWidget(parent), descriptor(descriptor), insightWorker(insightWorker) {
this->setObjectName("register-item");
this->setFixedHeight(25);
this->nameLabel->setText(QString::fromStdString(this->descriptor.name.value()).toUpper());
this->valueLabel->setObjectName("value");
this->registerIcon->setObjectName("register-icon");
auto static registerIconPath = QString::fromStdString(
Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register.svg"
);
this->registerIcon->setSvgFilePath(registerIconPath);
this->registerIcon->setContainerHeight(15);
this->registerIcon->setContainerWidth(15);
this->layout->setContentsMargins(47, 0, 0, 0);
this->layout->setSpacing(0);
this->layout->addWidget(this->registerIcon);
this->layout->addSpacing(7);
this->layout->addWidget(this->nameLabel);
this->layout->addSpacing(5);
this->layout->addWidget(this->valueLabel);
this->layout->addStretch(1);
this->connect(this->refreshValueAction, &QAction::triggered, this, &RegisterWidget::refreshValue);
this->connect(this->copyValueNameAction, &QAction::triggered, this, &RegisterWidget::copyName);
this->connect(this->copyValueHexAction, &QAction::triggered, this, &RegisterWidget::copyValueHex);
this->connect(this->copyValueDecimalAction, &QAction::triggered, this, &RegisterWidget::copyValueDecimal);
this->connect(this->copyValueBinaryAction, &QAction::triggered, this, &RegisterWidget::copyValueBinary);
this->connect(
&(this->insightWorker),
&InsightWorker::targetStateUpdated,
this,
&RegisterWidget::onTargetStateChange
);
}
void RegisterWidget::setRegisterValue(const Targets::TargetRegister& targetRegister) {
const auto valueChanged = this->currentRegister.has_value()
&& this->currentRegister.value().value != targetRegister.value;
this->currentRegister = targetRegister;
auto valueByteArray = QByteArray(
reinterpret_cast<const char*>(targetRegister.value.data()),
static_cast<qsizetype>(targetRegister.value.size())
);
auto hexValueByteArray = valueByteArray.toHex();
auto registerValue = ": 0x" + QString(hexValueByteArray).toUpper()
+ " | " + QString::number(hexValueByteArray.toUInt(nullptr, 16));
if (targetRegister.value.size() == 1 && targetRegister.value[0] >= 32 && targetRegister.value[0] <= 126) {
registerValue += " | '" + QString(valueByteArray) + "'";
}
this->valueLabel->setProperty("changed", valueChanged);
this->valueLabel->style()->unpolish(this->valueLabel);
this->valueLabel->style()->polish(this->valueLabel);
this->valueLabel->setText(registerValue);
}
void RegisterWidget::clearInlineValue() {
this->valueLabel->clear();
}
void RegisterWidget::refreshValue() {
auto readRegisterTask = new ReadTargetRegisters({this->descriptor});
this->connect(
readRegisterTask,
&ReadTargetRegisters::targetRegistersRead,
this,
[this] (Targets::TargetRegisters registers) {
for (const auto& targetRegister : registers) {
if (targetRegister.descriptor == this->descriptor) {
this->setRegisterValue(targetRegister);
}
}
}
);
this->insightWorker.queueTask(readRegisterTask);
}
void RegisterWidget::copyName() {
if (this->nameLabel != nullptr) {
QApplication::clipboard()->setText(this->nameLabel->text());
}
}
void RegisterWidget::copyValueHex() {
if (this->currentRegister.has_value()) {
auto valueByteArray = QByteArray(
reinterpret_cast<const char*>(this->currentRegister.value().value.data()),
static_cast<qsizetype>(this->currentRegister.value().value.size())
).toHex();
QApplication::clipboard()->setText(QString(valueByteArray).toUpper());
}
}
void RegisterWidget::copyValueDecimal() {
if (this->currentRegister.has_value()) {
auto valueByteArray = QByteArray(
reinterpret_cast<const char*>(this->currentRegister.value().value.data()),
static_cast<qsizetype>(this->currentRegister.value().value.size())
).toHex();
QApplication::clipboard()->setText(QString::number(valueByteArray.toUInt(nullptr, 16)));
}
}
void RegisterWidget::copyValueBinary() {
if (this->currentRegister.has_value()) {
const auto registerValueSize = static_cast<qsizetype>(this->currentRegister.value().size());
auto valueByteArray = QByteArray(
reinterpret_cast<const char*>(this->currentRegister.value().value.data()),
registerValueSize
).toHex();
auto bitString = QString::number(valueByteArray.toUInt(nullptr, 16), 2);
if (bitString.size() < (registerValueSize * 8)) {
bitString = bitString.rightJustified((registerValueSize * 8), '0');
}
QApplication::clipboard()->setText(bitString);
}
}
void RegisterWidget::contextMenuEvent(QContextMenuEvent* event) {
this->setSelected(true);
auto menu = new QMenu(this);
menu->addAction(this->refreshValueAction);
menu->addSeparator();
auto copyMenu = new QMenu("Copy", this);
copyMenu->addAction(this->copyValueNameAction);
copyMenu->addSeparator();
copyMenu->addAction(this->copyValueDecimalAction);
copyMenu->addAction(this->copyValueHexAction);
copyMenu->addAction(this->copyValueBinaryAction);
menu->addMenu(copyMenu);
const auto targetStopped = this->targetState == Targets::TargetState::STOPPED;
const auto targetStoppedAndValuePresent = targetStopped && this->currentRegister.has_value();
this->refreshValueAction->setEnabled(targetStopped);
this->copyValueDecimalAction->setEnabled(targetStoppedAndValuePresent);
this->copyValueHexAction->setEnabled(targetStoppedAndValuePresent);
this->copyValueBinaryAction->setEnabled(targetStoppedAndValuePresent);
menu->exec(event->globalPos());
}
void RegisterWidget::postSetSelected(bool selected) {
auto valueLabelStyle = this->valueLabel->style();
valueLabelStyle->unpolish(this->valueLabel);
valueLabelStyle->polish(this->valueLabel);
}
void RegisterWidget::onTargetStateChange(Targets::TargetState newState) {
this->targetState = newState;
if (this->targetState == Targets::TargetState::RUNNING) {
this->clearInlineValue();
}
}

View File

@@ -0,0 +1,68 @@
#pragma once
#include <QWidget>
#include <unordered_set>
#include <QHBoxLayout>
#include <QLabel>
#include <QAction>
#include <QSize>
#include <QEvent>
#include "ItemWidget.hpp"
#include "../SvgWidget.hpp"
#include "src/Insight/InsightWorker/InsightWorker.hpp"
namespace Bloom::Widgets
{
class RegisterWidget: public ItemWidget
{
Q_OBJECT
private:
InsightWorker& insightWorker;
QHBoxLayout* layout = new QHBoxLayout(this);
SvgWidget* registerIcon = new SvgWidget(this);
QLabel* nameLabel = new QLabel(this);
QLabel* valueLabel = new QLabel(this);
// Context-menu actions
QAction* refreshValueAction = new QAction("Refresh Value", this);
QAction* copyValueNameAction = new QAction("Copy Register Name", this);
QAction* copyValueHexAction = new QAction("Copy Hexadecimal Value", this);
QAction* copyValueDecimalAction = new QAction("Copy Decimal Value", this);
QAction* copyValueBinaryAction = new QAction("Copy Binary Value", this);
void postSetSelected(bool selected) override;
Targets::TargetState targetState = Targets::TargetState::UNKNOWN;
private slots:
void onTargetStateChange(Targets::TargetState newState);
public:
Targets::TargetRegisterDescriptor descriptor;
std::optional<Targets::TargetRegister> currentRegister;
RegisterWidget(
Targets::TargetRegisterDescriptor descriptor,
InsightWorker& insightWorker,
QWidget *parent
);
[[nodiscard]] QSize minimumSizeHint() const override {
auto size = QSize(this->parentWidget()->width(), 25);
return size;
}
void setRegisterValue(const Targets::TargetRegister& targetRegister);
void clearInlineValue();
void contextMenuEvent(QContextMenuEvent* event) override;
public slots:
void refreshValue();
void copyName();
void copyValueHex();
void copyValueDecimal();
void copyValueBinary();
};
}

View File

@@ -0,0 +1,248 @@
#include "TargetRegistersPaneWidget.hpp"
#include <QVBoxLayout>
#include <QScrollArea>
#include <set>
#include "../../UiLoader.hpp"
#include "../ExpandingWidget.hpp"
#include "RegisterGroupWidget.hpp"
#include "RegisterWidget.hpp"
#include "src/Helpers/Paths.hpp"
#include "src/Exceptions/Exception.hpp"
#include "src/Insight/InsightWorker/Tasks/ReadTargetRegisters.hpp"
using namespace Bloom::Widgets;
using namespace Bloom::Exceptions;
using Bloom::Targets::TargetDescriptor;
using Bloom::Targets::TargetRegisterDescriptor;
using Bloom::Targets::TargetRegisterDescriptors;
using Bloom::Targets::TargetRegisterType;
TargetRegistersPaneWidget::TargetRegistersPaneWidget(
const TargetDescriptor& targetDescriptor,
InsightWorker& insightWorker,
QWidget* parent
): QWidget(parent), parent(parent), targetDescriptor(targetDescriptor), insightWorker(insightWorker) {
this->setObjectName("target-registers-side-pane");
auto targetRegistersPaneUiFile = QFile(
QString::fromStdString(Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui"
)
);
if (!targetRegistersPaneUiFile.open(QFile::ReadOnly)) {
throw Exception("Failed to open TargetRegistersSidePane UI file");
}
auto uiLoader = UiLoader(this);
this->container = uiLoader.load(&targetRegistersPaneUiFile, this);
this->container->setFixedSize(parent->width(), parent->maximumHeight());
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(this->container);
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
this->collapseAllButton = this->toolBar->findChild<SvgToolButton*>("collapse-all-button");
this->expandAllButton = this->toolBar->findChild<SvgToolButton*>("expand-all-button");
this->toolBar->layout()->setContentsMargins(5, 0, 5, 0);
this->searchInput = this->container->findChild<QLineEdit*>("search-input");
this->connect(this->expandAllButton, &QToolButton::clicked, [this] {
this->expandAllRegisterGroups();
});
this->connect(this->collapseAllButton, &QToolButton::clicked, [this] {
this->collapseAllRegisterGroups();
});
this->connect(this->searchInput, &QLineEdit::textChanged, [this] {
this->filterRegisters(this->searchInput->text());
});
this->itemContainer = this->container->findChild<QWidget*>("item-container");
auto itemLayout = this->itemContainer->findChild<QVBoxLayout*>();
auto& registerDescriptors = targetDescriptor.registerDescriptorsByType;
this->renderedDescriptors = std::set<TargetRegisterDescriptor>(
registerDescriptors.at(TargetRegisterType::GENERAL_PURPOSE_REGISTER).begin(),
registerDescriptors.at(TargetRegisterType::GENERAL_PURPOSE_REGISTER).end()
);
auto generalPurposeRegisterGroupWidget = new RegisterGroupWidget(
"CPU General Purpose",
this->renderedDescriptors,
insightWorker,
this
);
itemLayout->addWidget(generalPurposeRegisterGroupWidget, 0, Qt::AlignTop);
this->registerGroupWidgets.insert(generalPurposeRegisterGroupWidget);
auto registerDescriptorsByGroupName = std::map<std::string, std::set<TargetRegisterDescriptor>>();
for (const auto& registerDescriptor : registerDescriptors.at(TargetRegisterType::OTHER)) {
registerDescriptorsByGroupName[registerDescriptor.groupName.value_or("other")].insert(registerDescriptor);
auto groupName = registerDescriptor.groupName.value_or("other");
}
for (const auto& [groupName, registerDescriptors] : registerDescriptorsByGroupName) {
auto registerGroupWidget = new RegisterGroupWidget(
QString::fromStdString(groupName).toUpper(),
registerDescriptors,
insightWorker,
this
);
itemLayout->addWidget(registerGroupWidget, 0, Qt::AlignTop);
this->registerGroupWidgets.insert(registerGroupWidget);
this->renderedDescriptors.insert(registerDescriptors.begin(), registerDescriptors.end());
}
itemLayout->addStretch(1);
this->connect(
&insightWorker,
&InsightWorker::targetStateUpdated,
this,
&TargetRegistersPaneWidget::onTargetStateChanged
);
}
void TargetRegistersPaneWidget::resizeEvent(QResizeEvent* event) {
auto parentSize = this->parent->size();
this->container->setFixedSize(
parentSize.width() - 1,
parentSize.height()
);
this->searchInput->setFixedWidth(parentSize.width() - 20);
}
void TargetRegistersPaneWidget::postActivate() {
if (this->targetState == Targets::TargetState::STOPPED) {
this->refreshRegisterValues();
}
}
void TargetRegistersPaneWidget::postDeactivate() {
}
void TargetRegistersPaneWidget::onTargetStateChanged(Targets::TargetState newState) {
using Targets::TargetState;
this->targetState = newState;
if (newState == TargetState::STOPPED && this->activated) {
this->refreshRegisterValues();
}
}
void TargetRegistersPaneWidget::filterRegisters(const QString& keyword) {
auto stdKeyword = keyword.toLower().toStdString();
for (auto& registerGroupWidget : this->registerGroupWidgets) {
// If the group name matches the keyword, then don't bother iterating through all the register widgets
if (keyword.isEmpty() || registerGroupWidget->name.contains(keyword, Qt::CaseInsensitive)) {
registerGroupWidget->setVisible(true);
registerGroupWidget->setAllRegistersVisible(true);
if (!keyword.isEmpty()) {
registerGroupWidget->expand();
} else {
registerGroupWidget->collapse();
}
} else {
registerGroupWidget->filterRegisters(stdKeyword);
}
}
}
void TargetRegistersPaneWidget::collapseAllRegisterGroups() {
for (auto& registerGroupWidget : this->registerGroupWidgets) {
registerGroupWidget->collapse();
}
}
void TargetRegistersPaneWidget::expandAllRegisterGroups() {
for (auto& registerGroupWidget : this->registerGroupWidgets) {
registerGroupWidget->expand();
}
}
void TargetRegistersPaneWidget::refreshRegisterValues(std::optional<std::function<void(void)>> callback) {
auto& descriptors = this->renderedDescriptors;
if (descriptors.empty()) {
return;
}
auto readRegisterTask = new ReadTargetRegisters(descriptors);
this->connect(
readRegisterTask,
&ReadTargetRegisters::targetRegistersRead,
this,
&TargetRegistersPaneWidget::onRegistersRead
);
if (callback.has_value()) {
this->connect(
readRegisterTask,
&InsightWorkerTask::completed,
this,
callback.value()
);
}
this->insightWorker.queueTask(readRegisterTask);
}
void TargetRegistersPaneWidget::clearInlineValues() {
for (const auto& registerGroupWidget : this->registerGroupWidgets) {
for (auto& [registerDescriptor, registerWidget] : registerGroupWidget->registerWidgetsMappedByDescriptor) {
registerWidget->clearInlineValue();
}
}
}
void TargetRegistersPaneWidget::activate() {
this->show();
this->activated = true;
this->postActivate();
}
void TargetRegistersPaneWidget::deactivate() {
this->hide();
this->activated = false;
this->postDeactivate();
}
void TargetRegistersPaneWidget::onItemSelectionChange(ItemWidget* newlySelectedWidget) {
// Only one item in the target registers pane can be selected at any given time.
if (this->selectedItemWidget != newlySelectedWidget) {
if (this->selectedItemWidget != nullptr) {
this->selectedItemWidget->setSelected(false);
}
this->selectedItemWidget = newlySelectedWidget;
}
}
void TargetRegistersPaneWidget::onRegistersRead(const Targets::TargetRegisters& registers) {
for (const auto& targetRegister : registers) {
auto& descriptor = targetRegister.descriptor;
for (const auto& registerGroupWidget : this->registerGroupWidgets) {
if (registerGroupWidget->registerWidgetsMappedByDescriptor.contains(descriptor)) {
registerGroupWidget->registerWidgetsMappedByDescriptor.at(descriptor)->setRegisterValue(targetRegister);
break;
}
}
}
}

View File

@@ -0,0 +1,85 @@
#pragma once
#include <QWidget>
#include <QLineEdit>
#include <set>
#include <QSize>
#include <QString>
#include <QEvent>
#include <optional>
#include "ItemWidget.hpp"
#include "../SvgToolButton.hpp"
#include "src/Insight/InsightWorker/InsightWorker.hpp"
#include "src/Targets/TargetState.hpp"
#include "src/Targets/TargetDescriptor.hpp"
namespace Bloom::Widgets
{
class RegisterGroupWidget;
class TargetRegistersPaneWidget: public QWidget
{
Q_OBJECT
private:
const Targets::TargetDescriptor& targetDescriptor;
InsightWorker& insightWorker;
QWidget* parent = nullptr;
QWidget* container = nullptr;
QWidget* toolBar = nullptr;
SvgToolButton* collapseAllButton = nullptr;
SvgToolButton* expandAllButton = nullptr;
QLineEdit* searchInput = nullptr;
QWidget* itemContainer = nullptr;
ItemWidget* selectedItemWidget = nullptr;
std::set<RegisterGroupWidget*> registerGroupWidgets;
Targets::TargetRegisterDescriptors renderedDescriptors;
Targets::TargetState targetState = Targets::TargetState::UNKNOWN;
private slots:
void onTargetStateChanged(Targets::TargetState newState);
protected:
void resizeEvent(QResizeEvent* event) override;
virtual void postActivate();
virtual void postDeactivate();
public:
bool activated = false;
TargetRegistersPaneWidget(
const Targets::TargetDescriptor& targetDescriptor,
InsightWorker& insightWorker,
QWidget *parent
);
[[nodiscard]] QSize minimumSizeHint() const override {
return this->parent->size();
}
[[nodiscard]] QSize sizeHint() const override {
return this->minimumSizeHint();
}
void filterRegisters(const QString& keyword);
void collapseAllRegisterGroups();
void expandAllRegisterGroups();
void refreshRegisterValues(std::optional<std::function<void(void)>> callback = std::nullopt);
void clearInlineValues();
void activate();
void deactivate();
public slots:
void onItemSelectionChange(ItemWidget* newlySelectedWidget);
void onRegistersRead(const Targets::TargetRegisters& registers);
};
}

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<widget class="QWidget" name="container">
<layout class="QVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="tool-bar">
<property name="minimumHeight">
<number>28</number>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="title">
<property name="text"><string>Target Registers</string></property>
</widget>
</item>
<item>
<spacer name="header-tool-bar-tailing-spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="SvgToolButton" name="expand-all-button">
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg</string>
</property>
<property name="toolTip">
<string>Expand All</string>
</property>
</widget>
</item>
<item>
<widget class="SvgToolButton" name="collapse-all-button">
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg</string>
</property>
<property name="toolTip">
<string>Collapse All</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="search-bar">
<property name="minimumHeight">
<number>27</number>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item alignment="Qt::AlignLeft">
<widget class="SvgWidget" name="search-bar-icon">
<property name="containerHeight">
<number>16</number>
</property>
<property name="containerWidth">
<number>20</number>
</property>
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/search-registers.svg</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignLeft">
<widget class="QLineEdit" name="search-input">
<property name="minimumHeight">
<number>25</number>
</property>
<property name="minimumWidth">
<number>240</number>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="header-tool-bar-tailing-spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="ExpandingHeightScrollAreaWidget" name="item-scroll-area">
<property name="widgetResizable"><bool>true</bool></property>
<property name="verticalScrollBarPolicy"><enum>Qt::ScrollBarAsNeeded</enum></property>
<property name="sizeAdjustPolicy"><enum>QAbstractScrollArea::AdjustToContents</enum></property>
<property name="horizontalScrollBarPolicy"><enum>Qt::ScrollBarAlwaysOff</enum></property>
<property name="sizePolicy"><enum>QSizePolicy::SetMinAndMaxSize</enum></property>
<widget class="QWidget" name="item-container">
<layout class="QVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</ui>

View File

@@ -19,6 +19,7 @@
<!-- QT UI templates for Insight--> <!-- QT UI templates for Insight-->
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui">./Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui">./Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui">./Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui">./Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui</file>
<!-- QT UI stylesheets for Insight--> <!-- QT UI stylesheets for Insight-->
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss</file>
@@ -31,5 +32,13 @@
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/RAM.svg">./Insight/UserInterfaces/InsightWindow/Images/RAM.svg</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/RAM.svg">./Insight/UserInterfaces/InsightWindow/Images/RAM.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh.svg">./Insight/UserInterfaces/InsightWindow/Images/refresh.svg</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh.svg">./Insight/UserInterfaces/InsightWindow/Images/refresh.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg">./Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg">./Insight/UserInterfaces/InsightWindow/Images/refresh-disabled.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register-group.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register-group.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers-disabled.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/target-registers-disabled.svg</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/search-registers.svg">./Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/search-registers.svg</file>
</qresource> </qresource>
</RCC> </RCC>