Compare commits

..

No commits in common. "c30ae1e12d871118b0b7449e7351dfc5d2fe5bff" and "2e4c5a8d078a90738fcdd7bdfb5dfa51d0ea08df" have entirely different histories.

8 changed files with 498 additions and 777 deletions

View File

@ -518,6 +518,9 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
bool DestoryCamera()
{
MdigProcess(MilDigitizer0, MilGrabBufferList0, 20, M_STOP, M_DEFAULT,ProcessingFunction0, M_NULL);
MdigProcess(MilDigitizer1, MilGrabBufferList1, 20, M_STOP, M_DEFAULT,ProcessingFunction1, M_NULL);
for (int i = 0; i < 20; i++)
{
MbufFree(MilGrabBufferList0[i]);
@ -1046,9 +1049,6 @@ bool iniLowMac()
bool DestoryLowMac()
{
MdigProcess(MilDigitizer0, MilGrabBufferList0, 20, M_STOP, M_DEFAULT,ProcessingFunction0, M_NULL);
MdigProcess(MilDigitizer1, MilGrabBufferList1, 20, M_STOP, M_DEFAULT,ProcessingFunction1, M_NULL);
// 构建停止命令
uint8_t stop_command[9] = {0};
stop_command[0] = 0xAA; // 起始标志
@ -1166,10 +1166,10 @@ void Start_camera()
{
cout << "Error: Unable to write to lower machine for start command." << endl;
}
}
std::vector<std::vector<uint8_t> > expandArray(const std::vector<std::vector<uint8_t> > &array, int newCols)
{
int rows = array.size();

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 15.0.0, 2024-12-25T23:24:15. -->
<!-- Written by QtCreator 15.0.0, 2024-12-25T01:32:34. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -32,13 +32,6 @@ int main(int argc, char *argv[])
// 安装自定义消息处理器,保存原始处理器
originalHandler = qInstallMessageHandler(customMessageHandler);
// QFile file("C:/Users/Administrator/Documents/cotton_double/styles/style.qss"); // 或者使用文件路径
// if (file.open(QFile::ReadOnly)) {
// QString styleSheet = QLatin1String(file.readAll());
// qApp->setStyleSheet(styleSheet);
// }
Widget w;
w.show();
return a.exec();

View File

@ -1,119 +0,0 @@
/* style.qss */
/* 全局字体设置 */
* {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 48px; /* 全局字体大小 */
font-weight: bold; /* 全局字体粗细 */
color: #FFFFFF; /* 全局文字颜色,白色 */
}
/* QWidget 样式 */
QWidget {
background-color: #2C3E50; /* 深灰色背景 */
border-radius: 15px; /* 圆角半径 */
}
/* QPushButton 样式 */
QPushButton {
background-color: #3498DB; /* 蓝色按钮背景 */
color: #FFFFFF; /* 白色按钮文字 */
border: 2px solid #7F8C8D; /* 中灰色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
/* 去除伪状态样式 */
}
/* QGroupBox 样式 */
QGroupBox {
border: 2px solid #7F8C8D; /* 中灰色边框 */
border-radius: 12px; /* 圆角半径 */
margin-top: 30px; /* 标题上边距 */
background-color: #2C3E50; /* 深灰色背景 */
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
padding: 0 10px;
color: #FFFFFF; /* 白色标题文字 */
font-size: 48px; /* 标题字体大小 */
}
/* QCheckBox 样式 */
QCheckBox {
spacing: 20px; /* 图标与文字间距 */
color: #FFFFFF; /* 白色文字 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 字体粗细 */
}
QCheckBox::indicator {
width: 48px;
height: 48px;
}
QCheckBox::indicator::unchecked {
border: 3px solid #7F8C8D; /* 中灰色边框 */
border-radius: 12px; /* 圆角半径 */
background: #2C3E50; /* 深灰色背景 */
}
QCheckBox::indicator::checked {
border: 3px solid #3498DB; /* 蓝色边框 */
border-radius: 12px; /* 圆角半径 */
background: #3498DB; /* 蓝色背景 */
}
QCheckBox::indicator::checked::after {
content: "\2713"; /* 勾选符号 */
color: #FFFFFF; /* 勾选符号颜色 */
font-size: 48px; /* 勾选符号大小 */
position: absolute;
top: -12px;
left: 12px;
}
/* QSpinBox 样式 */
QSpinBox, QDoubleSpinBox {
background-color: #3498DB; /* 蓝色背景 */
border: 2px solid #7F8C8D; /* 中灰色边框 */
border-radius: 12px; /* 圆角半径 */
padding: 20px; /* 内边距 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 字体粗细 */
color: #FFFFFF; /* 文字颜色 */
}
QSpinBox::up-button, QSpinBox::down-button,
QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
background-color: #2C3E50; /* 深灰色按钮背景 */
border: none;
width: 60px;
height: 60px;
border-radius: 12px; /* 圆角半径 */
}
QSpinBox::up-button::arrow, QSpinBox::down-button::arrow,
QDoubleSpinBox::up-button::arrow, QDoubleSpinBox::down-button::arrow {
width: 24px;
height: 24px;
color: #FFFFFF; /* 箭头颜色 */
}
/* QLabel 样式 */
QLabel {
color: #FFFFFF; /* 白色文字 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 字体粗细 */
}
/* 消息框样式 */
QLabel#message {
background-color: #E67E22; /* 橙色背景 */
color: #FFFFFF; /* 白色文字 */
padding: 20px;
border-radius: 12px;
font-size: 48px;
font-weight: bold;
}

View File

@ -13,6 +13,7 @@
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
@ -31,17 +32,26 @@ public:
QHBoxLayout *horizontalLayout;
QTabWidget *tabWidget;
QWidget *tab;
QVBoxLayout *verticalLayout;
QGroupBox *groupBox_5;
QGridLayout *gridLayout;
QPushButton *btn_goto_sort;
QPushButton *btn_0to3;
QPushButton *pushButtonStart;
QPushButton *pushButton_2;
QGroupBox *groupBox;
QHBoxLayout *horizontalLayout_2;
QLabel *label;
QLabel *label_3;
QLabel *lab_lowermachine_isconnect;
QPushButton *btn_reconnect;
QWidget *tab_2;
QHBoxLayout *horizontalLayout_3;
QGroupBox *groupBox_7;
QVBoxLayout *verticalLayout_3;
QLabel *lab_info;
QPushButton *btn_start;
QPushButton *btn_stop;
QPushButton *btn_take_photos;
QPushButton *btn_set_valve;
QPushButton *btn_stop;
QPushButton *btn_quit;
QSpacerItem *verticalSpacer;
QFrame *frame_6;
@ -70,17 +80,16 @@ public:
QLabel *label_title_3;
QGroupBox *groupBox_4;
QPushButton *btn_set_lower;
QFrame *frame_3;
QHBoxLayout *horizontalLayout_6;
QVBoxLayout *verticalLayout_5;
QLabel *label_delaytime;
QLabel *label_encoder;
QLabel *label_encoder_2;
QWidget *layoutWidget;
QVBoxLayout *verticalLayout_4;
QSpinBox *spinbox_delaytime;
QSpinBox *spinbox_encoder;
QSpinBox *spinbox_valve;
QPushButton *btn_tab3_backtab2;
QWidget *layoutWidget1;
QVBoxLayout *verticalLayout_5;
QLabel *label_delaytime;
QLabel *label_encoder;
QLabel *label_encoder_2;
QLabel *label_title_4;
QGroupBox *groupBox_2;
QLabel *label_explosure_2;
@ -96,23 +105,86 @@ public:
{
if (Widget->objectName().isEmpty())
Widget->setObjectName("Widget");
Widget->resize(2173, 1117);
Widget->resize(1920, 1080);
horizontalLayout = new QHBoxLayout(Widget);
horizontalLayout->setObjectName("horizontalLayout");
tabWidget = new QTabWidget(Widget);
tabWidget->setObjectName("tabWidget");
tabWidget->setEnabled(true);
tabWidget->setStyleSheet(QString::fromUtf8("background-color: rgb(228, 223, 186);"));
tab = new QWidget();
tab->setObjectName("tab");
label = new QLabel(tab);
verticalLayout = new QVBoxLayout(tab);
verticalLayout->setObjectName("verticalLayout");
groupBox_5 = new QGroupBox(tab);
groupBox_5->setObjectName("groupBox_5");
gridLayout = new QGridLayout(groupBox_5);
gridLayout->setObjectName("gridLayout");
btn_goto_sort = new QPushButton(groupBox_5);
btn_goto_sort->setObjectName("btn_goto_sort");
gridLayout->addWidget(btn_goto_sort, 2, 0, 1, 1);
btn_0to3 = new QPushButton(groupBox_5);
btn_0to3->setObjectName("btn_0to3");
gridLayout->addWidget(btn_0to3, 2, 1, 1, 1);
pushButtonStart = new QPushButton(groupBox_5);
pushButtonStart->setObjectName("pushButtonStart");
gridLayout->addWidget(pushButtonStart, 1, 0, 1, 1);
pushButton_2 = new QPushButton(groupBox_5);
pushButton_2->setObjectName("pushButton_2");
gridLayout->addWidget(pushButton_2, 1, 1, 1, 1);
verticalLayout->addWidget(groupBox_5);
groupBox = new QGroupBox(tab);
groupBox->setObjectName("groupBox");
horizontalLayout_2 = new QHBoxLayout(groupBox);
horizontalLayout_2->setObjectName("horizontalLayout_2");
horizontalLayout_2->setSizeConstraint(QLayout::SizeConstraint::SetDefaultConstraint);
label = new QLabel(groupBox);
label->setObjectName("label");
label->setGeometry(QRect(330, 120, 1271, 131));
label->setStyleSheet(QString::fromUtf8("font: 72pt \"Microsoft YaHei UI\";"));
label_3 = new QLabel(tab);
label_3->setObjectName("label_3");
label_3->setGeometry(QRect(500, 260, 1151, 141));
label_3->setStyleSheet(QString::fromUtf8("font: 72pt \"Microsoft YaHei UI\";"));
horizontalLayout_2->addWidget(label);
lab_lowermachine_isconnect = new QLabel(groupBox);
lab_lowermachine_isconnect->setObjectName("lab_lowermachine_isconnect");
QPalette palette;
QBrush brush(QColor(237, 212, 0, 255));
brush.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Button, brush);
palette.setBrush(QPalette::Active, QPalette::Base, brush);
palette.setBrush(QPalette::Active, QPalette::Window, brush);
QBrush brush1(QColor(246, 233, 127, 255));
brush1.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::AlternateBase, brush1);
palette.setBrush(QPalette::Inactive, QPalette::Button, brush);
palette.setBrush(QPalette::Inactive, QPalette::Base, brush);
palette.setBrush(QPalette::Inactive, QPalette::Window, brush);
palette.setBrush(QPalette::Inactive, QPalette::AlternateBase, brush1);
palette.setBrush(QPalette::Disabled, QPalette::Button, brush);
palette.setBrush(QPalette::Disabled, QPalette::Base, brush);
palette.setBrush(QPalette::Disabled, QPalette::Window, brush);
palette.setBrush(QPalette::Disabled, QPalette::AlternateBase, brush1);
lab_lowermachine_isconnect->setPalette(palette);
horizontalLayout_2->addWidget(lab_lowermachine_isconnect);
btn_reconnect = new QPushButton(groupBox);
btn_reconnect->setObjectName("btn_reconnect");
horizontalLayout_2->addWidget(btn_reconnect);
verticalLayout->addWidget(groupBox);
verticalLayout->setStretch(0, 5);
verticalLayout->setStretch(1, 1);
tabWidget->addTab(tab, QString());
tab_2 = new QWidget();
tab_2->setObjectName("tab_2");
@ -120,7 +192,6 @@ public:
horizontalLayout_3->setObjectName("horizontalLayout_3");
groupBox_7 = new QGroupBox(tab_2);
groupBox_7->setObjectName("groupBox_7");
groupBox_7->setMinimumSize(QSize(450, 0));
verticalLayout_3 = new QVBoxLayout(groupBox_7);
verticalLayout_3->setSpacing(20);
verticalLayout_3->setObjectName("verticalLayout_3");
@ -129,192 +200,36 @@ public:
lab_info->setObjectName("lab_info");
lab_info->setEnabled(true);
QFont font;
font.setFamilies({QString::fromUtf8("Microsoft YaHei UI")});
font.setPointSize(48);
font.setBold(false);
font.setItalic(false);
font.setPointSize(28);
lab_info->setFont(font);
lab_info->setStyleSheet(QString::fromUtf8("font: 48pt \"Microsoft YaHei UI\";\n"
"color: rgb(34, 40, 49);"));
verticalLayout_3->addWidget(lab_info);
btn_start = new QPushButton(groupBox_7);
btn_start->setObjectName("btn_start");
btn_start->setMinimumSize(QSize(70, 170));
btn_start->setStyleSheet(QString::fromUtf8("/* btn_start \346\240\267\345\274\217 */\n"
"QPushButton#btn_start {\n"
" background-color: #4b5b47; /* \346\232\227\347\273\277\350\211\262\350\203\214\346\231\257 */\n"
" color: #f5efe7; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #145A32; /* \346\233\264\346\267\261\347\232\204\347\273\277\350\211\262\350\276\271\346\241\206 */\n"
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
" font-weight: bold; /* \347\262\227\344\275\223\345\255\227 */\n"
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif; /* \345\255\227\344\275\223\346\227\217 */\n"
"}\n"
"\n"
"QPushButton#btn_start:hover {\n"
" background-color: #28b45d; /* \347\250\215\344\272\256\347\232\204\346\232\227\347\273\277\350\211\262\350\203\214\346\231\257 */\n"
" "
" border: 2px solid #1f8a4d; /* \346\232\227\347\273\277\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_start:pressed {\n"
" background-color: #186a3b; /* \346\233\264\346\267\261\347\232\204\347\273\277\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #134d33; /* \346\233\264\346\267\261\347\232\204\347\273\277\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_start:disabled {\n"
" background-color: #7F8C8D; /* \347\201\260\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #7F8C8D; /* \347\201\260\350\211\262\350\276\271\346\241\206 */\n"
"}"));
btn_start->setMinimumSize(QSize(70, 200));
btn_start->setStyleSheet(QString::fromUtf8("font: 700 40pt \"Microsoft YaHei UI\";"));
verticalLayout_3->addWidget(btn_start);
btn_stop = new QPushButton(groupBox_7);
btn_stop->setObjectName("btn_stop");
btn_stop->setMinimumSize(QSize(70, 170));
btn_stop->setStyleSheet(QString::fromUtf8("/* btn_stop \346\240\267\345\274\217 */\n"
"QPushButton#btn_stop\n"
" {\n"
" background-color: #be9970; /* \346\232\227\347\272\242\350\211\262\350\203\214\346\231\257 */\n"
" color: #ffffff; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #641e16; /* \346\233\264\346\267\261\347\232\204\347\272\242\350\211\262\350\276\271\346\241\206 */\n"
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
" font-weight: bold; /* \347\262\227\344\275\223\345\255\227 */\n"
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif; /* \345\255\227\344\275\223\346\227\217 */\n"
"}\n"
"\n"
"QPushButton#btn_stop:hover {\n"
" background-color: #cb4335; /* \347\250\215\344\272\256\347\232\204\346\232\227\347\272\242\350\211\262\350\203\214\346\231\257 */\n"
""
" border: 2px solid #a93226; /* \346\232\227\347\272\242\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_stop:pressed {\n"
" background-color: #7b241c; /* \346\233\264\346\267\261\347\232\204\347\272\242\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #641e16; /* \346\233\264\346\267\261\347\232\204\347\272\242\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_stop:disabled {\n"
" background-color: #7F8C8D; /* \347\201\260\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #7F8C8D; /* \347\201\260\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
""));
verticalLayout_3->addWidget(btn_stop);
btn_take_photos = new QPushButton(groupBox_7);
btn_take_photos->setObjectName("btn_take_photos");
btn_take_photos->setMinimumSize(QSize(70, 170));
btn_take_photos->setStyleSheet(QString::fromUtf8("/* btn_take_photos \346\240\267\345\274\217 */\n"
"QPushButton#btn_take_photos {\n"
" background-color: #7c8876; /* \346\232\227\350\223\235\350\211\262\350\203\214\346\231\257 */\n"
" color: #ffffff; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #145a86; /* \346\233\264\346\267\261\347\232\204\350\223\235\350\211\262\350\276\271\346\241\206 */\n"
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
" font-weight: bold; /* \347\262\227\344\275\223\345\255\227 */\n"
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif; /* \345\255\227\344\275\223\346\227\217 */\n"
"}\n"
"\n"
"QPushButton#btn_take_photos:hover {\n"
" background-color: #2e86c1; /* \347\250\215\344\272\256\347\232\204\346\232\227\350\223\235\350\211\262\350\203\214\346"
"\231\257 */\n"
" border: 2px solid #21618c; /* \346\232\227\350\223\235\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_take_photos:pressed {\n"
" background-color: #145a86; /* \346\233\264\346\267\261\347\232\204\350\223\235\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #0f3b6b; /* \346\233\264\346\267\261\347\232\204\350\223\235\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_take_photos:disabled {\n"
" background-color: #7F8C8D; /* \347\201\260\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #7F8C8D; /* \347\201\260\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
""));
btn_take_photos->setMinimumSize(QSize(70, 200));
btn_take_photos->setStyleSheet(QString::fromUtf8("font: 700 40pt \"Microsoft YaHei UI\";"));
verticalLayout_3->addWidget(btn_take_photos);
btn_set_valve = new QPushButton(groupBox_7);
btn_set_valve->setObjectName("btn_set_valve");
btn_set_valve->setMinimumSize(QSize(0, 170));
btn_set_valve->setStyleSheet(QString::fromUtf8("/* btn_set_value \346\240\267\345\274\217 */\n"
"QPushButton#btn_set_valve {\n"
" background-color: #be9970; /* \346\251\231\350\211\262\350\203\214\346\231\257 */\n"
" color: #ffffff; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #d68910; /* \346\267\261\346\251\231\350\211\262\350\276\271\346\241\206 */\n"
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
" font-weight: bold; /* \347\262\227\344\275\223\345\255\227 */\n"
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif; /* \345\255\227\344\275\223\346\227\217 */\n"
"}\n"
"\n"
"QPushButton#btn_set_valve:hover {\n"
" background-color: #f1c40f; /* \344\272\256\346\251\231\350\211\262\350\203\214\346\231\257 */\n"
" border: 2px solid #f39c12; /* \346\251\231\350\211\262\350"
"\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_set_valve:pressed {\n"
" background-color: #d68910; /* \346\267\261\346\251\231\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #b9770e; /* \346\233\264\346\267\261\347\232\204\346\251\231\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_set_valve:disabled {\n"
" background-color: #7F8C8D; /* \347\201\260\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #7F8C8D; /* \347\201\260\350\211\262\350\276\271\346\241\206 */\n"
"}"));
btn_stop = new QPushButton(groupBox_7);
btn_stop->setObjectName("btn_stop");
btn_stop->setMinimumSize(QSize(70, 200));
btn_stop->setStyleSheet(QString::fromUtf8("font: 700 40pt \"Microsoft YaHei UI\";"));
verticalLayout_3->addWidget(btn_set_valve);
verticalLayout_3->addWidget(btn_stop);
btn_quit = new QPushButton(groupBox_7);
btn_quit->setObjectName("btn_quit");
btn_quit->setMinimumSize(QSize(70, 170));
btn_quit->setStyleSheet(QString::fromUtf8("/* btn_quit \346\240\267\345\274\217 */\n"
"QPushButton#btn_quit {\n"
" background-color: #716244; /* \347\272\242\350\211\262\350\203\214\346\231\257 */\n"
" color: #ffffff; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #922b21; /* \346\267\261\347\272\242\350\211\262\350\276\271\346\241\206 */\n"
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
" font-weight: bold; /* \347\262\227\344\275\223\345\255\227 */\n"
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif; /* \345\255\227\344\275\223\346\227\217 */\n"
"}\n"
"\n"
"QPushButton#btn_quit:hover {\n"
" background-color: #e74c3c; /* \344\272\256\347\272\242\350\211\262\350\203\214\346\231\257 */\n"
" border: 2px solid #c0392b; /* \347\272\242\350\211\262\350\276\271\346\241"
"\206 */\n"
"}\n"
"\n"
"QPushButton#btn_quit:pressed {\n"
" background-color: #922b21; /* \346\267\261\347\272\242\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #641e16; /* \346\233\264\346\267\261\347\232\204\347\272\242\350\211\262\350\276\271\346\241\206 */\n"
"}\n"
"\n"
"QPushButton#btn_quit:disabled {\n"
" background-color: #7F8C8D; /* \347\201\260\350\211\262\350\203\214\346\231\257 */\n"
" color: #BDC3C7; /* \347\201\260\350\211\262\346\226\207\345\255\227 */\n"
" border: 2px solid #7F8C8D; /* \347\201\260\350\211\262\350\276\271\346\241\206 */\n"
"}"));
btn_quit->setMinimumSize(QSize(70, 200));
btn_quit->setStyleSheet(QString::fromUtf8("font: 700 40pt \"Microsoft YaHei UI\";"));
verticalLayout_3->addWidget(btn_quit);
@ -331,7 +246,8 @@ public:
verticalLayout_2->setObjectName("verticalLayout_2");
frame = new QFrame(frame_6);
frame->setObjectName("frame");
frame->setFrameShape(QFrame::Shape::NoFrame);
frame->setFrameShape(QFrame::Shape::StyledPanel);
frame->setFrameShadow(QFrame::Shadow::Raised);
horizontalLayout_4 = new QHBoxLayout(frame);
horizontalLayout_4->setObjectName("horizontalLayout_4");
label_2 = new QLabel(frame);
@ -340,7 +256,7 @@ public:
horizontalLayout_4->addWidget(label_2);
horizontalSpacer = new QSpacerItem(864, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
horizontalSpacer = new QSpacerItem(864, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
horizontalLayout_4->addItem(horizontalSpacer);
@ -352,7 +268,7 @@ public:
tra_enable_1 = new QCheckBox(frame);
tra_enable_1->setObjectName("tra_enable_1");
tra_enable_1->setEnabled(true);
tra_enable_1->setEnabled(false);
tra_enable_1->setStyleSheet(QString::fromUtf8("font: 12pt \"Microsoft YaHei UI\";"));
horizontalLayout_4->addWidget(tra_enable_1);
@ -388,16 +304,15 @@ public:
sizePolicy.setHeightForWidth(camera_1_img->sizePolicy().hasHeightForWidth());
camera_1_img->setSizePolicy(sizePolicy);
camera_1_img->setStyleSheet(QString::fromUtf8("background-color: rgb(129, 129, 129);\n"
"border: 4px solid black;\n"
"\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */"));
"border: 4px solid black;"));
camera_1_img->setLineWidth(1);
verticalLayout_2->addWidget(camera_1_img);
frame_2 = new QFrame(frame_6);
frame_2->setObjectName("frame_2");
frame_2->setFrameShape(QFrame::Shape::NoFrame);
frame_2->setFrameShape(QFrame::Shape::StyledPanel);
frame_2->setFrameShadow(QFrame::Shadow::Raised);
horizontalLayout_5 = new QHBoxLayout(frame_2);
horizontalLayout_5->setObjectName("horizontalLayout_5");
label_4 = new QLabel(frame_2);
@ -406,7 +321,7 @@ public:
horizontalLayout_5->addWidget(label_4);
horizontalSpacer_2 = new QSpacerItem(840, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
horizontalSpacer_2 = new QSpacerItem(840, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
horizontalLayout_5->addItem(horizontalSpacer_2);
@ -418,7 +333,7 @@ public:
tra_enable_0 = new QCheckBox(frame_2);
tra_enable_0->setObjectName("tra_enable_0");
tra_enable_0->setEnabled(true);
tra_enable_0->setEnabled(false);
tra_enable_0->setStyleSheet(QString::fromUtf8("font: 12pt \"Microsoft YaHei UI\";"));
horizontalLayout_5->addWidget(tra_enable_0);
@ -452,8 +367,7 @@ public:
sizePolicy.setHeightForWidth(camera_0_img->sizePolicy().hasHeightForWidth());
camera_0_img->setSizePolicy(sizePolicy);
camera_0_img->setStyleSheet(QString::fromUtf8("background-color: rgb(129, 129, 129);\n"
"border: 4px solid black;\n"
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */"));
"border: 4px solid black;"));
camera_0_img->setLineWidth(1);
verticalLayout_2->addWidget(camera_0_img);
@ -463,7 +377,7 @@ public:
horizontalLayout_3->addWidget(frame_6);
horizontalLayout_3->setStretch(0, 6);
horizontalLayout_3->setStretch(0, 4);
horizontalLayout_3->setStretch(1, 10);
tabWidget->addTab(tab_2, QString());
tab_3 = new QWidget();
@ -480,76 +394,54 @@ public:
label_title_3->setStyleSheet(QString::fromUtf8("font: 700 48pt \"Microsoft YaHei UI\";"));
groupBox_4 = new QGroupBox(tab_3);
groupBox_4->setObjectName("groupBox_4");
groupBox_4->setGeometry(QRect(30, 130, 771, 651));
groupBox_4->setGeometry(QRect(30, 130, 771, 591));
groupBox_4->setStyleSheet(QString::fromUtf8("font: 700 40pt \"Microsoft YaHei UI\";\n"
"border-color: rgb(0, 0, 0);"));
btn_set_lower = new QPushButton(groupBox_4);
btn_set_lower->setObjectName("btn_set_lower");
btn_set_lower->setGeometry(QRect(30, 470, 231, 141));
frame_3 = new QFrame(groupBox_4);
frame_3->setObjectName("frame_3");
frame_3->setGeometry(QRect(20, 80, 698, 373));
frame_3->setFrameShape(QFrame::Shape::StyledPanel);
frame_3->setFrameShadow(QFrame::Shadow::Raised);
horizontalLayout_6 = new QHBoxLayout(frame_3);
horizontalLayout_6->setObjectName("horizontalLayout_6");
verticalLayout_5 = new QVBoxLayout();
verticalLayout_5->setObjectName("verticalLayout_5");
label_delaytime = new QLabel(frame_3);
label_delaytime->setObjectName("label_delaytime");
label_delaytime->setStyleSheet(QString::fromUtf8("font: 700 48pt \"Microsoft YaHei UI\";"));
verticalLayout_5->addWidget(label_delaytime);
label_encoder = new QLabel(frame_3);
label_encoder->setObjectName("label_encoder");
label_encoder->setStyleSheet(QString::fromUtf8("font: 700 48pt \"Microsoft YaHei UI\";"));
verticalLayout_5->addWidget(label_encoder);
label_encoder_2 = new QLabel(frame_3);
label_encoder_2->setObjectName("label_encoder_2");
label_encoder_2->setStyleSheet(QString::fromUtf8("font: 700 48pt \"Microsoft YaHei UI\";"));
verticalLayout_5->addWidget(label_encoder_2);
horizontalLayout_6->addLayout(verticalLayout_5);
verticalLayout_4 = new QVBoxLayout();
btn_set_lower->setGeometry(QRect(430, 410, 231, 141));
layoutWidget = new QWidget(groupBox_4);
layoutWidget->setObjectName("layoutWidget");
layoutWidget->setGeometry(QRect(460, 120, 181, 241));
verticalLayout_4 = new QVBoxLayout(layoutWidget);
verticalLayout_4->setObjectName("verticalLayout_4");
spinbox_delaytime = new QSpinBox(frame_3);
verticalLayout_4->setContentsMargins(0, 0, 0, 0);
spinbox_delaytime = new QSpinBox(layoutWidget);
spinbox_delaytime->setObjectName("spinbox_delaytime");
spinbox_delaytime->setMinimum(1000);
spinbox_delaytime->setMaximum(1400);
spinbox_delaytime->setSingleStep(10);
spinbox_delaytime->setValue(1200);
verticalLayout_4->addWidget(spinbox_delaytime);
spinbox_encoder = new QSpinBox(frame_3);
spinbox_encoder = new QSpinBox(layoutWidget);
spinbox_encoder->setObjectName("spinbox_encoder");
spinbox_encoder->setMinimum(8000);
spinbox_encoder->setMaximum(13000);
spinbox_encoder->setSingleStep(100);
spinbox_encoder->setValue(12000);
verticalLayout_4->addWidget(spinbox_encoder);
spinbox_valve = new QSpinBox(frame_3);
spinbox_valve = new QSpinBox(layoutWidget);
spinbox_valve->setObjectName("spinbox_valve");
spinbox_valve->setMinimum(150);
spinbox_valve->setMaximum(250);
spinbox_valve->setValue(200);
verticalLayout_4->addWidget(spinbox_valve);
layoutWidget1 = new QWidget(groupBox_4);
layoutWidget1->setObjectName("layoutWidget1");
layoutWidget1->setGeometry(QRect(30, 120, 341, 251));
verticalLayout_5 = new QVBoxLayout(layoutWidget1);
verticalLayout_5->setObjectName("verticalLayout_5");
verticalLayout_5->setContentsMargins(0, 0, 0, 0);
label_delaytime = new QLabel(layoutWidget1);
label_delaytime->setObjectName("label_delaytime");
horizontalLayout_6->addLayout(verticalLayout_4);
verticalLayout_5->addWidget(label_delaytime);
label_encoder = new QLabel(layoutWidget1);
label_encoder->setObjectName("label_encoder");
verticalLayout_5->addWidget(label_encoder);
label_encoder_2 = new QLabel(layoutWidget1);
label_encoder_2->setObjectName("label_encoder_2");
verticalLayout_5->addWidget(label_encoder_2);
btn_tab3_backtab2 = new QPushButton(groupBox_4);
btn_tab3_backtab2->setObjectName("btn_tab3_backtab2");
btn_tab3_backtab2->setGeometry(QRect(480, 470, 231, 141));
label_title_4 = new QLabel(tab_3);
label_title_4->setObjectName("label_title_4");
label_title_4->setGeometry(QRect(920, 150, 91, 21));
@ -596,15 +488,21 @@ public:
void retranslateUi(QWidget *Widget)
{
Widget->setWindowTitle(QCoreApplication::translate("Widget", "Widget", nullptr));
label->setText(QCoreApplication::translate("Widget", "\345\245\216\345\261\257\351\223\266\345\212\233\346\243\211\346\262\271\346\234\272\346\242\260\346\234\211\351\231\220\345\205\254\345\217\270", nullptr));
label_3->setText(QCoreApplication::translate("Widget", "\347\261\275\346\243\211\345\274\202\347\272\244\346\235\202\350\264\250\345\210\206\351\200\211\346\234\272", nullptr));
groupBox_5->setTitle(QCoreApplication::translate("Widget", "GroupBox", nullptr));
btn_goto_sort->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242", nullptr));
btn_0to3->setText(QCoreApplication::translate("Widget", "\345\226\267\351\230\200\346\265\213\350\257\225", nullptr));
pushButtonStart->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213", nullptr));
pushButton_2->setText(QCoreApplication::translate("Widget", "\344\277\235\345\255\230\345\233\276\347\211\207", nullptr));
groupBox->setTitle(QCoreApplication::translate("Widget", "\350\277\236\346\216\245\347\212\266\346\200\201\357\274\232", nullptr));
label->setText(QCoreApplication::translate("Widget", "\344\270\213\344\275\215\346\234\272", nullptr));
lab_lowermachine_isconnect->setText(QString());
btn_reconnect->setText(QCoreApplication::translate("Widget", "\351\207\215\346\226\260\350\277\236\346\216\245", nullptr));
tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("Widget", "Tab 1", nullptr));
groupBox_7->setTitle(QCoreApplication::translate("Widget", "\346\216\247\345\210\266\345\217\212\347\212\266\346\200\201", nullptr));
lab_info->setText(QCoreApplication::translate("Widget", "\347\212\266\346\200\201", nullptr));
btn_start->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213\345\210\206\351\200\211", nullptr));
btn_stop->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242\345\210\206\351\200\211", nullptr));
btn_take_photos->setText(QCoreApplication::translate("Widget", "\346\212\223\345\217\226\345\233\276\347\211\207", nullptr));
btn_set_valve->setText(QCoreApplication::translate("Widget", "\350\256\276\347\275\256\345\217\202\346\225\260", nullptr));
btn_stop->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242\345\210\206\351\200\211", nullptr));
btn_quit->setText(QCoreApplication::translate("Widget", "\351\200\200\345\207\272\347\263\273\347\273\237", nullptr));
label_2->setText(QCoreApplication::translate("Widget", "\347\233\270\346\234\2721\357\274\210\351\253\230\344\276\247/\346\260\224\347\275\220\344\276\247\357\274\211", nullptr));
dl_enable_1->setText(QCoreApplication::translate("Widget", "\345\261\217\350\224\275\346\267\261\345\272\246\345\255\246\344\271\240", nullptr));
@ -625,9 +523,8 @@ public:
groupBox_4->setTitle(QCoreApplication::translate("Widget", "\344\270\213\344\275\215\346\234\272\345\217\202\346\225\260", nullptr));
btn_set_lower->setText(QCoreApplication::translate("Widget", "\350\256\276\345\256\232\345\217\202\346\225\260", nullptr));
label_delaytime->setText(QCoreApplication::translate("Widget", "\345\273\266\350\277\237\346\227\266\351\227\264", nullptr));
label_encoder->setText(QCoreApplication::translate("Widget", "\347\233\270\346\234\272\350\241\214\351\242\221", nullptr));
label_encoder_2->setText(QCoreApplication::translate("Widget", "\345\226\267\351\230\200\351\242\221\347\216\207", nullptr));
btn_tab3_backtab2->setText(QCoreApplication::translate("Widget", "\350\277\224\345\233\236", nullptr));
label_encoder->setText(QCoreApplication::translate("Widget", "\347\233\270\346\234\272\345\210\206\351\242\221\347\263\273\346\225\260", nullptr));
label_encoder_2->setText(QCoreApplication::translate("Widget", "\345\226\267\351\230\200\345\210\206\351\242\221\347\263\273\346\225\260", nullptr));
label_title_4->setText(QCoreApplication::translate("Widget", "\345\226\267\351\230\200\346\265\213\350\257\225\347\225\214\351\235\242", nullptr));
groupBox_2->setTitle(QCoreApplication::translate("Widget", "\346\211\213\345\212\250\345\226\267\351\230\200\346\265\213\350\257\225", nullptr));
label_explosure_2->setText(QCoreApplication::translate("Widget", "\351\200\232\351\201\223", nullptr));

View File

@ -52,8 +52,6 @@ Widget::Widget(QWidget *parent)
QTimer* timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, &Widget::refreshImage);
timer->start(50); // 每50毫秒秒刷新一次界面
ui->tabWidget->setCurrentIndex(1);
}
Widget::~Widget()
@ -254,10 +252,26 @@ void Widget::on_pushButton_2_clicked()
SaveImg_Flag = 1;
}
void Widget::on_btn_goto_sort_clicked()
{
// 回复显示的图片
{
QMutexLocker locker(&gDispPicMutex0);
gDispCurrentPicId0 = 0;
}
ui->camera_0_img->clear();
{
QMutexLocker locker(&gDispPicMutex1);
gDispCurrentPicId1 = 0;
}
ui->camera_1_img->clear();
DestoryCamera();
DestoryLowMac();
}
void Widget::on_btn_stop_clicked()
{
DestoryLowMac();
this->isCamRunning = false;
// 恢复显示的图片
{
@ -270,6 +284,31 @@ void Widget::on_btn_stop_clicked()
gDispCurrentPicId1 = 0;
}
ui->camera_1_img->clear();
// 停止检测工作者线程
for(int i = 0; i < 2; ++i)
{
g_recognitionRunning[i]->store(false);
g_img_Queue[i]->stop(); // 停止队列以唤醒线程
}
// 等待检测工作者线程结束
for(int i = 0; i < 2; ++i)
{
if(g_recognitionThread[i] && g_recognitionThread[i]->joinable())
{
g_recognitionThread[i]->join();
delete g_recognitionThread[i];
g_recognitionThread[i] = nullptr;
}
if(g_recognitionRunning[i])
{
delete g_recognitionRunning[i];
g_recognitionRunning[i] = nullptr;
}
}
DestoryCamera();
DestoryLowMac();
}
@ -323,33 +362,6 @@ void Widget::on_btn_take_photos_released()
void Widget::on_btn_quit_clicked()
{
// 停止检测工作者线程
for(int i = 0; i < 2; ++i)
{
g_recognitionRunning[i]->store(false);
g_img_Queue[i]->stop(); // 停止队列以唤醒线程
}
// 等待检测工作者线程结束
for(int i = 0; i < 2; ++i)
{
if(g_recognitionThread[i] && g_recognitionThread[i]->joinable())
{
g_recognitionThread[i]->join();
delete g_recognitionThread[i];
g_recognitionThread[i] = nullptr;
}
if(g_recognitionRunning[i])
{
delete g_recognitionRunning[i];
g_recognitionRunning[i] = nullptr;
}
}
DestoryCamera();
DestoryLowMac();
qApp->quit();
}
@ -363,15 +375,3 @@ void Widget::on_btn_set_lower_clicked()
file_valve = ui->spinbox_valve->text().toInt(); // 阀门通道
}
void Widget::on_btn_set_valve_clicked()
{
ui->tabWidget->setCurrentIndex(2);
}
void Widget::on_btn_tab3_backtab2_clicked()
{
ui->tabWidget->setCurrentIndex(1);
}

View File

@ -32,6 +32,8 @@ private slots:
void on_pushButton_2_clicked();
void on_btn_goto_sort_clicked();
void on_btn_stop_clicked();
void on_btn_start_clicked();
@ -44,10 +46,6 @@ private slots:
void on_btn_set_lower_clicked();
void on_btn_set_valve_clicked();
void on_btn_tab3_backtab2_clicked();
private:
Ui::Widget *ui;

630
widget.ui
View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>2173</width>
<height>1117</height>
<width>1920</width>
<height>1080</height>
</rect>
</property>
<property name="windowTitle">
@ -19,62 +19,211 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(228, 223, 186);</string>
</property>
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>330</x>
<y>120</y>
<width>1271</width>
<height>131</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 72pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>奎屯银力棉油机械有限公司</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>500</x>
<y>260</y>
<width>1151</width>
<height>141</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 72pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>籽棉异纤杂质分选机</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout" stretch="5,1">
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>GroupBox</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QPushButton" name="btn_goto_sort">
<property name="text">
<string>停止</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="btn_0to3">
<property name="text">
<string>喷阀测试</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButtonStart">
<property name="text">
<string>开始</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>保存图片</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>连接状态:</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>下位机</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lab_lowermachine_isconnect">
<property name="palette">
<palette>
<active>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>246</red>
<green>233</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>246</red>
<green>233</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>212</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>246</red>
<green>233</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_reconnect">
<property name="text">
<string>重新连接</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="6,10">
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="4,10">
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="minimumSize">
<size>
<width>450</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>控制及状态</string>
</property>
@ -98,16 +247,9 @@
</property>
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>48</pointsize>
<italic>false</italic>
<bold>false</bold>
<pointsize>28</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font: 48pt &quot;Microsoft YaHei UI&quot;;
color: rgb(34, 40, 49);</string>
</property>
<property name="text">
<string>状态</string>
</property>
@ -118,128 +260,27 @@ color: rgb(34, 40, 49);</string>
<property name="minimumSize">
<size>
<width>70</width>
<height>170</height>
<height>200</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">/* btn_start 样式 */
QPushButton#btn_start {
background-color: #4b5b47; /* 暗绿色背景 */
color: #f5efe7; /* 白色文字 */
border: 2px solid #145A32; /* 更深的绿色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 粗体字 */
font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; /* 字体族 */
}
QPushButton#btn_start:hover {
background-color: #28b45d; /* 稍亮的暗绿色背景 */
border: 2px solid #1f8a4d; /* 暗绿色边框 */
}
QPushButton#btn_start:pressed {
background-color: #186a3b; /* 更深的绿色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #134d33; /* 更深的绿色边框 */
}
QPushButton#btn_start:disabled {
background-color: #7F8C8D; /* 灰色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #7F8C8D; /* 灰色边框 */
}</string>
<string notr="true">font: 700 40pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>开始分选</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_stop">
<property name="minimumSize">
<size>
<width>70</width>
<height>170</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">/* btn_stop 样式 */
QPushButton#btn_stop
{
background-color: #be9970; /* 暗红色背景 */
color: #ffffff; /* 白色文字 */
border: 2px solid #641e16; /* 更深的红色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 粗体字 */
font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; /* 字体族 */
}
QPushButton#btn_stop:hover {
background-color: #cb4335; /* 稍亮的暗红色背景 */
border: 2px solid #a93226; /* 暗红色边框 */
}
QPushButton#btn_stop:pressed {
background-color: #7b241c; /* 更深的红色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #641e16; /* 更深的红色边框 */
}
QPushButton#btn_stop:disabled {
background-color: #7F8C8D; /* 灰色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #7F8C8D; /* 灰色边框 */
}
</string>
</property>
<property name="text">
<string>停止分选</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_take_photos">
<property name="minimumSize">
<size>
<width>70</width>
<height>170</height>
<height>200</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">/* btn_take_photos 样式 */
QPushButton#btn_take_photos {
background-color: #7c8876; /* 暗蓝色背景 */
color: #ffffff; /* 白色文字 */
border: 2px solid #145a86; /* 更深的蓝色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 粗体字 */
font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; /* 字体族 */
}
QPushButton#btn_take_photos:hover {
background-color: #2e86c1; /* 稍亮的暗蓝色背景 */
border: 2px solid #21618c; /* 暗蓝色边框 */
}
QPushButton#btn_take_photos:pressed {
background-color: #145a86; /* 更深的蓝色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #0f3b6b; /* 更深的蓝色边框 */
}
QPushButton#btn_take_photos:disabled {
background-color: #7F8C8D; /* 灰色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #7F8C8D; /* 灰色边框 */
}
</string>
<string notr="true">font: 700 40pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>抓取图片</string>
@ -247,45 +288,18 @@ QPushButton#btn_take_photos:disabled {
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_set_valve">
<widget class="QPushButton" name="btn_stop">
<property name="minimumSize">
<size>
<width>0</width>
<height>170</height>
<width>70</width>
<height>200</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">/* btn_set_value 样式 */
QPushButton#btn_set_valve {
background-color: #be9970; /* 橙色背景 */
color: #ffffff; /* 白色文字 */
border: 2px solid #d68910; /* 深橙色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 粗体字 */
font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; /* 字体族 */
}
QPushButton#btn_set_valve:hover {
background-color: #f1c40f; /* 亮橙色背景 */
border: 2px solid #f39c12; /* 橙色边框 */
}
QPushButton#btn_set_valve:pressed {
background-color: #d68910; /* 深橙色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #b9770e; /* 更深的橙色边框 */
}
QPushButton#btn_set_valve:disabled {
background-color: #7F8C8D; /* 灰色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #7F8C8D; /* 灰色边框 */
}</string>
<string notr="true">font: 700 40pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>设置参数</string>
<string>停止分选</string>
</property>
</widget>
</item>
@ -294,38 +308,11 @@ QPushButton#btn_set_valve:disabled {
<property name="minimumSize">
<size>
<width>70</width>
<height>170</height>
<height>200</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">/* btn_quit 样式 */
QPushButton#btn_quit {
background-color: #716244; /* 红色背景 */
color: #ffffff; /* 白色文字 */
border: 2px solid #922b21; /* 深红色边框 */
padding: 20px 40px; /* 内边距 */
border-radius: 12px; /* 圆角半径 */
font-size: 48px; /* 字体大小 */
font-weight: bold; /* 粗体字 */
font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; /* 字体族 */
}
QPushButton#btn_quit:hover {
background-color: #e74c3c; /* 亮红色背景 */
border: 2px solid #c0392b; /* 红色边框 */
}
QPushButton#btn_quit:pressed {
background-color: #922b21; /* 深红色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #641e16; /* 更深的红色边框 */
}
QPushButton#btn_quit:disabled {
background-color: #7F8C8D; /* 灰色背景 */
color: #BDC3C7; /* 灰色文字 */
border: 2px solid #7F8C8D; /* 灰色边框 */
}</string>
<string notr="true">font: 700 40pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>退出系统</string>
@ -334,9 +321,6 @@ QPushButton#btn_quit:disabled {
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
@ -354,7 +338,7 @@ QPushButton#btn_quit:disabled {
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
<enum>QFrame::NoFrame</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
@ -369,9 +353,6 @@ QPushButton#btn_quit:disabled {
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>864</width>
@ -393,7 +374,7 @@ QPushButton#btn_quit:disabled {
<item>
<widget class="QCheckBox" name="tra_enable_1">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
@ -452,9 +433,7 @@ QPushButton#btn_quit:disabled {
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(129, 129, 129);
border: 4px solid black;
border-radius: 12px; /* 圆角半径 */</string>
border: 4px solid black;</string>
</property>
<property name="lineWidth">
<number>1</number>
@ -467,7 +446,7 @@ border: 4px solid black;
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
<enum>QFrame::NoFrame</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
@ -482,9 +461,6 @@ border: 4px solid black;
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>840</width>
@ -506,7 +482,7 @@ border: 4px solid black;
<item>
<widget class="QCheckBox" name="tra_enable_0">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
@ -568,8 +544,7 @@ border: 4px solid black;
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(129, 129, 129);
border: 4px solid black;
border-radius: 12px; /* 圆角半径 */</string>
border: 4px solid black;</string>
</property>
<property name="lineWidth">
<number>1</number>
@ -601,6 +576,7 @@ border: 4px solid black;
<font>
<family>Microsoft YaHei UI</family>
<pointsize>48</pointsize>
<weight>87</weight>
<italic>false</italic>
<bold>true</bold>
</font>
@ -618,7 +594,7 @@ border: 4px solid black;
<x>30</x>
<y>130</y>
<width>771</width>
<height>651</height>
<height>591</height>
</rect>
</property>
<property name="styleSheet">
@ -631,8 +607,8 @@ border-color: rgb(0, 0, 0);</string>
<widget class="QPushButton" name="btn_set_lower">
<property name="geometry">
<rect>
<x>30</x>
<y>470</y>
<x>430</x>
<y>410</y>
<width>231</width>
<height>141</height>
</rect>
@ -641,119 +617,95 @@ border-color: rgb(0, 0, 0);</string>
<string>设定参数</string>
</property>
</widget>
<widget class="QFrame" name="frame_3">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>698</width>
<height>373</height>
<x>460</x>
<y>120</y>
<width>205</width>
<height>241</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_delaytime">
<property name="styleSheet">
<string notr="true">font: 700 48pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>延迟时间</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_encoder">
<property name="styleSheet">
<string notr="true">font: 700 48pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>相机行频</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_encoder_2">
<property name="styleSheet">
<string notr="true">font: 700 48pt &quot;Microsoft YaHei UI&quot;;</string>
</property>
<property name="text">
<string>喷阀频率</string>
</property>
</widget>
</item>
</layout>
<widget class="QSpinBox" name="spinbox_delaytime">
<property name="minimum">
<number>1000</number>
</property>
<property name="maximum">
<number>1400</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>1200</number>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QSpinBox" name="spinbox_delaytime">
<property name="minimum">
<number>1000</number>
</property>
<property name="maximum">
<number>1400</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>1200</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinbox_encoder">
<property name="minimum">
<number>8000</number>
</property>
<property name="maximum">
<number>13000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>12000</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinbox_valve">
<property name="minimum">
<number>150</number>
</property>
<property name="maximum">
<number>250</number>
</property>
<property name="value">
<number>200</number>
</property>
</widget>
</item>
</layout>
<widget class="QSpinBox" name="spinbox_encoder">
<property name="minimum">
<number>8000</number>
</property>
<property name="maximum">
<number>13000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>12000</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinbox_valve">
<property name="minimum">
<number>150</number>
</property>
<property name="maximum">
<number>250</number>
</property>
<property name="value">
<number>200</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_tab3_backtab2">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>480</x>
<y>470</y>
<width>231</width>
<height>141</height>
<x>30</x>
<y>120</y>
<width>360</width>
<height>251</height>
</rect>
</property>
<property name="text">
<string>返回</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_delaytime">
<property name="text">
<string>延迟时间</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_encoder">
<property name="text">
<string>相机行频</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_encoder_2">
<property name="text">
<string>喷阀频率</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QLabel" name="label_title_4">