From d60b9b633047b73d774b49191dea7d3c65d45579 Mon Sep 17 00:00:00 2001 From: crqiqi77 Date: Tue, 24 Mar 2026 11:10:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=B1=E5=BA=A6=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/formdraw.cpp | 22 ++++------------------ logPlus/forminfo.h | 6 +++--- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 0939dcb..87e20dd 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -186,24 +186,10 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) // 读取json // 设置左侧显示属性 设置界面样式 -// if(pInfo->m_strUnit.isEmpty()){ -// pInfo->m_strUnit = "(米)"; -// pInfo->m_strUnitFont = QFont("微软雅黑", 16); -// } - - - -// bool m_sdDrawStartDepth; // 绘制起点深度 -// bool m_sdDrawEndDepth; // 绘制终点深度 - - - - -// int m_sdMajorTickLineLength = 3; // 主刻度线长度 -// int m_sdMajorTickLineWidth = 1; // 主刻度线宽度 -// int m_sdMinorTickLineLength = 1; // 次刻度线长度 -// int m_sdMinorTickLineWidth = 1; // 次刻度线宽度 - + if(pInfo->m_strUnit.isEmpty()){ + pInfo->m_strUnit = "(米)"; + pInfo->m_strUnitFont = QFont("微软雅黑", 10); + } initDepth(curv); // 读json后 重新设置样式 // 头部高度 diff --git a/logPlus/forminfo.h b/logPlus/forminfo.h index 763e956..99efe21 100644 --- a/logPlus/forminfo.h +++ b/logPlus/forminfo.h @@ -81,8 +81,8 @@ public: QString m_strTrackName; QString m_strLineName; QString m_strAliasName;//显示名称 - QString m_strUnit;//单位 - QFont m_strUnitFont;//单位字体 + QString m_strUnit = "(米)";//单位 + QFont m_strUnitFont = QFont("微软雅黑", 10);//单位字体 // 头部高度 int m_headHeight = 100; @@ -198,7 +198,7 @@ public: // 深度 QColor m_sdRulerColor; // 标尺颜色 double m_sdInterval = 20; // 间隔 - QFont m_sdLabelFont = QFont("微软雅黑", 16); // 标注字体 + QFont m_sdLabelFont = QFont("微软雅黑", 10); // 标注字体 double m_sdRotationAngle = 0.0; // 旋转(°) bool m_sdDrawStartDepth; // 绘制起点深度 bool m_sdDrawEndDepth; // 绘制终点深度