qt/ledset/expertscreenconnwin.cpp

120 lines
3.2 KiB
C++
Raw Normal View History

2022-08-26 23:15:25 +08:00
#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();
}