diff --git a/ledset/expertscreenconnwin.cpp b/ledset/expertscreenconnwin.cpp new file mode 100644 index 0000000..f893800 --- /dev/null +++ b/ledset/expertscreenconnwin.cpp @@ -0,0 +1,119 @@ +#include "expertscreenconnwin.h" +#include +#include +#include +#include +#include +#include + +ExpertScreenConnWin::ExpertScreenConnWin(QWidget *parent) : QWidget{parent} { + auto vBox = new QVBoxLayout(this); + vBox->setContentsMargins(4, 4, 4, 4); + + auto hh = new QHBoxLayout; + vBox->addLayout(hh); + + auto vvv = new QVBoxLayout; + hh->addLayout(vvv); + + auto gBox = new QGroupBox("接收卡设置"); + vvv->addWidget(gBox); + auto hhh = new QHBoxLayout(gBox); + + auto lb = new QLabel("卡宽度: "); + hhh->addWidget(lb); + + auto fdReCardWidth = new QSpinBox; + fdReCardWidth->setRange(0, 9999); + fdReCardWidth->setValue(128); + hhh->addWidget(fdReCardWidth); + + lb = new QLabel("卡高度: "); + hhh->addWidget(lb); + + auto fdReCardHeight = new QSpinBox; + fdReCardHeight->setRange(0, 9999); + fdReCardHeight->setValue(64); + hhh->addWidget(fdReCardHeight); + + gBox = new QGroupBox("网口选择"); + vvv->addWidget(gBox); + hhh = new QHBoxLayout(gBox); + + auto bnNet1 = new QPushButton("1"); + hhh->addWidget(bnNet1); + + auto bnNet2 = new QPushButton("2"); + hhh->addWidget(bnNet2); + + auto bnNet3 = new QPushButton("3"); + hhh->addWidget(bnNet3); + + auto bnNet4 = new QPushButton("4"); + hhh->addWidget(bnNet4); + + + gBox = new QGroupBox("快速串线:"); + gBox->setStyleSheet("QToolButton {border: none; }"); + vvv->addWidget(gBox); + { + auto vvv = new QVBoxLayout(gBox); + hhh = new QHBoxLayout; + vvv->addLayout(hhh); + + auto bnConn1 = new QToolButton; + bnConn1->setIconSize(QSize(48,48)); + bnConn1->setIcon(QIcon(":/imgs/conn1.png")); + hhh->addWidget(bnConn1); + + auto bnConn2 = new QToolButton; + bnConn2->setIconSize(QSize(48,48)); + bnConn2->setIcon(QIcon(":/imgs/conn2.png")); + hhh->addWidget(bnConn2); + + auto bnConn3 = new QToolButton; + bnConn3->setIconSize(QSize(48,48)); + bnConn3->setIcon(QIcon(":/imgs/conn3.png")); + hhh->addWidget(bnConn3); + + auto bnConn4 = new QToolButton; + bnConn4->setIconSize(QSize(48,48)); + bnConn4->setIcon(QIcon(":/imgs/conn4.png")); + hhh->addWidget(bnConn4); + + hhh = new QHBoxLayout; + vvv->addLayout(hhh); + + auto bnConn5 = new QToolButton; + bnConn5->setIconSize(QSize(48,48)); + bnConn5->setIcon(QIcon(":/imgs/conn5.png")); + hhh->addWidget(bnConn5); + + auto bnConn6 = new QToolButton; + bnConn6->setIconSize(QSize(48,48)); + bnConn6->setIcon(QIcon(":/imgs/conn6.png")); + hhh->addWidget(bnConn6); + + auto bnConn7 = new QToolButton; + bnConn7->setIconSize(QSize(48,48)); + bnConn7->setIcon(QIcon(":/imgs/conn7.png")); + hhh->addWidget(bnConn7); + + auto bnConn8 = new QToolButton; + bnConn8->setIconSize(QSize(48,48)); + bnConn8->setIcon(QIcon(":/imgs/conn8.png")); + hhh->addWidget(bnConn8); + } + vvv->addStretch(); + + vvv = new QVBoxLayout; + hh->addLayout(vvv); + + hhh = new QHBoxLayout; + vvv->addLayout(hhh); + + auto bnRefresh = new QToolButton; + hhh->addWidget(bnRefresh); + + hhh->addStretch(); +} diff --git a/ledset/expertscreenconnwin.h b/ledset/expertscreenconnwin.h new file mode 100644 index 0000000..681367f --- /dev/null +++ b/ledset/expertscreenconnwin.h @@ -0,0 +1,15 @@ +#ifndef EXPERTSCREENCONNWIN_H +#define EXPERTSCREENCONNWIN_H + +#include + +class ExpertScreenConnWin : public QWidget { + Q_OBJECT +public: + explicit ExpertScreenConnWin(QWidget *parent = nullptr); + +signals: + +}; + +#endif // EXPERTSCREENCONNWIN_H diff --git a/ledset/expertwin.cpp b/ledset/expertwin.cpp index 836d791..e624906 100644 --- a/ledset/expertwin.cpp +++ b/ledset/expertwin.cpp @@ -2,11 +2,13 @@ #include "table.h" #include "screenunit.h" #include "expertsmartpointsetwin.h" +#include "expertscreenconnwin.h" #include #include #include #include #include +#include QColor colors[] {QColor(0xdd0000), QColor(0xdd6600), QColor(0x008800), QColor(0x008888), QColor(0x0000ff), QColor(0x777777), QColor(0xaaaaaa)}; @@ -129,7 +131,7 @@ QTabBar::tab:selected {margin-top: 0; border-bottom: none; color: #acf; backgrou tab->addTab(receivePanel, "接收卡"); { auto vBox = new QVBoxLayout(receivePanel); - auto gBox = new QGroupBox("模组信息", receivePanel); + auto gBox = new QGroupBox("模组信息"); gBox->setForegroundRole(QPalette::Text); vBox->addWidget(gBox); @@ -245,6 +247,9 @@ QTabBar::tab:selected {margin-top: 0; border-bottom: none; color: #acf; backgrou fdScreenCnt->setValue(1); hhh->addWidget(fdScreenCnt); - vBox->addStretch(); + auto stack = new QStackedLayout; + vBox->addLayout(stack); + + stack->addWidget(new ExpertScreenConnWin()); } } diff --git a/ledset/imgs/conn1.png b/ledset/imgs/conn1.png new file mode 100644 index 0000000..305b0d0 Binary files /dev/null and b/ledset/imgs/conn1.png differ diff --git a/ledset/imgs/conn2.png b/ledset/imgs/conn2.png new file mode 100644 index 0000000..b3db574 Binary files /dev/null and b/ledset/imgs/conn2.png differ diff --git a/ledset/imgs/conn3.png b/ledset/imgs/conn3.png new file mode 100644 index 0000000..445a53e Binary files /dev/null and b/ledset/imgs/conn3.png differ diff --git a/ledset/imgs/conn4.png b/ledset/imgs/conn4.png new file mode 100644 index 0000000..f8f1ef9 Binary files /dev/null and b/ledset/imgs/conn4.png differ diff --git a/ledset/imgs/conn5.png b/ledset/imgs/conn5.png new file mode 100644 index 0000000..6ff72e5 Binary files /dev/null and b/ledset/imgs/conn5.png differ diff --git a/ledset/imgs/conn6.png b/ledset/imgs/conn6.png new file mode 100644 index 0000000..6ff72e5 Binary files /dev/null and b/ledset/imgs/conn6.png differ diff --git a/ledset/imgs/conn7.png b/ledset/imgs/conn7.png new file mode 100644 index 0000000..6ff72e5 Binary files /dev/null and b/ledset/imgs/conn7.png differ diff --git a/ledset/imgs/conn8.png b/ledset/imgs/conn8.png new file mode 100644 index 0000000..6ff72e5 Binary files /dev/null and b/ledset/imgs/conn8.png differ diff --git a/ledset/ledset.pro b/ledset/ledset.pro index a3becbe..d53bff6 100644 --- a/ledset/ledset.pro +++ b/ledset/ledset.pro @@ -27,6 +27,7 @@ QMAKE_LFLAGS += /LARGEADDRESSAWARE SOURCES += \ basewin.cpp \ brightwin.cpp \ + expertscreenconnwin.cpp \ expertsmartpointsetwin.cpp \ expertwin.cpp \ fast.cpp \ @@ -41,6 +42,7 @@ SOURCES += \ HEADERS += \ basewin.h \ brightwin.h \ + expertscreenconnwin.h \ expertsmartpointsetwin.h \ expertwin.h \ fast.h \ diff --git a/ledset/res.qrc b/ledset/res.qrc index ee06b6e..ed08cdb 100644 --- a/ledset/res.qrc +++ b/ledset/res.qrc @@ -11,5 +11,13 @@ imgs/multi.png imgs/idea.png imgs/video.png + imgs/conn1.png + imgs/conn2.png + imgs/conn3.png + imgs/conn4.png + imgs/conn5.png + imgs/conn6.png + imgs/conn7.png + imgs/conn8.png