Commit 914ec9fd authored by ym0408's avatar ym0408

1

parent 1700a02c
Default.png

27.6 KB

//#include "MultiFunctionDialog.h"
//#include "ui_MultiFunctionDialog.h"
//MultiFunctionDialog::MultiFunctionDialog(DialogType type,QWidget *parent) :
// QDialog(parent),m_dialogType(type),
// ui(new Ui::MultiFunctionDialog)
//{
// //ui->setupUi(this);
// setWindowFlags(Qt::FramelessWindowHint);
// // 弹窗基础样式
// setWindowTitle("选择设置");
// setFixedSize(1800, 800); // 统一弹窗大小(可根据类型微调)
// // 根据类型初始化对应的UI
// switch (m_dialogType) {
// case WorkStationType:
// setWindowTitle("请选择要设置的工位");
// initWorkStationUI();
// break;
// case DeviceType:
// setWindowTitle("请选择设备名称");
// initDeviceUI();
// break;
// case InspectionType:
// setWindowTitle("请选择抽检项类型");
// initInspectionUI();
// break;
// case TimeRangeType:
// setWindowTitle("请选择时间范围");
// setFixedSize(400, 320); // 时间弹窗稍大
// initTimeRangeUI();
// break;
// }
//}
//MultiFunctionDialog::~MultiFunctionDialog()
//{
// delete ui;
//}
//// -------------------------- 1. 初始化工位选择UI --------------------------
//void MultiFunctionDialog::initWorkStationUI() {
// // 标题
// QLabel *titleLabel = new QLabel("请选择要设置的工位", this);
// titleLabel->setAlignment(Qt::AlignCenter);
// // 工位列表
// m_listWidget = new QListWidget(this);
// QStringList stations = {"KOER", "KOEO", "PEPS", "KOGH", "KMOK"};
// m_listWidget->addItems(stations);
// m_listWidget->setSelectionMode(QListWidget::SingleSelection);
// m_listWidget->setCurrentRow(2); // 默认选中PEPS
// // 列表样式
// m_listWidget->setStyleSheet(R"(
// QListWidget::item { padding: 8px; text-align: center; }
// QListWidget::item:selected { background-color: #f0f0f0; color: #00bcd4; }
// )");
// // 按钮
// QPushButton *confirmBtn = new QPushButton("确认修改", this);
// QPushButton *cancelBtn = new QPushButton("取消修改", this);
// confirmBtn->setStyleSheet("background-color: #00bcd4; color: white; padding: 8px; border: none; border-radius: 4px;");
// cancelBtn->setStyleSheet("background-color: #e0e0e0; color: #333; padding: 8px; border: none; border-radius: 4px;");
// // 布局
// QVBoxLayout *mainLayout = new QVBoxLayout(this);
// QHBoxLayout *btnLayout = new QHBoxLayout;
// btnLayout->addWidget(confirmBtn);
// btnLayout->addWidget(cancelBtn);
// mainLayout->addWidget(titleLabel);
// mainLayout->addWidget(m_listWidget);
// mainLayout->addLayout(btnLayout);
// // 绑定按钮事件
// connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
// connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
//}
//// -------------------------- 2. 初始化设备选择UI --------------------------
//void MultiFunctionDialog::initDeviceUI() {
// QLabel *titleLabel = new QLabel("请选择设备名称", this);
// titleLabel->setAlignment(Qt::AlignCenter);
// m_listWidget = new QListWidget(this);
// QStringList devices = {"设备A", "设备B", "设备C", "设备D", "设备E"};
// m_listWidget->addItems(devices);
// m_listWidget->setSelectionMode(QListWidget::SingleSelection);
// m_listWidget->setCurrentRow(0);
// m_listWidget->setStyleSheet(R"(
// QListWidget::item { padding: 8px; text-align: center; }
// QListWidget::item:selected { background-color: #f0f0f0; color: #00bcd4; }
// )");
// QPushButton *confirmBtn = new QPushButton("确认", this);
// QPushButton *cancelBtn = new QPushButton("取消", this);
// confirmBtn->setStyleSheet("background-color: #00bcd4; color: white; padding: 8px; border: none; border-radius: 4px;");
// cancelBtn->setStyleSheet("background-color: #e0e0e0; color: #333; padding: 8px; border: none; border-radius: 4px;");
// QVBoxLayout *mainLayout = new QVBoxLayout(this);
// QHBoxLayout *btnLayout = new QHBoxLayout;
// btnLayout->addWidget(confirmBtn);
// btnLayout->addWidget(cancelBtn);
// mainLayout->addWidget(titleLabel);
// mainLayout->addWidget(m_listWidget);
// mainLayout->addLayout(btnLayout);
// connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
// connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
//}
//// -------------------------- 3. 初始化抽检项选择UI --------------------------
//void MultiFunctionDialog::initInspectionUI() {
// QLabel *titleLabel = new QLabel("请选择抽检项类型", this);
// titleLabel->setAlignment(Qt::AlignCenter);
// // 单选按钮组
// m_radioGroup = new QButtonGroup(this);
// QRadioButton *rbMust = new QRadioButton("必检", this);
// QRadioButton *rbSample = new QRadioButton("抽检", this);
// QRadioButton *rbBoth = new QRadioButton("必检&抽检", this);
// m_radioGroup->addButton(rbMust);
// m_radioGroup->addButton(rbSample);
// m_radioGroup->addButton(rbBoth);
// rbBoth->setChecked(true); // 默认选中
// // 单选按钮样式
// rbMust->setStyleSheet("margin: 8px; font-size: 14px;");
// rbSample->setStyleSheet("margin: 8px; font-size: 14px;");
// rbBoth->setStyleSheet("margin: 8px; font-size: 14px;");
// QPushButton *confirmBtn = new QPushButton("确认", this);
// QPushButton *cancelBtn = new QPushButton("取消", this);
// confirmBtn->setStyleSheet("background-color: #00bcd4; color: white; padding: 8px; border: none; border-radius: 4px;");
// cancelBtn->setStyleSheet("background-color: #e0e0e0; color: #333; padding: 8px; border: none; border-radius: 4px;");
// QVBoxLayout *mainLayout = new QVBoxLayout(this);
// QHBoxLayout *btnLayout = new QHBoxLayout;
// btnLayout->addWidget(confirmBtn);
// btnLayout->addWidget(cancelBtn);
// mainLayout->addWidget(titleLabel);
// mainLayout->addWidget(rbMust);
// mainLayout->addWidget(rbSample);
// mainLayout->addWidget(rbBoth);
// mainLayout->addLayout(btnLayout);
// connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
// connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
//}
//// -------------------------- 4. 初始化时间范围选择UI --------------------------
//void MultiFunctionDialog::initTimeRangeUI() {
// QLabel *titleLabel = new QLabel("请选择时间范围", this);
// titleLabel->setAlignment(Qt::AlignCenter);
// // 日历控件(辅助选择)
// QCalendarWidget *calendar = new QCalendarWidget(this);
// calendar->setSelectedDate(QDate::currentDate());
// calendar->setGridVisible(true);
// calendar->setMaximumHeight(180);
// // 日期编辑框
// QLabel *startLabel = new QLabel("开始日期:", this);
// QLabel *endLabel = new QLabel("结束日期:", this);
// m_startDateEdit = new QDateEdit(QDate::currentDate(), this);
// m_endDateEdit = new QDateEdit(QDate::currentDate().addDays(2), this);
// m_startDateEdit->setCalendarPopup(true);
// m_endDateEdit->setCalendarPopup(true);
// m_startDateEdit->setFixedWidth(120);
// m_endDateEdit->setFixedWidth(120);
// // 日期布局
// QHBoxLayout *dateLayout = new QHBoxLayout;
// dateLayout->addWidget(startLabel);
// dateLayout->addWidget(m_startDateEdit);
// dateLayout->addSpacing(20);
// dateLayout->addWidget(endLabel);
// dateLayout->addWidget(m_endDateEdit);
// QPushButton *confirmBtn = new QPushButton("确认", this);
// QPushButton *cancelBtn = new QPushButton("取消", this);
// confirmBtn->setStyleSheet("background-color: #00bcd4; color: white; padding: 8px; border: none; border-radius: 4px;");
// cancelBtn->setStyleSheet("background-color: #e0e0e0; color: #333; padding: 8px; border: none; border-radius: 4px;");
// QVBoxLayout *mainLayout = new QVBoxLayout(this);
// QHBoxLayout *btnLayout = new QHBoxLayout;
// btnLayout->addWidget(confirmBtn);
// btnLayout->addWidget(cancelBtn);
// mainLayout->addWidget(titleLabel);
// mainLayout->addWidget(calendar);
// mainLayout->addLayout(dateLayout);
// mainLayout->addLayout(btnLayout);
// connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
// connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
//}
//// -------------------------- 获取选择结果 --------------------------
//QString MultiFunctionDialog::getStringResult() const {
// switch (m_dialogType) {
// case WorkStationType:
// // 返回选中的工位
// if (m_listWidget->currentItem()) {
// return m_listWidget->currentItem()->text();
// }
// break;
// case DeviceType:
// // 返回选中的设备
// if (m_listWidget->currentItem()) {
// return m_listWidget->currentItem()->text();
// }
// break;
// case InspectionType:
// // 返回选中的抽检项
// if (m_radioGroup->checkedButton()) {
// return m_radioGroup->checkedButton()->text();
// }
// break;
// default:
// break;
// }
// return "";
//}
//QPair<QDate, QDate> MultiFunctionDialog::getTimeRangeResult() const {
// // 仅时间范围弹窗返回日期对
// if (m_dialogType == TimeRangeType) {
// return {m_startDateEdit->date(), m_endDateEdit->date()};
// }
// return {QDate(), QDate()};
//}
#include "MultiFunctionDialog.h"
#include "ui_MultiFunctionDialog.h"
#include <QStyleOption>
#include <QPainter> // 用于绘制弹窗圆角(必须包含)
MultiFunctionDialog::MultiFunctionDialog(DialogType type,QWidget *parent) :
QDialog(parent),m_dialogType(type),
ui(new Ui::MultiFunctionDialog)
{
//ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
// -------------------------- 关键修改1:弹窗样式(白色背景+圆角+边框) --------------------------
setStyleSheet(R"(
QDialog {
background-color: white; /* 弹窗背景设为白色,非透明 */
border-radius: 12px; /* 弹窗圆角(可调整数值,越大越圆) */
border: 1px solid #f0f0f0; /* 可选:添加淡灰色边框,更显圆角效果 */
}
)");
// 弹窗基础设置
setWindowTitle("选择设置");
setFixedSize(1900, 700); // 修正:原1800x800太大,改为适配弹窗的尺寸(可按需调整)
move(40,440);
// 根据类型初始化对应的UI
switch (m_dialogType) {
case WorkStationType:
setWindowTitle("请选择要设置的工位");
initWorkStationUI();
break;
case DeviceType:
setWindowTitle("请选择设备名称");
initDeviceUI();
break;
case InspectionType:
setWindowTitle("请选择抽检项类型");
initInspectionUI();
break;
case TimeRangeType:
setWindowTitle("请选择时间范围");
setFixedSize(400, 320); // 时间弹窗稍大
initTimeRangeUI();
break;
}
}
MultiFunctionDialog::~MultiFunctionDialog()
{
delete ui;
}
// -------------------------- 关键补充:重写paintEvent实现圆角(必须,否则弹窗圆角不生效) --------------------------
void MultiFunctionDialog::paintEvent(QPaintEvent *event) {
QStyleOption opt;
opt.initFrom(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
QDialog::paintEvent(event);
}
// -------------------------- 1. 初始化工位选择UI --------------------------
void MultiFunctionDialog::initWorkStationUI() {
// 标题
QLabel *titleLabel = new QLabel("请选择要设置的工位", this);
titleLabel->setAlignment(Qt::AlignLeft);
titleLabel->setStyleSheet("font-size: 25px; font-weight: bold; margin-bottom: 15px;"); // 标题加粗加大,增加底部间距
// 工位列表
m_listWidget = new QListWidget(this);
QStringList stations = {"KOER", "KOEO", "PEPS", "KOGH", "KMOK"};
m_listWidget->addItems(stations);
m_listWidget->setSelectionMode(QListWidget::SingleSelection);
m_listWidget->setCurrentRow(2); // 默认选中PEPS
for (int i = 0; i < m_listWidget->count(); ++i)
{
QListWidgetItem *item = m_listWidget->item(i);
item->setTextAlignment(Qt::AlignCenter); // 等同于 Qt::AlignHCenter | Qt::AlignVCenter
}
// 列表样式
m_listWidget->setStyleSheet(R"(
QListWidget { border: none;
outline: none;
font-size: 40px;
} /* 去掉列表边框 */
QListWidget::item {
padding: 12px; /* 选项内边距加大,更宽松 */
text-align: center;
outline: none;
}
QListWidget::item:selected {
background-color: #f0f0f0;
color: #000000;
border-radius: 8px; /* 选中项也加圆角(可选) */
outline: none;
}
)");
// 按钮
QPushButton *confirmBtn = new QPushButton("确认修改", this);
QPushButton *cancelBtn = new QPushButton("取消修改", this);
// -------------------------- 关键修改2:按钮圆角加大(border-radius调整为16px) --------------------------
confirmBtn->setStyleSheet(R"(
QPushButton {
background-color:#1EC9D4;
color: white;
padding: 10px; /* 按钮内边距加大,更饱满 */
border: none;
border-radius: 16px; /* 按钮圆角(越大越圆,推荐16px) */
font-size: 25px;
width: 800px; /* 固定宽度 */
height: 70px; /* 固定高度 */
}
QPushButton:hover {
background-color: #00acc1; /* hover时加深颜色(可选) */
}
)");
cancelBtn->setStyleSheet(R"(
QPushButton {
background-color: #e0e0e0;
color: #333;
padding: 10px;
border: none;
border-radius: 16px; /* 取消按钮同样加大圆角 */
font-size: 25px;
width: 800px; /* 固定宽度 */
height: 70px; /* 固定高度 */
}
QPushButton:hover {
background-color: #d0d0d0; /* hover时加深颜色(可选) */
}
)");
// 布局
QVBoxLayout *mainLayout = new QVBoxLayout(this);
// 布局内边距(避免内容贴弹窗边缘)
mainLayout->setContentsMargins(20, 20, 20, 20);
// 布局间距(控件之间的距离)
mainLayout->setSpacing(15);
QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12); // 两个按钮之间的间距
btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel);
mainLayout->addWidget(m_listWidget);
mainLayout->addLayout(btnLayout);
// 绑定按钮事件
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
}
// -------------------------- 2. 初始化设备选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initDeviceUI() {
QLabel *titleLabel = new QLabel("请选择设备名称", this);
titleLabel->setAlignment(Qt::AlignLeft);
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;margin-left: 10px;");
m_listWidget = new QListWidget(this);
QStringList devices = {"设备A", "设备B", "设备C", "设备D", "设备E"};
m_listWidget->addItems(devices);
m_listWidget->setSelectionMode(QListWidget::SingleSelection);
m_listWidget->setCurrentRow(0);
m_listWidget->setStyleSheet(R"(
QListWidget { border: none; }
QListWidget::item { padding: 12px; text-align: center; font-size: 14px; }
QListWidget::item:selected { background-color: #f0f0f0; color: #00bcd4; border-radius: 8px; }
)");
QPushButton *confirmBtn = new QPushButton("确认", this);
QPushButton *cancelBtn = new QPushButton("取消", this);
// 按钮圆角同步加大
confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #00acc1; }
)");
cancelBtn->setStyleSheet(R"(
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #d0d0d0; }
)");
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20);
mainLayout->setSpacing(15);
QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel);
mainLayout->addWidget(m_listWidget);
mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
}
// -------------------------- 3. 初始化抽检项选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initInspectionUI() {
QLabel *titleLabel = new QLabel("请选择抽检项类型", this);
titleLabel->setAlignment(Qt::AlignCenter);
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;");
// 单选按钮组
m_radioGroup = new QButtonGroup(this);
QRadioButton *rbMust = new QRadioButton("必检", this);
QRadioButton *rbSample = new QRadioButton("抽检", this);
QRadioButton *rbBoth = new QRadioButton("必检&抽检", this);
m_radioGroup->addButton(rbMust);
m_radioGroup->addButton(rbSample);
m_radioGroup->addButton(rbBoth);
rbBoth->setChecked(true); // 默认选中
// 单选按钮样式优化
rbMust->setStyleSheet("margin: 12px; font-size: 16px;");
rbSample->setStyleSheet("margin: 12px; font-size: 16px;");
rbBoth->setStyleSheet("margin: 12px; font-size: 16px;");
QPushButton *confirmBtn = new QPushButton("确认", this);
QPushButton *cancelBtn = new QPushButton("取消", this);
// 按钮圆角同步加大
confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #00acc1; }
)");
cancelBtn->setStyleSheet(R"(
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #d0d0d0; }
)");
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20);
mainLayout->setSpacing(15);
QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel);
mainLayout->addWidget(rbMust);
mainLayout->addWidget(rbSample);
mainLayout->addWidget(rbBoth);
mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
}
// -------------------------- 4. 初始化时间范围选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initTimeRangeUI() {
QLabel *titleLabel = new QLabel("请选择时间范围", this);
titleLabel->setAlignment(Qt::AlignCenter);
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;");
// 日历控件(辅助选择)
QCalendarWidget *calendar = new QCalendarWidget(this);
calendar->setSelectedDate(QDate::currentDate());
calendar->setGridVisible(true);
calendar->setMaximumHeight(180);
calendar->setStyleSheet("border: none;"); // 去掉日历边框
// 日期编辑框
QLabel *startLabel = new QLabel("开始日期:", this);
QLabel *endLabel = new QLabel("结束日期:", this);
m_startDateEdit = new QDateEdit(QDate::currentDate(), this);
m_endDateEdit = new QDateEdit(QDate::currentDate().addDays(2), this);
m_startDateEdit->setCalendarPopup(true);
m_endDateEdit->setCalendarPopup(true);
m_startDateEdit->setFixedWidth(120);
m_endDateEdit->setFixedWidth(120);
// 日期编辑框样式优化
m_startDateEdit->setStyleSheet(R"(
QDateEdit {
padding: 6px;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
}
)");
m_endDateEdit->setStyleSheet(R"(
QDateEdit {
padding: 6px;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
}
)");
// 日期布局
QHBoxLayout *dateLayout = new QHBoxLayout;
dateLayout->addWidget(startLabel);
dateLayout->addWidget(m_startDateEdit);
dateLayout->addSpacing(20);
dateLayout->addWidget(endLabel);
dateLayout->addWidget(m_endDateEdit);
QPushButton *confirmBtn = new QPushButton("确认", this);
QPushButton *cancelBtn = new QPushButton("取消", this);
// 按钮圆角同步加大
confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #00acc1; }
)");
cancelBtn->setStyleSheet(R"(
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #d0d0d0; }
)");
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20);
mainLayout->setSpacing(15);
QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel);
mainLayout->addWidget(calendar);
mainLayout->addLayout(dateLayout);
mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
}
// -------------------------- 获取选择结果 --------------------------
QString MultiFunctionDialog::getStringResult() const {
switch (m_dialogType) {
case WorkStationType:
// 返回选中的工位
if (m_listWidget->currentItem()) {
return m_listWidget->currentItem()->text();
}
break;
case DeviceType:
// 返回选中的设备
if (m_listWidget->currentItem()) {
return m_listWidget->currentItem()->text();
}
break;
case InspectionType:
// 返回选中的抽检项
if (m_radioGroup->checkedButton()) {
return m_radioGroup->checkedButton()->text();
}
break;
default:
break;
}
return "";
}
QPair<QDate, QDate> MultiFunctionDialog::getTimeRangeResult() const {
// 仅时间范围弹窗返回日期对
if (m_dialogType == TimeRangeType) {
return {m_startDateEdit->date(), m_endDateEdit->date()};
}
return {QDate(), QDate()};
}
#ifndef MULTIFUNCTIONDIALOG_H
#define MULTIFUNCTIONDIALOG_H
#include <QDialog>
#include <QLabel> // 解决 QLabel 未声明的问题
#include <QPushButton> // 解决 QPushButton 不完整类型的问题
#include <QListWidget> // 用到了 QListWidget
#include <QRadioButton> // 用到了 QRadioButton
#include <QButtonGroup> // 用到了 QButtonGroup
#include <QDateEdit> // 用到了 QDateEdit
#include <QCalendarWidget> // 用到了 QCalendarWidget
#include <QVBoxLayout> // 用到了布局
#include <QHBoxLayout>
// 枚举:4种弹窗类型
enum DialogType {
WorkStationType, // 工位选择
DeviceType, // 设备名称选择
InspectionType, // 抽检项选择
TimeRangeType // 时间范围选择
};
namespace Ui {
class MultiFunctionDialog;
}
class MultiFunctionDialog : public QDialog
{
Q_OBJECT
public:
explicit MultiFunctionDialog(DialogType type,QWidget *parent = nullptr);
~MultiFunctionDialog();
// 统一接口:获取选择结果(根据类型返回对应数据)
QString getStringResult() const; // 用于:工位/设备/抽检项(返回字符串)
QPair<QDate, QDate> getTimeRangeResult() const; // 用于:时间范围(返回日期对)
private:
// 根据类型创建对应的UI
void initWorkStationUI(); // 初始化工位选择UI
void initDeviceUI(); // 初始化设备选择UI
void initInspectionUI(); // 初始化抽检项选择UI
void initTimeRangeUI(); // 初始化时间范围选择UI
void paintEvent(QPaintEvent *event);
DialogType m_dialogType; // 当前弹窗类型
QListWidget *m_listWidget; // 列表控件(工位/设备用)
QButtonGroup *m_radioGroup; // 单选按钮组(抽检项用)
QDateEdit *m_startDateEdit; // 开始日期编辑框(时间用)
QDateEdit *m_endDateEdit; // 结束日期编辑框(时间用)
Ui::MultiFunctionDialog *ui;
};
#endif // MULTIFUNCTIONDIALOG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MultiFunctionDialog</class>
<widget class="QDialog" name="MultiFunctionDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1800</width>
<height>800</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="styleSheet">
<string notr="true">QDialog {
border: 1px solid #e0e0e0; /* 淡灰色边框 */
border-radius: 25px; /* 圆角(可选,图片中可能有轻微圆角) */
background-color: white; /* 弹窗背景色 */
}</string>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>30</x>
<y>40</y>
<width>281</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>请选择要设置的工位</string>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>180</x>
<y>170</y>
<width>256</width>
<height>192</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<item>
<property name="text">
<string>dsad</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
<item>
<property name="text">
<string>dad</string>
</property>
</item>
<item>
<property name="text">
<string>dad</string>
</property>
</item>
<item>
<property name="text">
<string>fsd</string>
</property>
</item>
</widget>
</widget>
<resources/>
<connections/>
</ui>
...@@ -16,19 +16,22 @@ DEFINES += QT_DEPRECATED_WARNINGS ...@@ -16,19 +16,22 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \ SOURCES += \
MultiFunctionDialog.cpp \
main.cpp \ main.cpp \
carMachineDetectionWidget.cpp \ carMachineDetectionWidget.cpp
pageSoftwareControl.cpp
HEADERS += \ HEADERS += \
carMachineDetectionWidget.h \ MultiFunctionDialog.h \
pageSoftwareControl.h carMachineDetectionWidget.h
FORMS += \ FORMS += \
carMachineDetectionWidget.ui \ MultiFunctionDialog.ui \
pageSoftwareControl.ui carMachineDetectionWidget.ui
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target !isEmpty(target.path): INSTALLS += target
RESOURCES += \
q.qrc
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2025-12-01T18:01:53. --> <!-- Written by QtCreator 4.11.1, 2025-12-03T10:14:14. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
...@@ -287,8 +287,9 @@ ...@@ -287,8 +287,9 @@
</valuelist> </valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value> <value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Qt/text/carMachineDetect/carMachineDetect.pro</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">carMachineDetect2</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/Qt/text/carMachineDetect/carMachineDetect.pro</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Qt/text/carMachineDetect1/carMachineDetect.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/Qt/text/carMachineDetect1/carMachineDetect.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value> <value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value> <value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value> <value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
...@@ -530,14 +531,14 @@ ...@@ -530,14 +531,14 @@
</valuelist> </valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value> <value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Qt/text/carMachineDetect1/carMachineDetect.pro</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/Qt/text/carMachineDetect1/carMachineDetect.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="QString" key="RunConfiguration.Arguments"></value> <value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value> <value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value> <value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value> <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value> <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
......
#include "carMachineDetectionWidget.h" #include "carMachineDetectionWidget.h"
#include "ui_carMachineDetectionWidget.h" #include "ui_carMachineDetectionWidget.h"
#include "MultiFunctionDialog.h"
#include <QMessageBox>
carMachineDetectionWidget::carMachineDetectionWidget(QWidget *parent) carMachineDetectionWidget::carMachineDetectionWidget(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
, ui(new Ui::carMachineDetectionWidget) , ui(new Ui::carMachineDetectionWidget)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowFullscreenButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowFullscreenButtonHint);
setMaximumSize(2000, 1300); setMaximumSize(2000, 1200);
ui->setupUi(this); ui->setupUi(this);
//初始状态
// ui->widget_search->hide();
// ui->SoftControlwidget->hide();
// ui->listWidget_history->hide();
// ui->tableWidget_cur->hide();
// ui->listWidget_cur->hide();
} }
carMachineDetectionWidget::~carMachineDetectionWidget() carMachineDetectionWidget::~carMachineDetectionWidget()
...@@ -19,5 +27,48 @@ carMachineDetectionWidget::~carMachineDetectionWidget() ...@@ -19,5 +27,48 @@ carMachineDetectionWidget::~carMachineDetectionWidget()
void carMachineDetectionWidget::on_pushButton_btnSoftwareControl_clicked() void carMachineDetectionWidget::on_pushButton_btnSoftwareControl_clicked()
{ {
ui->containerMain->hide();
ui->SoftControlwidget->show();
}
void carMachineDetectionWidget::on_pushButton_return_clicked()
{
ui->containerMain->show();
ui->SoftControlwidget->hide();
}
void carMachineDetectionWidget::on_pushButton_workName_clicked()
{
MultiFunctionDialog dialog(WorkStationType, this);
if (dialog.exec() == QDialog::Accepted) {
QString result = dialog.getStringResult();
if (!result.isEmpty()) {
QMessageBox::information(this, "选择结果", "选中工位:" + result);
// 业务逻辑:更新工位设置
}
}
}
void carMachineDetectionWidget::on_pushButton_deviceName_clicked()
{
MultiFunctionDialog dialog(DeviceType, this);
if (dialog.exec() == QDialog::Accepted) {
QString result = dialog.getStringResult();
if (!result.isEmpty()) {
QMessageBox::information(this, "选择结果", "选中设备:" + result);
// 业务逻辑:更新设备设置
}
}
}
void carMachineDetectionWidget::on_pushButton_inspectionItemt_clicked()
{
MultiFunctionDialog dialog(InspectionType, this);
if (dialog.exec() == QDialog::Accepted) {
QString result = dialog.getStringResult();
if (!result.isEmpty()) {
QMessageBox::information(this, "选择结果", "选中抽检项:" + result);
// 业务逻辑:更新抽检项设置
}
}
} }
...@@ -20,6 +20,14 @@ public: ...@@ -20,6 +20,14 @@ public:
private slots: private slots:
void on_pushButton_btnSoftwareControl_clicked(); void on_pushButton_btnSoftwareControl_clicked();
void on_pushButton_return_clicked();
void on_pushButton_workName_clicked();
void on_pushButton_deviceName_clicked();
void on_pushButton_inspectionItemt_clicked();
private: private:
Ui::carMachineDetectionWidget *ui; Ui::carMachineDetectionWidget *ui;
}; };
......
...@@ -7,9 +7,451 @@ ...@@ -7,9 +7,451 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>2000</width> <width>2000</width>
<height>1400</height> <height>1250</height>
</rect> </rect>
</property> </property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>170</green>
<blue>170</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>170</green>
<blue>170</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>170</green>
<blue>170</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string> 车机自动化测试客户端|客户端名称</string> <string> 车机自动化测试客户端|客户端名称</string>
</property> </property>
...@@ -22,17 +464,20 @@ ...@@ -22,17 +464,20 @@
background-color: #d9e2f1; background-color: #d9e2f1;
}</string> }</string>
</property> </property>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="statusFrame">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>50</x> <x>39</x>
<y>30</y> <y>70</y>
<width>1900</width> <width>1911</width>
<height>311</height> <height>191</height>
</rect> </rect>
</property> </property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame { <string notr="true">QFrame#statusFrame {
background-color: #E4EBF6; background-color: #E4EBF6;
border-radius: 25px; /* 圆角半径,数值越大越圆 */ border-radius: 25px; /* 圆角半径,数值越大越圆 */
border: none; /* 去掉QFrame默认边框(可选) */ border: none; /* 去掉QFrame默认边框(可选) */
...@@ -48,8 +493,8 @@ ...@@ -48,8 +493,8 @@
<widget class="QLabel" name="label_connectionStatus"> <widget class="QLabel" name="label_connectionStatus">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>50</x>
<y>60</y> <y>30</y>
<width>161</width> <width>161</width>
<height>61</height> <height>61</height>
</rect> </rect>
...@@ -57,7 +502,7 @@ ...@@ -57,7 +502,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>微软雅黑</family>
<pointsize>16</pointsize> <pointsize>22</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
...@@ -67,10 +512,10 @@ ...@@ -67,10 +512,10 @@
<widget class="QLabel" name="label_carSeries"> <widget class="QLabel" name="label_carSeries">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>80</x>
<y>200</y> <y>130</y>
<width>221</width> <width>151</width>
<height>51</height> <height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -86,10 +531,10 @@ ...@@ -86,10 +531,10 @@
<widget class="QLabel" name="label_carModel"> <widget class="QLabel" name="label_carModel">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>250</x> <x>300</x>
<y>200</y> <y>130</y>
<width>211</width> <width>211</width>
<height>51</height> <height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -105,25 +550,24 @@ ...@@ -105,25 +550,24 @@
<widget class="QPushButton" name="pushButton_start"> <widget class="QPushButton" name="pushButton_start">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1560</x> <x>1571</x>
<y>90</y> <y>77</y>
<width>291</width> <width>291</width>
<height>111</height> <height>81</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>微软雅黑</family>
<pointsize>12</pointsize> <pointsize>14</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"> QPushButton { <string notr="true"> QPushButton {
background-color: #1EC9D4; /* 主色调(蓝色) */ background-color: #1EC9D4; /* 主色调(蓝色) */
color: #FFFFFF; /* 中性灰文字 */ color: #FFFFFF;
border: none; /* 去掉原生边框 */ border: none; /* 去掉原生边框 */
border-radius: 25px; /* 圆角半径(车机建议10~20px) */ border-radius: 25px; /* 圆角半径(车机建议10~20px) */
padding: 10px 20px; /* 内边距:上下10px,左右20px(避免文字贴边) */
}</string> }</string>
</property> </property>
...@@ -131,31 +575,13 @@ ...@@ -131,31 +575,13 @@
<string>开始</string> <string>开始</string>
</property> </property>
</widget> </widget>
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>490</x>
<y>140</y>
<width>1021</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
<widget class="QLabel" name="label_startTime"> <widget class="QLabel" name="label_startTime">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>480</x> <x>830</x>
<y>200</y> <y>130</y>
<width>411</width> <width>411</width>
<height>51</height> <height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -164,6 +590,11 @@ ...@@ -164,6 +590,11 @@
<pointsize>11</pointsize> <pointsize>11</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text"> <property name="text">
<string>开始执行时间:--:--:--</string> <string>开始执行时间:--:--:--</string>
</property> </property>
...@@ -171,10 +602,10 @@ ...@@ -171,10 +602,10 @@
<widget class="QLabel" name="label_time"> <widget class="QLabel" name="label_time">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1130</x> <x>1240</x>
<y>200</y> <y>130</y>
<width>371</width> <width>411</width>
<height>51</height> <height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -183,15 +614,20 @@ ...@@ -183,15 +614,20 @@
<pointsize>11</pointsize> <pointsize>11</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">QLabel#label_time{
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text"> <property name="text">
<string> 执行时间:--:--:--</string> <string> 执行用时:--:--:--</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_StartupState"> <widget class="QLabel" name="label_StartupState">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>480</x> <x>800</x>
<y>40</y> <y>30</y>
<width>431</width> <width>431</width>
<height>51</height> <height>51</height>
</rect> </rect>
...@@ -199,7 +635,7 @@ ...@@ -199,7 +635,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>微软雅黑</family>
<pointsize>14</pointsize> <pointsize>16</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
...@@ -209,9 +645,9 @@ ...@@ -209,9 +645,9 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>400</x> <x>470</x>
<y>10</y> <y>10</y>
<width>54</width> <width>41</width>
<height>271</height> <height>271</height>
</rect> </rect>
</property> </property>
...@@ -229,8 +665,8 @@ ...@@ -229,8 +665,8 @@
<widget class="QLabel" name="label_inspectionType"> <widget class="QLabel" name="label_inspectionType">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>170</x> <x>210</x>
<y>90</y> <y>50</y>
<width>71</width> <width>71</width>
<height>31</height> <height>31</height>
</rect> </rect>
...@@ -243,8 +679,8 @@ ...@@ -243,8 +679,8 @@
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QLabel { <string notr="true">QLabel {
color: #409EFF; /* 浅蓝色文字(和图中一致) */ color: #23C6D9; /* 浅蓝色文字(和图中一致) */
background-color: #E6F7FF; /* 浅蓝背景(和图中一致) */ background-color: #CAEBF1; /* 浅蓝背景(和图中一致) */
border-radius: 10px; /* 可选:轻微圆角更美观,不需要可删除 */ border-radius: 10px; /* 可选:轻微圆角更美观,不需要可删除 */
padding: 2px 4px; /* 内边距避免文字贴边 */ padding: 2px 4px; /* 内边距避免文字贴边 */
}</string> }</string>
...@@ -253,14 +689,171 @@ ...@@ -253,14 +689,171 @@
<string>必检</string> <string>必检</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_stpicture">
<property name="geometry">
<rect>
<x>800</x>
<y>141</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#label_stpicture {
border-image: url(:/startTime.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_car">
<property name="geometry">
<rect>
<x>635</x>
<y>50</y>
<width>141</width>
<height>111</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#label_car
{
border-image: url(:/hcar.png);
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_tpicture">
<property name="geometry">
<rect>
<x>1215</x>
<y>141</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#label_tpicture {
border-image: url(:/time.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_carSeriesp">
<property name="geometry">
<rect>
<x>50</x>
<y>141</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#label_carSeriesp{
border-image: url(:/carSeries.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_carModelp">
<property name="geometry">
<rect>
<x>270</x>
<y>141</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#label_carModelp{
border-image: url(:/carModel.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>797</x>
<y>99</y>
<width>721</width>
<height>10</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true"> QProgressBar {
border: 2px solid #E4EBF6; /* 边框颜色 */
border-radius: 25px; /* 边框圆角 */
background-color: #ecf0f1; /* 进度条背景色(未填充部分) */
height: 20px; /* 进度条高度 */
}
QProgressBar::chunk {
background-color: #1EC9D4; /* 进度条填充颜色(核心) */
border-radius: 25px; /* 填充部分圆角(与外层呼应) */
background-image: linear-gradient(to right, #3498db, #2ecc71); /* 渐变颜色(可选) */
}</string>
</property>
<property name="value">
<number>24</number>
</property>
<property name="textVisible">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="textDirection">
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_bar">
<property name="geometry">
<rect>
<x>1445</x>
<y>30</y>
<width>131</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>0%</string>
</property>
</widget>
</widget> </widget>
<widget class="QWidget" name="containerMain" native="true"> <widget class="QWidget" name="containerMain" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>400</y> <y>290</y>
<width>2000</width> <width>2000</width>
<height>1000</height> <height>921</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
...@@ -295,8 +888,8 @@ ...@@ -295,8 +888,8 @@
/* 2. 标签栏整体 */ /* 2. 标签栏整体 */
QTabBar { QTabBar {
background-color: #D9E2F1; /* 透明,继承整体背景 */ background-color: #D9E2F1; /* 透明,继承整体背景 */
qproperty-alignment: AlignCenter; /* 标签居中(车机常用) */
} }
/* 3. 单个标签(未选中状态) */ /* 3. 单个标签(未选中状态) */
...@@ -331,7 +924,7 @@ ...@@ -331,7 +924,7 @@
}</string> }</string>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
...@@ -339,7 +932,7 @@ ...@@ -339,7 +932,7 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab_cur">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
...@@ -357,7 +950,7 @@ ...@@ -357,7 +950,7 @@
<number>30</number> <number>30</number>
</property> </property>
<item> <item>
<widget class="QTableWidget" name="tableWidget"> <widget class="QTableWidget" name="tableWidget_cur">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
...@@ -587,7 +1180,6 @@ QHeaderView::horizontal { ...@@ -587,7 +1180,6 @@ QHeaderView::horizontal {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #F0F7FC, stop:1 #F0F7FC); background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #F0F7FC, stop:1 #F0F7FC);
border-radius: 25px; /* 表头整体圆角 */ border-radius: 25px; /* 表头整体圆角 */
border: none; border: none;
clip: rect(0px, auto, auto, 0px); /* 强制裁剪 */
padding: 0; /* 清除内边距 */ padding: 0; /* 清除内边距 */
margin: 0; margin: 0;
} }
...@@ -676,7 +1268,6 @@ QListWidget#listWidget_cur { ...@@ -676,7 +1268,6 @@ QListWidget#listWidget_cur {
border-left: 1px solid #B3D9F2; border-left: 1px solid #B3D9F2;
border-radius: 8px; border-radius: 8px;
padding: 10px 0; padding: 10px 0;
clip: rect(0px, auto, auto, 0px);
} }
/* 列表项(透明,继承整体背景) */ /* 列表项(透明,继承整体背景) */
...@@ -693,18 +1284,7 @@ QListWidget#listWidget_cur::item { ...@@ -693,18 +1284,7 @@ QListWidget#listWidget_cur::item {
selection-background-color: transparent; /* 选中背景透明 */ selection-background-color: transparent; /* 选中背景透明 */
selection-color: #333333; /* 选中文字颜色不变 */ selection-color: #333333; /* 选中文字颜色不变 */
} }
/* ---------- 第一列:操作文本样式 ---------- */ </string>
QLabel#logOperationLabel {
font-size: 25px; /* 第一列字体25px(你需要的大小) */
color: #333333; /* 第一列文字深灰 */
font-weight: 500; /* 可选:文字加粗 */
}
/* ---------- 其他列:时间样式 ---------- */
QLabel#logTimeLabel {
font-size: 16px; /* 其他列字体更小 */
color: #666666; /* 其他列文字浅灰 */
}</string>
</property> </property>
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>false</bool> <bool>false</bool>
...@@ -729,7 +1309,7 @@ QLabel#logTimeLabel { ...@@ -729,7 +1309,7 @@ QLabel#logTimeLabel {
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_history">
<attribute name="title"> <attribute name="title">
<string>历史执行任务</string> <string>历史执行任务</string>
</attribute> </attribute>
...@@ -739,7 +1319,7 @@ QLabel#logTimeLabel { ...@@ -739,7 +1319,7 @@ QLabel#logTimeLabel {
<x>1364</x> <x>1364</x>
<y>140</y> <y>140</y>
<width>511</width> <width>511</width>
<height>551</height> <height>561</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -755,7 +1335,6 @@ QListWidget#listWidget_history { ...@@ -755,7 +1335,6 @@ QListWidget#listWidget_history {
border-left: 1px solid #B3D9F2; /* 左侧分隔线 */ border-left: 1px solid #B3D9F2; /* 左侧分隔线 */
border-radius: 25px; /* 圆角 */ border-radius: 25px; /* 圆角 */
padding: 10px 0; /* 上下内边距 */ padding: 10px 0; /* 上下内边距 */
clip: rect(0px, auto, auto, 0px); /* 裁剪内容适配圆角 */
} }
/* 列表项样式(合并重复定义,禁用选中/hover效果) */ /* 列表项样式(合并重复定义,禁用选中/hover效果) */
...@@ -767,19 +1346,7 @@ QListWidget#listWidget_history::item { ...@@ -767,19 +1346,7 @@ QListWidget#listWidget_history::item {
selection-background-color: transparent; selection-background-color: transparent;
selection-color: #333333; selection-color: #333333;
} }
</string>
/* ---------- 第一列:操作文本样式 ---------- */
QLabel#logOperationLabel {
font-size: 25px; /* 第一列字体大小 */
color: #333333; /* 文字颜色 */
font-weight: 500; /* 文字加粗 */
}
/* ---------- 其他列:时间样式 ---------- */
QLabel#logTimeLabel {
font-size: 16px; /* 时间列字体大小 */
color: #666666; /* 文字浅灰 */
}</string>
</property> </property>
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>false</bool> <bool>false</bool>
...@@ -842,12 +1409,32 @@ QWidget#widget_SearchCriteria { ...@@ -842,12 +1409,32 @@ QWidget#widget_SearchCriteria {
<string> 时间范围</string> <string> 时间范围</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="lineEdit_histime"> <widget class="QPushButton" name="pushButton_chooseTime">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>390</x>
<y>30</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QPushButton#pushButton_chooseTime {
border-image: url(:/choosetime.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_choosetime">
<property name="geometry">
<rect>
<x>100</x>
<y>10</y> <y>10</y>
<width>231</width> <width>141</width>
<height>51</height> <height>51</height>
</rect> </rect>
</property> </property>
...@@ -858,28 +1445,10 @@ QWidget#widget_SearchCriteria { ...@@ -858,28 +1445,10 @@ QWidget#widget_SearchCriteria {
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">/* 去掉 lineEdit_histime 的边框 */ <string notr="true"> color: #6F7A84; /* 浅蓝色文字(和图中一致) */</string>
QLineEdit#lineEdit_histime {
border: none !important; /* 核心:取消所有边框 */
background-color: transparent; /* 可选:背景透明(若需继承父容器背景) */
padding: 4px 8px; /* 可选:添加内边距,避免文字贴边 */
}</string>
</property>
<property name="placeholderText">
<string>请选择时间范围</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_chooseTime">
<property name="geometry">
<rect>
<x>390</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property> </property>
<property name="text"> <property name="text">
<string>1</string> <string>请选择时间范围</string>
</property> </property>
</widget> </widget>
</widget> </widget>
...@@ -950,7 +1519,7 @@ QWidget#widget_carSeries { ...@@ -950,7 +1519,7 @@ QWidget#widget_carSeries {
border-radius: 25px; border-radius: 25px;
}</string> }</string>
</property> </property>
<widget class="QLabel" name="label_carSeries_2"> <widget class="QLabel" name="label_carSeries_sear">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
...@@ -1068,10 +1637,10 @@ QLineEdit#lineEdit_Model { ...@@ -1068,10 +1637,10 @@ QLineEdit#lineEdit_Model {
<widget class="QPushButton" name="pushButton_btnSoftwareControl"> <widget class="QPushButton" name="pushButton_btnSoftwareControl">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1690</x> <x>1750</x>
<y>50</y> <y>70</y>
<width>241</width> <width>221</width>
<height>81</height> <height>61</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
...@@ -1094,145 +1663,532 @@ QLineEdit#lineEdit_Model { ...@@ -1094,145 +1663,532 @@ QLineEdit#lineEdit_Model {
<string>软件控制</string> <string>软件控制</string>
</property> </property>
</widget> </widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>40</x>
<y>140</y>
<width>1880</width>
<height>700</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>140</x>
<y>699</y>
<width>800</width>
<height>71</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>1010</x>
<y>700</y>
<width>800</width>
<height>71</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
<zorder>listWidget</zorder>
<zorder>tabWidget</zorder>
<zorder>pushButton_btnSoftwareControl</zorder>
<zorder>pushButton</zorder>
<zorder>pushButton_2</zorder>
</widget> </widget>
<widget class="QWidget" name="widgetSoftControl" native="true"> <widget class="QWidget" name="SoftControlwidget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>400</y> <y>290</y>
<width>2000</width> <width>1981</width>
<height>1162</height> <height>921</height>
</rect> </rect>
</property> </property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget#widgetSoftControl { <string notr="true">QWidget#SoftControlwidget {
background-color: #D9E2F1 !important; /* 核心:容器背景色 */ background-color: #D9E2F1 !important; /* 核心:容器背景色 */
padding: 15px; /* 可选:内边距,避免控件贴边 */ padding: 15px; /* 可选:内边距,避免控件贴边 */
}</string> }</string>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget"> <widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>30</x>
<y>20</y> <y>100</y>
<width>121</width> <width>1921</width>
<height>31</height> <height>761</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_return" stretch="1,2"> <layout class="QVBoxLayout" name="verticalLayout_control" stretch="1,1,1,1,1">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item> <item>
<widget class="QPushButton" name="pushButton_return"> <widget class="QWidget" name="widget_softwname" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"> QPushButton#pushButton_return { <string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
background-color: #d9e2f1; /* 主色调(蓝色) */ QWidget#widget_softwname {
color:#000000; /* 去掉原生边框 */ background-color: #CDD8E6 !important; /* 目标背景色 */
border: none; /* 去掉原生边框 */ border-radius: 25px;
} }</string>
</string>
</property>
<property name="text">
<string>&lt;-</string>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>1861</width>
<height>80</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_softwname" stretch="1,4">
<property name="leftMargin">
<number>55</number>
</property>
<item>
<widget class="QLabel" name="label_softwnamet">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_softwnamet {
color: #707B89!important; /* 目标字体颜色 */
}</string>
</property>
<property name="text">
<string>软件名称与版本</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_softwname">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>车机产线测试系统v2.3</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_return"> <widget class="QWidget" name="widget_ReleaseTime" native="true">
<property name="font"> <property name="styleSheet">
<font> <string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
<family>微软雅黑</family> QWidget#widget_ReleaseTime {
<pointsize>10</pointsize> background-color: #CDD8E6 !important; /* 目标背景色 */
</font> border-radius: 25px;
</property> }</string>
<property name="text">
<string>软件控制</string>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget_10">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>1861</width>
<height>80</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_ReleaseTime" stretch="1,4">
<property name="leftMargin">
<number>55</number>
</property>
<item>
<widget class="QLabel" name="label_ReleaseTimet">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_ReleaseTimet{
color: #707B89 !important; /* 目标字体颜色 */
}</string>
</property>
<property name="text">
<string>发布时间</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_ReleaseTime">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>2025-09-30</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>561</width>
<height>301</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_control">
<item> <item>
<widget class="QWidget" name="widget_softwname" native="true"> <widget class="QWidget" name="widget_workname" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */ <string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_softwname { QWidget#widget_workname {
background-color: #CDD8E6 !important; /* 目标背景色 */ background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px; border-radius: 25px;
}</string> }</string>
</property> </property>
<widget class="QLabel" name="label_softwnamet"> <widget class="QWidget" name="horizontalLayoutWidget_4">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>10</y> <y>30</y>
<width>401</width> <width>1831</width>
<height>51</height> <height>80</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_workname" stretch="1,4">
<property name="spacing">
<number>18</number>
</property>
<property name="leftMargin">
<number>55</number>
</property>
<item>
<widget class="QLabel" name="label_worknamet">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_worknamet {
color: #707B89 !important; /* 目标字体颜色 */
}</string>
</property>
<property name="text">
<string>工位名称</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_workname">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>PEPS</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton_workName">
<property name="geometry">
<rect>
<x>1840</x>
<y>50</y>
<width>41</width>
<height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>Agency FB</family>
<pointsize>11</pointsize> <pointsize>16</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */ <string notr="true"> QPushButton#pushButton_workName {
QLabel#label_name { border-image: url(:/next.png);
color: #65707B !important; /* 目标字体颜色 */ background-color: #CDD8E6; /* 主色调(蓝色) */
color:#000000; /* 去掉原生边框 */
border: none; /* 去掉原生边框 */
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_deviceName" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_deviceName {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_5">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>1831</width>
<height>80</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_deviceName" stretch="1,4">
<property name="leftMargin">
<number>55</number>
</property>
<item>
<widget class="QLabel" name="label_deviceNamet">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_deviceNamet{
color: #707B89 !important; /* 目标字体颜色 */
}</string> }</string>
</property>
<property name="text">
<string>设备名称</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_deviceName">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>客户端APP</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton_deviceName">
<property name="geometry">
<rect>
<x>1840</x>
<y>50</y>
<width>41</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>Agency FB</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton#pushButton_deviceName {
border-image: url(:/next.png);
background-color: #CDD8E6; /* 主色调(蓝色) */
color:#000000; /* 去掉原生边框 */
border: none; /* 去掉原生边框 */
}
</string>
</property> </property>
<property name="text"> <property name="text">
<string>软件名称与版本</string> <string/>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_inspectionItem" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_inspectionItem {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_6">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>1831</width>
<height>80</height>
</rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_inspectionItem" stretch="1,4">
<property name="spacing">
<number>18</number>
</property>
<property name="leftMargin">
<number>55</number>
</property>
<item>
<widget class="QLabel" name="label_inspectionItemt">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_inspectionItemt{
color: #707B89 !important; /* 目标字体颜色 */
}</string>
</property>
<property name="text">
<string>抽检项</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_inspectionItem">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>必检</string>
</property>
</widget>
</item>
</layout>
</widget> </widget>
<widget class="QLabel" name="label_softwname"> <widget class="QPushButton" name="pushButton_inspectionItemt">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>340</x> <x>1840</x>
<y>10</y> <y>50</y>
<width>271</width> <width>41</width>
<height>51</height> <height>41</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>Agency FB</family>
<pointsize>11</pointsize> <pointsize>16</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">#pushButton_inspectionItemt {
border-image: url(:/next.png);
}
</string>
</property>
<property name="text"> <property name="text">
<string>车机产线测试系统v2.3</string> <string/>
</property> </property>
</widget> </widget>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QPushButton" name="pushButton_return">
<property name="geometry">
<rect>
<x>40</x>
<y>30</y>
<width>41</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">
QPushButton#pushButton_return {
/* 图片路径:本地路径 / qrc 资源路径 二选一 */
background-image: url(:/return.png); /* qrc 资源(推荐) */
/* background-image: url(images/btn_image.png); */ /* 本地相对路径 */
background-repeat: no-repeat; /* 不重复显示图片 */
background-position: center; /* 图片居中 */
border: none; /* 去掉默认边框 */
padding: 0; /* 去掉默认内边距 */
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_return">
<property name="geometry">
<rect>
<x>80</x>
<y>28</y>
<width>319</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>软件控制</string>
</property>
</widget>
<zorder>label_return</zorder>
<zorder>verticalLayoutWidget</zorder>
<zorder>pushButton_return</zorder>
</widget> </widget>
<zorder>frame</zorder> <zorder>SoftControlwidget</zorder>
<zorder>widgetSoftControl</zorder>
<zorder>containerMain</zorder> <zorder>containerMain</zorder>
</widget> <zorder>statusFrame</zorder>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget> </widget>
<widget class="QMenuBar" name="menuBar"> <widget class="QMenuBar" name="menuBar">
<property name="geometry"> <property name="geometry">
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>carMachineDetectionWidget</class>
<widget class="QMainWindow" name="carMachineDetectionWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>2000</width>
<height>1400</height>
</rect>
</property>
<property name="windowTitle">
<string> 车机自动化测试客户端|客户端名称</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QWidget" name="centralwidget">
<property name="styleSheet">
<string notr="true">#carMachineDetectionWidget, #centralwidget {
background-color: #d9e2f1;
}</string>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>50</x>
<y>30</y>
<width>1900</width>
<height>311</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QFrame {
background-color: #E4EBF6;
border-radius: 25px; /* 圆角半径,数值越大越圆 */
border: none; /* 去掉QFrame默认边框(可选) */
padding: 8px; /* 内边距,避免子控件贴圆角边缘 */
}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QLabel" name="label_connectionStatus">
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>161</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>未连接</string>
</property>
</widget>
<widget class="QLabel" name="label_carSeries">
<property name="geometry">
<rect>
<x>20</x>
<y>200</y>
<width>221</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>车系 --</string>
</property>
</widget>
<widget class="QLabel" name="label_carModel">
<property name="geometry">
<rect>
<x>250</x>
<y>200</y>
<width>211</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>车型 --</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_start">
<property name="geometry">
<rect>
<x>1560</x>
<y>90</y>
<width>291</width>
<height>111</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton {
background-color: #1EC9D4; /* 主色调(蓝色) */
color: #FFFFFF; /* 中性灰文字 */
border: none; /* 去掉原生边框 */
border-radius: 25px; /* 圆角半径(车机建议10~20px) */
padding: 10px 20px; /* 内边距:上下10px,左右20px(避免文字贴边) */
}</string>
</property>
<property name="text">
<string>开始</string>
</property>
</widget>
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>490</x>
<y>140</y>
<width>1021</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
<widget class="QLabel" name="label_startTime">
<property name="geometry">
<rect>
<x>480</x>
<y>200</y>
<width>411</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>开始执行时间:--:--:--</string>
</property>
</widget>
<widget class="QLabel" name="label_time">
<property name="geometry">
<rect>
<x>1130</x>
<y>200</y>
<width>371</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> 执行时间:--:--:--</string>
</property>
</widget>
<widget class="QLabel" name="label_StartupState">
<property name="geometry">
<rect>
<x>480</x>
<y>40</y>
<width>431</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>未启动</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>400</x>
<y>10</y>
<width>54</width>
<height>271</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"> QLabel {
border-right: 2px solid #E0E0E0; /* 纯直线竖线,无圆角 */
padding-right: 10px;
margin-right: 10px;
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_inspectionType">
<property name="geometry">
<rect>
<x>170</x>
<y>90</y>
<width>71</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>等线</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #409EFF; /* 浅蓝色文字(和图中一致) */
background-color: #E6F7FF; /* 浅蓝背景(和图中一致) */
border-radius: 10px; /* 可选:轻微圆角更美观,不需要可删除 */
padding: 2px 4px; /* 内边距避免文字贴边 */
}</string>
</property>
<property name="text">
<string>必检</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="containerMain" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>400</y>
<width>2000</width>
<height>1000</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QWidget#containerMain {
background-color: #D9E2F1 !important; /* 核心:容器背景色 */
padding: 15px; /* 可选:内边距,避免控件贴边 */
}</string>
</property>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>40</x>
<y>60</y>
<width>1900</width>
<height>800</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">
/* 1. QTabWidget整体容器 */
QTabWidget {
background-color: #D9E2F1; /* 极浅灰背景,衬托白底标签 */
border-radius: 12px; /* 整体圆角(车机适配) */
padding: 2px;
}
/* 2. 标签栏整体 */
QTabBar {
background-color: #D9E2F1; /* 透明,继承整体背景 */
qproperty-alignment: AlignCenter; /* 标签居中(车机常用) */
}
/* 3. 单个标签(未选中状态) */
QTabBar::tab {
background-color: #CCD8E6;
color: #424242; /* 极深灰文字,保证可读性 */
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding: 16px 24px; /* 上16px 下16px 左24px 右24px(车机触控更友好) */
margin-right: 6px; /* 标签间距适当增大(配合大标签) */
font-size: 25px; /* 目标字体大小 */
min-height: 45px; /* 关键修改2:最小高度=字体大小+上下内边距(40+16+16=72,预留少量冗余) */
min-width: 170px;
}
/* 4. 选中标签(核心:白底黑字) */
QTabBar::tab:selected {
background-color: #FFFFFF; /* 纯白色背景 */
color: #000000; /* 纯黑色文字 */
font-weight: 500; /* 可选:文字稍加粗,突出选中态 */
}
/* 5. 标签悬浮(未选中时) */
QTabBar::tab:hover:!selected {
background-color: #F0F0F0; /* 浅于未选中的灰色,提升交互感 */
}
QTabWidget::pane {
background-color: #D9E2F1;
border: none;
margin-top: -1px;
}</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<property name="iconSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<widget class="QWidget" name="tab">
<property name="styleSheet">
<string notr="true"/>
</property>
<attribute name="title">
<string>当前任务</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="3,1">
<property name="spacing">
<number>86</number>
</property>
<property name="leftMargin">
<number>19</number>
</property>
<property name="topMargin">
<number>30</number>
</property>
<item>
<widget class="QTableWidget" name="tableWidget">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>217</red>
<green>226</green>
<blue>241</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>66</red>
<green>66</green>
<blue>66</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 标签页内容区背景(确保表格父容器背景统一) */
QTabWidget::pane {
background-color: #D9E2F1; /* 标签页内容区浅灰,表格内容区继承 */
border: none;
margin-top: -1px;
}
/* 任务列表表格(核心优化) */
QTableWidget {
background-color: #D9E2F1; /* 表格内容区透明(无色) */
border: none; /* 去掉表格外边框 */
gridline-color: #D9E2F1; /* 分割线颜色=父容器背景(隐形) */
border-radius: 25px;
font-size: 14px;
color: #424242; /* 内容字体深灰 */
}
/* ------------ 表头样式(浅灰背景 + 深灰字体) ------------ */
QHeaderView::horizontal {
/* 核心:渐变背景图(颜色#F0F7FC,四角圆角8px),无渐变效果=纯色块 */
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #F0F7FC, stop:1 #F0F7FC);
border-radius: 25px; /* 表头整体圆角 */
border: none;
clip: rect(0px, auto, auto, 0px); /* 强制裁剪 */
padding: 0; /* 清除内边距 */
margin: 0;
}
QHeaderView::section {
background-color:#CAD5E3; /* 表头浅灰背景(适配需求) */
color: #757575; /* 表头字体深灰(适配需求) */
border: none;
text-align: center;
padding: 8px 0; /* 表头内边距,垂直居中 */
font-weight: 500; /* 字体稍粗,提高可读性 */
font-size: 20px;
/* 表头列分割线(浅灰细线条,与背景协调) */
border-right: 1px solid #CAD5E3;
}
/* 去掉最后一列的表头分割线 */
QHeaderView::section:last {
border-right: none;
}
/* ------------ 表格其他样式保持不变 ------------ */
/* 表格单元格(优化触控和hover效果) */
QTableWidget::item {
padding: 10px;
border: none;
text-align: center; /* 内容居中(可选,更整洁) */
}
QTableWidget::item:hover {
background-color: rgba(0, 0, 0, 0.05); /* hover时轻微深色透明,不突兀 */
}
QTableWidget::item:selected {
background-color: rgba(0, 0, 0, 0.1); /* 选中时浅透明,保留父容器背景感 */
color: #757575; /* 选中后字体仍为深灰 */
}
/* 状态文字颜色(区分状态,覆盖默认深灰) */
.success { color: #67C23A; } /* 成功绿 */
.fail { color: #F56C6C; } /* 失败红 */
.running { color: #409EFF; } /* 进行中蓝 */
.pending { color: #9E9E9E; } /* 未上传灰 */</string>
</property>
<property name="columnCount">
<number>4</number>
</property>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>334</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<column>
<property name="text">
<string>用例名称</string>
</property>
</column>
<column>
<property name="text">
<string>用例类型</string>
</property>
</column>
<column>
<property name="text">
<string>用例用时</string>
</property>
</column>
<column>
<property name="text">
<string>上传状态</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget_cur">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 列表整体样式(保留背景#E4EBF6等) */
QListWidget#listWidget_cur {
background-color: #E4EBF6 !important;
border-left: 1px solid #B3D9F2;
border-radius: 8px;
padding: 10px 0;
clip: rect(0px, auto, auto, 0px);
}
/* 列表项(透明,继承整体背景) */
QListWidget#listWidget_cur::item {
background-color: transparent;
border: none;
}
/* 关键:禁用列表项选中状态(hover和选中均无样式变化) */
QListWidget#listWidget_cur::item {
background-color: transparent;
height: 36px;
border: none;
/* 禁用选中高亮 */
selection-background-color: transparent; /* 选中背景透明 */
selection-color: #333333; /* 选中文字颜色不变 */
}
/* ---------- 第一列:操作文本样式 ---------- */
QLabel#logOperationLabel {
font-size: 25px; /* 第一列字体25px(你需要的大小) */
color: #333333; /* 第一列文字深灰 */
font-weight: 500; /* 可选:文字加粗 */
}
/* ---------- 其他列:时间样式 ---------- */
QLabel#logTimeLabel {
font-size: 16px; /* 其他列字体更小 */
color: #666666; /* 其他列文字浅灰 */
}</string>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string> 当前测试日志</string>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
</item>
<item>
<property name="text">
<string/>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>历史执行任务</string>
</attribute>
<widget class="QListWidget" name="listWidget_history">
<property name="geometry">
<rect>
<x>1364</x>
<y>140</y>
<width>511</width>
<height>551</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 列表整体样式(适配组件名listWidget_history) */
QListWidget#listWidget_history {
background-color: #E4EBF6 !important; /* 列表背景色 */
border-left: 1px solid #B3D9F2; /* 左侧分隔线 */
border-radius: 25px; /* 圆角 */
padding: 10px 0; /* 上下内边距 */
clip: rect(0px, auto, auto, 0px); /* 裁剪内容适配圆角 */
}
/* 列表项样式(合并重复定义,禁用选中/hover效果) */
QListWidget#listWidget_history::item {
background-color: transparent; /* 继承列表背景 */
height: 36px; /* 列表项高度 */
border: none; /* 无边框 */
/* 禁用选中样式 */
selection-background-color: transparent;
selection-color: #333333;
}
/* ---------- 第一列:操作文本样式 ---------- */
QLabel#logOperationLabel {
font-size: 25px; /* 第一列字体大小 */
color: #333333; /* 文字颜色 */
font-weight: 500; /* 文字加粗 */
}
/* ---------- 其他列:时间样式 ---------- */
QLabel#logTimeLabel {
font-size: 16px; /* 时间列字体大小 */
color: #666666; /* 文字浅灰 */
}</string>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string> 历史测试日志</string>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
</item>
<item>
<property name="text">
<string/>
</property>
</item>
</widget>
<widget class="QWidget" name="widget_search" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>1881</width>
<height>95</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>10</number>
</property>
<item>
<widget class="QWidget" name="widget_SearchCriteria" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_SearchCriteria {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QLabel" name="label_histime">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> 时间范围</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_histime">
<property name="geometry">
<rect>
<x>140</x>
<y>10</y>
<width>231</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 去掉 lineEdit_histime 的边框 */
QLineEdit#lineEdit_histime {
border: none !important; /* 核心:取消所有边框 */
background-color: transparent; /* 可选:背景透明(若需继承父容器背景) */
padding: 4px 8px; /* 可选:添加内边距,避免文字贴边 */
}</string>
</property>
<property name="placeholderText">
<string>请选择时间范围</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_chooseTime">
<property name="geometry">
<rect>
<x>390</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>1</string>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_vin" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_vin {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QLabel" name="label_vin">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> VIN</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_vin">
<property name="geometry">
<rect>
<x>100</x>
<y>10</y>
<width>271</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 去掉 lineEdit_histime 的边框 */
QLineEdit#lineEdit_vin {
border: none !important; /* 核心:取消所有边框 */
background-color: transparent; /* 可选:背景透明(若需继承父容器背景) */
padding: 4px 8px; /* 可选:添加内边距,避免文字贴边 */
}</string>
</property>
<property name="placeholderText">
<string>请输入车型</string>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_carSeries" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_carSeries {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QLabel" name="label_carSeries_2">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> 车系</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_carSeries">
<property name="geometry">
<rect>
<x>100</x>
<y>10</y>
<width>271</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 去掉 lineEdit_histime 的边框 */
QLineEdit#lineEdit_carSeries {
border: none !important; /* 核心:取消所有边框 */
background-color: transparent; /* 可选:背景透明(若需继承父容器背景) */
padding: 4px 8px; /* 可选:添加内边距,避免文字贴边 */
}</string>
</property>
<property name="text">
<string>这是输入后的车系</string>
</property>
<property name="placeholderText">
<string>请输入车型</string>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_Model" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_Model {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QLabel" name="label_Model">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> 车型</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_Model">
<property name="geometry">
<rect>
<x>100</x>
<y>10</y>
<width>271</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* 去掉 lineEdit_histime 的边框 */
QLineEdit#lineEdit_Model {
border: none !important; /* 核心:取消所有边框 */
background-color: transparent; /* 可选:背景透明(若需继承父容器背景) */
padding: 4px 8px; /* 可选:添加内边距,避免文字贴边 */
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>请输入车型</string>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="pushButton_btnSoftwareControl">
<property name="geometry">
<rect>
<x>1690</x>
<y>50</y>
<width>241</width>
<height>81</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton {
background-color: #d9e2f1; /* 主色调(蓝色) */
color: #000000; /* 中性灰文字 */
border-radius: 25px; /* 圆角半径(车机建议10~20px) */
padding: 10px 20px; /* 内边距:上下10px,左右20px(避免文字贴边) */
}
</string>
</property>
<property name="text">
<string>软件控制</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="widgetSoftControl" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>400</y>
<width>2000</width>
<height>1162</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QWidget#widgetSoftControl {
background-color: #D9E2F1 !important; /* 核心:容器背景色 */
padding: 15px; /* 可选:内边距,避免控件贴边 */
}</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_return" stretch="1,2">
<item>
<widget class="QPushButton" name="pushButton_return">
<property name="styleSheet">
<string notr="true"> QPushButton#pushButton_return {
background-color: #d9e2f1; /* 主色调(蓝色) */
color:#000000; /* 去掉原生边框 */
border: none; /* 去掉原生边框 */
}
</string>
</property>
<property name="text">
<string>&lt;-</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_return">
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>软件控制</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>561</width>
<height>301</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_control">
<item>
<widget class="QWidget" name="widget_softwname" native="true">
<property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_softwname {
background-color: #CDD8E6 !important; /* 目标背景色 */
border-radius: 25px;
}</string>
</property>
<widget class="QLabel" name="label_softwnamet">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>401</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">/* label_name 标签:字体颜色 #65707B */
QLabel#label_name {
color: #65707B !important; /* 目标字体颜色 */
}</string>
</property>
<property name="text">
<string>软件名称与版本</string>
</property>
</widget>
<widget class="QLabel" name="label_softwname">
<property name="geometry">
<rect>
<x>340</x>
<y>10</y>
<width>271</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>车机产线测试系统v2.3</string>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<zorder>frame</zorder>
<zorder>widgetSoftControl</zorder>
<zorder>containerMain</zorder>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>2000</width>
<height>21</height>
</rect>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
carModel.png

