Moved Insight target widgets to "Widgets" sub-folder.

This commit is contained in:
Nav
2021-07-07 20:54:45 +01:00
parent d8f53e4f9f
commit 2e4810389f
25 changed files with 43 additions and 44 deletions

View File

@@ -113,16 +113,16 @@ add_executable(Bloom
src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp
src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/TargetPackageWidget.hpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.hpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/TargetPinWidget.hpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.hpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/DualInlinePackageWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinBodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinBodyWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/BodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/BodyWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/QuadFlatPackageWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinBodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinBodyWidget.cpp
src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/BodyWidget.cpp src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/BodyWidget.cpp
) )
set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom) set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom)

View File

@@ -1,14 +1,13 @@
#include <QtUiTools> #include <QtUiTools>
#include "AboutWindow.hpp" #include "AboutWindow.hpp"
#include "TargetWidgets/DIP/DualInlinePackageWidget.hpp" #include "Widgets/TargetWidgets/DIP/DualInlinePackageWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
#include "src/Application.hpp" #include "src/Application.hpp"
#include "src/Helpers/Paths.hpp" #include "src/Helpers/Paths.hpp"
using namespace Bloom; using namespace Bloom;
using namespace InsightTargetWidgets;
using namespace Exceptions; using namespace Exceptions;
AboutWindow::AboutWindow(QWidget* parent): QObject(parent) { AboutWindow::AboutWindow(QWidget* parent): QObject(parent) {

View File

@@ -4,8 +4,8 @@
#include "InsightWindow.hpp" #include "InsightWindow.hpp"
#include "AboutWindow.hpp" #include "AboutWindow.hpp"
#include "TargetWidgets/DIP/DualInlinePackageWidget.hpp" #include "Widgets/TargetWidgets/DIP/DualInlinePackageWidget.hpp"
#include "TargetWidgets/QFP/QuadFlatPackageWidget.hpp" #include "Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
#include "src/Targets/TargetDescriptor.hpp" #include "src/Targets/TargetDescriptor.hpp"
@@ -13,7 +13,7 @@
using namespace Bloom; using namespace Bloom;
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;
using namespace Bloom::InsightTargetWidgets; using namespace Bloom::Widgets;
using Bloom::Targets::TargetDescriptor; using Bloom::Targets::TargetDescriptor;
using Bloom::Targets::TargetState; using Bloom::Targets::TargetState;
@@ -445,7 +445,7 @@ void InsightWindow::onTargetPinStatesUpdate(int variantId, Bloom::Targets::Targe
} }
} }
void InsightWindow::togglePinIoState(TargetPinWidget* pinWidget) { void InsightWindow::togglePinIoState(InsightTargetWidgets::TargetPinWidget* pinWidget) {
auto pinState = pinWidget->getPinState(); auto pinState = pinWidget->getPinState();
// Currently, we only allow users to toggle the IO state of output pins // Currently, we only allow users to toggle the IO state of output pins

View File

@@ -8,7 +8,7 @@
#include "AboutWindow.hpp" #include "AboutWindow.hpp"
#include "src/ApplicationConfig.hpp" #include "src/ApplicationConfig.hpp"
#include "TargetWidgets/TargetPackageWidget.hpp" #include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
#include "src/Targets/TargetState.hpp" #include "src/Targets/TargetState.hpp"
#include "src/Targets/TargetDescriptor.hpp" #include "src/Targets/TargetDescriptor.hpp"
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
@@ -38,7 +38,7 @@ namespace Bloom
QWidget* ioContainerWidget = nullptr; QWidget* ioContainerWidget = nullptr;
QLabel* ioUnavailableWidget = nullptr; QLabel* ioUnavailableWidget = nullptr;
InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr; Widgets::InsightTargetWidgets::TargetPackageWidget* targetPackageWidget = nullptr;
QWidget* footer = nullptr; QWidget* footer = nullptr;
QLabel* targetStatusLabel = nullptr; QLabel* targetStatusLabel = nullptr;
@@ -86,7 +86,7 @@ namespace Bloom
void openReportIssuesUrl(); void openReportIssuesUrl();
static void openGettingStartedUrl(); static void openGettingStartedUrl();
void openAboutWindow(); void openAboutWindow();
void togglePinIoState(InsightTargetWidgets::TargetPinWidget* pinWidget); void togglePinIoState(Widgets::InsightTargetWidgets::TargetPinWidget* pinWidget);
signals: signals:
void refreshTargetPinStates(int variantId); void refreshTargetPinStates(int variantId);

View File

@@ -4,7 +4,7 @@
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
using namespace Bloom::InsightTargetWidgets::Dip; using namespace Bloom::Widgets::InsightTargetWidgets::Dip;
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;
void BodyWidget::paintEvent(QPaintEvent* event) { void BodyWidget::paintEvent(QPaintEvent* event) {

View File

@@ -2,7 +2,7 @@
#include <QWidget> #include <QWidget>
namespace Bloom::InsightTargetWidgets::Dip namespace Bloom::Widgets::InsightTargetWidgets::Dip
{ {
class BodyWidget: public QWidget class BodyWidget: public QWidget
{ {

View File

@@ -5,7 +5,7 @@
#include <QEvent> #include <QEvent>
#include <QFile> #include <QFile>
#include "../../InsightWindow.hpp" #include "../../../InsightWindow.hpp"
#include "DualInlinePackageWidget.hpp" #include "DualInlinePackageWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
#include "src/Exceptions/Exception.hpp" #include "src/Exceptions/Exception.hpp"
@@ -13,7 +13,7 @@
#include "PinWidget.hpp" #include "PinWidget.hpp"
#include "BodyWidget.hpp" #include "BodyWidget.hpp"
using namespace Bloom::InsightTargetWidgets::Dip; using namespace Bloom::Widgets::InsightTargetWidgets::Dip;
using namespace Bloom::Exceptions; using namespace Bloom::Exceptions;
using Bloom::Targets::TargetVariant; using Bloom::Targets::TargetVariant;
@@ -25,7 +25,7 @@ DualInlinePackageWidget::DualInlinePackageWidget(
): TargetPackageWidget(targetVariant, insightWindowObj, parent) { ): TargetPackageWidget(targetVariant, insightWindowObj, parent) {
auto stylesheetFile = QFile(QString::fromStdString( auto stylesheetFile = QFile(QString::fromStdString(
Paths::compiledResourcesPath() Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss" + "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss"
) )
); );
stylesheetFile.open(QFile::ReadOnly); stylesheetFile.open(QFile::ReadOnly);

View File

@@ -10,7 +10,7 @@
#include "BodyWidget.hpp" #include "BodyWidget.hpp"
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
namespace Bloom::InsightTargetWidgets::Dip namespace Bloom::Widgets::InsightTargetWidgets::Dip
{ {
/** /**
* The DualInlinePackageWidget implements a custom Qt widget for the Dual-inline package target variants. * The DualInlinePackageWidget implements a custom Qt widget for the Dual-inline package target variants.

View File

@@ -7,7 +7,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
using namespace Bloom::InsightTargetWidgets::Dip; using namespace Bloom::Widgets::InsightTargetWidgets::Dip;
using namespace Bloom::Targets; using namespace Bloom::Targets;
void PinBodyWidget::paintEvent(QPaintEvent* event) { void PinBodyWidget::paintEvent(QPaintEvent* event) {

View File

@@ -6,7 +6,7 @@
#include "src/Targets/TargetPinDescriptor.hpp" #include "src/Targets/TargetPinDescriptor.hpp"
namespace Bloom::InsightTargetWidgets::Dip namespace Bloom::Widgets::InsightTargetWidgets::Dip
{ {
class PinBodyWidget: public QWidget class PinBodyWidget: public QWidget
{ {

View File

@@ -8,7 +8,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
using namespace Bloom::InsightTargetWidgets::Dip; using namespace Bloom::Widgets::InsightTargetWidgets::Dip;
using namespace Bloom::Targets; using namespace Bloom::Targets;
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant): PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):

View File

@@ -7,7 +7,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
namespace Bloom::InsightTargetWidgets::Dip namespace Bloom::Widgets::InsightTargetWidgets::Dip
{ {
class PinWidget: public TargetPinWidget class PinWidget: public TargetPinWidget
{ {

View File

@@ -3,7 +3,7 @@
#include "BodyWidget.hpp" #include "BodyWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
using namespace Bloom::InsightTargetWidgets::Qfp; using namespace Bloom::Widgets::InsightTargetWidgets::Qfp;
void BodyWidget::paintEvent(QPaintEvent* event) { void BodyWidget::paintEvent(QPaintEvent* event) {
auto painter = QPainter(this); auto painter = QPainter(this);

View File

@@ -2,7 +2,7 @@
#include <QWidget> #include <QWidget>
namespace Bloom::InsightTargetWidgets::Qfp namespace Bloom::Widgets::InsightTargetWidgets::Qfp
{ {
class BodyWidget: public QWidget class BodyWidget: public QWidget
{ {

View File

@@ -7,7 +7,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
using namespace Bloom::InsightTargetWidgets::Qfp; using namespace Bloom::Widgets::InsightTargetWidgets::Qfp;
using namespace Bloom::Targets; using namespace Bloom::Targets;
void PinBodyWidget::paintEvent(QPaintEvent* event) { void PinBodyWidget::paintEvent(QPaintEvent* event) {

View File

@@ -6,7 +6,7 @@
#include "src/Targets/TargetPinDescriptor.hpp" #include "src/Targets/TargetPinDescriptor.hpp"
namespace Bloom::InsightTargetWidgets::Qfp namespace Bloom::Widgets::InsightTargetWidgets::Qfp
{ {
class PinBodyWidget: public QWidget class PinBodyWidget: public QWidget
{ {

View File

@@ -8,7 +8,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Logger/Logger.hpp" #include "src/Logger/Logger.hpp"
using namespace Bloom::InsightTargetWidgets::Qfp; using namespace Bloom::Widgets::InsightTargetWidgets::Qfp;
using namespace Bloom::Targets; using namespace Bloom::Targets;
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant): PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):

View File

@@ -7,7 +7,7 @@
#include "PinBodyWidget.hpp" #include "PinBodyWidget.hpp"
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
namespace Bloom::InsightTargetWidgets::Qfp namespace Bloom::Widgets::InsightTargetWidgets::Qfp
{ {
class PinWidget: public TargetPinWidget class PinWidget: public TargetPinWidget
{ {

View File

@@ -5,13 +5,13 @@
#include <QEvent> #include <QEvent>
#include <QFile> #include <QFile>
#include "../../InsightWindow.hpp" #include "../../../InsightWindow.hpp"
#include "QuadFlatPackageWidget.hpp" #include "QuadFlatPackageWidget.hpp"
#include "src/Helpers/Paths.hpp" #include "src/Helpers/Paths.hpp"
#include "PinWidget.hpp" #include "PinWidget.hpp"
#include "BodyWidget.hpp" #include "BodyWidget.hpp"
using namespace Bloom::InsightTargetWidgets::Qfp; using namespace Bloom::Widgets::InsightTargetWidgets::Qfp;
using namespace Bloom::Targets; using namespace Bloom::Targets;
QuadFlatPackageWidget::QuadFlatPackageWidget( QuadFlatPackageWidget::QuadFlatPackageWidget(
@@ -23,7 +23,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget(
auto stylesheetFile = QFile(QString::fromStdString( auto stylesheetFile = QFile(QString::fromStdString(
Paths::compiledResourcesPath() Paths::compiledResourcesPath()
+ "/src/Insight/UserInterfaces/InsightWindow/TargetWidgets//QFP/Stylesheets/QuadFlatPackage.qss" + "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets//QFP/Stylesheets/QuadFlatPackage.qss"
) )
); );
stylesheetFile.open(QFile::ReadOnly); stylesheetFile.open(QFile::ReadOnly);
@@ -118,7 +118,7 @@ void QuadFlatPackageWidget::drawWidget(QPainter& painter) {
auto parentContainerHeight = parentWidget->height(); auto parentContainerHeight = parentWidget->height();
auto parentContainerWidth = parentWidget->width(); auto parentContainerWidth = parentWidget->width();
auto verticalPinWidgetHeight = PinWidget::MAXIMUM_VERTICAL_HEIGHT; auto verticalPinWidgetHeight = PinWidget::MAXIMUM_VERTICAL_HEIGHT;
auto verticalPinWidgetWidth = PinWidget::MAXIMUM_VERTICAL_WIDTH; auto verticalPinWidgetWidth = PinWidget::MAXIMUM_VERTICAL_WIDTH;
auto horizontalPinWidgetHeight = PinWidget::MAXIMUM_HORIZONTAL_HEIGHT; auto horizontalPinWidgetHeight = PinWidget::MAXIMUM_HORIZONTAL_HEIGHT;

View File

@@ -10,7 +10,7 @@
#include "BodyWidget.hpp" #include "BodyWidget.hpp"
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
namespace Bloom::InsightTargetWidgets::Qfp namespace Bloom::Widgets::InsightTargetWidgets::Qfp
{ {
/** /**
* QuadFlatPackageWidget implements a custom Qt widget for Quad-flat package variants. * QuadFlatPackageWidget implements a custom Qt widget for Quad-flat package variants.

View File

@@ -9,7 +9,7 @@
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
#include "src/Targets/TargetDescriptor.hpp" #include "src/Targets/TargetDescriptor.hpp"
namespace Bloom::InsightTargetWidgets namespace Bloom::Widgets::InsightTargetWidgets
{ {
/** /**
* Each custom target package widget should be derived from this class. * Each custom target package widget should be derived from this class.

View File

@@ -6,7 +6,7 @@
#include "src/Targets/TargetVariant.hpp" #include "src/Targets/TargetVariant.hpp"
#include "src/Targets/TargetPinDescriptor.hpp" #include "src/Targets/TargetPinDescriptor.hpp"
namespace Bloom::InsightTargetWidgets namespace Bloom::Widgets::InsightTargetWidgets
{ {
class TargetPinWidget: public QWidget class TargetPinWidget: public QWidget
{ {

View File

@@ -23,8 +23,8 @@
<!-- QT UI stylesheets for Insight--> <!-- QT UI stylesheets for Insight-->
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/AboutWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/AboutWindow.qss</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Stylesheets/AboutWindow.qss">./Insight/UserInterfaces/InsightWindow/Stylesheets/AboutWindow.qss</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss">./Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss">./Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/Stylesheets/DualInlinePackage.qss</file>
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/Stylesheets/QuadFlatPackage.qss">./Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/Stylesheets/QuadFlatPackage.qss</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/Stylesheets/QuadFlatPackage.qss">./Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/Stylesheets/QuadFlatPackage.qss</file>
<!-- Icons for Insight--> <!-- Icons for Insight-->
<file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg">./Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg</file> <file alias="/compiled/src/Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg">./Insight/UserInterfaces/InsightWindow/Images/BloomIcon.svg</file>