Commit da10d978 authored by ym0408's avatar ym0408

7

parent b25211ae
...@@ -4,49 +4,50 @@ ...@@ -4,49 +4,50 @@
#include <QPainter> // 用于绘制弹窗圆角(必须包含) #include <QPainter> // 用于绘制弹窗圆角(必须包含)
MultiFunctionDialog::MultiFunctionDialog(DialogType type,QWidget *parent) : MultiFunctionDialog::MultiFunctionDialog(DialogType type,QWidget *parent) :
QDialog(parent),m_dialogType(type), QDialog(parent),m_dialogType(type)
ui(new Ui::MultiFunctionDialog) //ui(new Ui::MultiFunctionDialog)
{ {
//ui->setupUi(this); // ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint); setWindowFlags(Qt::FramelessWindowHint);
// -------------------------- 关键修改1:弹窗样式(白色背景+圆角+边框) -------------------------- // -------------------------- 关键修改1:弹窗样式(白色背景+圆角+边框) --------------------------
setStyleSheet(R"( setStyleSheet(R"(
QDialog { QDialog {
background-color: white; /* 弹窗背景设为白色,非透明 */ background-color: white; /* 弹窗背景设为白色,非透明 */
border-radius: 12px; /* 弹窗圆角(可调整数值,越大越圆) */ border-radius: 12px; /* 弹窗圆角(可调整数值,越大越圆) */
border: 1px solid #f0f0f0; /* 可选:添加淡灰色边框,更显圆角效果 */ border: 1px solid #f0f0f0; /* 可选:添加淡灰色边框,更显圆角效果 */
} }
)"); )");
// 弹窗基础设置 // 弹窗基础设置
setWindowTitle("选择设置"); setWindowTitle("选择设置");
// setFixedSize(1900, 700); // 修正:原1800x800太大,改为适配弹窗的尺寸(可按需调整) // setFixedSize(1900, 700);
// move(40,440); // move(40,440);
// 根据类型初始化对应的UI // 根据类型初始化对应的UI
switch (m_dialogType) { switch (m_dialogType) {
case WorkStationType: case WorkStationType:
setWindowTitle("请选择要设置的工位"); setWindowTitle("请选择要设置的工位");
setFixedSize(1900, 700); // 修正:原1800x800太大,改为适配弹窗的尺寸(可按需调整) setFixedSize(1940, 720);
move(40,440); move(40,400);
initWorkStationUI(); initWorkStationUI();
break; break;
case DeviceType: case DeviceType:
setWindowTitle("请选择设备名称"); setWindowTitle("请选择设备名称");
setFixedSize(1900, 700); // 修正:原1800x800太大,改为适配弹窗的尺寸(可按需调整) setFixedSize(1940, 320);
move(40,440); move(40,780);
initDeviceUI(); initDeviceUI();
break; break;
case InspectionType: case InspectionType:
setWindowTitle("请选择抽检项类型"); setWindowTitle("请选择抽检项类型");
setFixedSize(1900, 700); // 修正:原1800x800太大,改为适配弹窗的尺寸(可按需调整) setFixedSize(1940, 500);
move(40,440); move(40,620);
initInspectionUI(); initInspectionUI();
break; break;
case TimeRangeType: case TimeRangeType:
setWindowTitle("请选择时间范围"); setWindowTitle("请选择时间范围");
setFixedSize(400, 320); // 时间弹窗稍大 setFixedSize(1900, 1000); // 时间弹窗稍大
initTimeRangeUI(); move(40,50);
break; initTimeRangeUI();
break;
} }
} }
...@@ -55,7 +56,7 @@ MultiFunctionDialog::~MultiFunctionDialog() ...@@ -55,7 +56,7 @@ MultiFunctionDialog::~MultiFunctionDialog()
//delete ui; //delete ui;
} }
// -------------------------- 关键补充:重写paintEvent实现圆角(必须,否则弹窗圆角不生效) -------------------------- // -------------------------- 重写paintEvent实现圆角 --------------------------
void MultiFunctionDialog::paintEvent(QPaintEvent *event) { void MultiFunctionDialog::paintEvent(QPaintEvent *event) {
QStyleOption opt; QStyleOption opt;
opt.initFrom(this); opt.initFrom(this);
...@@ -69,7 +70,7 @@ void MultiFunctionDialog::initWorkStationUI() { ...@@ -69,7 +70,7 @@ void MultiFunctionDialog::initWorkStationUI() {
// 标题 // 标题
QLabel *titleLabel = new QLabel("请选择要设置的工位", this); QLabel *titleLabel = new QLabel("请选择要设置的工位", this);
titleLabel->setAlignment(Qt::AlignLeft); titleLabel->setAlignment(Qt::AlignLeft);
titleLabel->setStyleSheet("font-size: 25px; font-weight: bold; margin-bottom: 15px;"); // 标题加粗加大,增加底部间距 titleLabel->setStyleSheet("font-size: 25px; font-weight: bold; margin-bottom: 15px;margin-top: 30px;"); // 标题加粗加大,增加底部间距
// 工位列表 // 工位列表
m_listWidget = new QListWidget(this); m_listWidget = new QListWidget(this);
...@@ -82,30 +83,30 @@ void MultiFunctionDialog::initWorkStationUI() { ...@@ -82,30 +83,30 @@ void MultiFunctionDialog::initWorkStationUI() {
QListWidgetItem *item = m_listWidget->item(i); QListWidgetItem *item = m_listWidget->item(i);
item->setTextAlignment(Qt::AlignCenter); // 等同于 Qt::AlignHCenter | Qt::AlignVCenter item->setTextAlignment(Qt::AlignCenter); // 等同于 Qt::AlignHCenter | Qt::AlignVCenter
} }
// // 开启循环滚动 // // 开启循环滚动
// m_enableCycleScroll = true; // m_enableCycleScroll = true;
// // 给列表安装事件过滤器 // // 给列表安装事件过滤器
// m_listWidget->installEventFilter(this); // m_listWidget->installEventFilter(this);
// 列表样式 // 列表样式
m_listWidget->setStyleSheet(R"( m_listWidget->setStyleSheet(R"(
QListWidget { border: none; QListWidget { border: none;
outline: none; outline: none;
font-size: 25px; font-size: 25px;
border-radius: 25px; border-radius: 25px;
} /* 去掉列表边框 */ } /* 去掉列表边框 */
QListWidget::item { QListWidget::item {
padding: 25px; /* 选项内边距加大,更宽松 */ padding: 25px; /* 选项内边距加大,更宽松 */
text-align: center; text-align: center;
outline: none; outline: none;
} }
QListWidget::item:selected { QListWidget::item:selected {
background-color: #f0f0f0; background-color: #f0f0f0;
color: #000000; color: #000000;
border-radius: 8px; /* 选中项也加圆角(可选) */ border-radius: 8px; /* 选中项也加圆角(可选) */
outline: none; outline: none;
} }
)"); )");
// 按钮 // 按钮
QPushButton *confirmBtn = new QPushButton("确认修改", this); QPushButton *confirmBtn = new QPushButton("确认修改", this);
...@@ -120,32 +121,32 @@ void MultiFunctionDialog::initWorkStationUI() { ...@@ -120,32 +121,32 @@ void MultiFunctionDialog::initWorkStationUI() {
border-radius: 16px; /* 按钮圆角(越大越圆,推荐16px) */ border-radius: 16px; /* 按钮圆角(越大越圆,推荐16px) */
font-size: 25px; font-size: 25px;
width: 800px; /* 固定宽度 */ width: 800px; /* 固定宽度 */
height: 70px; /* 固定高度 */ height: 50px; /* 固定高度 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00acc1; /* hover时加深颜色(可选) */ background-color: #00acc1; /* hover时加深颜色(可选) */
} }
)"); )");
cancelBtn->setStyleSheet(R"( cancelBtn->setStyleSheet(R"(
QPushButton { QPushButton {
background-color: #e0e0e0; background-color: #e0e0e0;
color: #333; color: #333;
padding: 10px; padding: 10px;
border: none; border: none;
border-radius: 16px; /* 取消按钮同样加大圆角 */ border-radius: 16px; /* 取消按钮同样加大圆角 */
font-size: 25px; font-size: 25px;
width: 800px; /* 固定宽度 */ width: 800px; /* 固定宽度 */
height: 70px; /* 固定高度 */ height: 50px; /* 固定高度 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #d0d0d0; /* hover时加深颜色(可选) */ background-color: #d0d0d0; /* hover时加深颜色(可选) */
} }
)"); )");
// 布局 // 布局
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
// 布局内边距(避免内容贴弹窗边缘) // 布局内边距(避免内容贴弹窗边缘)
mainLayout->setContentsMargins(20, 30, 20, 20); mainLayout->setContentsMargins(30, 20, 30, 20);
// 布局间距(控件之间的距离) // 布局间距(控件之间的距离)
mainLayout->setSpacing(25); mainLayout->setSpacing(25);
...@@ -162,225 +163,391 @@ void MultiFunctionDialog::initWorkStationUI() { ...@@ -162,225 +163,391 @@ void MultiFunctionDialog::initWorkStationUI() {
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept); connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject); connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
} }
//// 事件过滤器实现:处理上下键循环滚动 // -------------------------- 2. 初始化设备选择UI --------------------------
//bool MultiFunctionDialog::eventFilter(QObject *watched, QEvent *event) {
// // 仅处理QListWidget的按键事件,且开启了循环滚动
// if (watched == m_listWidget && m_enableCycleScroll && event->type() == QEvent::KeyPress) {
// QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
// int currentRow = m_listWidget->currentRow();
// int itemCount = m_listWidget->count();
// // 按下下键:最后一项 -> 第一项
// if (keyEvent->key() == Qt::Key_Down) {
// if (currentRow == itemCount - 1) {
// m_listWidget->setCurrentRow(0);
// return true; // 拦截默认事件,避免继续向下滚动
// }
// }
// // 按上键:第一项 -> 最后一项
// else if (keyEvent->key() == Qt::Key_Up) {
// if (currentRow == 0) {
// m_listWidget->setCurrentRow(itemCount - 1);
// return true; // 拦截默认事件
// }
// }
// }
// // 其他事件交给父类处理
// return QDialog::eventFilter(watched, event);
//}
// -------------------------- 2. 初始化设备选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initDeviceUI() { void MultiFunctionDialog::initDeviceUI() {
QLabel *titleLabel = new QLabel("请选择设备名称", this); QLabel *deviceLabel = new QLabel("设备名称", this);
titleLabel->setAlignment(Qt::AlignLeft); deviceLabel->setStyleSheet("font-size: 25px; "); // 标题加粗加大,增加底部间距
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;margin-left: 10px;"); QLineEdit *deviceEdit = new QLineEdit(this);
deviceEdit->setPlaceholderText("请输入设备名称"); // 输入框占位提示
m_listWidget = new QListWidget(this); deviceEdit->setStyleSheet(R"(
QStringList devices = {"设备A", "设备B", "设备C", "设备D", "设备E"}; QLineEdit {
m_listWidget->addItems(devices); border: 1px solid #e0e0e0;
m_listWidget->setSelectionMode(QListWidget::SingleSelection); border-radius: 30px; /* 关键:调整这个数值控制圆角大小(默认25px,改为30px更圆) */
m_listWidget->setCurrentRow(0); padding: 15px 25px; /* 优化:内边距同步加大,避免文字贴圆角 */
m_listWidget->setStyleSheet(R"( font-size: 25px;
QListWidget { border: none; } background-color: #ffffff;
QListWidget::item { padding: 12px; text-align: center; font-size: 14px; } min-height: 50px; /* 优化:最小高度,让输入框更饱满,匹配大圆角 */
QListWidget::item:selected { background-color: #f0f0f0; color: #00bcd4; border-radius: 8px; } }
)"); )");
QPushButton *confirmBtn = new QPushButton("确认", this); // 2. 创建“确认修改”“取消修改”按钮
QPushButton *cancelBtn = new QPushButton("取消", this); QPushButton *confirmBtn = new QPushButton("确认修改", this);
// 按钮圆角同步加大 QPushButton *cancelBtn = new QPushButton("取消修改", this);
confirmBtn->setStyleSheet(R"( confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; }
QPushButton:hover { background-color: #00acc1; } QPushButton {
)"); background-color:#1EC9D4;
color: white;
padding: 10px; /* 按钮内边距加大,更饱满 */
border: none;
border-radius: 16px; /* 按钮圆角(越大越圆,推荐16px) */
font-size: 25px;
width: 800px; /* 固定宽度 */
height: 50px; /* 固定高度 */
}
QPushButton:hover {
background-color: #00acc1; /* hover时加深颜色(可选) */
}
)");
cancelBtn->setStyleSheet(R"( cancelBtn->setStyleSheet(R"(
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; } QPushButton {
QPushButton:hover { background-color: #d0d0d0; } background-color: #e0e0e0;
)"); color: #333;
padding: 10px;
border: none;
border-radius: 16px; /* 取消按钮同样加大圆角 */
font-size: 25px;
width: 800px; /* 固定宽度 */
height: 50px; /* 固定高度 */
}
QPushButton:hover {
background-color: #d0d0d0; /* hover时加深颜色(可选) */
}
)");
// 3. 构建布局(水平布局放标签+输入框,垂直布局嵌套所有组件)
QHBoxLayout *inputLayout = new QHBoxLayout;
inputLayout->setSpacing(10);
inputLayout->addWidget(deviceLabel);
inputLayout->addWidget(deviceEdit); // 标签+输入框横向排列
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20);
mainLayout->setSpacing(15);
QHBoxLayout *btnLayout = new QHBoxLayout; QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12); btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn); btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn); btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel);
mainLayout->addWidget(m_listWidget); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(30, 20, 30, 20);
mainLayout->setSpacing(20);
mainLayout->addLayout(inputLayout);
mainLayout->addLayout(btnLayout); mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept); // 4. 绑定按钮事件(确认时可获取输入框内容)
connect(confirmBtn, &QPushButton::clicked, this, [=]() {
m_deviceName = deviceEdit->text(); // 保存输入的设备名称(需在类中声明m_deviceName成员)
accept();
});
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject); connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
} }
// -------------------------- 3. 抽检项选择UI --------------------------
// -------------------------- 3. 初始化抽检项选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initInspectionUI() { void MultiFunctionDialog::initInspectionUI() {
QLabel *titleLabel = new QLabel("请选择抽检项类型", this); // 1. 标题:左对齐,调整文本
titleLabel->setAlignment(Qt::AlignCenter); QLabel *titleLabel = new QLabel("请选择是否存在抽检项", this);
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;"); titleLabel->setAlignment(Qt::AlignLeft);
titleLabel->setStyleSheet("font-size: 25px; font-weight: bold; margin-bottom: 20px;margin-top: 30px;");
// 单选按钮组 // 2. 核心:文字左、单选框右(用 QLabel + QRadioButton + 水平布局实现)
m_radioGroup = new QButtonGroup(this); m_radioGroup = new QButtonGroup(this);
QRadioButton *rbMust = new QRadioButton("必检", this);
QRadioButton *rbSample = new QRadioButton("抽检", this); // 必检选项:标签(文字)+ 单选框(右侧)
QRadioButton *rbBoth = new QRadioButton("必检&抽检", this); QWidget *mustWidget = new QWidget(this);
QHBoxLayout *mustLayout = new QHBoxLayout(mustWidget);
mustLayout->setContentsMargins(0, 0, 0, 0); // 取消布局边距
QLabel *mustLabel = new QLabel("必检", this);
mustLabel->setStyleSheet("font-size: 25px;");
QRadioButton *rbMust = new QRadioButton(this); // 单独的单选框(无文字)
m_radioGroup->addButton(rbMust); m_radioGroup->addButton(rbMust);
mustLayout->addWidget(mustLabel); // 先加文字标签
mustLayout->addStretch(1); // 拉伸占位,把单选框推到右侧
mustLayout->addWidget(rbMust); // 后加单选框
// 抽检选项:同上
QWidget *sampleWidget = new QWidget(this);
QHBoxLayout *sampleLayout = new QHBoxLayout(sampleWidget);
sampleLayout->setContentsMargins(0, 0, 0, 0);
QLabel *sampleLabel = new QLabel("抽检", this);
sampleLabel->setStyleSheet("font-size: 25px;");
QRadioButton *rbSample = new QRadioButton(this);
m_radioGroup->addButton(rbSample); m_radioGroup->addButton(rbSample);
sampleLayout->addWidget(sampleLabel);
sampleLayout->addStretch(1);
sampleLayout->addWidget(rbSample);
// 必检&抽检选项:同上(默认选中)
QWidget *bothWidget = new QWidget(this);
QHBoxLayout *bothLayout = new QHBoxLayout(bothWidget);
bothLayout->setContentsMargins(0, 0, 0, 0);
QLabel *bothLabel = new QLabel("必检&抽检", this);
bothLabel->setStyleSheet("font-size: 25px;");
QRadioButton *rbBoth = new QRadioButton(this);
m_radioGroup->addButton(rbBoth); m_radioGroup->addButton(rbBoth);
rbBoth->setChecked(true); // 默认选中 rbBoth->setChecked(true); // 默认选中
// 单选按钮样式优化 bothLayout->addWidget(bothLabel);
rbMust->setStyleSheet("margin: 12px; font-size: 16px;"); bothLayout->addStretch(1);
rbSample->setStyleSheet("margin: 12px; font-size: 16px;"); bothLayout->addWidget(rbBoth);
rbBoth->setStyleSheet("margin: 12px; font-size: 16px;");
// 3. 按钮:调整样式和布局
QPushButton *confirmBtn = new QPushButton("确认", this); QPushButton *confirmBtn = new QPushButton("确认", this);
QPushButton *cancelBtn = new QPushButton("取消", this); QPushButton *cancelBtn = new QPushButton("取消", this);
// 按钮圆角同步加大
confirmBtn->setStyleSheet(R"( confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; } QPushButton {
QPushButton:hover { background-color: #00acc1; } background-color:#1EC9D4;
)"); color: white;
cancelBtn->setStyleSheet(R"( padding: 10px; /* 按钮内边距加大,更饱满 */
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; } border: none;
QPushButton:hover { background-color: #d0d0d0; } border-radius: 16px; /* 按钮圆角(越大越圆,推荐16px) */
)"); font-size: 25px;
width: 800px; /* 固定宽度 */
height: 50px; /* 固定高度 */
}
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: 50px; /* 固定高度 */
}
QPushButton:hover {
background-color: #d0d0d0; /* hover时加深颜色(可选) */
}
)");
// 4. 顶层布局
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20); mainLayout->setContentsMargins(50, 20, 30, 20);
mainLayout->setSpacing(15); mainLayout->setSpacing(20);
QHBoxLayout *btnLayout = new QHBoxLayout; QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12); btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn); btnLayout->addWidget(confirmBtn, 1);
btnLayout->addWidget(cancelBtn); btnLayout->addWidget(cancelBtn, 1);
// 加入“文字+单选框”的组合组件
mainLayout->addWidget(titleLabel); mainLayout->addWidget(titleLabel);
mainLayout->addWidget(rbMust); mainLayout->addWidget(mustWidget);
mainLayout->addWidget(rbSample); mainLayout->addWidget(sampleWidget);
mainLayout->addWidget(rbBoth); mainLayout->addWidget(bothWidget);
mainLayout->addLayout(btnLayout); mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept); connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject); connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
} }
// -------------------------- 4. 初始化时间范围选择UI(完整改写) --------------------------
// -------------------------- 4. 初始化时间范围选择UI(按钮样式同步修改) --------------------------
void MultiFunctionDialog::initTimeRangeUI() { void MultiFunctionDialog::initTimeRangeUI() {
// 1. 标题(保持不变)
QLabel *titleLabel = new QLabel("请选择时间范围", this); QLabel *titleLabel = new QLabel("请选择时间范围", this);
titleLabel->setAlignment(Qt::AlignCenter); titleLabel->setAlignment(Qt::AlignLeft);
titleLabel->setStyleSheet("font-size: 16px; font-weight: bold; margin-bottom: 15px;"); titleLabel->setStyleSheet("font-size: 25px; font-weight: bold; margin-bottom: 30px; margin-top: 30px;");
// 日历控件(辅助选择) // 2. 替换为自定义RangeCalendar(支持区间背景)
QCalendarWidget *calendar = new QCalendarWidget(this); RangeCalendar *calendar = new RangeCalendar(this);
calendar->setSelectedDate(QDate::currentDate()); // 日历样式(保持你的原样式)
calendar->setGridVisible(true); calendar->setStyleSheet(R"(
calendar->setMaximumHeight(180); QCalendarWidget {
calendar->setStyleSheet("border: none;"); // 去掉日历边框 background-color: white;
font-size: 25px;
border: none;
}
QCalendarWidget QWidget#qt_calendar_navigationbar {
background-color: #1EC9D4;
color: white;
font-weight: bold;
font-size: 25px;
}
QCalendarWidget QHeaderView::section {
background-color: #1EC9D4;
border: none;
padding: 10px;
font-size: 26px;
font-weight: bold;
color: white;
}
QCalendarWidget QTableView {
selection-background-color: #1EC9D4;
selection-color: white;
outline: none;
}
QCalendarWidget QAbstractItemView::item:hover:!selected {
background-color: #f0f0f0;
}
QCalendarWidget QAbstractItemView::item:disabled {
color: #ccc;
}
)");
calendar->setGridVisible(false);
calendar->setMinimumHeight(500);
// 日期编辑框 // 3. 日期编辑框(保持不变)
QLabel *startLabel = new QLabel("开始日期:", this); QLabel *startLabel = new QLabel("开始日期:", this);
QLabel *endLabel = new QLabel("结束日期:", this); QLabel *endLabel = new QLabel("结束日期:", this);
startLabel->setStyleSheet("font-size: 20px; margin-right: 15px;");
endLabel->setStyleSheet("font-size: 20px; margin-right: 15px; margin-left: 50px;");
m_startDateEdit = new QDateEdit(QDate::currentDate(), this); m_startDateEdit = new QDateEdit(QDate::currentDate(), this);
m_endDateEdit = new QDateEdit(QDate::currentDate().addDays(2), this); m_endDateEdit = new QDateEdit(QDate::currentDate().addDays(2), this);
m_startDateEdit->setCalendarPopup(true); QString dateEditStyle = R"(
m_endDateEdit->setCalendarPopup(true);
m_startDateEdit->setFixedWidth(120);
m_endDateEdit->setFixedWidth(120);
// 日期编辑框样式优化
m_startDateEdit->setStyleSheet(R"(
QDateEdit { QDateEdit {
padding: 6px;
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
border-radius: 8px; border-radius: 16px;
font-size: 14px; padding: 12px 20px;
font-size: 20px;
background-color: white;
min-width: 250px;
min-height: 40px;
} }
)"); QDateEdit::drop-down {
m_endDateEdit->setStyleSheet(R"( border: none;
QDateEdit { background-color: transparent;
padding: 6px;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
} }
)"); )";
m_startDateEdit->setStyleSheet(dateEditStyle);
// 日期布局 m_endDateEdit->setStyleSheet(dateEditStyle);
QHBoxLayout *dateLayout = new QHBoxLayout; m_startDateEdit->setCalendarPopup(true);
dateLayout->addWidget(startLabel); m_endDateEdit->setCalendarPopup(true);
dateLayout->addWidget(m_startDateEdit); m_startDateEdit->setDisplayFormat("yyyy-MM-dd");
dateLayout->addSpacing(20); m_endDateEdit->setDisplayFormat("yyyy-MM-dd");
dateLayout->addWidget(endLabel);
dateLayout->addWidget(m_endDateEdit); // 4. 联动逻辑:选择日期时更新区间,触发背景渲染
connect(calendar, &QCalendarWidget::clicked, this, [=](const QDate &date) {
static QDate firstSelectDate;
if (!firstSelectDate.isValid()) {
firstSelectDate = date;
m_startDateEdit->setDate(date);
calendar->setDateRange(QDate(), QDate()); // 重置区间
} else {
QDate start = qMin(firstSelectDate, date);
QDate end = qMax(firstSelectDate, date);
m_startDateEdit->setDate(start);
m_endDateEdit->setDate(end);
calendar->setDateRange(start, end); // 设置区间,触发背景绘制
firstSelectDate = QDate(); // 重置,支持重新选择
}
});
// 编辑框修改时同步更新区间
connect(m_startDateEdit, &QDateEdit::dateChanged, this, [=](const QDate &date) {
calendar->setDateRange(date, m_endDateEdit->date());
});
connect(m_endDateEdit, &QDateEdit::dateChanged, this, [=](const QDate &date) {
calendar->setDateRange(m_startDateEdit->date(), date);
});
// 5. 按钮(保持不变)
QPushButton *confirmBtn = new QPushButton("确认", this); QPushButton *confirmBtn = new QPushButton("确认", this);
QPushButton *cancelBtn = new QPushButton("取消", this); QPushButton *cancelBtn = new QPushButton("取消", this);
// 按钮圆角同步加大
confirmBtn->setStyleSheet(R"( confirmBtn->setStyleSheet(R"(
QPushButton { background-color: #00bcd4; color: white; padding: 10px; border: none; border-radius: 16px; font-size: 14px; } QPushButton {
QPushButton:hover { background-color: #00acc1; } background-color: #1EC9D4;
color: white;
padding: 10px;
border: none;
border-radius: 16px;
font-size: 25px;
width: 800px;
height: 50px;
}
QPushButton:hover {
background-color: #00acc1;
}
)"); )");
cancelBtn->setStyleSheet(R"( cancelBtn->setStyleSheet(R"(
QPushButton { background-color: #e0e0e0; color: #333; padding: 10px; border: none; border-radius: 16px; font-size: 14px; } QPushButton {
QPushButton:hover { background-color: #d0d0d0; } background-color: #e0e0e0;
color: #333;
padding: 10px;
border: none;
border-radius: 16px;
font-size: 25px;
width: 800px;
height: 50px;
}
QPushButton:hover {
background-color: #d0d0d0;
}
)"); )");
// 6. 布局(保持不变)
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(20, 20, 20, 20); mainLayout->setContentsMargins(40, 40, 40, 40);
mainLayout->setSpacing(15); mainLayout->setSpacing(30);
QHBoxLayout *dateEditLayout = new QHBoxLayout;
dateEditLayout->setSpacing(20);
dateEditLayout->addWidget(startLabel);
dateEditLayout->addWidget(m_startDateEdit);
dateEditLayout->addWidget(endLabel);
dateEditLayout->addWidget(m_endDateEdit);
dateEditLayout->addStretch(1);
QHBoxLayout *btnLayout = new QHBoxLayout; QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->setSpacing(12); btnLayout->setSpacing(12);
btnLayout->addWidget(confirmBtn); btnLayout->addWidget(confirmBtn);
btnLayout->addWidget(cancelBtn); btnLayout->addWidget(cancelBtn);
mainLayout->addWidget(titleLabel); mainLayout->addWidget(titleLabel);
mainLayout->addWidget(calendar); mainLayout->addWidget(calendar);
mainLayout->addLayout(dateLayout); mainLayout->addLayout(dateEditLayout);
mainLayout->addLayout(btnLayout); mainLayout->addLayout(btnLayout);
connect(confirmBtn, &QPushButton::clicked, this, &QDialog::accept); connect(confirmBtn, &QPushButton::clicked, this, [=]() {
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject); // 关键:先校验指针是否为空
if (!m_startDateEdit || !m_endDateEdit) {
qDebug() << "日期编辑框未初始化!";
reject(); // 避免崩溃,直接关闭弹窗
return;
}
// 再校验日期合法性
QDate start = m_startDateEdit->date();
QDate end = m_endDateEdit->date();
if (end < start) {
end = start.addDays(2);
m_endDateEdit->setDate(end); // 更新编辑框显示
}
accept(); // 正常关闭弹窗
});
} }
// -------------------------- 获取选择结果 -------------------------- // -------------------------- 获取选择结果 --------------------------
QString MultiFunctionDialog::getStringResult() const { QString MultiFunctionDialog::getStringResult() const {
switch (m_dialogType) { switch (m_dialogType) {
case WorkStationType: case WorkStationType:
// 返回选中的工位 if (m_listWidget && m_listWidget->currentItem()) {
if (m_listWidget &&m_listWidget->currentItem()) { return m_listWidget->currentItem()->text();
return m_listWidget->currentItem()->text(); }
} break;
break; case DeviceType:
case DeviceType: return m_deviceName; // 修正:返回输入的设备名称(原代码用了m_listWidget,错误)
// 返回选中的设备 break;
if (m_listWidget->currentItem()) { case InspectionType:
return m_listWidget->currentItem()->text(); // 修正:抽检项用QLabel显示文字,需通过按钮关联标签文本(原代码返回按钮文本为空)
} if (m_radioGroup->checkedButton()) {
break; QRadioButton *checkedBtn = qobject_cast<QRadioButton*>(m_radioGroup->checkedButton());
case InspectionType: if (checkedBtn) {
// 返回选中的抽检项 // 找到对应的标签(通过父Widget查找)
if (m_radioGroup->checkedButton()) { QWidget *parentWidget = checkedBtn->parentWidget();
return m_radioGroup->checkedButton()->text(); if (parentWidget) {
QLabel *textLabel = parentWidget->findChild<QLabel*>();
if (textLabel) {
return textLabel->text(); // 返回“必检”“抽检”等文本
}
}
} }
break; }
default: break;
break; default:
break;
} }
return ""; return "";
} }
......
#ifndef MULTIFUNCTIONDIALOG_H #ifndef MULTIFUNCTIONDIALOG_H
#define MULTIFUNCTIONDIALOG_H #define MULTIFUNCTIONDIALOG_H
#include <QCalendarWidget>
#include<QDebug>
#include <QPainter>
#include <QDate>
#include <QDialog> #include <QDialog>
#include <QLineEdit>
#include<QMessageBox>
#include <QLabel> // 解决 QLabel 未声明的问题 #include <QLabel> // 解决 QLabel 未声明的问题
#include <QPushButton> // 解决 QPushButton 不完整类型的问题 #include <QPushButton> // 解决 QPushButton 不完整类型的问题
#include <QListWidget> // 用到了 QListWidget #include <QListWidget> // 用到了 QListWidget
...@@ -19,10 +24,39 @@ enum DialogType { ...@@ -19,10 +24,39 @@ enum DialogType {
InspectionType, // 抽检项选择 InspectionType, // 抽检项选择
TimeRangeType // 时间范围选择 TimeRangeType // 时间范围选择
}; };
// 仅在头文件中定义一次RangeCalendar
class RangeCalendar : public QCalendarWidget
{
Q_OBJECT
public:
explicit RangeCalendar(QWidget *parent = nullptr)
: QCalendarWidget(parent), m_startDate(QDate()), m_endDate(QDate()) {}
void setDateRange(const QDate &start, const QDate &end) {
m_startDate = start;
m_endDate = end;
updateCells();
}
protected:
void paintCell(QPainter *painter, const QRect &rect, const QDate &date) const override {
// 1. 先绘制区间背景(在默认样式之前)
if (m_startDate.isValid() && m_endDate.isValid()) {
if (date > m_startDate && date < m_endDate) {
painter->save();
painter->fillRect(rect.adjusted(1, 1, -1, -1), QColor(220, 240, 250));
painter->restore();
}
}
// 2. 再绘制默认样式(包含文字)
QCalendarWidget::paintCell(painter, rect, date);
}
private:
QDate m_startDate;
QDate m_endDate;
};
namespace Ui {
class MultiFunctionDialog;
}
class MultiFunctionDialog : public QDialog class MultiFunctionDialog : public QDialog
{ {
...@@ -36,7 +70,7 @@ public: ...@@ -36,7 +70,7 @@ public:
QPair<QDate, QDate> getTimeRangeResult() const; // 用于:时间范围(返回日期对) QPair<QDate, QDate> getTimeRangeResult() const; // 用于:时间范围(返回日期对)
private slots: private slots:
// 事件过滤器:处理QListWidget的按键事件(实现循环滚动) // 事件过滤器:处理QListWidget的按键事件(实现循环滚动)
// bool eventFilter(QObject *watched, QEvent *event); // bool eventFilter(QObject *watched, QEvent *event);
private: private:
// 根据类型创建对应的UI // 根据类型创建对应的UI
void initWorkStationUI(); // 初始化工位选择UI void initWorkStationUI(); // 初始化工位选择UI
...@@ -48,10 +82,15 @@ private: ...@@ -48,10 +82,15 @@ private:
DialogType m_dialogType; // 当前弹窗类型 DialogType m_dialogType; // 当前弹窗类型
QListWidget *m_listWidget; // 列表控件(工位/设备用) QListWidget *m_listWidget; // 列表控件(工位/设备用)
QButtonGroup *m_radioGroup; // 单选按钮组(抽检项用) QButtonGroup *m_radioGroup; // 单选按钮组(抽检项用)
QDateEdit *m_startDateEdit; // 开始日期编辑框(时间用) QDateEdit *m_startDateEdit=nullptr; // 开始日期编辑框(时间用)
QDateEdit *m_endDateEdit; // 结束日期编辑框(时间用) QDateEdit *m_endDateEdit=nullptr; // 结束日期编辑框(时间用)
QLineEdit *m_deviceEdit; // 设备输入框成员(原代码可能遗漏)
QDate m_firstSelectDate;
QString m_deviceName; // 设备名称存储变量
// bool m_enableCycleScroll = false; // bool m_enableCycleScroll = false;
Ui::MultiFunctionDialog *ui; // Ui::MultiFunctionDialog *ui;
}; };
......
USB.png

