增加显示屏连接界面

This commit is contained in:
gangphon 2022-08-26 23:15:25 +08:00
parent b687d834a5
commit 2daed814e1
13 changed files with 151 additions and 2 deletions

View File

@ -0,0 +1,119 @@
#include "expertscreenconnwin.h"
#include <QBoxLayout>
#include <QGroupBox>
#include <QLabel>
#include <QSpinBox>
#include <QToolButton>
#include <QPushButton>
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();
}

View File

@ -0,0 +1,15 @@
#ifndef EXPERTSCREENCONNWIN_H
#define EXPERTSCREENCONNWIN_H
#include <QWidget>
class ExpertScreenConnWin : public QWidget {
Q_OBJECT
public:
explicit ExpertScreenConnWin(QWidget *parent = nullptr);
signals:
};
#endif // EXPERTSCREENCONNWIN_H

View File

@ -2,11 +2,13 @@
#include "table.h" #include "table.h"
#include "screenunit.h" #include "screenunit.h"
#include "expertsmartpointsetwin.h" #include "expertsmartpointsetwin.h"
#include "expertscreenconnwin.h"
#include <QTabWidget> #include <QTabWidget>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
#include <QGroupBox> #include <QGroupBox>
#include <QStackedLayout>
QColor colors[] {QColor(0xdd0000), QColor(0xdd6600), QColor(0x008800), QColor(0x008888), QColor(0x0000ff), QColor(0x777777), QColor(0xaaaaaa)}; 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, "接收卡"); tab->addTab(receivePanel, "接收卡");
{ {
auto vBox = new QVBoxLayout(receivePanel); auto vBox = new QVBoxLayout(receivePanel);
auto gBox = new QGroupBox("模组信息", receivePanel); auto gBox = new QGroupBox("模组信息");
gBox->setForegroundRole(QPalette::Text); gBox->setForegroundRole(QPalette::Text);
vBox->addWidget(gBox); vBox->addWidget(gBox);
@ -245,6 +247,9 @@ QTabBar::tab:selected {margin-top: 0; border-bottom: none; color: #acf; backgrou
fdScreenCnt->setValue(1); fdScreenCnt->setValue(1);
hhh->addWidget(fdScreenCnt); hhh->addWidget(fdScreenCnt);
vBox->addStretch(); auto stack = new QStackedLayout;
vBox->addLayout(stack);
stack->addWidget(new ExpertScreenConnWin());
} }
} }

BIN
ledset/imgs/conn1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

BIN
ledset/imgs/conn2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

BIN
ledset/imgs/conn3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

BIN
ledset/imgs/conn4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
ledset/imgs/conn5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
ledset/imgs/conn6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
ledset/imgs/conn7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
ledset/imgs/conn8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -27,6 +27,7 @@ QMAKE_LFLAGS += /LARGEADDRESSAWARE
SOURCES += \ SOURCES += \
basewin.cpp \ basewin.cpp \
brightwin.cpp \ brightwin.cpp \
expertscreenconnwin.cpp \
expertsmartpointsetwin.cpp \ expertsmartpointsetwin.cpp \
expertwin.cpp \ expertwin.cpp \
fast.cpp \ fast.cpp \
@ -41,6 +42,7 @@ SOURCES += \
HEADERS += \ HEADERS += \
basewin.h \ basewin.h \
brightwin.h \ brightwin.h \
expertscreenconnwin.h \
expertsmartpointsetwin.h \ expertsmartpointsetwin.h \
expertwin.h \ expertwin.h \
fast.h \ fast.h \

View File

@ -11,5 +11,13 @@
<file>imgs/multi.png</file> <file>imgs/multi.png</file>
<file>imgs/idea.png</file> <file>imgs/idea.png</file>
<file>imgs/video.png</file> <file>imgs/video.png</file>
<file>imgs/conn1.png</file>
<file>imgs/conn2.png</file>
<file>imgs/conn3.png</file>
<file>imgs/conn4.png</file>
<file>imgs/conn5.png</file>
<file>imgs/conn6.png</file>
<file>imgs/conn7.png</file>
<file>imgs/conn8.png</file>
</qresource> </qresource>
</RCC> </RCC>