Replaced QLabel with derived Label widget - for plain text formatting being configured as a default
This commit is contained in:
@@ -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<QLabel*>(
|
||||
this->errorMessageDescriptionLabel = this->container->findChild<Label*>(
|
||||
"error-message-description-label"
|
||||
);
|
||||
this->okButton = this->container->findChild<QPushButton*>("ok-btn");
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QShowEvent>
|
||||
|
||||
#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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="error-message-description-label">
|
||||
<widget class="Label" name="error-message-description-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"/>
|
||||
</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
|
||||
|
||||
#include <QLabel>
|
||||
#include <QSize>
|
||||
|
||||
#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) {
|
||||
|
||||
@@ -10,9 +10,11 @@ namespace Bloom::Widgets
|
||||
std::vector<ExcludedMemoryRegion>& 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);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <vector>
|
||||
#include <QEvent>
|
||||
|
||||
@@ -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<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||
InsightWorker& insightWorker,
|
||||
const HexViewerWidgetSettings& settings,
|
||||
QLabel* hoveredAddressLabel,
|
||||
Label* hoveredAddressLabel,
|
||||
QWidget* parent
|
||||
);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Bloom::Widgets
|
||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||
InsightWorker& insightWorker,
|
||||
const HexViewerWidgetSettings& settings,
|
||||
QLabel* hoveredAddressLabel,
|
||||
Label* hoveredAddressLabel,
|
||||
QGraphicsView* parent
|
||||
)
|
||||
: QGraphicsScene(parent)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <QGraphicsView>
|
||||
#include <QScrollBar>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <map>
|
||||
@@ -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<ExcludedMemoryRegion>& 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;
|
||||
|
||||
|
||||
@@ -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<QLabel*>("byte-address-label");
|
||||
this->hoveredAddressLabel = this->bottomBar->findChild<Label*>("byte-address-label");
|
||||
|
||||
this->byteItemGraphicsViewContainer = this->container->findChild<QWidget*>("graphics-view-container");
|
||||
this->byteItemGraphicsView = new ByteItemContainerGraphicsView(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QResizeEvent>
|
||||
#include <QShowEvent>
|
||||
#include <vector>
|
||||
@@ -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;
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="byte-address-label">
|
||||
<widget class="Label" name="byte-address-label">
|
||||
<property name="text">
|
||||
<string>Relative Address (Absolute Address):</string>
|
||||
</property>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <map>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#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<QString, AddressRangeTypeOption> addressRangeTypeOptionsByName = std::map<
|
||||
QString, AddressRangeTypeOption
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="name-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="name-label">
|
||||
<widget class="Label" name="name-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -97,7 +97,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="address-range-description-label">
|
||||
<widget class="Label" name="address-range-description-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -124,7 +124,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="address-type-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="address-type-label">
|
||||
<widget class="Label" name="address-type-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -187,7 +187,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="start-address-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="start-address-label">
|
||||
<widget class="Label" name="start-address-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -247,7 +247,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="end-address-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="end-address-label">
|
||||
<widget class="Label" name="end-address-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -291,7 +291,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="size-label">
|
||||
<widget class="Label" name="size-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="name-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="name-label">
|
||||
<widget class="Label" name="name-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -97,7 +97,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="address-range-description-label">
|
||||
<widget class="Label" name="address-range-description-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -124,7 +124,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="address-type-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="address-type-label">
|
||||
<widget class="Label" name="address-type-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -187,7 +187,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="start-address-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="start-address-label">
|
||||
<widget class="Label" name="start-address-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -247,7 +247,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="end-address-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="end-address-label">
|
||||
<widget class="Label" name="end-address-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -291,7 +291,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="size-label">
|
||||
<widget class="Label" name="size-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -371,7 +371,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="value-annotations-description-label">
|
||||
<widget class="Label" name="value-annotations-description-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -396,7 +396,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="integer-width-notice-label">
|
||||
<widget class="Label" name="integer-width-notice-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -423,7 +423,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="data-type-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="data-type-label">
|
||||
<widget class="Label" name="data-type-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -486,7 +486,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="endianness-row">
|
||||
<item alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="endianness-label">
|
||||
<widget class="Label" name="endianness-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<layout class="QStackedLayout" name="stacked-form-layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="stacked-form-placeholder-label">
|
||||
<widget class="Label" name="stacked-form-placeholder-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
||||
</property>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "TargetMemoryInspectionPane.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QToolButton>
|
||||
|
||||
#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<QWidget*>("title-bar");
|
||||
|
||||
this->titleBar->layout()->setContentsMargins(7, 0, 7, 0);
|
||||
auto* titleLabel = this->titleBar->findChild<QLabel*>("title");
|
||||
auto* titleLabel = this->titleBar->findChild<Label*>("title");
|
||||
titleLabel->setText(
|
||||
this->targetMemoryDescriptor.type == TargetMemoryType::EEPROM ? "Internal EEPROM" : "Internal RAM"
|
||||
);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="title"/>
|
||||
<widget class="Label" name="title"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontal-spacer">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <bitset>
|
||||
#include <QLabel>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QEvent>
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <bitset>
|
||||
#include <QLabel>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
|
||||
#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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <bitset>
|
||||
#include <QLabel>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QEvent>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <set>
|
||||
|
||||
#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<QWidget*>("item-container");
|
||||
this->itemContainerLayout = this->itemContainer->findChild<QVBoxLayout*>("item-container-layout");
|
||||
auto titleBar = this->container->findChild<QWidget*>("title-bar");
|
||||
auto title = titleBar->findChild<QLabel*>("title");
|
||||
auto* titleBar = this->container->findChild<QWidget*>("title-bar");
|
||||
auto* title = titleBar->findChild<Label*>("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);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <set>
|
||||
#include <QSize>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<property name="minimumHeight">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<widget class="QLabel" name="title">
|
||||
<widget class="Label" name="title">
|
||||
<property name="text"><string>Register History</string></property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace Bloom::Widgets
|
||||
this->registerValueTextInput->setDisabled(true);
|
||||
this->applyButton->setVisible(false);
|
||||
|
||||
auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild<QLabel*>(
|
||||
auto* readOnlyIndicatorLabel = this->registerValueContainer->findChild<Label*>(
|
||||
"read-only-indicator-label"
|
||||
);
|
||||
readOnlyIndicatorLabel->show();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <set>
|
||||
@@ -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;
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="register-details-name-label">
|
||||
<widget class="Label" name="register-details-name-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -130,7 +130,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="register-details-label">
|
||||
<widget class="Label" name="register-details-label">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -160,7 +160,7 @@
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="register-details-start-address-label">
|
||||
<widget class="Label" name="register-details-start-address-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -196,7 +196,7 @@
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="register-details-size-label">
|
||||
<widget class="Label" name="register-details-size-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -232,7 +232,7 @@
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QLabel" name="register-details-description-label">
|
||||
<widget class="Label" name="register-details-description-label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"/>
|
||||
</property>
|
||||
@@ -294,7 +294,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="read-only-indicator-label">
|
||||
<widget class="Label" name="read-only-indicator-label">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <QWidget>
|
||||
#include <unordered_set>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QSize>
|
||||
#include <set>
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <QWidget>
|
||||
#include <unordered_set>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QAction>
|
||||
#include <QSize>
|
||||
#include <QEvent>
|
||||
@@ -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);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<widget class="Label" name="title">
|
||||
<property name="text"><string>Target Registers</string></property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <QWidget>
|
||||
#include <cstdint>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#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 "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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#include <QWidget>
|
||||
#include <cstdint>
|
||||
#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 "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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user