Removed all using declarations and directives from header files
This commit is contained in:
@@ -15,8 +15,13 @@
|
||||
using namespace Bloom::InsightTargetWidgets::Dip;
|
||||
using namespace Bloom::Exceptions;
|
||||
|
||||
DualInlinePackageWidget::DualInlinePackageWidget(const TargetVariant& targetVariant, QObject* insightWindowObj, QWidget* parent):
|
||||
TargetPackageWidget(targetVariant, insightWindowObj, parent) {
|
||||
using Bloom::Targets::TargetVariant;
|
||||
|
||||
DualInlinePackageWidget::DualInlinePackageWidget(
|
||||
const TargetVariant& targetVariant,
|
||||
QObject* insightWindowObj,
|
||||
QWidget* parent
|
||||
): TargetPackageWidget(targetVariant, insightWindowObj, parent) {
|
||||
auto stylesheetFile = QFile(":/compiled/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss");
|
||||
stylesheetFile.open(QFile::ReadOnly);
|
||||
this->setStyleSheet(stylesheetFile.readAll());
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
namespace Bloom::InsightTargetWidgets::Dip
|
||||
{
|
||||
using Targets::TargetVariant;
|
||||
|
||||
/**
|
||||
* The DualInlinePackageWidget implements a custom Qt widget for the Dual-inline package target variants.
|
||||
*/
|
||||
@@ -32,6 +30,6 @@ namespace Bloom::InsightTargetWidgets::Dip
|
||||
void drawWidget(QPainter& painter);
|
||||
|
||||
public:
|
||||
DualInlinePackageWidget(const TargetVariant& targetVariant, QObject* insightWindowObj, QWidget* parent);
|
||||
DualInlinePackageWidget(const Targets::TargetVariant& targetVariant, QObject* insightWindowObj, QWidget* parent);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
using namespace Bloom::InsightTargetWidgets::Dip;
|
||||
using namespace Bloom::Targets;
|
||||
using namespace Bloom::Exceptions;
|
||||
|
||||
void PinBodyWidget::paintEvent(QPaintEvent* event) {
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
|
||||
namespace Bloom::InsightTargetWidgets::Dip
|
||||
{
|
||||
using Targets::TargetPinDescriptor;
|
||||
using Targets::TargetPinType;
|
||||
using Targets::TargetPinState;
|
||||
|
||||
class PinBodyWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -18,8 +14,8 @@ namespace Bloom::InsightTargetWidgets::Dip
|
||||
Q_PROPERTY(int disableAlphaLevel READ getDisableAlphaLevel WRITE setDisableAlphaLevel DESIGNABLE true)
|
||||
|
||||
private:
|
||||
TargetPinDescriptor pinDescriptor;
|
||||
std::optional<TargetPinState> pinState;
|
||||
Targets::TargetPinDescriptor pinDescriptor;
|
||||
std::optional<Targets::TargetPinState> pinState;
|
||||
QColor bodyColor = QColor("#AFB1B3");
|
||||
int disableAlphaLevel = 100;
|
||||
|
||||
@@ -40,12 +36,15 @@ namespace Bloom::InsightTargetWidgets::Dip
|
||||
static const int WIDTH = 30;
|
||||
static const int HEIGHT = 40;
|
||||
|
||||
PinBodyWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor): QWidget(parent), pinDescriptor(pinDescriptor) {
|
||||
PinBodyWidget(
|
||||
QWidget* parent,
|
||||
const Targets::TargetPinDescriptor& pinDescriptor
|
||||
): QWidget(parent), pinDescriptor(pinDescriptor) {
|
||||
this->setFixedSize(PinBodyWidget::WIDTH, PinBodyWidget::HEIGHT);
|
||||
this->setObjectName("target-pin-body");
|
||||
}
|
||||
|
||||
void setPinState(const TargetPinState& pinState) {
|
||||
void setPinState(const Targets::TargetPinState& pinState) {
|
||||
this->pinState = pinState;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
using namespace Bloom::InsightTargetWidgets::Dip;
|
||||
using namespace Bloom::Targets;
|
||||
|
||||
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):
|
||||
TargetPinWidget(parent, pinDescriptor, targetVariant) {
|
||||
|
||||
@@ -34,16 +34,22 @@ namespace Bloom::InsightTargetWidgets::Dip
|
||||
static const int MINIMUM_WIDTH = 30;
|
||||
static const int MAXIMUM_LABEL_COUNT = 3;
|
||||
static const int LABEL_HEIGHT = 20;
|
||||
static const int MAXIMUM_HEIGHT = PinBodyWidget::HEIGHT + (PinWidget::LABEL_HEIGHT * PinWidget::MAXIMUM_LABEL_COUNT);
|
||||
static const int MAXIMUM_HEIGHT = PinBodyWidget::HEIGHT
|
||||
+ (PinWidget::LABEL_HEIGHT * PinWidget::MAXIMUM_LABEL_COUNT);
|
||||
|
||||
PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant);
|
||||
PinWidget(
|
||||
QWidget* parent,
|
||||
const Targets::TargetPinDescriptor& pinDescriptor,
|
||||
const Targets::TargetVariant& targetVariant
|
||||
);
|
||||
|
||||
virtual void updatePinState(const TargetPinState& pinState) override {
|
||||
virtual void updatePinState(const Targets::TargetPinState& pinState) override {
|
||||
TargetPinWidget::updatePinState(pinState);
|
||||
|
||||
if (pinState.ioDirection.has_value()) {
|
||||
this->pinDirectionLabel->setText(pinState.ioDirection.value() == TargetPinState::IoDirection::INPUT ?
|
||||
"IN" : "OUT");
|
||||
this->pinDirectionLabel->setText(
|
||||
pinState.ioDirection.value() == Targets::TargetPinState::IoDirection::INPUT ? "IN" : "OUT"
|
||||
);
|
||||
|
||||
} else {
|
||||
this->pinDirectionLabel->setText("");
|
||||
|
||||
Reference in New Issue
Block a user