From d24ffd4ebc519b8e91b91a6170df7a7b24646b86 Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 3 May 2022 20:00:52 +0100 Subject: [PATCH] Replaced QLabel with derived Label widget - for plain text formatting being configured as a default --- src/Insight/CMakeLists.txt | 1 + .../InsightWindow/AboutWindow.cpp | 8 ++++--- .../InsightWindow/InsightWindow.cpp | 10 ++++---- .../InsightWindow/InsightWindow.hpp | 12 +++++----- .../InsightWindow/UiFiles/AboutWindow.ui | 14 +++++++---- .../InsightWindow/UiFiles/InsightWindow.ui | 14 +++++------ .../UserInterfaces/InsightWindow/UiLoader.cpp | 10 ++++++++ .../Widgets/ErrorDialogue/ErrorDialogue.cpp | 6 +++-- .../Widgets/ErrorDialogue/ErrorDialogue.hpp | 5 ++-- .../ErrorDialogue/UiFiles/ErrorDialogue.ui | 2 +- .../InsightWindow/Widgets/Label.hpp | 24 +++++++++++++++++++ .../InsightWindow/Widgets/RotatableLabel.hpp | 14 +++++++---- .../ByteItemContainerGraphicsView.cpp | 6 +++-- .../ByteItemContainerGraphicsView.hpp | 4 ++-- .../HexViewerWidget/ByteItemGraphicsScene.cpp | 2 +- .../HexViewerWidget/ByteItemGraphicsScene.hpp | 7 +++--- .../HexViewerWidget/HexViewerWidget.cpp | 2 +- .../HexViewerWidget/HexViewerWidget.hpp | 4 ++-- .../UiFiles/HexViewerWidget.ui | 2 +- .../ExcludedRegionItem.cpp | 4 +++- .../MemoryRegionManager/FocusedRegionItem.cpp | 4 +++- .../MemoryRegionManager/RegionItem.cpp | 5 +++- .../MemoryRegionManager/RegionItem.hpp | 11 +++++---- .../UiFiles/ExcludedMemoryRegionForm.ui | 12 +++++----- .../UiFiles/FocusedMemoryRegionForm.ui | 20 ++++++++-------- .../UiFiles/MemoryRegionManagerWindow.ui | 2 +- .../TargetMemoryInspectionPane.cpp | 4 ++-- .../UiFiles/TargetMemoryInspectionPane.ui | 2 +- .../BitsetWidget/BitBodyWidget.hpp | 1 - .../BitsetWidget/BitWidget.cpp | 4 ++-- .../BitsetWidget/BitWidget.hpp | 6 ++--- .../BitsetWidget/BitsetWidget.hpp | 1 - .../RegisterHistoryWidget/CurrentItem.hpp | 4 ++-- .../RegisterHistoryItem.hpp | 8 +++---- .../RegisterHistoryWidget.cpp | 13 ++++++---- .../RegisterHistoryWidget.hpp | 1 - .../UiFiles/RegisterHistoryWidget.ui | 2 +- .../TargetRegisterInspectorWindow.cpp | 2 +- .../TargetRegisterInspectorWindow.hpp | 6 ++--- .../UiFiles/TargetRegisterInspectorWindow.ui | 12 +++++----- .../RegisterGroupWidget.hpp | 8 +++---- .../TargetRegistersPane/RegisterWidget.hpp | 6 ++--- .../UiFiles/TargetRegistersSidePane.ui | 2 +- .../Widgets/TargetWidgets/DIP/PinWidget.cpp | 6 +++-- .../Widgets/TargetWidgets/DIP/PinWidget.hpp | 6 ++--- .../Widgets/TargetWidgets/QFP/PinWidget.cpp | 2 +- .../Widgets/TargetWidgets/QFP/PinWidget.hpp | 11 +++++---- 47 files changed, 189 insertions(+), 123 deletions(-) create mode 100644 src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp diff --git a/src/Insight/CMakeLists.txt b/src/Insight/CMakeLists.txt index 47233bca..f5aea5fc 100755 --- a/src/Insight/CMakeLists.txt +++ b/src/Insight/CMakeLists.txt @@ -9,6 +9,7 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/AboutWindow.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/PaneWidget.hpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/Label.hpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/LabeledSeparator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/TextInput.cpp diff --git a/src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp index 2beb4c9f..2a2f4186 100644 --- a/src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp @@ -1,6 +1,8 @@ #include "AboutWindow.hpp" -#include + +#include "UiLoader.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Exceptions/Exception.hpp" #include "src/Helpers/Paths.hpp" @@ -30,12 +32,12 @@ namespace Bloom throw Exception("Failed to open AboutWindow QSS file"); } - auto uiLoader = QUiLoader(); + auto uiLoader = UiLoader(this); this->windowWidget = uiLoader.load(&aboutWindowUiFile, parent); this->windowWidget->setStyleSheet(aboutWindowStylesheet.readAll()); this->windowWidget->setFixedSize(400, 300); - auto versionLabel = this->windowWidget->findChild("version-label"); + auto versionLabel = this->windowWidget->findChild("version-label"); if (versionLabel != nullptr) { versionLabel->setText("Bloom v" + QString::fromStdString(Application::VERSION.toString())); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 4d136eb3..030ce5d9 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -95,7 +95,7 @@ namespace Bloom this->ioContainerWidget = this->windowContainer->findChild( "io-container" ); - this->ioUnavailableWidget = this->windowContainer->findChild("io-inspection-unavailable"); + this->ioUnavailableWidget = this->windowContainer->findChild("io-inspection-unavailable"); auto* fileMenu = this->mainMenuBar->findChild("file-menu"); auto* helpMenu = this->mainMenuBar->findChild("help-menu"); @@ -124,10 +124,10 @@ namespace Bloom this->eepromInspectionButton = this->container->findChild("eeprom-inspection-btn"); this->footer = this->windowContainer->findChild("footer"); - this->targetStatusLabel = this->footer->findChild("target-state"); - this->programCounterValueLabel = this->footer->findChild("target-program-counter-value"); - this->targetNameLabel = this->footer->findChild("target-name"); - this->targetIdLabel = this->footer->findChild("target-id"); + this->targetStatusLabel = this->footer->findChild("target-state"); + this->programCounterValueLabel = this->footer->findChild("target-program-counter-value"); + this->targetNameLabel = this->footer->findChild("target-name"); + this->targetIdLabel = this->footer->findChild("target-id"); this->variantMenu = this->footer->findChild("target-variant-menu"); const auto windowSize = this->size(); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp index 69b9f737..bce81a81 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include "Widgets/PanelWidget.hpp" +#include "Widgets/Label.hpp" #include "Widgets/SvgToolButton.hpp" #include "Widgets/TargetWidgets/TargetPackageWidgetContainer.hpp" #include "Widgets/TargetWidgets/TargetPackageWidget.hpp" @@ -77,8 +77,8 @@ namespace Bloom QWidget* layoutContainer = nullptr; QWidget* container = nullptr; QMenu* variantMenu = nullptr; - QLabel* targetNameLabel = nullptr; - QLabel* targetIdLabel = nullptr; + Widgets::Label* targetNameLabel = nullptr; + Widgets::Label* targetIdLabel = nullptr; AboutWindow* aboutWindowWidget = nullptr; QWidget* header = nullptr; @@ -89,7 +89,7 @@ namespace Bloom Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr; QToolButton* targetRegistersButton = nullptr; - QLabel* ioUnavailableWidget = nullptr; + Widgets::Label* ioUnavailableWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr; @@ -105,8 +105,8 @@ namespace Bloom QToolButton* eepromInspectionButton = nullptr; QWidget* footer = nullptr; - QLabel* targetStatusLabel = nullptr; - QLabel* programCounterValueLabel = nullptr; + Widgets::Label* targetStatusLabel = nullptr; + Widgets::Label* programCounterValueLabel = nullptr; std::map supportedVariantsByName; const Targets::TargetVariant* selectedVariant = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui b/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui index 106e9d47..8cfef33b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui +++ b/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui @@ -12,14 +12,17 @@ - + Bloom - + + + Qt::TextFormat::RichText + https://bloom.oscillate.io @@ -31,7 +34,7 @@ - + Nav Mohammed @@ -45,7 +48,10 @@ - + + + Qt::TextFormat::RichText + Powered by open-source software diff --git a/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui b/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui index 1c3dff16..64f38e0b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui +++ b/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui @@ -229,7 +229,7 @@ - + false Qt::AlignCenter @@ -331,7 +331,7 @@ - + RAM @@ -382,7 +382,7 @@ - + EEPROM @@ -418,7 +418,7 @@ 0 - + Target State @@ -432,7 +432,7 @@ - + - @@ -442,14 +442,14 @@ - + Target Name - + Target ID diff --git a/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp b/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp index e8fb350f..79e9d5fb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp @@ -4,6 +4,7 @@ // Custom widgets #include "Widgets/PanelWidget.hpp" +#include "Widgets/Label.hpp" #include "Widgets/RotatableLabel.hpp" #include "Widgets/LabeledSeparator.hpp" #include "Widgets/TextInput.hpp" @@ -27,6 +28,15 @@ namespace Bloom return widget; } }, + { + "Label", + [this] (QWidget* parent, const QString& name) { + auto* widget = new Label(parent); + widget->setObjectName(name); + widget->setStyleSheet(parent->styleSheet()); + return widget; + } + }, { "RotatableLabel", [this] (QWidget* parent, const QString& name) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp index e8724c4d..716843e0 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp @@ -15,7 +15,9 @@ namespace Bloom::Widgets const QString& windowTitle, const QString& errorMessage, QWidget* parent - ): QDialog(parent) { + ) + : QDialog(parent) + { this->setObjectName("error-dialogue"); this->setAttribute(Qt::WA_DeleteOnClose, true); this->setWindowTitle(windowTitle); @@ -45,7 +47,7 @@ namespace Bloom::Widgets auto uiLoader = UiLoader(this); this->container = uiLoader.load(&dialogueUiFile, this); - this->errorMessageDescriptionLabel = this->container->findChild( + this->errorMessageDescriptionLabel = this->container->findChild( "error-message-description-label" ); this->okButton = this->container->findChild("ok-btn"); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp index 224060df..104f6c31 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp @@ -1,10 +1,11 @@ #pragma once #include -#include #include #include +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" + namespace Bloom::Widgets { class ErrorDialogue: public QDialog @@ -19,7 +20,7 @@ namespace Bloom::Widgets private: QWidget* container = nullptr; - QLabel* errorMessageDescriptionLabel = nullptr; + Label* errorMessageDescriptionLabel = nullptr; QPushButton* okButton = nullptr; }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/UiFiles/ErrorDialogue.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/UiFiles/ErrorDialogue.ui index fddc26fe..610b165d 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/UiFiles/ErrorDialogue.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/UiFiles/ErrorDialogue.ui @@ -36,7 +36,7 @@ - + diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp new file mode 100644 index 00000000..3361ab90 --- /dev/null +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include + +namespace Bloom::Widgets +{ + class Label: public QLabel + { + Q_OBJECT + + public: + explicit Label(QWidget* parent = nullptr) + : QLabel(parent) + { + this->setTextFormat(Qt::TextFormat::PlainText); + }; + + Label(const QString& text, QWidget* parent = nullptr) + : Label(parent) + { + this->setText(text); + }; + }; +} diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.hpp index d6f70dc9..9a71fac6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.hpp @@ -1,19 +1,23 @@ #pragma once -#include #include +#include "Label.hpp" + namespace Bloom::Widgets { - class RotatableLabel: public QLabel + class RotatableLabel: public Label { Q_OBJECT public: - RotatableLabel(const QString& text, QWidget* parent): QLabel(text, parent) {}; + RotatableLabel(const QString& text, QWidget* parent) + : Label(text, parent) + {}; + RotatableLabel(int angleDegrees, const QString& text, QWidget* parent) - : QLabel(text, parent), - angle(angleDegrees) + : Label(text, parent) + , angle(angleDegrees) {}; void setAngle(int angleDegrees) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.cpp index 527cc5c5..b92c8a69 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.cpp @@ -10,9 +10,11 @@ namespace Bloom::Widgets std::vector& excludedMemoryRegions, InsightWorker& insightWorker, const HexViewerWidgetSettings& settings, - QLabel* hoveredAddressLabel, + Label* hoveredAddressLabel, QWidget* parent - ): QGraphicsView(parent) { + ) + : QGraphicsView(parent) + { this->setObjectName("graphics-view"); this->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); this->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.hpp index c249c550..c37419fa 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.hpp @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -10,6 +9,7 @@ #include "src/Insight/InsightWorker/InsightWorker.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "ByteItemGraphicsScene.hpp" #include "HexViewerWidgetSettings.hpp" @@ -26,7 +26,7 @@ namespace Bloom::Widgets std::vector& excludedMemoryRegions, InsightWorker& insightWorker, const HexViewerWidgetSettings& settings, - QLabel* hoveredAddressLabel, + Label* hoveredAddressLabel, QWidget* parent ); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp index 352e4db3..2d673974 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp @@ -12,7 +12,7 @@ namespace Bloom::Widgets std::vector& excludedMemoryRegions, InsightWorker& insightWorker, const HexViewerWidgetSettings& settings, - QLabel* hoveredAddressLabel, + Label* hoveredAddressLabel, QGraphicsView* parent ) : QGraphicsScene(parent) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.hpp index c4a17cbd..3623dbe1 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.hpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -21,6 +20,8 @@ #include "src/Insight/InsightWorker/InsightWorker.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" + #include "ByteItem.hpp" #include "ByteAddressContainer.hpp" #include "AnnotationItem.hpp" @@ -44,7 +45,7 @@ namespace Bloom::Widgets std::vector& excludedMemoryRegions, InsightWorker& insightWorker, const HexViewerWidgetSettings& settings, - QLabel* hoveredAddressLabel, + Label* hoveredAddressLabel, QGraphicsView* parent ); @@ -91,7 +92,7 @@ namespace Bloom::Widgets const HexViewerWidgetSettings& settings; QGraphicsView* parent = nullptr; - QLabel* hoveredAddressLabel = nullptr; + Label* hoveredAddressLabel = nullptr; ByteAddressContainer* byteAddressContainer = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp index 6a22afaa..7d1a2059 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp @@ -69,7 +69,7 @@ namespace Bloom::Widgets this->bottomBar->setContentsMargins(0, 0, 0, 0); this->bottomBar->layout()->setContentsMargins(5, 0, 5, 0); - this->hoveredAddressLabel = this->bottomBar->findChild("byte-address-label"); + this->hoveredAddressLabel = this->bottomBar->findChild("byte-address-label"); this->byteItemGraphicsViewContainer = this->container->findChild("graphics-view-container"); this->byteItemGraphicsView = new ByteItemContainerGraphicsView( diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp index 9c4bbc16..af506e10 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include #include @@ -11,6 +10,7 @@ #include "src/Insight/InsightWorker/InsightWorker.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgToolButton.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp" @@ -63,7 +63,7 @@ namespace Bloom::Widgets QWidget* byteItemGraphicsViewContainer = nullptr; ByteItemContainerGraphicsView* byteItemGraphicsView = nullptr; ByteItemGraphicsScene* byteItemGraphicsScene = nullptr; - QLabel* hoveredAddressLabel = nullptr; + Label* hoveredAddressLabel = nullptr; SvgToolButton* highlightStackMemoryButton = nullptr; SvgToolButton* highlightFocusedMemoryButton = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui index c608ee00..6fe84974 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui @@ -220,7 +220,7 @@ 0 - + Relative Address (Absolute Address): diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/ExcludedRegionItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/ExcludedRegionItem.cpp index c6c0cb77..e30cc684 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/ExcludedRegionItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/ExcludedRegionItem.cpp @@ -12,7 +12,9 @@ namespace Bloom::Widgets const ExcludedMemoryRegion& region, const Targets::TargetMemoryDescriptor& memoryDescriptor, QWidget* parent - ): memoryRegion(region), RegionItem(region, memoryDescriptor, parent) { + ) + : memoryRegion(region), RegionItem(region, memoryDescriptor, parent) + { auto formUiFile = QFile( QString::fromStdString(Paths::compiledResourcesPath() + "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane" diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/FocusedRegionItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/FocusedRegionItem.cpp index f9f14dd4..bf08fdf1 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/FocusedRegionItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/FocusedRegionItem.cpp @@ -14,7 +14,9 @@ namespace Bloom::Widgets const FocusedMemoryRegion& region, const Targets::TargetMemoryDescriptor& memoryDescriptor, QWidget* parent - ): memoryRegion(region), RegionItem(region, memoryDescriptor, parent) { + ) + : memoryRegion(region), RegionItem(region, memoryDescriptor, parent) + { auto formUiFile = QFile( QString::fromStdString(Paths::compiledResourcesPath() + "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane" diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.cpp index 58e0ee0c..4893b539 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.cpp @@ -11,7 +11,10 @@ namespace Bloom::Widgets const MemoryRegion& region, const Targets::TargetMemoryDescriptor& memoryDescriptor, QWidget* parent - ): memoryDescriptor(memoryDescriptor), ClickableWidget(parent) { + ) + : memoryDescriptor(memoryDescriptor) + , ClickableWidget(parent) + { this->setObjectName("region-item"); this->setFixedHeight(50); this->layout->setContentsMargins(5, 5, 5, 0); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.hpp index 17370066..e9b3cec3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/RegionItem.hpp @@ -1,12 +1,13 @@ #pragma once #include -#include #include #include #include #include +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" + #include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp" @@ -75,10 +76,10 @@ namespace Bloom::Widgets private: QVBoxLayout* layout = new QVBoxLayout(this); - QLabel* nameLabel = new QLabel(this); - QLabel* typeLabel = new QLabel(this); - QLabel* addressRangeLabel = new QLabel(this); - QLabel* timeLabel = new QLabel(this); + Label* nameLabel = new Label(this); + Label* typeLabel = new Label(this); + Label* addressRangeLabel = new Label(this); + Label* timeLabel = new Label(this); static inline const std::map addressRangeTypeOptionsByName = std::map< QString, AddressRangeTypeOption diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/ExcludedMemoryRegionForm.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/ExcludedMemoryRegionForm.ui index a3fbae4e..e473ae97 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/ExcludedMemoryRegionForm.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/ExcludedMemoryRegionForm.ui @@ -23,7 +23,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/FocusedMemoryRegionForm.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/FocusedMemoryRegionForm.ui index 7fc61da1..07891e75 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/FocusedMemoryRegionForm.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/FocusedMemoryRegionForm.ui @@ -23,7 +23,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -291,7 +291,7 @@ - + @@ -371,7 +371,7 @@ - + @@ -396,7 +396,7 @@ - + @@ -423,7 +423,7 @@ - + @@ -486,7 +486,7 @@ - + diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/MemoryRegionManagerWindow.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/MemoryRegionManagerWindow.ui index 3bd3cfe5..15f8edd3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/MemoryRegionManagerWindow.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemoryRegionManager/UiFiles/MemoryRegionManagerWindow.ui @@ -165,7 +165,7 @@ - + diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index ca2c3aaa..fd0bf208 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -1,10 +1,10 @@ #include "TargetMemoryInspectionPane.hpp" #include -#include #include #include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Insight/InsightWorker/Tasks/ReadTargetMemory.hpp" #include "src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp" @@ -49,7 +49,7 @@ namespace Bloom::Widgets this->titleBar = this->container->findChild("title-bar"); this->titleBar->layout()->setContentsMargins(7, 0, 7, 0); - auto* titleLabel = this->titleBar->findChild("title"); + auto* titleLabel = this->titleBar->findChild("title"); titleLabel->setText( this->targetMemoryDescriptor.type == TargetMemoryType::EEPROM ? "Internal EEPROM" : "Internal RAM" ); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui index ecee76da..9ab77f4c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui @@ -27,7 +27,7 @@ 0 - + diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp index eebe6495..dccdefb5 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp index 563c729a..5652ec5a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp @@ -29,8 +29,8 @@ namespace Bloom::Widgets this ); - this->bitLabel = new QLabel("Bit", this); - this->bitNumberLabel = new QLabel(QString::number(this->bitNumber), this); + this->bitLabel = new Label("Bit", this); + this->bitNumberLabel = new Label(QString::number(this->bitNumber), this); this->bitLabel->setObjectName("register-bit-label"); this->bitNumberLabel->setObjectName("register-bit-number-label"); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp index 8ff07e97..c45e0c2c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp @@ -2,13 +2,13 @@ #include #include -#include #include #include #include #include #include +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp" #include "BitBodyWidget.hpp" @@ -49,7 +49,7 @@ namespace Bloom::Widgets BitBodyWidget* body = nullptr; - QLabel* bitLabel = nullptr; - QLabel* bitNumberLabel = nullptr; + Label* bitLabel = nullptr; + Label* bitNumberLabel = nullptr; }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp index 27615135..dedadfdf 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/CurrentItem.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/CurrentItem.hpp index db271008..3616ed67 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/CurrentItem.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/CurrentItem.hpp @@ -2,9 +2,9 @@ #include #include -#include #include "Item.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp" #include "src/Targets/TargetMemory.hpp" @@ -23,6 +23,6 @@ namespace Bloom::Widgets private: QHBoxLayout* layout = new QHBoxLayout(this); - QLabel* titleLabel = new QLabel(this); + Label* titleLabel = new Label(this); }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp index e8ce66bc..86f6be6f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp @@ -2,9 +2,9 @@ #include #include -#include #include "Item.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" namespace Bloom::Widgets { @@ -21,8 +21,8 @@ namespace Bloom::Widgets private: QVBoxLayout* layout = new QVBoxLayout(this); - QLabel* dateLabel = new QLabel(this); - QLabel* valueLabel = new QLabel(this); - QLabel* descriptionLabel = new QLabel(this); + Label* dateLabel = new Label(this); + Label* valueLabel = new Label(this); + Label* descriptionLabel = new Label(this); }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp index bb65fc21..772b54e1 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp @@ -7,6 +7,7 @@ #include #include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Helpers/Paths.hpp" #include "src/Helpers/DateTime.hpp" @@ -25,7 +26,11 @@ namespace Bloom::Widgets const Targets::TargetMemoryBuffer& currentValue, InsightWorker& insightWorker, QWidget* parent - ): QWidget(parent), registerDescriptor(registerDescriptor), insightWorker(insightWorker) { + ) + : QWidget(parent) + , registerDescriptor(registerDescriptor) + , insightWorker(insightWorker) + { this->setObjectName("target-register-history-widget"); this->setFixedWidth(300); @@ -49,8 +54,8 @@ namespace Bloom::Widgets this->itemContainer = this->container->findChild("item-container"); this->itemContainerLayout = this->itemContainer->findChild("item-container-layout"); - auto titleBar = this->container->findChild("title-bar"); - auto title = titleBar->findChild("title"); + auto* titleBar = this->container->findChild("title-bar"); + auto* title = titleBar->findChild("title"); titleBar->setContentsMargins(0, 0, 0, 0); title->setFixedHeight(titleBar->height()); @@ -76,7 +81,7 @@ namespace Bloom::Widgets auto* separatorWidget = new QWidget(this); auto* separatorLayout = new QHBoxLayout(separatorWidget); - auto* separatorLabel = new QLabel("Select an item to restore", separatorWidget); + auto* separatorLabel = new Label("Select an item to restore", separatorWidget); separatorWidget->setFixedHeight(40); separatorWidget->setObjectName("separator-widget"); separatorLayout->setContentsMargins(0, 10, 0, 10); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.hpp index 082bf8b9..0334094f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/UiFiles/RegisterHistoryWidget.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/UiFiles/RegisterHistoryWidget.ui index 0416937d..9d6e858a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/UiFiles/RegisterHistoryWidget.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/UiFiles/RegisterHistoryWidget.ui @@ -16,7 +16,7 @@ 30 - + Register History diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp index 23200a3d..66903008 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp @@ -123,7 +123,7 @@ namespace Bloom::Widgets this->registerValueTextInput->setDisabled(true); this->applyButton->setVisible(false); - auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild( + auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild( "read-only-indicator-label" ); readOnlyIndicatorLabel->show(); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp index 3b39c268..5dc7a556 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include #include @@ -14,6 +13,7 @@ #include "src/Targets/TargetRegister.hpp" #include "src/Targets/TargetState.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "BitsetWidget/BitsetWidget.hpp" #include "RegisterHistoryWidget/RegisterHistoryWidget.hpp" @@ -47,8 +47,8 @@ namespace Bloom::Widgets InsightWorker& insightWorker; QWidget* container = nullptr; - QLabel* registerNameLabel = nullptr; - QLabel* registerDescriptionLabel = nullptr; + Label* registerNameLabel = nullptr; + Label* registerDescriptionLabel = nullptr; QScrollArea* contentContainer = nullptr; RegisterHistoryWidget* registerHistoryWidget = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/UiFiles/TargetRegisterInspectorWindow.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/UiFiles/TargetRegisterInspectorWindow.ui index a1f62f6a..97c361e4 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/UiFiles/TargetRegisterInspectorWindow.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/UiFiles/TargetRegisterInspectorWindow.ui @@ -70,7 +70,7 @@ 20 - + @@ -130,7 +130,7 @@ - + true @@ -160,7 +160,7 @@ 20 - + @@ -196,7 +196,7 @@ 20 - + @@ -232,7 +232,7 @@ 20 - + @@ -294,7 +294,7 @@ 0 - + false diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.hpp index 4fd09d69..8fcd2eb5 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.hpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -11,8 +10,9 @@ #include "ItemWidget.hpp" #include "src/Insight/InsightWorker/InsightWorker.hpp" -#include "../ClickableWidget.hpp" -#include "../SvgWidget.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" namespace Bloom::Widgets { @@ -46,7 +46,7 @@ namespace Bloom::Widgets ItemWidget* headerWidget = new ItemWidget(this); SvgWidget* arrowIcon = new SvgWidget(this->headerWidget); SvgWidget* registerGroupIcon = new SvgWidget(this->headerWidget); - QLabel* label = new QLabel(this->headerWidget); + Label* label = new Label(this->headerWidget); QWidget* bodyWidget = new QWidget(this); }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.hpp index e360089a..6d008192 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.hpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -12,6 +11,7 @@ #include "ItemWidget.hpp" #include "src/Insight/InsightWorker/InsightWorker.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp" @@ -55,8 +55,8 @@ namespace Bloom::Widgets InsightWorker& insightWorker; QHBoxLayout* layout = new QHBoxLayout(this); SvgWidget* registerIcon = new SvgWidget(this); - QLabel* nameLabel = new QLabel(this); - QLabel* valueLabel = new QLabel(this); + Label* nameLabel = new Label(this); + Label* valueLabel = new Label(this); // Context-menu actions QAction* openInspectionWindowAction = new QAction("Inspect", this); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui index b37f2f26..27349796 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui @@ -27,7 +27,7 @@ 0 - + Target Registers diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp index a0c9caa5..25e1f314 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp @@ -9,7 +9,9 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip const TargetVariant& targetVariant, InsightWorker& insightWorker, QWidget* parent - ): TargetPinWidget(pinDescriptor, targetVariant, insightWorker, parent) { + ) + : TargetPinWidget(pinDescriptor, targetVariant, insightWorker, parent) + { this->setFixedSize(PinWidget::MINIMUM_WIDTH, PinWidget::MAXIMUM_HEIGHT); this->layout = new QVBoxLayout(); @@ -28,7 +30,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper(); this->pinNameLabelText.truncate(5); - this->pinNumberLabel = new QLabel(this); + this->pinNumberLabel = new Label(this); this->pinNumberLabel->setObjectName("target-pin-number"); this->pinNumberLabel->setText(QString::number(pinDescriptor.number)); this->pinNumberLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.hpp index baf9d045..fa3e51b3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.hpp @@ -3,10 +3,10 @@ #include #include #include -#include #include -#include "../TargetPinWidget.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp" #include "PinBodyWidget.hpp" #include "src/Targets/TargetVariant.hpp" @@ -57,7 +57,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip private: QVBoxLayout* layout = nullptr; - QLabel* pinNumberLabel = nullptr; + Label* pinNumberLabel = nullptr; PinBodyWidget* bodyWidget = nullptr; }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp index a99c693f..fc17cd80 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp @@ -45,7 +45,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper(); this->pinNameLabelText.truncate(5); - this->pinNumberLabel = new QLabel(this); + this->pinNumberLabel = new Label(this); this->pinNumberLabel->setObjectName("target-pin-number"); auto pinNumberText = QString::number(pinDescriptor.number); pinNumberText.truncate(5); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp index 2b340c2a..d7839220 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp @@ -3,9 +3,10 @@ #include #include #include -#include -#include "../TargetPinWidget.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp" +#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp" + #include "PinBodyWidget.hpp" #include "src/Targets/TargetVariant.hpp" @@ -55,9 +56,9 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp private: QBoxLayout* layout = nullptr; - QLabel* pinNumberLabel = nullptr; - QLabel* pinNameLabel = nullptr; - QLabel* pinDirectionLabel = nullptr; + Label* pinNumberLabel = nullptr; + Label* pinNameLabel = nullptr; + Label* pinDirectionLabel = nullptr; PinBodyWidget* bodyWidget = nullptr; }; }