Replaced QLabel with derived Label widget - for plain text formatting being configured as a default
This commit is contained in:
@@ -9,6 +9,7 @@ target_sources(
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/AboutWindow.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/AboutWindow.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/PaneWidget.hpp
|
${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/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/RotatableLabel.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/LabeledSeparator.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/LabeledSeparator.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/TextInput.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/TextInput.cpp
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "AboutWindow.hpp"
|
#include "AboutWindow.hpp"
|
||||||
|
|
||||||
#include <QtUiTools>
|
|
||||||
|
#include "UiLoader.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
#include "src/Helpers/Paths.hpp"
|
#include "src/Helpers/Paths.hpp"
|
||||||
@@ -30,12 +32,12 @@ namespace Bloom
|
|||||||
throw Exception("Failed to open AboutWindow QSS file");
|
throw Exception("Failed to open AboutWindow QSS file");
|
||||||
}
|
}
|
||||||
|
|
||||||
auto uiLoader = QUiLoader();
|
auto uiLoader = UiLoader(this);
|
||||||
this->windowWidget = uiLoader.load(&aboutWindowUiFile, parent);
|
this->windowWidget = uiLoader.load(&aboutWindowUiFile, parent);
|
||||||
this->windowWidget->setStyleSheet(aboutWindowStylesheet.readAll());
|
this->windowWidget->setStyleSheet(aboutWindowStylesheet.readAll());
|
||||||
this->windowWidget->setFixedSize(400, 300);
|
this->windowWidget->setFixedSize(400, 300);
|
||||||
|
|
||||||
auto versionLabel = this->windowWidget->findChild<QLabel*>("version-label");
|
auto versionLabel = this->windowWidget->findChild<Widgets::Label*>("version-label");
|
||||||
|
|
||||||
if (versionLabel != nullptr) {
|
if (versionLabel != nullptr) {
|
||||||
versionLabel->setText("Bloom v" + QString::fromStdString(Application::VERSION.toString()));
|
versionLabel->setText("Bloom v" + QString::fromStdString(Application::VERSION.toString()));
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ namespace Bloom
|
|||||||
this->ioContainerWidget = this->windowContainer->findChild<InsightTargetWidgets::TargetPackageWidgetContainer*>(
|
this->ioContainerWidget = this->windowContainer->findChild<InsightTargetWidgets::TargetPackageWidgetContainer*>(
|
||||||
"io-container"
|
"io-container"
|
||||||
);
|
);
|
||||||
this->ioUnavailableWidget = this->windowContainer->findChild<QLabel*>("io-inspection-unavailable");
|
this->ioUnavailableWidget = this->windowContainer->findChild<Label*>("io-inspection-unavailable");
|
||||||
|
|
||||||
auto* fileMenu = this->mainMenuBar->findChild<QMenu*>("file-menu");
|
auto* fileMenu = this->mainMenuBar->findChild<QMenu*>("file-menu");
|
||||||
auto* helpMenu = this->mainMenuBar->findChild<QMenu*>("help-menu");
|
auto* helpMenu = this->mainMenuBar->findChild<QMenu*>("help-menu");
|
||||||
@@ -124,10 +124,10 @@ namespace Bloom
|
|||||||
this->eepromInspectionButton = this->container->findChild<QToolButton*>("eeprom-inspection-btn");
|
this->eepromInspectionButton = this->container->findChild<QToolButton*>("eeprom-inspection-btn");
|
||||||
|
|
||||||
this->footer = this->windowContainer->findChild<QWidget*>("footer");
|
this->footer = this->windowContainer->findChild<QWidget*>("footer");
|
||||||
this->targetStatusLabel = this->footer->findChild<QLabel*>("target-state");
|
this->targetStatusLabel = this->footer->findChild<Label*>("target-state");
|
||||||
this->programCounterValueLabel = this->footer->findChild<QLabel*>("target-program-counter-value");
|
this->programCounterValueLabel = this->footer->findChild<Label*>("target-program-counter-value");
|
||||||
this->targetNameLabel = this->footer->findChild<QLabel*>("target-name");
|
this->targetNameLabel = this->footer->findChild<Label*>("target-name");
|
||||||
this->targetIdLabel = this->footer->findChild<QLabel*>("target-id");
|
this->targetIdLabel = this->footer->findChild<Label*>("target-id");
|
||||||
this->variantMenu = this->footer->findChild<QMenu*>("target-variant-menu");
|
this->variantMenu = this->footer->findChild<QMenu*>("target-variant-menu");
|
||||||
|
|
||||||
const auto windowSize = this->size();
|
const auto windowSize = this->size();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QLabel>
|
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
@@ -17,6 +16,7 @@
|
|||||||
|
|
||||||
#include "Widgets/PanelWidget.hpp"
|
#include "Widgets/PanelWidget.hpp"
|
||||||
|
|
||||||
|
#include "Widgets/Label.hpp"
|
||||||
#include "Widgets/SvgToolButton.hpp"
|
#include "Widgets/SvgToolButton.hpp"
|
||||||
#include "Widgets/TargetWidgets/TargetPackageWidgetContainer.hpp"
|
#include "Widgets/TargetWidgets/TargetPackageWidgetContainer.hpp"
|
||||||
#include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
|
#include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
|
||||||
@@ -77,8 +77,8 @@ namespace Bloom
|
|||||||
QWidget* layoutContainer = nullptr;
|
QWidget* layoutContainer = nullptr;
|
||||||
QWidget* container = nullptr;
|
QWidget* container = nullptr;
|
||||||
QMenu* variantMenu = nullptr;
|
QMenu* variantMenu = nullptr;
|
||||||
QLabel* targetNameLabel = nullptr;
|
Widgets::Label* targetNameLabel = nullptr;
|
||||||
QLabel* targetIdLabel = nullptr;
|
Widgets::Label* targetIdLabel = nullptr;
|
||||||
AboutWindow* aboutWindowWidget = nullptr;
|
AboutWindow* aboutWindowWidget = nullptr;
|
||||||
|
|
||||||
QWidget* header = nullptr;
|
QWidget* header = nullptr;
|
||||||
@@ -89,7 +89,7 @@ namespace Bloom
|
|||||||
Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr;
|
Widgets::TargetRegistersPaneWidget* targetRegistersSidePane = nullptr;
|
||||||
QToolButton* targetRegistersButton = nullptr;
|
QToolButton* targetRegistersButton = nullptr;
|
||||||
|
|
||||||
QLabel* ioUnavailableWidget = nullptr;
|
Widgets::Label* ioUnavailableWidget = nullptr;
|
||||||
Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr;
|
Widgets::InsightTargetWidgets::TargetPackageWidgetContainer* ioContainerWidget = nullptr;
|
||||||
Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr;
|
Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr;
|
||||||
|
|
||||||
@@ -105,8 +105,8 @@ namespace Bloom
|
|||||||
QToolButton* eepromInspectionButton = nullptr;
|
QToolButton* eepromInspectionButton = nullptr;
|
||||||
|
|
||||||
QWidget* footer = nullptr;
|
QWidget* footer = nullptr;
|
||||||
QLabel* targetStatusLabel = nullptr;
|
Widgets::Label* targetStatusLabel = nullptr;
|
||||||
QLabel* programCounterValueLabel = nullptr;
|
Widgets::Label* programCounterValueLabel = nullptr;
|
||||||
|
|
||||||
std::map<QString, Targets::TargetVariant> supportedVariantsByName;
|
std::map<QString, Targets::TargetVariant> supportedVariantsByName;
|
||||||
const Targets::TargetVariant* selectedVariant = nullptr;
|
const Targets::TargetVariant* selectedVariant = nullptr;
|
||||||
|
|||||||
@@ -12,14 +12,17 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
<widget class="QLabel" name="version-label">
|
<widget class="Label" name="version-label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bloom</string>
|
<string>Bloom</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
<widget class="QLabel" name="link-label">
|
<widget class="Label" name="link-label">
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::TextFormat::RichText</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><![CDATA[
|
<string><![CDATA[
|
||||||
<a style="color: #3F86A0;" href="https://bloom.oscillate.io/">https://bloom.oscillate.io</a>
|
<a style="color: #3F86A0;" href="https://bloom.oscillate.io/">https://bloom.oscillate.io</a>
|
||||||
@@ -31,7 +34,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
<widget class="QLabel" name="author-label">
|
<widget class="Label" name="author-label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Nav Mohammed</string>
|
<string>Nav Mohammed</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -45,7 +48,10 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
<widget class="QLabel" name="os-link-label">
|
<widget class="Label" name="os-link-label">
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::TextFormat::RichText</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><![CDATA[
|
<string><![CDATA[
|
||||||
<span>Powered by <a style="color: #3F86A0;" href="https://bloom.oscillate.io/powered-by">open-source software</a></span>
|
<span>Powered by <a style="color: #3F86A0;" href="https://bloom.oscillate.io/powered-by">open-source software</a></span>
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
<widget class="QLabel" name="io-inspection-unavailable">
|
<widget class="Label" name="io-inspection-unavailable">
|
||||||
<property name="visible"><bool>false</bool></property>
|
<property name="visible"><bool>false</bool></property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<enum>Qt::AlignCenter</enum>
|
<enum>Qt::AlignCenter</enum>
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="QLabel" name="ram-inspection-btn-label">
|
<widget class="Label" name="ram-inspection-btn-label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>RAM</string>
|
<string>RAM</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="QLabel" name="eeprom-inspection-btn-label">
|
<widget class="Label" name="eeprom-inspection-btn-label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>EEPROM</string>
|
<string>EEPROM</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
<property name="margin"><number>0</number></property>
|
<property name="margin"><number>0</number></property>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="target-state">
|
<widget class="Label" name="target-state">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Target State</string>
|
<string>Target State</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="target-program-counter-value">
|
<widget class="Label" name="target-program-counter-value">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -442,14 +442,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="target-name">
|
<widget class="Label" name="target-name">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Target Name</string>
|
<string>Target Name</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="target-id">
|
<widget class="Label" name="target-id">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Target ID</string>
|
<string>Target ID</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
// Custom widgets
|
// Custom widgets
|
||||||
#include "Widgets/PanelWidget.hpp"
|
#include "Widgets/PanelWidget.hpp"
|
||||||
|
#include "Widgets/Label.hpp"
|
||||||
#include "Widgets/RotatableLabel.hpp"
|
#include "Widgets/RotatableLabel.hpp"
|
||||||
#include "Widgets/LabeledSeparator.hpp"
|
#include "Widgets/LabeledSeparator.hpp"
|
||||||
#include "Widgets/TextInput.hpp"
|
#include "Widgets/TextInput.hpp"
|
||||||
@@ -27,6 +28,15 @@ namespace Bloom
|
|||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Label",
|
||||||
|
[this] (QWidget* parent, const QString& name) {
|
||||||
|
auto* widget = new Label(parent);
|
||||||
|
widget->setObjectName(name);
|
||||||
|
widget->setStyleSheet(parent->styleSheet());
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"RotatableLabel",
|
"RotatableLabel",
|
||||||
[this] (QWidget* parent, const QString& name) {
|
[this] (QWidget* parent, const QString& name) {
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ namespace Bloom::Widgets
|
|||||||
const QString& windowTitle,
|
const QString& windowTitle,
|
||||||
const QString& errorMessage,
|
const QString& errorMessage,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): QDialog(parent) {
|
)
|
||||||
|
: QDialog(parent)
|
||||||
|
{
|
||||||
this->setObjectName("error-dialogue");
|
this->setObjectName("error-dialogue");
|
||||||
this->setAttribute(Qt::WA_DeleteOnClose, true);
|
this->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
this->setWindowTitle(windowTitle);
|
this->setWindowTitle(windowTitle);
|
||||||
@@ -45,7 +47,7 @@ namespace Bloom::Widgets
|
|||||||
auto uiLoader = UiLoader(this);
|
auto uiLoader = UiLoader(this);
|
||||||
this->container = uiLoader.load(&dialogueUiFile, this);
|
this->container = uiLoader.load(&dialogueUiFile, this);
|
||||||
|
|
||||||
this->errorMessageDescriptionLabel = this->container->findChild<QLabel*>(
|
this->errorMessageDescriptionLabel = this->container->findChild<Label*>(
|
||||||
"error-message-description-label"
|
"error-message-description-label"
|
||||||
);
|
);
|
||||||
this->okButton = this->container->findChild<QPushButton*>("ok-btn");
|
this->okButton = this->container->findChild<QPushButton*>("ok-btn");
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QLabel>
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
namespace Bloom::Widgets
|
namespace Bloom::Widgets
|
||||||
{
|
{
|
||||||
class ErrorDialogue: public QDialog
|
class ErrorDialogue: public QDialog
|
||||||
@@ -19,7 +20,7 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget* container = nullptr;
|
QWidget* container = nullptr;
|
||||||
QLabel* errorMessageDescriptionLabel = nullptr;
|
Label* errorMessageDescriptionLabel = nullptr;
|
||||||
QPushButton* okButton = nullptr;
|
QPushButton* okButton = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="error-message-description-label">
|
<widget class="Label" name="error-message-description-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
24
src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp
Normal file
24
src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,19 +1,23 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
|
#include "Label.hpp"
|
||||||
|
|
||||||
namespace Bloom::Widgets
|
namespace Bloom::Widgets
|
||||||
{
|
{
|
||||||
class RotatableLabel: public QLabel
|
class RotatableLabel: public Label
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
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)
|
RotatableLabel(int angleDegrees, const QString& text, QWidget* parent)
|
||||||
: QLabel(text, parent),
|
: Label(text, parent)
|
||||||
angle(angleDegrees)
|
, angle(angleDegrees)
|
||||||
{};
|
{};
|
||||||
|
|
||||||
void setAngle(int angleDegrees) {
|
void setAngle(int angleDegrees) {
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ namespace Bloom::Widgets
|
|||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
const HexViewerWidgetSettings& settings,
|
const HexViewerWidgetSettings& settings,
|
||||||
QLabel* hoveredAddressLabel,
|
Label* hoveredAddressLabel,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): QGraphicsView(parent) {
|
)
|
||||||
|
: QGraphicsView(parent)
|
||||||
|
{
|
||||||
this->setObjectName("graphics-view");
|
this->setObjectName("graphics-view");
|
||||||
this->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
|
this->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
|
||||||
this->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn);
|
this->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
|
||||||
@@ -10,6 +9,7 @@
|
|||||||
|
|
||||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
#include "ByteItemGraphicsScene.hpp"
|
#include "ByteItemGraphicsScene.hpp"
|
||||||
#include "HexViewerWidgetSettings.hpp"
|
#include "HexViewerWidgetSettings.hpp"
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ namespace Bloom::Widgets
|
|||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
const HexViewerWidgetSettings& settings,
|
const HexViewerWidgetSettings& settings,
|
||||||
QLabel* hoveredAddressLabel,
|
Label* hoveredAddressLabel,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Bloom::Widgets
|
|||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
const HexViewerWidgetSettings& settings,
|
const HexViewerWidgetSettings& settings,
|
||||||
QLabel* hoveredAddressLabel,
|
Label* hoveredAddressLabel,
|
||||||
QGraphicsView* parent
|
QGraphicsView* parent
|
||||||
)
|
)
|
||||||
: QGraphicsScene(parent)
|
: QGraphicsScene(parent)
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -21,6 +20,8 @@
|
|||||||
|
|
||||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
#include "ByteItem.hpp"
|
#include "ByteItem.hpp"
|
||||||
#include "ByteAddressContainer.hpp"
|
#include "ByteAddressContainer.hpp"
|
||||||
#include "AnnotationItem.hpp"
|
#include "AnnotationItem.hpp"
|
||||||
@@ -44,7 +45,7 @@ namespace Bloom::Widgets
|
|||||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
const HexViewerWidgetSettings& settings,
|
const HexViewerWidgetSettings& settings,
|
||||||
QLabel* hoveredAddressLabel,
|
Label* hoveredAddressLabel,
|
||||||
QGraphicsView* parent
|
QGraphicsView* parent
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@ namespace Bloom::Widgets
|
|||||||
const HexViewerWidgetSettings& settings;
|
const HexViewerWidgetSettings& settings;
|
||||||
|
|
||||||
QGraphicsView* parent = nullptr;
|
QGraphicsView* parent = nullptr;
|
||||||
QLabel* hoveredAddressLabel = nullptr;
|
Label* hoveredAddressLabel = nullptr;
|
||||||
|
|
||||||
ByteAddressContainer* byteAddressContainer = nullptr;
|
ByteAddressContainer* byteAddressContainer = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Bloom::Widgets
|
|||||||
this->bottomBar->setContentsMargins(0, 0, 0, 0);
|
this->bottomBar->setContentsMargins(0, 0, 0, 0);
|
||||||
this->bottomBar->layout()->setContentsMargins(5, 0, 5, 0);
|
this->bottomBar->layout()->setContentsMargins(5, 0, 5, 0);
|
||||||
|
|
||||||
this->hoveredAddressLabel = this->bottomBar->findChild<QLabel*>("byte-address-label");
|
this->hoveredAddressLabel = this->bottomBar->findChild<Label*>("byte-address-label");
|
||||||
|
|
||||||
this->byteItemGraphicsViewContainer = this->container->findChild<QWidget*>("graphics-view-container");
|
this->byteItemGraphicsViewContainer = this->container->findChild<QWidget*>("graphics-view-container");
|
||||||
this->byteItemGraphicsView = new ByteItemContainerGraphicsView(
|
this->byteItemGraphicsView = new ByteItemContainerGraphicsView(
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -11,6 +10,7 @@
|
|||||||
|
|
||||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
#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/SvgToolButton.hpp"
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp"
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ namespace Bloom::Widgets
|
|||||||
QWidget* byteItemGraphicsViewContainer = nullptr;
|
QWidget* byteItemGraphicsViewContainer = nullptr;
|
||||||
ByteItemContainerGraphicsView* byteItemGraphicsView = nullptr;
|
ByteItemContainerGraphicsView* byteItemGraphicsView = nullptr;
|
||||||
ByteItemGraphicsScene* byteItemGraphicsScene = nullptr;
|
ByteItemGraphicsScene* byteItemGraphicsScene = nullptr;
|
||||||
QLabel* hoveredAddressLabel = nullptr;
|
Label* hoveredAddressLabel = nullptr;
|
||||||
|
|
||||||
SvgToolButton* highlightStackMemoryButton = nullptr;
|
SvgToolButton* highlightStackMemoryButton = nullptr;
|
||||||
SvgToolButton* highlightFocusedMemoryButton = nullptr;
|
SvgToolButton* highlightFocusedMemoryButton = nullptr;
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="byte-address-label">
|
<widget class="Label" name="byte-address-label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Relative Address (Absolute Address):</string>
|
<string>Relative Address (Absolute Address):</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ namespace Bloom::Widgets
|
|||||||
const ExcludedMemoryRegion& region,
|
const ExcludedMemoryRegion& region,
|
||||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): memoryRegion(region), RegionItem(region, memoryDescriptor, parent) {
|
)
|
||||||
|
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||||
|
{
|
||||||
auto formUiFile = QFile(
|
auto formUiFile = QFile(
|
||||||
QString::fromStdString(Paths::compiledResourcesPath()
|
QString::fromStdString(Paths::compiledResourcesPath()
|
||||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ namespace Bloom::Widgets
|
|||||||
const FocusedMemoryRegion& region,
|
const FocusedMemoryRegion& region,
|
||||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): memoryRegion(region), RegionItem(region, memoryDescriptor, parent) {
|
)
|
||||||
|
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||||
|
{
|
||||||
auto formUiFile = QFile(
|
auto formUiFile = QFile(
|
||||||
QString::fromStdString(Paths::compiledResourcesPath()
|
QString::fromStdString(Paths::compiledResourcesPath()
|
||||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ namespace Bloom::Widgets
|
|||||||
const MemoryRegion& region,
|
const MemoryRegion& region,
|
||||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): memoryDescriptor(memoryDescriptor), ClickableWidget(parent) {
|
)
|
||||||
|
: memoryDescriptor(memoryDescriptor)
|
||||||
|
, ClickableWidget(parent)
|
||||||
|
{
|
||||||
this->setObjectName("region-item");
|
this->setObjectName("region-item");
|
||||||
this->setFixedHeight(50);
|
this->setFixedHeight(50);
|
||||||
this->layout->setContentsMargins(5, 5, 5, 0);
|
this->layout->setContentsMargins(5, 5, 5, 0);
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp"
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.hpp"
|
||||||
|
|
||||||
@@ -75,10 +76,10 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||||
QLabel* nameLabel = new QLabel(this);
|
Label* nameLabel = new Label(this);
|
||||||
QLabel* typeLabel = new QLabel(this);
|
Label* typeLabel = new Label(this);
|
||||||
QLabel* addressRangeLabel = new QLabel(this);
|
Label* addressRangeLabel = new Label(this);
|
||||||
QLabel* timeLabel = new QLabel(this);
|
Label* timeLabel = new Label(this);
|
||||||
|
|
||||||
static inline const std::map<QString, AddressRangeTypeOption> addressRangeTypeOptionsByName = std::map<
|
static inline const std::map<QString, AddressRangeTypeOption> addressRangeTypeOptionsByName = std::map<
|
||||||
QString, AddressRangeTypeOption
|
QString, AddressRangeTypeOption
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="name-row">
|
<layout class="QHBoxLayout" name="name-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="name-label">
|
<widget class="Label" name="name-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="address-range-description-label">
|
<widget class="Label" name="address-range-description-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="address-type-row">
|
<layout class="QHBoxLayout" name="address-type-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="address-type-label">
|
<widget class="Label" name="address-type-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="start-address-row">
|
<layout class="QHBoxLayout" name="start-address-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="start-address-label">
|
<widget class="Label" name="start-address-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="end-address-row">
|
<layout class="QHBoxLayout" name="end-address-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="end-address-label">
|
<widget class="Label" name="end-address-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="size-label">
|
<widget class="Label" name="size-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="name-row">
|
<layout class="QHBoxLayout" name="name-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="name-label">
|
<widget class="Label" name="name-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="address-range-description-label">
|
<widget class="Label" name="address-range-description-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="address-type-row">
|
<layout class="QHBoxLayout" name="address-type-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="address-type-label">
|
<widget class="Label" name="address-type-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="start-address-row">
|
<layout class="QHBoxLayout" name="start-address-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="start-address-label">
|
<widget class="Label" name="start-address-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="end-address-row">
|
<layout class="QHBoxLayout" name="end-address-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="end-address-label">
|
<widget class="Label" name="end-address-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="size-label">
|
<widget class="Label" name="size-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -371,7 +371,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="value-annotations-description-label">
|
<widget class="Label" name="value-annotations-description-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -396,7 +396,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="integer-width-notice-label">
|
<widget class="Label" name="integer-width-notice-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="data-type-row">
|
<layout class="QHBoxLayout" name="data-type-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="data-type-label">
|
<widget class="Label" name="data-type-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -486,7 +486,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="endianness-row">
|
<layout class="QHBoxLayout" name="endianness-row">
|
||||||
<item alignment="Qt::AlignVCenter">
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="endianness-label">
|
<widget class="Label" name="endianness-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<layout class="QStackedLayout" name="stacked-form-layout">
|
<layout class="QStackedLayout" name="stacked-form-layout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="stacked-form-placeholder-label">
|
<widget class="Label" name="stacked-form-placeholder-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "TargetMemoryInspectionPane.hpp"
|
#include "TargetMemoryInspectionPane.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
#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/ReadTargetMemory.hpp"
|
||||||
#include "src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp"
|
#include "src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp"
|
||||||
@@ -49,7 +49,7 @@ namespace Bloom::Widgets
|
|||||||
this->titleBar = this->container->findChild<QWidget*>("title-bar");
|
this->titleBar = this->container->findChild<QWidget*>("title-bar");
|
||||||
|
|
||||||
this->titleBar->layout()->setContentsMargins(7, 0, 7, 0);
|
this->titleBar->layout()->setContentsMargins(7, 0, 7, 0);
|
||||||
auto* titleLabel = this->titleBar->findChild<QLabel*>("title");
|
auto* titleLabel = this->titleBar->findChild<Label*>("title");
|
||||||
titleLabel->setText(
|
titleLabel->setText(
|
||||||
this->targetMemoryDescriptor.type == TargetMemoryType::EEPROM ? "Internal EEPROM" : "Internal RAM"
|
this->targetMemoryDescriptor.type == TargetMemoryType::EEPROM ? "Internal EEPROM" : "Internal RAM"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="title"/>
|
<widget class="Label" name="title"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontal-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <QLabel>
|
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ namespace Bloom::Widgets
|
|||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
this->bitLabel = new QLabel("Bit", this);
|
this->bitLabel = new Label("Bit", this);
|
||||||
this->bitNumberLabel = new QLabel(QString::number(this->bitNumber), this);
|
this->bitNumberLabel = new Label(QString::number(this->bitNumber), this);
|
||||||
|
|
||||||
this->bitLabel->setObjectName("register-bit-label");
|
this->bitLabel->setObjectName("register-bit-label");
|
||||||
this->bitNumberLabel->setObjectName("register-bit-number-label");
|
this->bitNumberLabel->setObjectName("register-bit-number-label");
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <QLabel>
|
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp"
|
||||||
|
|
||||||
#include "BitBodyWidget.hpp"
|
#include "BitBodyWidget.hpp"
|
||||||
@@ -49,7 +49,7 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
BitBodyWidget* body = nullptr;
|
BitBodyWidget* body = nullptr;
|
||||||
|
|
||||||
QLabel* bitLabel = nullptr;
|
Label* bitLabel = nullptr;
|
||||||
QLabel* bitNumberLabel = nullptr;
|
Label* bitNumberLabel = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <QLabel>
|
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include "Item.hpp"
|
#include "Item.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp"
|
||||||
|
|
||||||
#include "src/Targets/TargetMemory.hpp"
|
#include "src/Targets/TargetMemory.hpp"
|
||||||
@@ -23,6 +23,6 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||||
QLabel* titleLabel = new QLabel(this);
|
Label* titleLabel = new Label(this);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include "Item.hpp"
|
#include "Item.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
namespace Bloom::Widgets
|
namespace Bloom::Widgets
|
||||||
{
|
{
|
||||||
@@ -21,8 +21,8 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||||
QLabel* dateLabel = new QLabel(this);
|
Label* dateLabel = new Label(this);
|
||||||
QLabel* valueLabel = new QLabel(this);
|
Label* valueLabel = new Label(this);
|
||||||
QLabel* descriptionLabel = new QLabel(this);
|
Label* descriptionLabel = new Label(this);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
#include "src/Helpers/Paths.hpp"
|
#include "src/Helpers/Paths.hpp"
|
||||||
#include "src/Helpers/DateTime.hpp"
|
#include "src/Helpers/DateTime.hpp"
|
||||||
@@ -25,7 +26,11 @@ namespace Bloom::Widgets
|
|||||||
const Targets::TargetMemoryBuffer& currentValue,
|
const Targets::TargetMemoryBuffer& currentValue,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): QWidget(parent), registerDescriptor(registerDescriptor), insightWorker(insightWorker) {
|
)
|
||||||
|
: QWidget(parent)
|
||||||
|
, registerDescriptor(registerDescriptor)
|
||||||
|
, insightWorker(insightWorker)
|
||||||
|
{
|
||||||
this->setObjectName("target-register-history-widget");
|
this->setObjectName("target-register-history-widget");
|
||||||
this->setFixedWidth(300);
|
this->setFixedWidth(300);
|
||||||
|
|
||||||
@@ -49,8 +54,8 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
this->itemContainer = this->container->findChild<QWidget*>("item-container");
|
this->itemContainer = this->container->findChild<QWidget*>("item-container");
|
||||||
this->itemContainerLayout = this->itemContainer->findChild<QVBoxLayout*>("item-container-layout");
|
this->itemContainerLayout = this->itemContainer->findChild<QVBoxLayout*>("item-container-layout");
|
||||||
auto titleBar = this->container->findChild<QWidget*>("title-bar");
|
auto* titleBar = this->container->findChild<QWidget*>("title-bar");
|
||||||
auto title = titleBar->findChild<QLabel*>("title");
|
auto* title = titleBar->findChild<Label*>("title");
|
||||||
|
|
||||||
titleBar->setContentsMargins(0, 0, 0, 0);
|
titleBar->setContentsMargins(0, 0, 0, 0);
|
||||||
title->setFixedHeight(titleBar->height());
|
title->setFixedHeight(titleBar->height());
|
||||||
@@ -76,7 +81,7 @@ namespace Bloom::Widgets
|
|||||||
|
|
||||||
auto* separatorWidget = new QWidget(this);
|
auto* separatorWidget = new QWidget(this);
|
||||||
auto* separatorLayout = new QHBoxLayout(separatorWidget);
|
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->setFixedHeight(40);
|
||||||
separatorWidget->setObjectName("separator-widget");
|
separatorWidget->setObjectName("separator-widget");
|
||||||
separatorLayout->setContentsMargins(0, 10, 0, 10);
|
separatorLayout->setContentsMargins(0, 10, 0, 10);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<property name="minimumHeight">
|
<property name="minimumHeight">
|
||||||
<number>30</number>
|
<number>30</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="title">
|
<widget class="Label" name="title">
|
||||||
<property name="text"><string>Register History</string></property>
|
<property name="text"><string>Register History</string></property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace Bloom::Widgets
|
|||||||
this->registerValueTextInput->setDisabled(true);
|
this->registerValueTextInput->setDisabled(true);
|
||||||
this->applyButton->setVisible(false);
|
this->applyButton->setVisible(false);
|
||||||
|
|
||||||
auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild<QLabel*>(
|
auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild<Label*>(
|
||||||
"read-only-indicator-label"
|
"read-only-indicator-label"
|
||||||
);
|
);
|
||||||
readOnlyIndicatorLabel->show();
|
readOnlyIndicatorLabel->show();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLabel>
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <set>
|
#include <set>
|
||||||
@@ -14,6 +13,7 @@
|
|||||||
#include "src/Targets/TargetRegister.hpp"
|
#include "src/Targets/TargetRegister.hpp"
|
||||||
#include "src/Targets/TargetState.hpp"
|
#include "src/Targets/TargetState.hpp"
|
||||||
|
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
#include "BitsetWidget/BitsetWidget.hpp"
|
#include "BitsetWidget/BitsetWidget.hpp"
|
||||||
#include "RegisterHistoryWidget/RegisterHistoryWidget.hpp"
|
#include "RegisterHistoryWidget/RegisterHistoryWidget.hpp"
|
||||||
|
|
||||||
@@ -47,8 +47,8 @@ namespace Bloom::Widgets
|
|||||||
InsightWorker& insightWorker;
|
InsightWorker& insightWorker;
|
||||||
|
|
||||||
QWidget* container = nullptr;
|
QWidget* container = nullptr;
|
||||||
QLabel* registerNameLabel = nullptr;
|
Label* registerNameLabel = nullptr;
|
||||||
QLabel* registerDescriptionLabel = nullptr;
|
Label* registerDescriptionLabel = nullptr;
|
||||||
|
|
||||||
QScrollArea* contentContainer = nullptr;
|
QScrollArea* contentContainer = nullptr;
|
||||||
RegisterHistoryWidget* registerHistoryWidget = nullptr;
|
RegisterHistoryWidget* registerHistoryWidget = nullptr;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="register-details-name-label">
|
<widget class="Label" name="register-details-name-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="register-details-label">
|
<widget class="Label" name="register-details-label">
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="register-details-start-address-label">
|
<widget class="Label" name="register-details-start-address-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="register-details-size-label">
|
<widget class="Label" name="register-details-size-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item alignment="Qt::AlignTop">
|
<item alignment="Qt::AlignTop">
|
||||||
<widget class="QLabel" name="register-details-description-label">
|
<widget class="Label" name="register-details-description-label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -294,7 +294,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="read-only-indicator-label">
|
<widget class="Label" name="read-only-indicator-label">
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@@ -11,8 +10,9 @@
|
|||||||
#include "ItemWidget.hpp"
|
#include "ItemWidget.hpp"
|
||||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||||
|
|
||||||
#include "../ClickableWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.hpp"
|
||||||
#include "../SvgWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
|
||||||
namespace Bloom::Widgets
|
namespace Bloom::Widgets
|
||||||
{
|
{
|
||||||
@@ -46,7 +46,7 @@ namespace Bloom::Widgets
|
|||||||
ItemWidget* headerWidget = new ItemWidget(this);
|
ItemWidget* headerWidget = new ItemWidget(this);
|
||||||
SvgWidget* arrowIcon = new SvgWidget(this->headerWidget);
|
SvgWidget* arrowIcon = new SvgWidget(this->headerWidget);
|
||||||
SvgWidget* registerGroupIcon = 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);
|
QWidget* bodyWidget = new QWidget(this);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
@@ -12,6 +11,7 @@
|
|||||||
#include "ItemWidget.hpp"
|
#include "ItemWidget.hpp"
|
||||||
#include "src/Insight/InsightWorker/InsightWorker.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/SvgWidget.hpp"
|
||||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp"
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ namespace Bloom::Widgets
|
|||||||
InsightWorker& insightWorker;
|
InsightWorker& insightWorker;
|
||||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||||
SvgWidget* registerIcon = new SvgWidget(this);
|
SvgWidget* registerIcon = new SvgWidget(this);
|
||||||
QLabel* nameLabel = new QLabel(this);
|
Label* nameLabel = new Label(this);
|
||||||
QLabel* valueLabel = new QLabel(this);
|
Label* valueLabel = new Label(this);
|
||||||
|
|
||||||
// Context-menu actions
|
// Context-menu actions
|
||||||
QAction* openInspectionWindowAction = new QAction("Inspect", this);
|
QAction* openInspectionWindowAction = new QAction("Inspect", this);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="title">
|
<widget class="Label" name="title">
|
||||||
<property name="text"><string>Target Registers</string></property>
|
<property name="text"><string>Target Registers</string></property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip
|
|||||||
const TargetVariant& targetVariant,
|
const TargetVariant& targetVariant,
|
||||||
InsightWorker& insightWorker,
|
InsightWorker& insightWorker,
|
||||||
QWidget* parent
|
QWidget* parent
|
||||||
): TargetPinWidget(pinDescriptor, targetVariant, insightWorker, parent) {
|
)
|
||||||
|
: TargetPinWidget(pinDescriptor, targetVariant, insightWorker, parent)
|
||||||
|
{
|
||||||
this->setFixedSize(PinWidget::MINIMUM_WIDTH, PinWidget::MAXIMUM_HEIGHT);
|
this->setFixedSize(PinWidget::MINIMUM_WIDTH, PinWidget::MAXIMUM_HEIGHT);
|
||||||
|
|
||||||
this->layout = new QVBoxLayout();
|
this->layout = new QVBoxLayout();
|
||||||
@@ -28,7 +30,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip
|
|||||||
this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper();
|
this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper();
|
||||||
this->pinNameLabelText.truncate(5);
|
this->pinNameLabelText.truncate(5);
|
||||||
|
|
||||||
this->pinNumberLabel = new QLabel(this);
|
this->pinNumberLabel = new Label(this);
|
||||||
this->pinNumberLabel->setObjectName("target-pin-number");
|
this->pinNumberLabel->setObjectName("target-pin-number");
|
||||||
this->pinNumberLabel->setText(QString::number(pinDescriptor.number));
|
this->pinNumberLabel->setText(QString::number(pinDescriptor.number));
|
||||||
this->pinNumberLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
this->pinNumberLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#include "../TargetPinWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp"
|
||||||
|
|
||||||
#include "PinBodyWidget.hpp"
|
#include "PinBodyWidget.hpp"
|
||||||
#include "src/Targets/TargetVariant.hpp"
|
#include "src/Targets/TargetVariant.hpp"
|
||||||
@@ -57,7 +57,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QVBoxLayout* layout = nullptr;
|
QVBoxLayout* layout = nullptr;
|
||||||
QLabel* pinNumberLabel = nullptr;
|
Label* pinNumberLabel = nullptr;
|
||||||
PinBodyWidget* bodyWidget = nullptr;
|
PinBodyWidget* bodyWidget = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp
|
|||||||
this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper();
|
this->pinNameLabelText = QString::fromStdString(pinDescriptor.name).toUpper();
|
||||||
this->pinNameLabelText.truncate(5);
|
this->pinNameLabelText.truncate(5);
|
||||||
|
|
||||||
this->pinNumberLabel = new QLabel(this);
|
this->pinNumberLabel = new Label(this);
|
||||||
this->pinNumberLabel->setObjectName("target-pin-number");
|
this->pinNumberLabel->setObjectName("target-pin-number");
|
||||||
auto pinNumberText = QString::number(pinDescriptor.number);
|
auto pinNumberText = QString::number(pinDescriptor.number);
|
||||||
pinNumberText.truncate(5);
|
pinNumberText.truncate(5);
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include "../TargetPinWidget.hpp"
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||||
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp"
|
||||||
|
|
||||||
#include "PinBodyWidget.hpp"
|
#include "PinBodyWidget.hpp"
|
||||||
#include "src/Targets/TargetVariant.hpp"
|
#include "src/Targets/TargetVariant.hpp"
|
||||||
|
|
||||||
@@ -55,9 +56,9 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QBoxLayout* layout = nullptr;
|
QBoxLayout* layout = nullptr;
|
||||||
QLabel* pinNumberLabel = nullptr;
|
Label* pinNumberLabel = nullptr;
|
||||||
QLabel* pinNameLabel = nullptr;
|
Label* pinNameLabel = nullptr;
|
||||||
QLabel* pinDirectionLabel = nullptr;
|
Label* pinDirectionLabel = nullptr;
|
||||||
PinBodyWidget* bodyWidget = nullptr;
|
PinBodyWidget* bodyWidget = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user