762 Bytes

carSeries.png

880 Bytes

choosetime.png

701 Bytes

hcar.png

9.5 KB

lcar.png

10.7 KB

next.png

392 Bytes

#ifndef PAGESOFTWARECONTROL_H
#define PAGESOFTWARECONTROL_H
#include <QWidget>
namespace Ui {
class pageSoftwareControl;
}
class pageSoftwareControl : public QWidget
{
Q_OBJECT
public:
explicit pageSoftwareControl(QWidget *parent = nullptr);
~pageSoftwareControl();
private:
Ui::pageSoftwareControl *ui;
};
#endif // PAGESOFTWARECONTROL_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>pageSoftwareControl</class> <class>pageSoftwareControl</class>
<widget class="QWidget" name="pageSoftwareControl"> <widget class="QWidget" name="pageSoftwareControl">
<property name="geometry"> <property name="geometry">
...@@ -15,7 +13,126 @@ ...@@ -15,7 +13,126 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>201</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>请选择要设置的工位</string>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>60</x>
<y>70</y>
<width>256</width>
<height>192</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QListWidget {
border: none; /* 隐藏列表默认边框 */
background-color: transparent; /* 列表背景透明 */
}
QListWidget::item {
height: 30px; /* 列表项高度 */
color: #666666; /* 未选中文字颜色 */
background-color: #ffffff; /* 未选中项背景 */
qproperty-alignment: AlignCenter; /* 关键!让文字水平+垂直居中 */
}
QListWidget::item:selected {
background-color: #f0f0f0; /* 选中项高亮背景 */
color: #000000; /* 选中项文字颜色 */
font-weight: normal;
qproperty-alignment: AlignCenter; /* 选中项也保持居中 */
}
QListWidget::item:hover {
background-color: #f5f5f5; /* 悬浮背景 */
}</string>
</property>
<property name="textElideMode">
<enum>Qt::ElideMiddle</enum>
</property>
<property name="currentRow">
<number>-1</number>
</property>
<item>
<property name="text">
<string>KOER</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
<item>
<property name="text">
<string>KOEO</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
<item>
<property name="text">
<string>PEPS</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
<item>
<property name="text">
<string>KOGH</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
<item>
<property name="text">
<string>KMOK</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</item>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>40</x>
<y>250</y>
<width>80</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>210</x>
<y>250</y>
<width>80</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
</widget> </widget>
<pixmapfunction/> <resources/>
<connections/> <connections/>
</ui> </ui>
<RCC>
<qresource prefix="/">
<file>startTime.png</file>
<file>time.png</file>
<file>return.png</file>
<file>next.png</file>
<file>hcar.png</file>
<file>lcar.png</file>
<file>carModel.png</file>
<file>carSeries.png</file>
<file>Default.png</file>
<file>choosetime.png</file>
</qresource>
</RCC>
return.png

406 Bytes

time.png

1013 Bytes

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment