From 0776e0aa0780eab8d7b5fe8a0a33d0593f2cc0b7 Mon Sep 17 00:00:00 2001 From: pimin <362371171@qq.com> Date: Mon, 3 Nov 2025 17:03:08 +0800 Subject: [PATCH] modified ImageFile --- src/translations/Dyt_zh_CN.qm | Bin 30079 -> 43970 bytes src/translations/Dyt_zh_CN.ts | 1909 +++++++++++++------------- src/ui/Panel/DataPanel.cpp | 2 + src/ui/Panel/DataPanelFactory.cpp | 9 + src/ui/Panel/DataPanelManager.cpp | 1 + src/ui/Panel/ImagePanel.cpp | 138 +- src/ui/Panel/ImagePanel.h | 9 + src/ui/WorkSpace/AddImageDlg.ui | 908 ++++-------- src/ui/WorkSpace/AddImageFileDlg.cpp | 355 ++--- src/ui/WorkSpace/AddImageFileDlg.h | 17 +- src/ui/WorkSpace/AddPolarDlg.ui | 146 +- src/workspace/FileEntry.cpp | 104 ++ src/workspace/FileEntry.h | 24 +- src/workspace/WorkSpace.cpp | 3 + 14 files changed, 1727 insertions(+), 1898 deletions(-) diff --git a/src/translations/Dyt_zh_CN.qm b/src/translations/Dyt_zh_CN.qm index 04a95a6bfcfd7ea9bad84102f3d25276e85e3754..b826ef6df970de4ac47b6b1a1709765baeef9aaf 100644 GIT binary patch literal 43970 zcmdUY34ByV(s(DCdnTC>5RgNjN+3iCH*#bVNPuu8B$+@6_hj;t3`}OmnaKqU$|Z!u zAjlyi>WYfTDvPM-y2$$JdaUcU>ZO-uym@cldoyp8Z}<1@|L<2Y zR8?13S65e8SNF?5T+{W1FZXQ!%cVV@Ty*;%-n*L+qF-9Su%KiDAsvsw-})0W@dUsD z@E`sUVCQcc>|M;B_gKK}w;B~h% zxUmz!IfQJy3SbK%<&Oev1^7O|rGz;2gcu)$zi$TkJ3@R10UiYiya#6hPBw#Gx-i&h zAcI5SV9-&T@5>(pHGocVu_jOV<;yCERMv88#gCYG3nUXUN;8`-&RSo*P zicIxXz_{N}rf!%@$gG28>W(`=PfN+v7l7XQB$>W?JM=3f46DfWn}E(%%3!bY4E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l0;zTQ@ zeXpU`m=(K?&tk#FzoAqu`mCTQJ&ZYKd?((H=EHahzbY__O?V{TIm#aZMc1 z2kJHR`B{S3{A2+=%ik}ca#zYZJk}Q-`8CZP-Q}L8GgW`1F?r-_7V7vE2eK{O`bmvk z%l?zZkW-rBrv2{a`;c2{RwQ)T2-^RDs1Ami?4A(vJLL%?bnNw<=09jnZSMbFYfAp2 zGidRtwHW;;jd8<6tH^hG-mKtkb#Dkwns`)q9;NrKiBkpw;zE-1ZT_UW)AM_Ie=Vuy zC1g}VJiky&W*3a-VlyhczA>IGF!0b`e$nWd< z2F1U%OQ8X#gC~SSC^f{^kRwH34=BJ;al&Loj{j9ISAsrnuR+c;PB{_F1e9|ry)fqb~WddPaWn~zNOtK@dPstsK z%jiGGgqV%DH#Svs0)G2mGP^FF!!HPI9jm)V=2QxaF2$UjsP83qQ{$Pn@~MF)OUAWR z!+1|UhCewp1%a^i%Xs{#nN7qIrbUPt(-FT^>tGlpD~4+m{zOFs;YUapEX42d1ND5~;(WYTm7{a(`mbF0CzBi{m>kj#1j)#zb7m|pV zhLO-#1*vaUl9lrmq^$LpQc=CWLOSr`HP+9q;StZ5W|ABKS}*_IBeH(Ob*XGdZTrS9 z$hb?^Zk#M!c6G%HqTEz2oR+-2#Mrb+!y`S(W@J;33w7heo)KcvlAj9aKe8i_db-rA z)JIK2vS+1UdOWsbvnNT|tRy!#FB)XQUP}W`(2pO|vBlr?{L~f~sf3QCYSF5+ceuTV z_DZbN&P>duw&*zh+M-`GB&Ao!!r^0De7kpqTtz1`(`3}v5Yzagt?c>HtpSPwzvxXO NgZiTA`U!p2{|iS&5MKZQ diff --git a/src/translations/Dyt_zh_CN.ts b/src/translations/Dyt_zh_CN.ts index 59f479bf..1ae2d029 100644 --- a/src/translations/Dyt_zh_CN.ts +++ b/src/translations/Dyt_zh_CN.ts @@ -7,213 +7,213 @@ Add Curve Data File - + 新增曲线图表 File Selection - + 文件选择 File Path: - + 文件路径: Select curve data file... - + 选择数据文件... ... - + File Name: - + 文件名称: - - + File Size: - + 文件大小: Chart Properties - + 图表属性 Chart Name: - + 图表名称: Chart 1 - + 图表1 Enter chart name... - + 输入图表名称... Chart Type: - + 图表类型: X Axis Title: - + X轴标题: Enter X axis title... - + 输入X轴标题... Y Axis Title: - + Y轴标题: Enter Y axis title... - + 输入Y轴标题... Time: - + 时间列: Axis Range Settings - + 轴设置 X Tick Count: - + X轴间隔数目: X Min: - + X轴最小值: Y Max: - + Y轴最大值: Y Min: - + Y轴最小值: X Max: - + X轴最大值: Y Tick Count: - + Y轴间隔数目: Curve Management - + 曲线管理 Curves: - + 曲线 Add Curve - + 添加 Remove - + 删除 Selected Curve Properties - + 曲线属性 Curve Name: - + 曲线名称: Enter curve name... - + 输入曲线名称... Curve Color: - + 曲线颜色: Select Color - + 选择颜色 background-color: rgb(255, 0, 0); border: 1px solid black; - + Data Start: - + 数据开始列: Data Stop: - + 数据结束列: X Value: - + X值数据列: Y Value: - + Y值数据列: Add File - + 确定 Cancel - + 取消 Curve %1 - + @@ -238,159 +238,159 @@ Validation Error - + 验证错误 Please select a data file. - + 请选择一个数据文件。 Selected file does not exist. - + 所选文件不存在。 Selected file is not readable. Please check file permissions. - + 所选文件不可读,请检查文件权限。 File is too large (over 100MB). Please select a smaller file. - + 文件太大(超过100MB),请选择一个较小的文件。 At least one curve must be defined. - + 必须至少定义一条曲线。 Curve %1 name cannot be empty. - + 曲线%1名称不能为空。 Curve name '%1' is duplicated. Please use different names. - + 曲线名称“%1”重复,请使用不同的名称。 Curve name '%1' is too long. Please limit to 50 characters. - + 曲线名称“%1”太长,请限制为50个字符。 Curve '%1' start and stop values must be greater than 0. - + 曲线“%1”的开始值和结束值必须大于0。 Curve '%1' start value cannot be greater than stop value. - + 曲线“%1”的起始值不能大于结束值。 Curve '%1' data range is too small. At least 2 data points are required. - + 曲线“%1”的数据范围太小,至少需要2个数据点。 Curve '%1' stop value is too large. Please ensure it does not exceed 1000000. - + 曲线“%1”的结束值太大,请确保它不超过1000000。 Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000. - + 曲线“%1”的X列超出范围,请确保它在-1000000到1000000之间。 Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000. - + 曲线“%1”的Y列超出范围,请确保它在-1000000到1000000之间。 Chart name cannot be empty. - + 图表名称不能为空。 Chart name is too long. Please limit to 100 characters. - + 图表名称太长,请限制为100个字符。 X axis title is too long. Please limit to 50 characters. - + X轴标题太长,请限制为50个字符。 Y axis title is too long. Please limit to 50 characters. - + Y轴标题太长,请限制为50个字符。 X axis minimum value must be less than maximum value. - + X轴最小值必须小于最大值。 Y axis minimum value must be less than maximum value. - + Y轴最小值必须小于最大值。 Time parameter cannot be negative. - + 时间参数不能为负。 Data Files (*.txt *.csv *.dat);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) Error - + 错误 Failed to create file entry - + 创建文件条目失败。 Unable to get current workspace - + 无法获取当前工作区间。 Curve file count has reached the limit (9 files) - + 曲线文件数已达到限制(9个文件) File already exists - + 文件已存在 File copy failed - + 文件复制失败 Invalid file - + 无效文件 Failed to add file - + 添加文件失败 @@ -398,360 +398,302 @@ Add Image - + 新增图片图表 - File Selection - + Curve Management + 图片管理 - - File Path: - + + Curves: + 图片 - - Select curve data file... - + + Add + 添加 - - ... - + + Remove + 删除 - - File Name: - + + Selected Curve Properties + 图片属性 - - - - - + + Names: + 名称: - - File Size: - + + Enter image names (comma separated)... + 输入图像名称(逗号分隔)... - - Angular Axis - + + Datas: + 数据: - - - Title: - + + Enter data values (comma separated integers)... + 输入数据值(逗号分隔的整数)... - - - Enter axis title... - + + Path: + 路径: - - - Min: - - - - - - Max: - + + Select data path... + 选择数据路径... - - Count: - + + ... + - - - Unit: - + + Suffix: + 后缀: - - - Enter axis Unit... - + + png + - - Radial Axis - + + Enter data suffix... + 输入数据后缀... - - Curve Management - + + Row Index: + 行编号: - - Curves: - + + + + - + - - Add - + + File Selection + 文件选择 - - Remove - + + File Path: + 文件路径: - - Selected Curve Properties - + + Select curve data file... + 选择数据文件... - - Name: - + + File Name: + 文件名称: - - Enter curve name... - + + File Size: + 文件大小: - - Color: - - - - - Select Color - - - - - background-color: rgb(255, 0, 0); border: 1px solid black; - - - - - Angular: - - - - - Radial: - - - - - X Value: - - - - - Y Value: - - - - + Add File - + 确定 - + Cancel - + 取消 - + Chart Properties - + 图表属性 - + Time: - + 时间列: - + Chart Name: - + 图表名称: - + Chart 1 - + 图表1 - + Enter chart name... - + 输入图表名称... AddImageFileDlg - + Data Files (*.txt *.csv *.dat);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) - + Add Image - + 新增图片图表 - - - - - - - - - - - - - - - + + + + + + + + + + + + Validation Error - + 验证错误 - + Please select a data file. - + 请选择一个数据文件。 - + Selected file does not exist. - + 所选文件不存在。 - + Selected file is not readable. Please check file permissions. - + 所选文件不可读,请检查文件权限。 - + File is too large (over 100MB). Please select a smaller file. - + 文件太大(超过100MB),请选择一个较小的文件。 - + At least one curve must be defined. - + 必须至少定义一条数据。 - - Curve %1 name cannot be empty. - + + Image %1 name cannot be empty. + 图像%1名称不能为空。 - - Curve name '%1' is duplicated. Please use different names. - + + Image %1 data cannot be empty. + 图像%1数据不能为空。 - - Curve name '%1' is too long. Please limit to 50 characters. - + + Image %1 name does not match data. + 图像%1名称不能匹配数据。 - - Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000. - + + Image %1 suffix cannot be empty. + 图像%1后缀不能为空。 - - Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000. - - - - + Chart name cannot be empty. - + 图表名称不能为空。 - + Chart name is too long. Please limit to 100 characters. - + 图表名称太长,请限制为100个字符。 - - Angular axis minimum value must be less than maximum value. - - - - - Radial axis minimum value must be less than maximum value. - - - - + Time parameter cannot be negative. - + 时间参数不能为负。 - - Curve %1 - + + Image %1 + 图像%1 - - - - + + + + Error - + 错误 - + Failed to create file entry - + 创建文件条目失败。 - + Unable to get current workspace - + 无法获取当前工作区间。 - - Polar file count has reached the limit (9 files) - + + Image file count has reached the limit (9 files) + 文件数已达到限制(9个文件) - + File already exists - + 文件已存在 - + File copy failed - + 文件复制失败 - + Invalid file - + 无效文件 - + Failed to add file - + 添加文件失败 - - Failed to create Polar file entry. - + + Failed to create Image file entry. + 创建图像文件失败。 + + + + Select Image directory + 选择图像目录 @@ -760,211 +702,211 @@ Add Light Data File - + 新增信号灯图表 File Selection - + 文件选择 File Path: - + 文件路径: Select light data file... - + 选择数据文件... ... - + File Name: - + 文件名称: - - + File Size: - + 文件大小: Chart Properties - + 图表属性 Chart Name: - + 图表名称: Chart 1 - + 图表1 Time: - + 时间列: Color Properties - + 颜色属性 Open Color: - + 亮灯颜色: Select Color - + 选择颜色 background-color: rgb(0, 255, 0); border: 1px solid black; - + Close Color: - + 灭灯颜色: background-color: rgb(255, 0, 0); border: 1px solid black; - + Light Management - + 信号灯管理 Lights: - + 信号灯 Add Light Row - + 添加 Remove - + 删除 Selected Light Properties - + 信号灯属性 Light Names: - + 名称: Enter light names (comma separated)... - + 输入名称(逗号分隔)... Light Datas: - + 数据值: Enter data values (comma separated integers)... - + 输入数据值(逗号分隔的整数)... Edit Data - + Row Index: - + 行编号: Add File - + 确定 Cancel - + 取消 Light Data Files (*.txt *.csv *.dat);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) Warning - + 警告 Please enter a Chart name. - + 输入图表名称。 Error - + 错误 Unable to get current workspace - + 无法获取当前工作区间。 Curve file count has reached the limit (9 files) - + 文件数已达到限制(9个文件) File already exists - + 文件已存在 File copy failed - + 文件复制失败 Invalid file - + 无效文件 Failed to add file - + 添加文件失败 @@ -972,22 +914,22 @@ ParamSetting - + 参数设置 param - + 参数 input param descript - + 输入参数说明 input value - + 输入值 @@ -995,62 +937,62 @@ AddParamSetting - + 参数名称 - + 描述 - + 数据类型 - + 最大值 - + 最小值 - + 小数点有效位 - + 初始值 - + 数据输入示例 - + 添加 - + 删除 - + 应用 - + @@ -1058,200 +1000,190 @@ Add Polar - + 新增极坐标图表 File Selection - + 文件选择 File Path: - + 文件路径: Select curve data file... - + 选择数据文件... ... - + File Name: - + 文件名称: - - + File Size: - + 文件大小: Angular Axis - + 角度轴 Title: - + 标题: Enter axis title... - + 输入轴标题... Min: - + 最小值: Max: - + 最大值: Count: - + 间隔数目: Unit: - + 单位: Enter axis Unit... - + 输入轴单位... Radial Axis - + 径向轴 Curve Management - + 曲线管理 Curves: - + 曲线 Add - + 添加 Remove - + 删除 Selected Curve Properties - + 曲线属性 - - Name: - - - - - Enter curve name... - - - - - Color: - - - - + Select Color - + 选择颜色 - + background-color: rgb(255, 0, 0); border: 1px solid black; - + - + Angular: - + 角度: - + + Color: + 颜色: + + + + Enter curve name... + 输入曲线名称... + + + + Name: + 名称: + + + Radial: - + 径向: - - X Value: - - - - - Y Value: - - - - + Add File - + 确定 - + Cancel - + 取消 - + Chart Properties - + 图表属性 - + Time: - + 时间列: - + Chart Name: - + 图表名称: - + Chart 1 - + 图表1 - + Enter chart name... - + 输入图表名称... @@ -1259,12 +1191,12 @@ Data Files (*.txt *.csv *.dat);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) Add Polar - + 新增极坐标图表 @@ -1283,87 +1215,87 @@ Validation Error - + 验证错误 Please select a data file. - + 请选择一个数据文件。 Selected file does not exist. - + 所选文件不存在。 Selected file is not readable. Please check file permissions. - + 所选文件不可读,请检查文件权限。 File is too large (over 100MB). Please select a smaller file. - + 文件太大(超过100MB),请选择一个较小的文件。 At least one curve must be defined. - + 必须至少定义一条数据。 Curve %1 name cannot be empty. - + 曲线%1名称不能为空。 Curve name '%1' is duplicated. Please use different names. - + 曲线名称“%1”重复,请使用不同的名称。 Curve name '%1' is too long. Please limit to 50 characters. - + 曲线名称“%1”太长,请限制为50个字符。 Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000. - + 曲线“%1”的X列超出范围,请确保它在-1000000到1000000之间。 Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000. - + 曲线“%1”的Y列超出范围,请确保它在-1000000到1000000之间。 Chart name cannot be empty. - + 图表名称不能为空。 Chart name is too long. Please limit to 100 characters. - + 图表名称太长,请限制为100个字符。 Angular axis minimum value must be less than maximum value. - + 角度轴最小值必须小于最大值。 Radial axis minimum value must be less than maximum value. - + 径向轴最小值必须小于最大值。 Time parameter cannot be negative. - + 时间参数不能为负。 Curve %1 - + 曲线%1 @@ -1371,47 +1303,47 @@ Error - + 错误 Failed to create file entry - + 创建文件条目失败。 Unable to get current workspace - + 无法获取当前工作区间。 Polar file count has reached the limit (9 files) - + 文件数已达到限制(9个文件) File already exists - + 文件已存在 File copy failed - + 文件复制失败 Invalid file - + 无效文件 Failed to add file - + 添加文件失败 Failed to create Polar file entry. - + 创建文件失败。 @@ -1419,290 +1351,290 @@ Add Surface File - + 新增曲面图表 File Selection - + 文件选择 Select surface data file... - + 选择数据文件... Browse... - + 浏览... Chart Properties - + 图表属性 X Axis Title: - + X轴标题: Y Axis Title: - + Y轴标题: Z Axis Title: - + Z轴标题: Time Parameter: - + 时间列: X Range: - + X轴范围: to - + X Count: - + X轴间隔数目: Y Range: - + Y轴范围: Y Count: - + Y轴间隔数目: Z Range: - + Z轴范围: Z Count: - + Z轴间隔数目: Name: - + 名称: Surface Management - + 曲面管理 Add Surface - + 添加 Remove - + 删除 Surface Properties - + 曲面属性 Color: - + 颜色: Select Color - + 选择颜色 Start Point: - + 数据开始列: End Point: - + 数据结束列: X-Map: - + X值映射: x - + y - + z - + Y-Map: - + Y值映射: Z-Map: - + Z值映射: Data Format Parameters - + X Column: - + Y Column: - + Z Column: - + Separator: - + , - + X Grid Size: - + Y Grid Size: - + Has Header Row - + Surface Data Files (*.txt *.dat *.csv);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) Add Surface Dialog - + 新增曲面图表 Warning - + 警告 Please add at least one surface. - + 必须至少定义一条数据。 Please fill in all axis titles. - + 请填写所有轴标题。 Select Surface Color - + 选择曲面颜色 Please enter a Surface name. - + 请输入曲面名称。 Error - + 错误 Failed to create surface file entry. - + 创建文件条目失败。 Unable to get current workspace - + 无法获取当前工作区间。 Surface file count has reached the limit (9 files) - + 文件数已达到限制(9个文件) File already exists - + 文件已存在 File copy failed - + 文件复制失败 Invalid file - + 无效文件 Failed to add file - + 添加文件失败 @@ -1711,193 +1643,193 @@ Add Table Data File - + 新增表格图表 File Selection - + 文件选择 File Path: - + 文件路径: Select table data file... - + 选择数据文件... ... - + File Name: - + 文件名称: - - + File Size: - + 文件大小: Basic Information - + 图表属性 Enter table name... - + 输入图表名称... Table Name: - + 图表名称: Time Parameter: - + 时间列: Table Headers Configuration - + 表头设置 File has header row - + Headers (comma-separated): - + 表头(逗号分隔): e.g., Time, Value1, Value2, Value3... - + Tip: Headers will be auto-detected if file has header row - + 提示:如果文件有标题行,将自动检测标题 Parsing Parameters - + Skip Rows: - + Auto-detect parameters - + Encoding: - + UTF-8 - + GBK - + ASCII - + ISO-8859-1 - + Curves Configuration - + Add Curve - + Remove Curve - + Curve Properties - + Name: - + Enter curve name... - + Color: - + Select Color - + Data: - + Enter data values (comma-separated)... - + Data values must match the number of headers - + Add File - + 确定 Cancel - + 取消 @@ -1907,127 +1839,89 @@ Warning - + 警告 Please configure table headers first. - + 请先配置表头。 Select Curve Color - + Please configure table headers. - + 请先配置表头。 Curve %1 name cannot be empty. - + Curve '%1' data cannot be empty. - + Curve '%1' data count (%2) doesn't match headers count (%3). - + Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*) - + 数据文件(*.txt*.csv*.dat);;所有文件(*.*) Please enter a table name. - + 请输入表格名称。 Error - + 错误 Failed to create table file entry. - + 创建文件条目失败。 Unable to get current workspace - + 无法获取当前工作区间。 Table file count has reached the limit - + 文件数已达到限制 File already exists - + 文件已存在 File copy failed - + 文件复制失败 Invalid file - + 无效文件 Failed to add file - - - - - ChartPlotMenuClass - - - ChartPlotMenu - - - - - Wave文件 - - - - - Report文件 - - - - - RD文件 - - - - - Matlab文件 - - - - - Lamp文件 - - - - - Run Simu - + 添加文件失败 @@ -2035,7 +1929,7 @@ CodeEdtUI - + @@ -2043,17 +1937,17 @@ 2D Curve - + 2D(lg) Curve - + 3D Curve - + @@ -2061,44 +1955,44 @@ Form - + x轴 - + 选择数据列 - + y轴 - + z轴 - + 已添加的曲线 - + 曲线名称 - + 颜色 - + @@ -2106,67 +2000,67 @@ ... - + x轴标题 - + 绑定x轴数据 - + y轴标题 - + 绑定y轴数据 - + z轴标题 - + 绑定z轴数据 - + y轴数据类型 - + 一般 - + 对数 - + 删除 - + 更新 - + 添加 - + @@ -2174,7 +2068,7 @@ Dialog - + @@ -2182,7 +2076,7 @@ DialogTitleBar - + @@ -2190,54 +2084,54 @@ Added a window - + Central area - + Left area - + Upper area - + Right area - + Underneath the area - + delete Window - + Move down - + Move up - + add window - + @@ -2245,7 +2139,7 @@ DockTitleBar - + @@ -2253,7 +2147,7 @@ DynamicDisplayMenu - + @@ -2261,7 +2155,7 @@ ModelBrowserPannal - + @@ -2269,52 +2163,52 @@ FileManagerMenu - + new workspace - + 新建工作区间 open workspace - + 打开工作区间 save workspace - + 保存工作区间 new wave file - + 新建曲线图表 new surface file - + 新建曲面图表 new table file - + 新建表格图表 new light file - + 新建信号灯图表 new polar file - + 新建极坐标图表 new image file - + 新建图像图表 @@ -2322,7 +2216,7 @@ FitCurveChartView - + @@ -2330,7 +2224,7 @@ FitCurveDialog - + @@ -2338,22 +2232,22 @@ Frame - + default - + silver - + blue - + @@ -2361,35 +2255,35 @@ LayoutSettingUI - + MainFrame - + Dyt - + - + file manager - + 文件管理 - + simu manager - + 仿真管理 - + play manager - + 回放管理 - + system manager - + 系统管理 @@ -2397,88 +2291,88 @@ MainWindow - + model elements - + 模型元素 preset models - + 预制模型 attribte - + 属性 - + Main View - + 主视图 ModelTreeWidget - + Add boke Entity - + Add lsjhqt Entity - + Add nimizi Entity - + Add tkdlj Entity - + Add jiaofan Entity - + Add satellite Entity - + Release Track - + Track - + Add Label Component - + Add Mesh Component - + Add Path Component - + Delete @@ -2488,12 +2382,12 @@ warning - + 警告 open dyt file failed - + 打开dyt文件失败。 @@ -2501,7 +2395,7 @@ PlanManagerMenu - + @@ -2509,7 +2403,7 @@ PlayManagerMenu - + @@ -2517,37 +2411,37 @@ play - + 开始 stop - + 停止 000.000 - + 00000 - + x1 - + up - + 加速 down - + 减速 @@ -2559,7 +2453,7 @@ warning - + 警告 @@ -2570,19 +2464,19 @@ has not workspace - + 无法获取当前工作区间。 not timestep - + 没有时戳 pause - + 暂停 @@ -2590,7 +2484,7 @@ Preset Models - + @@ -2598,30 +2492,39 @@ attribute - + 属性 - + WorkSpace - + 工作区间 - - + + + + + + CurveEntry + + + + + Entity - + 实体 - + ModelBase - + 模型 - + color base - + 颜色 @@ -2629,12 +2532,12 @@ Open File - + 打开文件 All Files (*) - + 所有文件(*) @@ -2642,12 +2545,12 @@ Open File - + 打开文件 All Files (*) - + 所有文件(*) @@ -2655,38 +2558,38 @@ error - + 错误 the appliaction is crash - + 应用程序崩溃 longitude: - + 经度: latitude: - + 纬度: altitude: - + 高度: Open Workspace - + 打开工作区间 Dyt Files (*.dyt) - + Dyt文件(*.dyt) @@ -2697,7 +2600,7 @@ prompt - + 提示 @@ -2708,41 +2611,76 @@ please create workspace first - + 请先创建工作区间。 Save Workspace - + 保存工作区间 - - + + Curve[%1] - + - - + + Surface[%1] - + - - + + Table[%1] - + - - + + Light[%1] - + - + Polar[%1] - + + + + + Image[%1] + + + + + Curve[%1] Name + + + + + Curve[%1] Color + + + + + Curve[%1] WaveStart + + + + + Curve[%1] WaveStop + + + + + Curve[%1] ReportX + + + + + Curve[%1] ReportY + @@ -2752,13 +2690,13 @@ True - + False - + @@ -2766,12 +2704,12 @@ True - + False - + @@ -2779,7 +2717,7 @@ Clear Char - + @@ -2787,7 +2725,7 @@ ... - + @@ -2795,71 +2733,71 @@ Red - + Green - + Blue - + Alpha - + QtConeWaveComponentManager - - + + ConeWaveComponent - + - + Height - + - + Radius - + - + waveCount - + - + waveSpeed - + - + baseColor - + - + waveColor - + - + ringBrightAlpha - + - + ringDarkAlpha - + @@ -2867,126 +2805,195 @@ Arrow - + Up Arrow - + Cross - + Wait - + IBeam - + Size Vertical - + Size Horizontal - + Size Backslash - + Size Slash - + Size All - + Blank - + Split Vertical - + Split Horizontal - + Pointing Hand - + Forbidden - + Open Hand - + Closed Hand - + What's This - + Busy + + + + + QtCurveEntryPropertyManager + + + + Curve[%1] Name + + + + + + Curve[%1] Color + + + + + + Curve[%1] WaveStart + + + + + + Curve[%1] WaveStop + + + + + + Curve[%1] ReportX + + + + + + Curve[%1] ReportY + + + + + Name + + + + + ChartType + + + + + Wave + + + + + Report + + + + + Curves + + + + + Count QtDashedLineComponentManager - - + + DashedLineComponent - + - + Start - + - + End - + - + Radius - + - + Color - + @@ -2994,25 +3001,25 @@ ... - + QtEntityPropertyManager - + Name - + 名称 - + Visible - + 显示 - + Transform - + 变换 @@ -3020,12 +3027,12 @@ ... - + Select Font - + 选择字体 @@ -3033,37 +3040,37 @@ Family - + Point Size - + Bold - + Italic - + Underline - + Strikeout - + Kerning - + @@ -3071,36 +3078,36 @@ <Invalid> - + %1, %2 - + Language - + Country - + QtMeshComponetManager - - + + MeshComponent - + 网格体组件 - + Mesh - + 网格体 @@ -3136,26 +3143,26 @@ warning - + 警告 open dyt file failed - + 打开dyt文件失败 QtPathComponentManager - - + + PathComponent - + 路径组件 - + Path - + 路径 @@ -3163,17 +3170,17 @@ (%1, %2) - + X - + Y - + @@ -3181,17 +3188,17 @@ (%1, %2) - + X - + Y - + @@ -3199,22 +3206,22 @@ [%1, %2, %3] (%4) - + [%1, %2] - + [%1, %2, %3] - + [%1, %2, %3] [%4, %5, %6] [%7, %8, %9] - + @@ -3222,27 +3229,27 @@ [(%1, %2), %3 x %4] - + X - + Y - + Width - + Height - + @@ -3250,27 +3257,27 @@ [(%1, %2), %3 x %4] - + X - + Y - + Width - + Height - + @@ -3278,17 +3285,17 @@ %1 x %2 - + Width - + Height - + @@ -3297,32 +3304,32 @@ <Invalid> - + [%1, %2, %3, %4] - + Horizontal Policy - + Vertical Policy - + Horizontal Stretch - + Vertical Stretch - + @@ -3330,17 +3337,17 @@ %1 x %2 - + Width - + Height - + @@ -3348,7 +3355,7 @@ ... - + @@ -3356,17 +3363,17 @@ Location - + 位置 Rotation - + 旋转 Scale - + 缩放 @@ -3374,12 +3381,12 @@ Property - + 属性 Value - + @@ -3387,90 +3394,100 @@ X - + Y - + Z - + QtWorkspacePropertyManager - + Name - - - - - Description - - - - - Timestep - + 名称 + Description + 说明 + + + + Timestep + 时戳 + + + CommondPath - - - - - Count - - - - - Curve[%1] - + 命令路径 - Surface[%1] - - - - - Table[%1] - - - - - Light[%1] - - - - - Curves - + Count + 数目 - Surfaces - + Curve[%1] + + + + + Surface[%1] + + + + + Table[%1] + + Light[%1] + + + + + Image[%1] + + + + + Curves + + + + + Surfaces + + + + Tables - + - + Lights - + - + Polars - + + + + + Images + @@ -3478,7 +3495,7 @@ SignalIndicatorLampUI - + @@ -3486,22 +3503,22 @@ no workspace - + 未打开工作区间 no commands - + 没有命令 Commands - + 命令 unnamed - + 未命名 @@ -3509,7 +3526,7 @@ SimuRunMenu - + @@ -3517,7 +3534,7 @@ DSurfaceDialog - + @@ -3525,32 +3542,32 @@ SystemManagerMenu - + exit - + 退出 windows setting - + 窗口设置 ui setting - + UI设置 question - + 提问 are you sure to exit - + 真的要退出吗? @@ -3558,7 +3575,7 @@ TargetListWgt - + @@ -3566,7 +3583,7 @@ ViewManagerMenu - + @@ -3574,7 +3591,7 @@ WindowManagerMenu - + @@ -3582,63 +3599,63 @@ New WorkSpace - + 新建工作区间 Name - + 名称 input workspace name - + 请输入工作区间 Path - + 路径 select workspace save path - + 选择工作区间保存路径 ... - + commond Path - + 命令路径 select commond file path - + 选择命令文件路径 describe - + 说明 Sure - + 确定 Cancel - + 取消 new workspace - + 新建工作区间 @@ -3648,52 +3665,52 @@ warning - + 警告 name or save path is empty, please check it - + 名称或保存路径为空,请检查! save current workspace? - + 保存当前工作区间? current path is contains current folder, do you want to overwrite it? - + 当前路径包含当前文件夹,是否要覆盖它? removeRecursively failed - + remove递归失败 mkpath failed - + mkpath失败 name is exits - + 名称已存在 save spaceWork directory - + 保存工作区间目录 select command xml file - + 选择命令xml文件 XML files (*.xml);;All files (*.*) - + diff --git a/src/ui/Panel/DataPanel.cpp b/src/ui/Panel/DataPanel.cpp index 74229192..0e176919 100644 --- a/src/ui/Panel/DataPanel.cpp +++ b/src/ui/Panel/DataPanel.cpp @@ -84,6 +84,8 @@ QString DataPanel::GetTypeDisplayName() const return "Light"; case FileEntryType::Polar: return "Polar"; + case FileEntryType::Image: + return "Image"; default: return "Unknown"; } diff --git a/src/ui/Panel/DataPanelFactory.cpp b/src/ui/Panel/DataPanelFactory.cpp index fc937f56..0f5b81d1 100644 --- a/src/ui/Panel/DataPanelFactory.cpp +++ b/src/ui/Panel/DataPanelFactory.cpp @@ -8,6 +8,7 @@ #include "TablePanel.h" #include "LightPanel.h" #include "PolarPanel.h" +#include "ImagePanel.h" DataPanel* DataPanelFactory::CreatePanel(FileEntryType fileType, int index, const QString& filePath, QWidget* parent) { @@ -36,6 +37,11 @@ DataPanel* DataPanelFactory::CreatePanel(FileEntryType fileType, int index, cons // TODO: Implement LightPanel LOG_WARN("PolarPanel not implemented yet, creating base DataPanel"); return new PolarPanel(index, filePath, parent); + + case FileEntryType::Image: + // TODO: Implement LightPanel + LOG_WARN("ImagePanel not implemented yet, creating base DataPanel"); + return new ImagePanel(index, filePath, parent); default: LOG_ERROR("Unsupported file type: {}", static_cast(fileType)); @@ -58,6 +64,7 @@ bool DataPanelFactory::IsTypeSupported(FileEntryType fileType) case FileEntryType::Table: case FileEntryType::Light: case FileEntryType::Polar: + case FileEntryType::Image: return true; default: return false; @@ -77,6 +84,8 @@ QString DataPanelFactory::GetTypeDisplayName(FileEntryType fileType) return "Light"; case FileEntryType::Polar: return "Polar"; + case FileEntryType::Image: + return "Image"; default: return "Unknown"; } diff --git a/src/ui/Panel/DataPanelManager.cpp b/src/ui/Panel/DataPanelManager.cpp index 4b09dc87..683beabf 100644 --- a/src/ui/Panel/DataPanelManager.cpp +++ b/src/ui/Panel/DataPanelManager.cpp @@ -66,6 +66,7 @@ void DataPanelManager::SetWorkspace(WorkSpace* workspace) UpdatePanelsForType(FileEntryType::Table); UpdatePanelsForType(FileEntryType::Light); UpdatePanelsForType(FileEntryType::Polar); + UpdatePanelsForType(FileEntryType::Image); LOG_INFO("DataPanelManager::SetWorkspace - Reapplying UI layout after panels created"); UiLayoutManager::Restore(mainWindow_, 1); } else { diff --git a/src/ui/Panel/ImagePanel.cpp b/src/ui/Panel/ImagePanel.cpp index 38a17688..e9ecc6f2 100644 --- a/src/ui/Panel/ImagePanel.cpp +++ b/src/ui/Panel/ImagePanel.cpp @@ -6,8 +6,11 @@ #include #include +#include "workspace/WorkSpaceManager.h" +#include "workspace/WorkSpace.h" + ImagePanel::ImagePanel(int index, const QString& filePath, QWidget* parent) - : DataPanel(index, FileEntryType::Table, filePath, parent) + : DataPanel(index, FileEntryType::Image, filePath, parent) { LOG_INFO("Created ImagePanel {} for file: {}", index, filePath.toStdString()); } @@ -45,8 +48,10 @@ void ImagePanel::RefreshPanel() void ImagePanel::InitUI() { QGridLayout* pMainLyt = new QGridLayout(this); - pMainLyt->setContentsMargins(5, 0, 5, 0); + pMainLyt->setContentsMargins(0, 0, 0, 0); setLayout(pMainLyt); + + setMinimumHeight(100); } QString ImagePanel::GetTypeDisplayName() const @@ -59,11 +64,39 @@ void ImagePanel::OnDataPanelUpdated(FileEntryImage* fileEntry) QString strName = fileEntry->GetName(); updateTitle(strName); + FileEntryImage::ChartProperties propChart = fileEntry->GetChartProperties(); + + QString strFile = fileEntry->GetPath() + "/" + fileEntry->GetFileName(); + FileEntryImage::ImageProperties listCurve = fileEntry->GetImageProperties(); + updateParseFile(strFile, propChart.timeParam, listCurve); } void ImagePanel::OnTimeChanged(double time) { - + if (m_dataImage.size() > 0) + { + QMap< double, QVariantMap >::const_iterator ite = m_dataImage.lowerBound(time); + if (ite == m_dataImage.end()) + { + ite--; + } + + QVariantMap mapData = ite.value(); + for (QVariantMap::Iterator it = mapData.begin(); it != mapData.end(); it++) + { + QString strKey = it.key(); + QString sData = it.value().toString(); + + QLabel* pImgLabel = m_mapImage.value(strKey); + if (pImgLabel) + { + QImage px; + px.load(sData); + + pImgLabel->setPixmap(QPixmap::fromImage(px)); + } + } + } } void ImagePanel::updateTitle(const QString & title) @@ -72,4 +105,103 @@ void ImagePanel::updateTitle(const QString & title) { dockWidget_->setWindowTitle(title); } +} + +void ImagePanel::updateParseFile(const QString & strFile, int nT, FileEntryImage::ImageProperties listCurve) +{ + if (strFile.isEmpty()) + { + QMessageBox::information(nullptr, QString::fromLocal8Bit("ʾ"), QString::fromLocal8Bit("ļ·")); + return; + } + + m_dataImage.clear(); + + clearImagePanel(); + + QGridLayout* layout = qobject_cast(this->layout()); + if (!layout) + { + return; + } + + QFile file(strFile); + if (file.open(QIODevice::ReadOnly)) + { + for (int nI = 0; nI < listCurve.size(); nI++) + { + FileEntryImage::ImageProperty prop = listCurve.at(nI); + + for (auto i = 0; i < prop.names.size(); ++i) + { + QLabel* pImgLabel = new QLabel; + pImgLabel->setStyleSheet(QString("background-color: rgb(190, 190, 190, 255);")); + pImgLabel->setScaledContents(true); + layout->addWidget(pImgLabel, nI, i); + + QString strKey = QString::number(nI) + "-" + QString::number(i); + m_mapImage.insert(strKey, pImgLabel); + } + } + + QString strDir = WorkSpaceManager::Get().GetCurrent()->GetDir(); + + while (!file.atEnd()) + { + QString strLine = file.readLine().simplified(); + if (!strLine.isEmpty()) + { + QStringList listLine = strLine.split(" "); + double t = listLine.at(nT).toDouble(); + + QVariantMap mapData; + for (int nI = 0; nI < listCurve.size(); nI++) + { + FileEntryImage::ImageProperty prop = listCurve.at(nI); + + for (int nJ = 0; nJ < prop.datas.size(); ++nJ) + { + int nIndex = prop.datas.at(nJ); + QString sImage = listLine.at(nIndex); + + if (prop.path.isEmpty()) + { + sImage = strDir + "/" + prop.names.at(nI) + "/" + sImage + "." + prop.suffix; + } + else + { + sImage = prop.path + "/" + prop.names.at(nI) + "/" + sImage + "." + prop.suffix; + } + + QString strKey = QString::number(nI) + "-" + QString::number(nJ); + mapData.insert(strKey, sImage); + } + } + m_dataImage.insert(t, mapData); + } + } + + file.close(); + } +} + +void ImagePanel::clearImagePanel() +{ + if (auto* layout = qobject_cast(this->layout())) + { + while (layout->count() > 0) + { + QLayoutItem* item = layout->takeAt(0); + if (item) + { + if (auto* w = item->widget()) + { + w->deleteLater(); + } + + delete item; + } + } + } + m_mapImage.clear(); } \ No newline at end of file diff --git a/src/ui/Panel/ImagePanel.h b/src/ui/Panel/ImagePanel.h index bdd862b9..4deec0be 100644 --- a/src/ui/Panel/ImagePanel.h +++ b/src/ui/Panel/ImagePanel.h @@ -4,6 +4,9 @@ #include "workspace/FileEntry.h" #include +#include +#include + class ImagePanel : public DataPanel { Q_OBJECT @@ -59,5 +62,11 @@ protected: private: void updateTitle(const QString& title); + void updateParseFile(const QString& strFile, int nT, FileEntryImage::ImageProperties listCurve); + void clearImagePanel(); + +private: + QMap m_mapImage; + QMap< double, QVariantMap > m_dataImage; }; diff --git a/src/ui/WorkSpace/AddImageDlg.ui b/src/ui/WorkSpace/AddImageDlg.ui index 4a21a0c5..b1b266e3 100644 --- a/src/ui/WorkSpace/AddImageDlg.ui +++ b/src/ui/WorkSpace/AddImageDlg.ui @@ -7,13 +7,302 @@ 0 0 580 - 756 + 601 Add Image + + + + Curve Management + + + + + + + + Curves: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 80 + 16777215 + + + + Add + + + + + + + + 0 + 0 + + + + + 60 + 16777215 + + + + Remove + + + + + + + + + + 16777215 + 120 + + + + false + + + + + + + false + + + Selected Curve Properties + + + + + + + + + 60 + 25 + + + + + 60 + 16777215 + + + + Names: + + + + + + + + 0 + 25 + + + + Enter image names (comma separated)... + + + + + + + + + + + + 60 + 25 + + + + + 60 + 16777215 + + + + Datas: + + + + + + + + 0 + 25 + + + + Enter data values (comma separated integers)... + + + + + + + + + + + + 60 + 25 + + + + + 60 + 16777215 + + + + Path: + + + + + + + + 0 + 25 + + + + true + + + Select data path... + + + + + + + + 0 + 25 + + + + ... + + + + + + + + + + + + 60 + 25 + + + + + 60 + 16777215 + + + + Suffix: + + + + + + + + 0 + 25 + + + + png + + + Enter data suffix... + + + + + + + + + + + + 0 + 25 + + + + + 60 + 16777215 + + + + Row Index: + + + + + + + - + + + + + + + + + + + @@ -117,624 +406,7 @@ - - - - Angular Axis - - - - - - - 0 - 25 - - - - Title: - - - - - - - - 0 - 25 - - - - Enter axis title... - - - - - - - - 0 - 25 - - - - Min: - - - - - - - - 0 - 25 - - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - - 0 - 25 - - - - Max: - - - - - - - - 0 - 25 - - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 360.000000000000000 - - - - - - - - 0 - 25 - - - - Count: - - - - - - - - 0 - 25 - - - - 2 - - - 50 - - - 13 - - - - - - - - 0 - 25 - - - - Unit: - - - - - - - - 0 - 25 - - - - Enter axis Unit... - - - - - - - - - - Radial Axis - - - - - - - 0 - 25 - - - - Title: - - - - - - - - 0 - 25 - - - - Enter axis title... - - - - - - - - 0 - 25 - - - - Min: - - - - - - - - 0 - 25 - - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - - 0 - 25 - - - - Max: - - - - - - - - 0 - 25 - - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - - 0 - 25 - - - - Count: - - - - - - - - 0 - 25 - - - - 2 - - - 50 - - - 6 - - - - - - - - 0 - 25 - - - - Unit: - - - - - - - - 0 - 25 - - - - Enter axis Unit... - - - - - - - - - Curve Management - - - - - - - - Curves: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 80 - 16777215 - - - - Add - - - - - - - - 0 - 0 - - - - - 60 - 16777215 - - - - Remove - - - - - - - - - - 16777215 - 120 - - - - false - - - - - - - false - - - Selected Curve Properties - - - - - - - 0 - 25 - - - - Name: - - - - - - - - 0 - 25 - - - - Enter curve name... - - - - - - - - 0 - 25 - - - - Color: - - - - - - - - - - 0 - 0 - - - - - 100 - 16777215 - - - - Select Color - - - - - - - - 50 - 25 - - - - background-color: rgb(255, 0, 0); border: 1px solid black; - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 0 - 25 - - - - Angular: - - - - - - - - 0 - 25 - - - - 0 - - - 999999 - - - 0 - - - - - - - - 0 - 25 - - - - Radial: - - - - - - - - 0 - 25 - - - - 0 - - - 999999 - - - 0 - - - - - - - false - - - X Value: - - - - - - - false - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - false - - - Y Value: - - - - - - - false - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - - - - diff --git a/src/ui/WorkSpace/AddImageFileDlg.cpp b/src/ui/WorkSpace/AddImageFileDlg.cpp index 49fa4914..7734197c 100644 --- a/src/ui/WorkSpace/AddImageFileDlg.cpp +++ b/src/ui/WorkSpace/AddImageFileDlg.cpp @@ -15,9 +15,7 @@ AddImageFileDlg::AddImageFileDlg(QWidget* parent) : BaseAddFileDlg(FileEntryType::Polar, parent) , ui(new Ui::AddImageDlg) , currentCurveIndex_(-1) - , selectedColor_(255, 0, 0) { - SetupUI(ui); SetTitle(getDialogTitle()); @@ -29,7 +27,6 @@ AddImageFileDlg::~AddImageFileDlg() delete ui; } - QString AddImageFileDlg::getFileFilter() const { return tr("Data Files (*.txt *.csv *.dat);;All Files (*.*)"); @@ -86,46 +83,36 @@ bool AddImageFileDlg::validateSpecificParams() } // Curve name uniqueness validation - QStringList curveNames; for (int i = 0; i < curves_.size(); ++i) { - const FileEntryPolar::LineProperty& curve = curves_[i]; - - if (curve.name.isEmpty()) + const FileEntryImage::ImageProperty& curve = curves_[i]; + int nSizeName = curve.names.size(); + if (curve.names.isEmpty()) { QMessageBox::warning(this, tr("Validation Error"), - tr("Curve %1 name cannot be empty.").arg(i + 1)); + tr("Image %1 name cannot be empty.").arg(i + 1)); return false; } - if (curveNames.contains(curve.name)) + int nSizeData = curve.datas.size(); + if (nSizeData == 0) { QMessageBox::warning(this, tr("Validation Error"), - tr("Curve name '%1' is duplicated. Please use different names.").arg(curve.name)); - return false; - } - curveNames.append(curve.name); - - // Curve name length validation - if (curve.name.length() > 50) - { - QMessageBox::warning(this, tr("Validation Error"), - tr("Curve name '%1' is too long. Please limit to 50 characters.").arg(curve.name)); + tr("Image %1 data cannot be empty.").arg(i + 1)); return false; } - // Report type validation - ensure x and y values are reasonable - if (curve.Angular < -1000000 || curve.Angular > 1000000) + if (nSizeName != nSizeData) { QMessageBox::warning(this, tr("Validation Error"), - tr("Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000.").arg(curve.name)); + tr("Image %1 name does not match data.").arg(i + 1)); return false; } - if (curve.Radial < -1000000 || curve.Radial > 1000000) + if (curve.suffix.isEmpty()) { QMessageBox::warning(this, tr("Validation Error"), - tr("Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000.").arg(curve.name)); + tr("Image %1 suffix cannot be empty.").arg(i + 1)); return false; } } @@ -143,25 +130,6 @@ bool AddImageFileDlg::validateSpecificParams() return false; } - // Axis range validation - double AngularMin = ui->SpinBox_Min_Angular->value(); - double AngularMax = ui->SpinBox_Max_Angular->value(); - double RadialMin = ui->SpinBox_Min_Radial->value(); - double RadialMax = ui->SpinBox_Max_Radial->value(); - - if (AngularMin > AngularMax) - { - QMessageBox::warning(this, tr("Validation Error"), tr("Angular axis minimum value must be less than maximum value.")); - return false; - } - - if (RadialMin > RadialMax) - { - QMessageBox::warning(this, tr("Validation Error"), tr("Radial axis minimum value must be less than maximum value.")); - return false; - } - - // Time parameter validation double timeParam = ui->SpinBox_time->value(); if (timeParam < 0) @@ -211,54 +179,17 @@ void AddImageFileDlg::setupConnections() connect(ui->curveListWidget, &QListWidget::itemClicked, this, &AddImageFileDlg::onCurveListWidgetItemClicked); // Curve properties connections - connect(ui->colorButton, &QPushButton::clicked, this, &AddImageFileDlg::onColorButtonClicked); - connect(ui->curveNameEdit, &QLineEdit::textChanged, this, &AddImageFileDlg::onCurveNameChanged); - connect(ui->SpinBox_Angular, QOverload::of(&QSpinBox::valueChanged), this, &AddImageFileDlg::onCurveDataChanged); - connect(ui->SpinBox_Radial, QOverload::of(&QSpinBox::valueChanged), this, &AddImageFileDlg::onCurveDataChanged); + connect(ui->image_name, &QLineEdit::textChanged, this, &AddImageFileDlg::onNamesChanged); + connect(ui->image_data, &QLineEdit::textChanged, this, &AddImageFileDlg::onDatasChanged); + connect(ui->image_path, &QLineEdit::textChanged, this, &AddImageFileDlg::onPathChanged); + connect(ui->image_suffix, &QLineEdit::textChanged, this, &AddImageFileDlg::onSuffixChanged); + connect(ui->image_btn, &QToolButton::clicked, this, &AddImageFileDlg::onSelectDir); // Dialog buttons connect(ui->addBtn, &QPushButton::clicked, this, &AddImageFileDlg::onSure); connect(ui->cancelBtn, &QPushButton::clicked, this, &QDialog::reject); } -void AddImageFileDlg::onColorButtonClicked() -{ - if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) - { - QColor color = QColorDialog::getColor(curves_[currentCurveIndex_].color, this, "Select Curve Color"); - if (color.isValid()) - { - curves_[currentCurveIndex_].color = color; - selectedColor_ = color; - updateColorPreview(color); - - // Update list item text - QListWidgetItem* item = ui->curveListWidget->item(currentCurveIndex_); - if (item) - { - QString itemText = QString("%1 (%2,%3) (%4,%5,%6)") - .arg(curves_[currentCurveIndex_].name) - .arg(curves_[currentCurveIndex_].Angular) - .arg(curves_[currentCurveIndex_].Radial) - .arg(color.red()) - .arg(color.green()) - .arg(color.blue()); - - item->setText(itemText); - } - } - } -} - -void AddImageFileDlg::updateColorPreview(const QColor& color) -{ - QString styleSheet = QString("background-color: rgb(%1, %2, %3); border: 1px solid black;") - .arg(color.red()) - .arg(color.green()) - .arg(color.blue()); - ui->colorPreview->setStyleSheet(styleSheet); -} - void AddImageFileDlg::onAddCurveClicked() { // Save current curve properties if any curve is selected @@ -268,29 +199,23 @@ void AddImageFileDlg::onAddCurveClicked() } // Create new curve with default properties based on chart type - FileEntryPolar::LineProperty newCurve; - newCurve.name = generateCurveName(); - newCurve.color = generateCurveColor(); - newCurve.Angular = 0.0; - newCurve.Radial = 0.0; - + FileEntryImage::ImageProperty newCurve; + newCurve.names = QStringList() << generateCurveName(); + newCurve.suffix = "png"; // Add to curves list and UI curves_.append(newCurve); // Add to UI list widget with appropriate display format - QString displayText = QString("%1 (%2,%3) (%4,%5,%6)") - .arg(newCurve.name) - .arg(newCurve.Angular) - .arg(newCurve.Radial) - .arg(newCurve.color.red()) - .arg(newCurve.color.green()) - .arg(newCurve.color.blue()); + QString displayText = QString("[%1] [%2] [Row: %3]") + .arg(newCurve.names.join(", ")) + .arg("") + .arg(curves_.size() - 1); QListWidgetItem* item = new QListWidgetItem(displayText); ui->curveListWidget->addItem(item); ++currentCurveIndex_; - ui->curveNameEdit->setText(newCurve.name); + updateCurveProperties(); // Select the new curve ui->curveListWidget->setCurrentRow(curves_.size() - 1); @@ -341,24 +266,8 @@ void AddImageFileDlg::onCurveListWidgetItemClicked(QListWidgetItem* item) } int clickedIndex = ui->curveListWidget->row(item); - if (clickedIndex == currentCurveIndex_) { - ui->curveNameEdit->setText(curves_[currentCurveIndex_].name); - - ui->SpinBox_Angular->blockSignals(true); - ui->SpinBox_Angular->setValue(curves_[currentCurveIndex_].Angular); - ui->SpinBox_Angular->blockSignals(false); - - ui->SpinBox_Radial->blockSignals(true); - ui->SpinBox_Radial->setValue(curves_[currentCurveIndex_].Radial); - ui->SpinBox_Radial->blockSignals(false); - - updateColorPreview(curves_[currentCurveIndex_].color); - enableCurveProperties(true); - - ui->curveNameEdit->setFocus(); - ui->curveNameEdit->selectAll(); } else { @@ -391,27 +300,18 @@ void AddImageFileDlg::onCurveSelectionChanged() } } -void AddImageFileDlg::onCurveNameChanged() +void AddImageFileDlg::onNamesChanged() { if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) { - QString newName = ui->curveNameEdit->text(); - curves_[currentCurveIndex_].name = newName; - - // Update list item text with appropriate format - QListWidgetItem* item = ui->curveListWidget->item(currentCurveIndex_); - if (item) - { - QString displayText = QString("%1 (%2,%3) (%4,%5,%6)") - .arg(newName) - .arg(curves_[currentCurveIndex_].Angular) - .arg(curves_[currentCurveIndex_].Radial) - .arg(curves_[currentCurveIndex_].color.red()) - .arg(curves_[currentCurveIndex_].color.green()) - .arg(curves_[currentCurveIndex_].color.blue()); - - item->setText(displayText); + QString namesText = ui->image_name->text(); + QStringList names = namesText.split(",", Qt::SkipEmptyParts); + for (int i = 0; i < names.size(); ++i) { + names[i] = names[i].trimmed(); } + curves_[currentCurveIndex_].names = names; + + updateListDisplay(); } } @@ -419,26 +319,37 @@ void AddImageFileDlg::saveCurveProperties() { if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) { - curves_[currentCurveIndex_].name = ui->curveNameEdit->text(); + QString namesText = ui->image_name->text(); + QStringList names = namesText.split(",", Qt::SkipEmptyParts); + for (int i = 0; i < names.size(); ++i) { + names[i] = names[i].trimmed(); + } + curves_[currentCurveIndex_].names = names; - // Save properties based on chart type - curves_[currentCurveIndex_].Angular = ui->SpinBox_Angular->value(); - curves_[currentCurveIndex_].Radial = ui->SpinBox_Radial->value(); + QString dataText = ui->image_data->text(); + QStringList dataStrings = dataText.split(",", Qt::SkipEmptyParts); + QList dataValues; - curves_[currentCurveIndex_].color = selectedColor_; + for (const QString& str : dataStrings) { + bool ok; + int dataValue = str.trimmed().toInt(&ok); + if (ok) { + dataValues.append(dataValue); + } + } + curves_[currentCurveIndex_].datas = dataValues; + + onPathChanged(); + onSuffixChanged(); } } void AddImageFileDlg::clearCurveProperties() { - ui->curveNameEdit->clear(); - - // Clear properties based on chart type - ui->SpinBox_Angular->setValue(0.0); - ui->SpinBox_Radial->setValue(0.0); - - selectedColor_ = QColor(255, 0, 0); - updateColorPreview(selectedColor_); + ui->image_name->clear(); + ui->image_data->clear(); + ui->image_path->clear(); + ui->image_suffix->setText("png"); } void AddImageFileDlg::enableCurveProperties(bool enabled) @@ -448,45 +359,37 @@ void AddImageFileDlg::enableCurveProperties(bool enabled) QString AddImageFileDlg::generateCurveName() { - return tr("Curve %1").arg(curves_.size() + 1); -} - -QColor AddImageFileDlg::generateCurveColor() const -{ - // Generate different colors for each curve - static const QColor colors[] = { - QColor(255, 0, 0), // Red - QColor(0, 255, 0), // Green - QColor(0, 0, 255), // Blue - QColor(255, 255, 0), // Yellow - QColor(255, 0, 255), // Magenta - QColor(0, 255, 255), // Cyan - QColor(255, 128, 0), // Orange - QColor(128, 0, 255), // Purple - }; - - int colorIndex = curves_.size() % (sizeof(colors) / sizeof(colors[0])); - return colors[colorIndex]; + return tr("Image %1").arg(curves_.size() + 1); } void AddImageFileDlg::updateCurveProperties() { if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) { - const FileEntryPolar::LineProperty& curve = curves_[currentCurveIndex_]; + const FileEntryImage::ImageProperty& curve = curves_[currentCurveIndex_]; - ui->curveNameEdit->setText(curve.name); + ui->image_name->blockSignals(true); + ui->image_name->setText(curve.names.join(", ")); + ui->image_name->blockSignals(false); - ui->SpinBox_Angular->blockSignals(true); - ui->SpinBox_Angular->setValue(curve.Angular); - ui->SpinBox_Angular->blockSignals(false); + QStringList dataStrings; + for (int dataValue : curve.datas) + { + dataStrings.append(QString::number(dataValue)); + } + ui->image_data->blockSignals(true); + ui->image_data->setText(dataStrings.join(", ")); + ui->image_data->blockSignals(false); - ui->SpinBox_Radial->blockSignals(true); - ui->SpinBox_Radial->setValue(curve.Radial); - ui->SpinBox_Radial->blockSignals(false); + ui->image_path->blockSignals(true); + ui->image_path->setText(curve.path); + ui->image_path->blockSignals(false); - selectedColor_ = curve.color; - updateColorPreview(curve.color); + ui->image_suffix->blockSignals(true); + ui->image_suffix->setText(curve.suffix); + ui->image_suffix->blockSignals(false); + + ui->rowIndexValue->setText(QString::number(currentCurveIndex_)); } } @@ -495,35 +398,25 @@ void AddImageFileDlg::onSure() if (validateSpecificParams()) { // Create FileEntryCurve object using factory function - auto fileEntryPolar = CreateFileEntryPolar(getSelectedFilePath()); - if (!fileEntryPolar) + auto fileEntryImage = CreateFileEntryImage(getSelectedFilePath()); + if (!fileEntryImage) { QMessageBox::warning(this, tr("Error"), tr("Failed to create file entry")); return; } // Set curve properties - fileEntryPolar->SetName(ui->chartNameEdit->text()); + fileEntryImage->SetName(ui->chartNameEdit->text()); // Set chart properties - FileEntryPolar::ChartProperties chartProps; - chartProps.AngularCount = ui->SpinBox_Count_Angular->value(); - chartProps.RadialCount = ui->SpinBox_Count_Radial->value(); - chartProps.AngularTitle = ui->TitleEdit_Angular->text(); - chartProps.RadialTitle = ui->TitleEdit_Radial->text(); - chartProps.AngularUnit = ui->TitleEdit_Unit_Angular->text(); - chartProps.RadialUnit = ui->TitleEdit_Unit_Radial->text(); - chartProps.AngularMin = ui->SpinBox_Min_Angular->value(); - chartProps.AngularMax = ui->SpinBox_Max_Angular->value(); - chartProps.RadialMin = ui->SpinBox_Min_Radial->value(); - chartProps.RadialMax = ui->SpinBox_Max_Radial->value(); + FileEntryImage::ChartProperties chartProps; chartProps.timeParam = ui->SpinBox_time->value(); - fileEntryPolar->SetChartProperties(chartProps); + fileEntryImage->SetChartProperties(chartProps); // Add curve properties for (const auto& curve : curves_) { - fileEntryPolar->AddLineProperty(curve); + fileEntryImage->AddImageProperty(curve); } // Get current workspace @@ -535,13 +428,13 @@ void AddImageFileDlg::onSure() } // Add FileEntryCurve to workspace using new SetFileEntry method - auto result = workspace->SetFileEntry(fileEntryPolar); + auto result = workspace->SetFileEntry(fileEntryImage); if (result != WorkSpace::FileEntryResult::Ok) { QString errorMsg; switch (result) { case WorkSpace::FileEntryResult::LimitExceeded: - errorMsg = tr("Polar file count has reached the limit (9 files)"); + errorMsg = tr("Image file count has reached the limit (9 files)"); break; case WorkSpace::FileEntryResult::Duplicate: errorMsg = tr("File already exists"); @@ -564,30 +457,78 @@ void AddImageFileDlg::onSure() } else { - QMessageBox::critical(this, tr("Error"), tr("Failed to create Polar file entry.")); + QMessageBox::critical(this, tr("Error"), tr("Failed to create Image file entry.")); } } -void AddImageFileDlg::onCurveDataChanged() +void AddImageFileDlg::onDatasChanged() { if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) { - curves_[currentCurveIndex_].Angular = ui->SpinBox_Angular->value(); - curves_[currentCurveIndex_].Radial = ui->SpinBox_Radial->value(); + QString dataText = ui->image_data->text(); + QStringList dataStrings = dataText.split(',', Qt::SkipEmptyParts); + + QList dataValues; + for (const QString& str : dataStrings) { + bool ok; + int dataValue = str.trimmed().toInt(&ok); + if (ok) { + dataValues.append(dataValue); + } + } + curves_[currentCurveIndex_].datas = dataValues; + + updateListDisplay(); + } +} + +void AddImageFileDlg::onPathChanged() +{ + if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) + { + QString text = ui->image_path->text(); + curves_[currentCurveIndex_].path = text; + } +} + +void AddImageFileDlg::onSuffixChanged() +{ + if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) + { + QString text = ui->image_suffix->text(); + curves_[currentCurveIndex_].suffix = text; + } +} + +void AddImageFileDlg::updateListDisplay() +{ + if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) + { + QStringList dataStrings; + for (int dataValue : curves_[currentCurveIndex_].datas) { + dataStrings.append(QString::number(dataValue)); + } - // Update display text in list widget QListWidgetItem* item = ui->curveListWidget->item(currentCurveIndex_); - if (item) + if (item) { - QString itemText = QString("%1 (%2,%3) (%4,%5,%6)") - .arg(curves_[currentCurveIndex_].name) - .arg(curves_[currentCurveIndex_].Angular) - .arg(curves_[currentCurveIndex_].Radial) - .arg(curves_[currentCurveIndex_].color.red()) - .arg(curves_[currentCurveIndex_].color.green()) - .arg(curves_[currentCurveIndex_].color.blue()); - - item->setText(itemText); + item->setText(QString("[%1] [%2] [Row: %3]") + .arg(curves_[currentCurveIndex_].names.join(", ")) + .arg(dataStrings.join(", ")) + .arg(currentCurveIndex_)); } } +} + +void AddImageFileDlg::onSelectDir() +{ + QString workspacePath = WorkSpaceManager::Get().GetCurrent()->GetDir(); + const QString imagePath = QFileDialog::getExistingDirectory(this, + tr("Select Image directory"), workspacePath, QFileDialog::DontResolveSymlinks); + if (imagePath.isEmpty()) + { + return; + } + + ui->image_path->setText(imagePath); } \ No newline at end of file diff --git a/src/ui/WorkSpace/AddImageFileDlg.h b/src/ui/WorkSpace/AddImageFileDlg.h index adbb4a96..6b005c48 100644 --- a/src/ui/WorkSpace/AddImageFileDlg.h +++ b/src/ui/WorkSpace/AddImageFileDlg.h @@ -32,30 +32,31 @@ protected: void updateFileInfo(const QString& filePath) override; private slots: - void onColorButtonClicked(); void onAddCurveClicked(); void onRemoveCurveClicked(); void onCurveListWidgetItemClicked(class QListWidgetItem* item); void onCurveSelectionChanged(); - void onCurveNameChanged(); - void onCurveDataChanged(); + void onNamesChanged(); + void onDatasChanged(); + void onPathChanged(); + void onSuffixChanged(); + void onSelectDir(); void onSure(); private: void setupConnections(); - void updateColorPreview(const QColor& color); void updateCurveProperties(); void saveCurveProperties(); void clearCurveProperties(); void enableCurveProperties(bool enabled); QString generateCurveName(); - QColor generateCurveColor() const; + + void updateListDisplay(); private: Ui::AddImageDlg* ui; int currentCurveIndex_; - QColor selectedColor_; - FileEntryPolar::ChartProperties chartProperties_; - FileEntryPolar::LineProperties curves_; + FileEntryImage::ChartProperties chartProperties_; + FileEntryImage::ImageProperties curves_; }; \ No newline at end of file diff --git a/src/ui/WorkSpace/AddPolarDlg.ui b/src/ui/WorkSpace/AddPolarDlg.ui index 6f865f4a..45459416 100644 --- a/src/ui/WorkSpace/AddPolarDlg.ui +++ b/src/ui/WorkSpace/AddPolarDlg.ui @@ -521,42 +521,22 @@ Selected Curve Properties - - + + 0 25 - - Name: + + 0 - - - - - - - 0 - 25 - + + 999999 - - Enter curve name... - - - - - - - - 0 - 25 - - - - Color: + + 0 @@ -625,6 +605,32 @@ + + + + + 0 + 25 + + + + Color: + + + + + + + + 0 + 25 + + + + Enter curve name... + + + @@ -644,6 +650,19 @@ + + + + + 0 + 25 + + + + Name: + + + @@ -657,77 +676,6 @@ - - - - - 0 - 25 - - - - 0 - - - 999999 - - - 0 - - - - - - - false - - - X Value: - - - - - - - false - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - - - - - false - - - Y Value: - - - - - - - false - - - -999999.000000000000000 - - - 999999.000000000000000 - - - 0.000000000000000 - - - diff --git a/src/workspace/FileEntry.cpp b/src/workspace/FileEntry.cpp index db727c98..48d8e4c2 100644 --- a/src/workspace/FileEntry.cpp +++ b/src/workspace/FileEntry.cpp @@ -864,4 +864,108 @@ const FileEntryImage::ImageProperties& FileEntryImage::GetImageProperties() cons FileEntryImage* FileEntryImage::AsImage() { return this; +} + +//SaveFiles implementation +bool FileEntryImage::SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) { + if (!scene || !doc) { + LOG_ERROR("Invalid XML parameters"); + return false; + } + + // 创建 元素 + tinyxml2::XMLElement* chartElement = doc->NewElement("chart"); + scene->InsertEndChild(chartElement); + + // 设置chart属性 + chartElement->SetAttribute("name", name_.toUtf8().constData()); + chartElement->SetAttribute("path", fileName_.toUtf8().constData()); + chartElement->SetAttribute("t", chartProperties_.timeParam); + + for (const auto& imageRow : imageProperties_) { + tinyxml2::XMLElement* imageElement = doc->NewElement("curve"); + chartElement->InsertEndChild(imageElement); + + // 保存name列表(以逗号分隔) + QString nameStr = imageRow.names.join(","); + imageElement->SetAttribute("names", nameStr.toUtf8().constData()); + + // 保存data列表(以逗号分隔) + QStringList dataStrList; + for (int value : imageRow.datas) { + dataStrList.append(QString::number(value)); + } + QString dataStr = dataStrList.join(","); + imageElement->SetAttribute("datas", dataStr.toUtf8().constData()); + + imageElement->SetAttribute("path", imageRow.path.toUtf8().constData()); + imageElement->SetAttribute("suffix", imageRow.suffix.toUtf8().constData()); + } + + return true; +} + +//ParseFiles implementation +bool FileEntryImage::ParseFiles(const tinyxml2::XMLElement* chartElement) { + if (!chartElement) { + LOG_ERROR("Invalid XML element"); + return false; + } + + // 解析chart属性 + const char* nameAttr = chartElement->Attribute("name"); + const char* pathAttr = chartElement->Attribute("path"); + if (nameAttr) name_ = QString::fromUtf8(nameAttr); + if (pathAttr) { + QString fullPath = QString::fromUtf8(pathAttr); + QFileInfo fileInfo(fullPath); + fileName_ = fileInfo.fileName(); + path_ = fileInfo.absolutePath(); + } + + chartProperties_.timeParam = chartElement->DoubleAttribute("t", 0.0); + + // 解析所有元素 + imageProperties_.clear(); + for (const tinyxml2::XMLElement* imageElement = chartElement->FirstChildElement("curve"); + imageElement != nullptr; + imageElement = imageElement->NextSiblingElement("curve")) { + + ImageProperty imageRow; + + // 解析name属性(逗号分隔的字符串列表) + const char* nameAttr = imageElement->Attribute("names"); + if (nameAttr) { + QString nameStr = QString::fromUtf8(nameAttr); + imageRow.names = nameStr.split(",", Qt::SkipEmptyParts); + } + + // 解析data属性(逗号分隔的整数列表) + const char* dataAttr = imageElement->Attribute("datas"); + if (dataAttr) { + QString dataStr = QString::fromUtf8(dataAttr); + QStringList dataStrList = dataStr.split(",", Qt::SkipEmptyParts); + for (const QString& str : dataStrList) { + bool ok; + int value = str.trimmed().toInt(&ok); + if (ok) { + imageRow.datas.append(value); + } + } + } + + const char* pathAttr = imageElement->Attribute("path"); + if (pathAttr) { + imageRow.path = QString::fromUtf8(pathAttr); + } + + const char* suffixAttr = imageElement->Attribute("suffix"); + if (suffixAttr) { + imageRow.suffix = QString::fromUtf8(suffixAttr); + } + + imageProperties_.append(imageRow); + } + + return true; } \ No newline at end of file diff --git a/src/workspace/FileEntry.h b/src/workspace/FileEntry.h index e1f36cbd..edfa3345 100644 --- a/src/workspace/FileEntry.h +++ b/src/workspace/FileEntry.h @@ -362,24 +362,14 @@ private: class FileEntryImage : public FileEntry { public: struct ChartProperties { - int AngularCount; - int RadialCount; - QString AngularTitle; - QString RadialTitle; - double AngularMin; - double AngularMax; - double RadialMin; - double RadialMax; - QString AngularUnit; - QString RadialUnit; double timeParam; // 对应XML的t }; struct ImageProperty { - QString name; - QColor color; - int Angular; - int Radial; + QStringList names; + QList datas; + QString path; + QString suffix; }; using ImageProperties = QList; @@ -400,9 +390,9 @@ public: // Type conversion FileEntryImage* AsImage() override; - //// XML处理方法 - //bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) override; - //bool ParseFiles(const tinyxml2::XMLElement* element) override; + // XML处理方法 + bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) override; + bool ParseFiles(const tinyxml2::XMLElement* element) override; private: ChartProperties chartProperties_; diff --git a/src/workspace/WorkSpace.cpp b/src/workspace/WorkSpace.cpp index aedda10d..fa4e221b 100644 --- a/src/workspace/WorkSpace.cpp +++ b/src/workspace/WorkSpace.cpp @@ -162,6 +162,9 @@ bool WorkSpace::SetFileEntryCount(FileEntryType type, int count) { case FileEntryType::Polar: fileEntry = std::make_shared(); break; + case FileEntryType::Image: + fileEntry = std::make_shared(); + break; default: return false; // Invalid type }