800 Bytes

USBconncet.png

612 Bytes

<?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-03T15:06:26. --> <!-- Written by QtCreator 4.11.1, 2025-12-04T14:46:12. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
......
...@@ -7,9 +7,9 @@ carMachineDetectionWidget::carMachineDetectionWidget(QWidget *parent) ...@@ -7,9 +7,9 @@ carMachineDetectionWidget::carMachineDetectionWidget(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
, ui(new Ui::carMachineDetectionWidget) , ui(new Ui::carMachineDetectionWidget)
{ {
//setWindowFlags(windowFlags() & ~Qt::WindowFullscreenButtonHint); ui->setupUi(this);
//setMaximumSize(2000, 1200); setWindowFlags(Qt::FramelessWindowHint);
ui->setupUi(this);
//初始状态 //初始状态
// ui->widget_search->hide(); // ui->widget_search->hide();
// ui->SoftControlwidget->hide(); // ui->SoftControlwidget->hide();
...@@ -23,8 +23,6 @@ carMachineDetectionWidget::~carMachineDetectionWidget() ...@@ -23,8 +23,6 @@ carMachineDetectionWidget::~carMachineDetectionWidget()
delete ui; delete ui;
} }
void carMachineDetectionWidget::on_pushButton_btnSoftwareControl_clicked() void carMachineDetectionWidget::on_pushButton_btnSoftwareControl_clicked()
{ {
ui->containerMain->hide(); ui->containerMain->hide();
...@@ -75,15 +73,37 @@ void carMachineDetectionWidget::on_pushButton_inspectionItemt_clicked() ...@@ -75,15 +73,37 @@ void carMachineDetectionWidget::on_pushButton_inspectionItemt_clicked()
void carMachineDetectionWidget::on_pushButton_chooseTime_clicked() void carMachineDetectionWidget::on_pushButton_chooseTime_clicked()
{ {
MultiFunctionDialog dialog(TimeRangeType, this); MultiFunctionDialog *dialog = new MultiFunctionDialog(TimeRangeType, this);
if (dialog.exec() == QDialog::Accepted) { if (dialog->exec() == QDialog::Accepted) {
QPair<QDate, QDate> timeRange = dialog.getTimeRangeResult(); QPair<QDate, QDate> timeRange = dialog->getTimeRangeResult();
QDate startDate = timeRange.first; QDate startDate = timeRange.first;
QDate endDate = timeRange.second; QDate endDate = timeRange.second;
if (startDate.isValid() && endDate.isValid()) { if (startDate.isValid() && endDate.isValid()) {
QMessageBox::information(this, "选择结果", QMessageBox::information(this, "选择结果",
QString("时间范围:%1 至 %2").arg(startDate.toString("yyyy-MM-dd")).arg(endDate.toString("yyyy-MM-dd"))); QString("时间范围:%1 至 %2")
// 业务逻辑:更新时间范围设置 .arg(startDate.toString("yyyy-MM-dd"))
} .arg(endDate.toString("yyyy-MM-dd")));
} }
}
delete dialog; // 手动销毁,避免内存泄漏
}
void carMachineDetectionWidget::onMinimizeButtonClicked()
{
}
void carMachineDetectionWidget::onCloseButtonClicked()
{
}
void carMachineDetectionWidget::on_pushButton_min_clicked()
{
this->showMinimized();
}
void carMachineDetectionWidget::on_pushButton_off_clicked()
{
this->close();
} }
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
#define CARMACHINEDETECTIONWIDGET_H #define CARMACHINEDETECTIONWIDGET_H
#include <QMainWindow> #include <QMainWindow>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QApplication>
#include <QLabel>
#include <QPushButton>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace Ui { class carMachineDetectionWidget; } namespace Ui { class carMachineDetectionWidget; }
QT_END_NAMESPACE QT_END_NAMESPACE
...@@ -30,7 +34,22 @@ private slots: ...@@ -30,7 +34,22 @@ private slots:
void on_pushButton_chooseTime_clicked(); void on_pushButton_chooseTime_clicked();
void onMinimizeButtonClicked();
void onCloseButtonClicked();
void on_pushButton_min_clicked();
void on_pushButton_off_clicked();
private: private:
QLabel *m_titleLabel;
QLabel *m_stationLabel;
QLabel *m_usbStatusLabel;
QLabel *m_signalIconLabel;
QLabel *m_networkStatusLabel;
QPushButton *m_minimizeButton;
QPushButton *m_closeButton;
Ui::carMachineDetectionWidget *ui; Ui::carMachineDetectionWidget *ui;
}; };
#endif // CARMACHINEDETECTIONWIDGET_H #endif // CARMACHINEDETECTIONWIDGET_H
...@@ -7,9 +7,15 @@ ...@@ -7,9 +7,15 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>2000</width> <width>2000</width>
<height>1250</height> <height>1200</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
...@@ -459,18 +465,24 @@ ...@@ -459,18 +465,24 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">#carMachineDetectionWidget, #centralwidget { <string notr="true">#carMachineDetectionWidget, #centralwidget {
background-color: #d9e2f1; background-color: #d9e2f1;
}</string> }</string>
</property> </property>
<widget class="QFrame" name="statusFrame"> <widget class="QWidget" name="containerMain" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>39</x> <x>30</x>
<y>70</y> <y>320</y>
<width>1911</width> <width>1981</width>
<height>191</height> <height>821</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -479,464 +491,81 @@ ...@@ -479,464 +491,81 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame#statusFrame { <string notr="true">QWidget#containerMain {
background-color: #E4EBF6; background-color: #D9E2F1 !important; /* 核心:容器背景色 */
border-radius: 25px; /* 圆角半径,数值越大越圆 */ padding: 15px; /* 可选:内边距,避免控件贴边 */
border: none; /* 去掉QFrame默认边框(可选) */ }</string>
padding: 8px; /* 内边距,避免子控件贴圆角边缘 */
}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property> </property>
<widget class="QLabel" name="label_connectionStatus"> <widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>50</x>
<y>30</y>
<width>161</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>22</pointsize>
</font>
</property>
<property name="text">
<string>未连接</string>
</property>
</widget>
<widget class="QLabel" name="label_carSeries">
<property name="geometry">
<rect>
<x>80</x>
<y>130</y>
<width>151</width>
<height>41</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>300</x>
<y>130</y>
<width>211</width>
<height>41</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"> <property name="geometry">
<rect> <rect>
<x>1571</x> <x>40</x>
<y>77</y> <y>60</y>
<width>291</width> <width>1900</width>
<height>81</height> <height>800</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>微软雅黑</family> <family>微软雅黑</family>
<pointsize>14</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"> QPushButton { <string notr="true">
background-color: #1EC9D4; /* 主色调(蓝色) */ /* 1. QTabWidget整体容器 */
color: #FFFFFF; QTabWidget {
border: none; /* 去掉原生边框 */ background-color: #D9E2F1; /* 极浅灰背景,衬托白底标签 */
border-radius: 25px; /* 圆角半径(车机建议10~20px) */ border-radius: 12px; /* 整体圆角(车机适配) */
padding: 2px;
}
}</string> /* 2. 标签栏整体 */
</property> QTabBar {
<property name="text"> background-color: #D9E2F1; /* 透明,继承整体背景 */
<string>开始</string>
</property> }
</widget>
<widget class="QLabel" name="label_startTime"> /* 3. 单个标签(未选中状态) */
<property name="geometry"> QTabBar::tab {
<rect> background-color: #CCD8E6;
<x>830</x> color: #424242; /* 极深灰文字,保证可读性 */
<y>130</y> border-top-left-radius: 8px;
<width>411</width> border-top-right-radius: 8px;
<height>41</height> padding: 16px 24px; /* 上16px 下16px 左24px 右24px(车机触控更友好) */
</rect> margin-right: 6px; /* 标签间距适当增大(配合大标签) */
</property> font-size: 25px; /* 目标字体大小 */
<property name="font"> min-height: 45px; /* 关键修改2:最小高度=字体大小+上下内边距(40+16+16=72,预留少量冗余) */
<font> min-width: 170px;
<family>微软雅黑</family> }
<pointsize>11</pointsize>
</font> /* 4. 选中标签(核心:白底黑字) */
</property> QTabBar::tab:selected {
<property name="styleSheet"> background-color: #FFFFFF; /* 纯白色背景 */
<string notr="true">QLabel { color: #000000; /* 纯黑色文字 */
color: #6F7A84; /* 浅蓝色文字(和图中一致) */ font-weight: 500; /* 可选:文字稍加粗,突出选中态 */
}</string> }
</property>
<property name="text"> /* 5. 标签悬浮(未选中时) */
<string>开始执行时间:--:--:--</string> QTabBar::tab:hover:!selected {
</property> background-color: #F0F0F0; /* 浅于未选中的灰色,提升交互感 */
</widget> }
<widget class="QLabel" name="label_time">
<property name="geometry"> QTabWidget::pane {
<rect> background-color: #D9E2F1;
<x>1240</x> border: none;
<y>130</y> margin-top: -1px;
<width>411</width> }</string>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel#label_time{
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text">
<string> 执行用时:--:--:--</string>
</property>
</widget>
<widget class="QLabel" name="label_StartupState">
<property name="geometry">
<rect>
<x>800</x>
<y>30</y>
<width>431</width>
<height>51</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">
<property name="geometry">
<rect>
<x>470</x>
<y>10</y>
<width>41</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> </property>
</widget> <property name="currentIndex">
<widget class="QLabel" name="label_inspectionType"> <number>1</number>
<property name="geometry">
<rect>
<x>210</x>
<y>50</y>
<width>71</width>
<height>31</height>
</rect>
</property> </property>
<property name="font"> <property name="iconSize">
<font> <size>
<family>等线</family> <width>40</width>
<pointsize>11</pointsize> <height>40</height>
</font> </size>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #23C6D9; /* 浅蓝色文字(和图中一致) */
background-color: #CAEBF1; /* 浅蓝背景(和图中一致) */
border-radius: 10px; /* 可选:轻微圆角更美观,不需要可删除 */
padding: 2px 4px; /* 内边距避免文字贴边 */
}</string>
</property>
<property name="text">
<string>必检</string>
</property>
</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 class="QWidget" name="containerMain" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>290</y>
<width>2000</width>
<height>921</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; /* 透明,继承整体背景 */
}
/* 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>0</number>
</property>
<property name="iconSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property> </property>
<widget class="QWidget" name="tab_cur"> <widget class="QWidget" name="tab_cur">
<property name="styleSheet"> <property name="styleSheet">
...@@ -947,10 +576,10 @@ ...@@ -947,10 +576,10 @@
</attribute> </attribute>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="3,1"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="3,1">
<property name="spacing"> <property name="spacing">
<number>86</number> <number>105</number>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>19</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>30</number> <number>30</number>
...@@ -1377,9 +1006,9 @@ QListWidget#listWidget_history::item { ...@@ -1377,9 +1006,9 @@ QListWidget#listWidget_history::item {
<widget class="QWidget" name="widget_search" native="true"> <widget class="QWidget" name="widget_search" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>-10</x>
<y>30</y> <y>30</y>
<width>1881</width> <width>1901</width>
<height>95</height> <height>95</height>
</rect> </rect>
</property> </property>
...@@ -1440,7 +1069,7 @@ QWidget#widget_SearchCriteria { ...@@ -1440,7 +1069,7 @@ QWidget#widget_SearchCriteria {
<rect> <rect>
<x>170</x> <x>170</x>
<y>10</y> <y>10</y>
<width>141</width> <width>271</width>
<height>51</height> <height>51</height>
</rect> </rect>
</property> </property>
...@@ -1457,6 +1086,9 @@ QWidget#widget_SearchCriteria { ...@@ -1457,6 +1086,9 @@ QWidget#widget_SearchCriteria {
<string>请选择时间范围</string> <string>请选择时间范围</string>
</property> </property>
</widget> </widget>
<zorder>label_histime</zorder>
<zorder>label_choosetime</zorder>
<zorder>pushButton_chooseTime</zorder>
</widget> </widget>
</item> </item>
<item> <item>
...@@ -1669,29 +1301,22 @@ QLineEdit#lineEdit_Model { ...@@ -1669,29 +1301,22 @@ 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>
<zorder>listWidget</zorder>
<zorder>tabWidget</zorder>
<zorder>pushButton_btnSoftwareControl</zorder>
</widget> </widget>
<widget class="QWidget" name="SoftControlwidget" native="true"> <widget class="QWidget" name="SoftControlwidget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>30</x>
<y>290</y> <y>320</y>
<width>1981</width> <width>1961</width>
<height>921</height> <height>821</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize> <pointsize>14</pointsize>
...@@ -1706,10 +1331,10 @@ QLineEdit#lineEdit_Model { ...@@ -1706,10 +1331,10 @@ QLineEdit#lineEdit_Model {
<widget class="QWidget" name="verticalLayoutWidget"> <widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>20</x>
<y>100</y> <y>100</y>
<width>1921</width> <width>1941</width>
<height>761</height> <height>731</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_control" stretch="1,1,1,1,1"> <layout class="QVBoxLayout" name="verticalLayout_control" stretch="1,1,1,1,1">
...@@ -1723,13 +1348,19 @@ QLineEdit#lineEdit_Model { ...@@ -1723,13 +1348,19 @@ QLineEdit#lineEdit_Model {
<number>10</number> <number>10</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>10</number> <number>20</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>10</number> <number>10</number>
</property> </property>
<item> <item>
<widget class="QWidget" name="widget_softwname" native="true"> <widget class="QWidget" name="widget_softwname" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */ <string notr="true">/* widget_SearchCriteria 样式:背景色+圆角 */
QWidget#widget_softwname { QWidget#widget_softwname {
...@@ -2166,23 +1797,649 @@ QPushButton#pushButton_return { ...@@ -2166,23 +1797,649 @@ QPushButton#pushButton_return {
<string>软件控制</string> <string>软件控制</string>
</property> </property>
</widget> </widget>
<zorder>label_return</zorder>
<zorder>verticalLayoutWidget</zorder>
<zorder>pushButton_return</zorder>
</widget> </widget>
<zorder>SoftControlwidget</zorder> <widget class="QFrame" name="frame">
<zorder>containerMain</zorder> <property name="geometry">
<zorder>statusFrame</zorder> <rect>
</widget> <x>0</x>
<widget class="QMenuBar" name="menuBar"> <y>0</y>
<property name="geometry"> <width>2001</width>
<rect> <height>71</height>
<x>0</x> </rect>
<y>0</y> </property>
<width>2000</width> <property name="styleSheet">
<height>21</height> <string notr="true">QFrame#frame {
</rect> background-color: #E4EBF6;
</property> }</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QLabel" name="label_title">
<property name="geometry">
<rect>
<x>30</x>
<y>10</y>
<width>441</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_web">
<property name="geometry">
<rect>
<x>1650</x>
<y>20</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>等线</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #23C6D9; /* 浅蓝色文字(和图中一致) */
background-color: #CAEBF1; /* 浅蓝背景(和图中一致) */
border-radius: 20px; /* 可选:轻微圆角更美观,不需要可删除 */
padding: 2px 4px; /* 内边距避免文字贴边 */
}</string>
</property>
<property name="text">
<string>网络已连接</string>
</property>
</widget>
<widget class="QLabel" name="label_usb">
<property name="geometry">
<rect>
<x>1460</x>
<y>20</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>等线</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #23C6D9;
background-color: #CAEBF1;
border: 1px solid #CAEBF1;
border-radius: 30px;
padding: 2px 4px;
}</string>
</property>
<property name="text">
<string>USB已连接</string>
</property>
</widget>
<widget class="QLabel" name="label_usbpicture">
<property name="geometry">
<rect>
<x>1420</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#label_usbpicture{
border-image: url(:/USBconncet.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_signalpicture">
<property name="geometry">
<rect>
<x>1610</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#label_signalpicture{
border-image: url(:/signalconnect.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_work">
<property name="geometry">
<rect>
<x>1140</x>
<y>11</y>
<width>261</width>
<height>51</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel#label_work{
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text">
<string>执行工位 · KOER</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_min">
<property name="geometry">
<rect>
<x>1820</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>Agency FB</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton#pushButton_min {
border-image: url(:/min.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="pushButton_off">
<property name="geometry">
<rect>
<x>1930</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>Agency FB</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton#pushButton_off {
border-image: url(:/off.png);
}
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<widget class="QFrame" name="statusFrame">
<property name="geometry">
<rect>
<x>50</x>
<y>90</y>
<width>1891</width>
<height>221</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="styleSheet">
<string notr="true">QFrame#statusFrame {
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>50</x>
<y>30</y>
<width>161</width>
<height>61</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>22</pointsize>
</font>
</property>
<property name="text">
<string>未连接</string>
</property>
</widget>
<widget class="QLabel" name="label_carSeries">
<property name="geometry">
<rect>
<x>80</x>
<y>130</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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>300</x>
<y>130</y>
<width>211</width>
<height>41</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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>1571</x>
<y>77</y>
<width>291</width>
<height>81</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"> QPushButton {
background-color: #1EC9D4; /* 主色调(蓝色) */
color: #FFFFFF;
border: none; /* 去掉原生边框 */
border-radius: 25px; /* 圆角半径(车机建议10~20px) */
}</string>
</property>
<property name="text">
<string>开始</string>
</property>
</widget>
<widget class="QLabel" name="label_startTime">
<property name="geometry">
<rect>
<x>830</x>
<y>130</y>
<width>411</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text">
<string>开始执行时间:--:--:--</string>
</property>
</widget>
<widget class="QLabel" name="label_time">
<property name="geometry">
<rect>
<x>1240</x>
<y>130</y>
<width>411</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">QLabel#label_time{
color: #6F7A84; /* 浅蓝色文字(和图中一致) */
}</string>
</property>
<property name="text">
<string> 执行用时:--:--:--</string>
</property>
</widget>
<widget class="QLabel" name="label_StartupState">
<property name="geometry">
<rect>
<x>800</x>
<y>30</y>
<width>431</width>
<height>51</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">
<property name="geometry">
<rect>
<x>470</x>
<y>10</y>
<width>41</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>180</x>
<y>40</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: #23C6D9; /* 浅蓝色文字(和图中一致) */
background-color: #CAEBF1; /* 浅蓝背景(和图中一致) */
border-radius: 10px; /* 可选:轻微圆角更美观,不需要可删除 */
padding: 2px 4px; /* 内边距避免文字贴边 */
}</string>
</property>
<property name="text">
<string>必检</string>
</property>
</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="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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>
<zorder>statusFrame</zorder>
<zorder>SoftControlwidget</zorder>
<zorder>containerMain</zorder>
<zorder>frame</zorder>
</widget> </widget>
</widget> </widget>
<resources/> <resources/>
......
min.png

259 Bytes

off.png

504 Bytes

...@@ -10,5 +10,11 @@ ...@@ -10,5 +10,11 @@
<file>carSeries.png</file> <file>carSeries.png</file>
<file>Default.png</file> <file>Default.png</file>
<file>choosetime.png</file> <file>choosetime.png</file>
<file>signal.png</file>
<file>signalconnect.png</file>
<file>USB.png</file>
<file>USBconncet.png</file>
<file>off.png</file>
<file>min.png</file>
</qresource> </qresource>
</RCC> </RCC>
signal.png

522 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