diff --git a/AnalysisTool-release/bin/DSCAnalysisTool_1.0.5.exe b/AnalysisTool-release/bin/DSCAnalysisTool_1.0.5.exe deleted file mode 100644 index b6eb46e..0000000 Binary files a/AnalysisTool-release/bin/DSCAnalysisTool_1.0.5.exe and /dev/null differ diff --git a/AnalysisTool-release/bin/DSCAnalysisTool_1.2.1.exe b/AnalysisTool-release/bin/DSCAnalysisTool_1.2.1.exe new file mode 100644 index 0000000..f3d52fd Binary files /dev/null and b/AnalysisTool-release/bin/DSCAnalysisTool_1.2.1.exe differ diff --git a/AnalysisTool-release/bin/log/20250701.log b/AnalysisTool-release/bin/log/20250701.log new file mode 100644 index 0000000..af048b5 --- /dev/null +++ b/AnalysisTool-release/bin/log/20250701.log @@ -0,0 +1,16 @@ +[2025-07-01 09:44:49,675] main... +[2025-07-01 09:44:49,675] config file existed. +[2025-07-01 09:44:49,714] version:1.2.1.0 +[2025-07-01 09:44:49,745] setEventHandlerEnable...0 +[2025-07-01 09:44:52,111] slotSendData:9 +[2025-07-01 09:44:52,112] slotSendData:a5 5a 06 83 50 00 4a a8 46 +[2025-07-01 09:44:52,112] All data writen. +[2025-07-01 09:44:52,112] open serial port. +[2025-07-01 09:44:52,114] ----------------------- recv +[2025-07-01 09:44:52,114] oit value:0 +[2025-07-01 09:44:52,114] Global::_experimentOITFlag = true; +[2025-07-01 09:44:52,114] initAtmosphereValue:1 +[2025-07-01 09:45:00,523] localLength:1 +[2025-07-01 09:45:08,659] localLength:1 +[2025-07-01 09:45:53,165] localLength:1 +[2025-07-01 09:45:59,668] localLength:1 diff --git a/AnalysisTool-release/bin/log/20250707.log b/AnalysisTool-release/bin/log/20250707.log new file mode 100644 index 0000000..7de218c --- /dev/null +++ b/AnalysisTool-release/bin/log/20250707.log @@ -0,0 +1,4 @@ +[2025-07-07 09:53:12,042] main... +[2025-07-07 09:53:12,042] config file existed. +[2025-07-07 09:53:12,052] version:1.2.1.0 +[2025-07-07 09:53:12,059] setEventHandlerEnable...0 diff --git a/AnalysisTool-release/bin/log/20250730.log b/AnalysisTool-release/bin/log/20250730.log new file mode 100644 index 0000000..9b1fcf8 --- /dev/null +++ b/AnalysisTool-release/bin/log/20250730.log @@ -0,0 +1,51 @@ +[2025-07-30 11:07:09,318] main... +[2025-07-30 11:07:09,318] config file existed. +[2025-07-30 11:07:09,330] version:1.2.1.0 +[2025-07-30 11:07:09,351] setEventHandlerEnable...0 +[2025-07-30 11:31:18,369] context menu... +[2025-07-30 11:31:18,369] not selected... +[2025-07-30 14:05:28,843] main... +[2025-07-30 14:05:28,843] config file existed. +[2025-07-30 14:05:28,853] version:1.2.1.0 +[2025-07-30 14:05:28,861] setEventHandlerEnable...0 +[2025-07-30 14:05:33,335] xlsx sample weight: +[2025-07-30 14:05:33,335] Cell does not exist. +[2025-07-30 14:05:33,338] analysis operation vtr size:0 +[2025-07-30 14:05:34,768] xlsx sample weight: +[2025-07-30 14:05:34,770] Cell does not exist. +[2025-07-30 14:05:34,772] analysis operation vtr size:0 +[2025-07-30 14:05:34,772] analysis operation vtr size:0 +[2025-07-30 14:05:35,422] xlsx sample weight:7 +[2025-07-30 14:05:35,422] Cell does not exist. +[2025-07-30 14:05:35,424] analysis operation vtr size:0 +[2025-07-30 14:05:35,424] analysis operation vtr size:0 +[2025-07-30 14:05:35,424] analysis operation vtr size:0 +[2025-07-30 14:05:36,151] xlsx sample weight:8.17 +[2025-07-30 14:05:36,155] ana op size:0 +[2025-07-30 14:05:36,162] analysis operation vtr size:0 +[2025-07-30 14:05:36,162] analysis operation vtr size:0 +[2025-07-30 14:05:36,162] analysis operation vtr size:0 +[2025-07-30 14:05:36,164] analysis operation vtr size:0 +[2025-07-30 14:08:34,913] xlsx sample weight:26.89 +[2025-07-30 14:08:34,915] Cell does not exist. +[2025-07-30 14:08:34,919] analysis operation vtr size:0 +[2025-07-30 14:08:34,919] analysis operation vtr size:0 +[2025-07-30 14:08:34,919] analysis operation vtr size:0 +[2025-07-30 14:08:34,919] analysis operation vtr size:0 +[2025-07-30 14:08:34,919] analysis operation vtr size:0 +[2025-07-30 14:08:37,053] clearExperimentData... +[2025-07-30 14:08:38,053] xlsx sample weight:26.89 +[2025-07-30 14:08:38,054] Cell does not exist. +[2025-07-30 14:08:38,060] analysis operation vtr size:0 +[2025-07-30 14:08:39,146] xlsx sample weight:0 +[2025-07-30 14:08:39,149] Cell does not exist. +[2025-07-30 14:08:39,153] analysis operation vtr size:0 +[2025-07-30 14:08:39,153] analysis operation vtr size:0 +[2025-07-30 14:08:42,340] clearExperimentData... +[2025-07-30 14:08:43,113] xlsx sample weight:0 +[2025-07-30 14:08:43,115] Cell does not exist. +[2025-07-30 14:08:43,119] analysis operation vtr size:0 +[2025-07-30 14:18:57,092] phaseTotalVtr size:1 +[2025-07-30 14:18:57,092] cutoff temp:150 +[2025-07-30 14:18:57,092] Key:1, Onoff: +[2025-07-30 15:14:53,632] Base,standard,sample not selected. diff --git a/experiment_data/analysis_state/~$peak.xlsx b/experiment_data/analysis_state/~$peak.xlsx new file mode 100644 index 0000000..d4a5841 Binary files /dev/null and b/experiment_data/analysis_state/~$peak.xlsx differ diff --git a/experiment_data/analysis_state/~$样品.xlsx b/experiment_data/analysis_state/~$样品.xlsx new file mode 100644 index 0000000..d4a5841 Binary files /dev/null and b/experiment_data/analysis_state/~$样品.xlsx differ diff --git a/experiment_data/sample_data/new_2025_07_01_09_57_49.xlsx b/experiment_data/sample_data/new_2025_07_01_09_57_49.xlsx new file mode 100644 index 0000000..3fe7da4 Binary files /dev/null and b/experiment_data/sample_data/new_2025_07_01_09_57_49.xlsx differ diff --git a/experiment_data/sample_data/new_2025_07_01_09_59_41.xlsx b/experiment_data/sample_data/new_2025_07_01_09_59_41.xlsx new file mode 100644 index 0000000..c737171 Binary files /dev/null and b/experiment_data/sample_data/new_2025_07_01_09_59_41.xlsx differ diff --git a/experiment_data/sample_data/new_2025_07_01_10_00_24.xlsx b/experiment_data/sample_data/new_2025_07_01_10_00_24.xlsx new file mode 100644 index 0000000..7f1fcf3 Binary files /dev/null and b/experiment_data/sample_data/new_2025_07_01_10_00_24.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_08_55_28.xlsx b/experiment_data/sample_data/new_2025_09_26_08_55_28.xlsx new file mode 100644 index 0000000..2c170fd Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_08_55_28.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_08_57_32.xlsx b/experiment_data/sample_data/new_2025_09_26_08_57_32.xlsx new file mode 100644 index 0000000..9abca9d Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_08_57_32.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_08_57_38.xlsx b/experiment_data/sample_data/new_2025_09_26_08_57_38.xlsx new file mode 100644 index 0000000..8c30e4d Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_08_57_38.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_08_57_49.xlsx b/experiment_data/sample_data/new_2025_09_26_08_57_49.xlsx new file mode 100644 index 0000000..8341d3f Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_08_57_49.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_13_49_36.xlsx b/experiment_data/sample_data/new_2025_09_26_13_49_36.xlsx new file mode 100644 index 0000000..d94a40c Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_13_49_36.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_13_53_34.xlsx b/experiment_data/sample_data/new_2025_09_26_13_53_34.xlsx new file mode 100644 index 0000000..9c87847 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_13_53_34.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_15_38.xlsx b/experiment_data/sample_data/new_2025_09_26_14_15_38.xlsx new file mode 100644 index 0000000..0c7ff07 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_15_38.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_28_48.xlsx b/experiment_data/sample_data/new_2025_09_26_14_28_48.xlsx new file mode 100644 index 0000000..bdab070 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_28_48.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_45_06.xlsx b/experiment_data/sample_data/new_2025_09_26_14_45_06.xlsx new file mode 100644 index 0000000..4b554a1 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_45_06.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_50_06.xlsx b/experiment_data/sample_data/new_2025_09_26_14_50_06.xlsx new file mode 100644 index 0000000..2133a96 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_50_06.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_52_01.xlsx b/experiment_data/sample_data/new_2025_09_26_14_52_01.xlsx new file mode 100644 index 0000000..bd81f7e Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_52_01.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_59_24.xlsx b/experiment_data/sample_data/new_2025_09_26_14_59_24.xlsx new file mode 100644 index 0000000..fc955a6 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_59_24.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_14_59_45.xlsx b/experiment_data/sample_data/new_2025_09_26_14_59_45.xlsx new file mode 100644 index 0000000..9761b1e Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_14_59_45.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_12_39.xlsx b/experiment_data/sample_data/new_2025_09_26_16_12_39.xlsx new file mode 100644 index 0000000..54f41ff Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_12_39.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_13_33.xlsx b/experiment_data/sample_data/new_2025_09_26_16_13_33.xlsx new file mode 100644 index 0000000..0625d0b Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_13_33.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_15_08.xlsx b/experiment_data/sample_data/new_2025_09_26_16_15_08.xlsx new file mode 100644 index 0000000..28f2b5a Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_15_08.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_18_46.xlsx b/experiment_data/sample_data/new_2025_09_26_16_18_46.xlsx new file mode 100644 index 0000000..4195958 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_18_46.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_22_16.xlsx b/experiment_data/sample_data/new_2025_09_26_16_22_16.xlsx new file mode 100644 index 0000000..e0cbe82 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_22_16.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_22_27.xlsx b/experiment_data/sample_data/new_2025_09_26_16_22_27.xlsx new file mode 100644 index 0000000..9cbf2f2 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_22_27.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_24_25.xlsx b/experiment_data/sample_data/new_2025_09_26_16_24_25.xlsx new file mode 100644 index 0000000..e40d8ad Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_24_25.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_26_44.xlsx b/experiment_data/sample_data/new_2025_09_26_16_26_44.xlsx new file mode 100644 index 0000000..e27269a Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_26_44.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_27_08.xlsx b/experiment_data/sample_data/new_2025_09_26_16_27_08.xlsx new file mode 100644 index 0000000..4b54e81 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_27_08.xlsx differ diff --git a/experiment_data/sample_data/new_2025_09_26_16_29_45.xlsx b/experiment_data/sample_data/new_2025_09_26_16_29_45.xlsx new file mode 100644 index 0000000..6645108 Binary files /dev/null and b/experiment_data/sample_data/new_2025_09_26_16_29_45.xlsx differ diff --git a/src/.cache/clangd/index/CMakeCXXCompilerId.cpp.B2729662287364D1.idx b/src/.cache/clangd/index/CMakeCXXCompilerId.cpp.B2729662287364D1.idx new file mode 100644 index 0000000..c8f671f Binary files /dev/null and b/src/.cache/clangd/index/CMakeCXXCompilerId.cpp.B2729662287364D1.idx differ diff --git a/src/.cache/clangd/index/aboutform.cpp.41D567385878C337.idx b/src/.cache/clangd/index/aboutform.cpp.41D567385878C337.idx new file mode 100644 index 0000000..63eb7d7 Binary files /dev/null and b/src/.cache/clangd/index/aboutform.cpp.41D567385878C337.idx differ diff --git a/src/.cache/clangd/index/aboutform.h.C76EFC9AB9C07F37.idx b/src/.cache/clangd/index/aboutform.h.C76EFC9AB9C07F37.idx new file mode 100644 index 0000000..2b55a79 Binary files /dev/null and b/src/.cache/clangd/index/aboutform.h.C76EFC9AB9C07F37.idx differ diff --git a/src/.cache/clangd/index/analysisoperationrecorder.cpp.FFDDEA0838604290.idx b/src/.cache/clangd/index/analysisoperationrecorder.cpp.FFDDEA0838604290.idx new file mode 100644 index 0000000..f826444 Binary files /dev/null and b/src/.cache/clangd/index/analysisoperationrecorder.cpp.FFDDEA0838604290.idx differ diff --git a/src/.cache/clangd/index/analysisoperationrecorder.h.831AC27832DA767D.idx b/src/.cache/clangd/index/analysisoperationrecorder.h.831AC27832DA767D.idx new file mode 100644 index 0000000..57a7c3f Binary files /dev/null and b/src/.cache/clangd/index/analysisoperationrecorder.h.831AC27832DA767D.idx differ diff --git a/src/.cache/clangd/index/analysissettingform.cpp.3491810068FBAC18.idx b/src/.cache/clangd/index/analysissettingform.cpp.3491810068FBAC18.idx new file mode 100644 index 0000000..1412ec8 Binary files /dev/null and b/src/.cache/clangd/index/analysissettingform.cpp.3491810068FBAC18.idx differ diff --git a/src/.cache/clangd/index/analysissettingform.h.C087B8DDE4BF565C.idx b/src/.cache/clangd/index/analysissettingform.h.C087B8DDE4BF565C.idx new file mode 100644 index 0000000..44d6810 Binary files /dev/null and b/src/.cache/clangd/index/analysissettingform.h.C087B8DDE4BF565C.idx differ diff --git a/src/.cache/clangd/index/axissettingform.cpp.0BA745C27D470874.idx b/src/.cache/clangd/index/axissettingform.cpp.0BA745C27D470874.idx new file mode 100644 index 0000000..31f114c Binary files /dev/null and b/src/.cache/clangd/index/axissettingform.cpp.0BA745C27D470874.idx differ diff --git a/src/.cache/clangd/index/axissettingform.h.16BDA6002B57BE2D.idx b/src/.cache/clangd/index/axissettingform.h.16BDA6002B57BE2D.idx new file mode 100644 index 0000000..6640016 Binary files /dev/null and b/src/.cache/clangd/index/axissettingform.h.16BDA6002B57BE2D.idx differ diff --git a/src/.cache/clangd/index/centralwidget.cpp.966ACEB142F1EE12.idx b/src/.cache/clangd/index/centralwidget.cpp.966ACEB142F1EE12.idx new file mode 100644 index 0000000..81f936e Binary files /dev/null and b/src/.cache/clangd/index/centralwidget.cpp.966ACEB142F1EE12.idx differ diff --git a/src/.cache/clangd/index/centralwidget.h.588D9A45E10D3A7F.idx b/src/.cache/clangd/index/centralwidget.h.588D9A45E10D3A7F.idx new file mode 100644 index 0000000..9508fb8 Binary files /dev/null and b/src/.cache/clangd/index/centralwidget.h.588D9A45E10D3A7F.idx differ diff --git a/src/.cache/clangd/index/coefficientselectionform.cpp.EAB312A6E84A36F9.idx b/src/.cache/clangd/index/coefficientselectionform.cpp.EAB312A6E84A36F9.idx new file mode 100644 index 0000000..3cdf1ae Binary files /dev/null and b/src/.cache/clangd/index/coefficientselectionform.cpp.EAB312A6E84A36F9.idx differ diff --git a/src/.cache/clangd/index/coefficientselectionform.h.ACEA1F7DBC49CAB9.idx b/src/.cache/clangd/index/coefficientselectionform.h.ACEA1F7DBC49CAB9.idx new file mode 100644 index 0000000..9a27efc Binary files /dev/null and b/src/.cache/clangd/index/coefficientselectionform.h.ACEA1F7DBC49CAB9.idx differ diff --git a/src/.cache/clangd/index/confighandler.cpp.439735CD7B87DDFC.idx b/src/.cache/clangd/index/confighandler.cpp.439735CD7B87DDFC.idx new file mode 100644 index 0000000..44960d9 Binary files /dev/null and b/src/.cache/clangd/index/confighandler.cpp.439735CD7B87DDFC.idx differ diff --git a/src/.cache/clangd/index/confighandler.h.C9D2456385762F00.idx b/src/.cache/clangd/index/confighandler.h.C9D2456385762F00.idx new file mode 100644 index 0000000..f4a0d67 Binary files /dev/null and b/src/.cache/clangd/index/confighandler.h.C9D2456385762F00.idx differ diff --git a/src/.cache/clangd/index/dataparser.cpp.2106BA19DD4D57AD.idx b/src/.cache/clangd/index/dataparser.cpp.2106BA19DD4D57AD.idx new file mode 100644 index 0000000..050fd1c Binary files /dev/null and b/src/.cache/clangd/index/dataparser.cpp.2106BA19DD4D57AD.idx differ diff --git a/src/.cache/clangd/index/dataparser.h.D0D13647D60AFF76.idx b/src/.cache/clangd/index/dataparser.h.D0D13647D60AFF76.idx new file mode 100644 index 0000000..25e706b Binary files /dev/null and b/src/.cache/clangd/index/dataparser.h.D0D13647D60AFF76.idx differ diff --git a/src/.cache/clangd/index/defines.h.814E11B094AE4B82.idx b/src/.cache/clangd/index/defines.h.814E11B094AE4B82.idx new file mode 100644 index 0000000..30a4313 Binary files /dev/null and b/src/.cache/clangd/index/defines.h.814E11B094AE4B82.idx differ diff --git a/src/.cache/clangd/index/degreeofcrystallinityform.cpp.D15F39BE390BCB4C.idx b/src/.cache/clangd/index/degreeofcrystallinityform.cpp.D15F39BE390BCB4C.idx new file mode 100644 index 0000000..21386ac Binary files /dev/null and b/src/.cache/clangd/index/degreeofcrystallinityform.cpp.D15F39BE390BCB4C.idx differ diff --git a/src/.cache/clangd/index/degreeofcrystallinityform.h.2B0B28DD50C905FB.idx b/src/.cache/clangd/index/degreeofcrystallinityform.h.2B0B28DD50C905FB.idx new file mode 100644 index 0000000..11d8c86 Binary files /dev/null and b/src/.cache/clangd/index/degreeofcrystallinityform.h.2B0B28DD50C905FB.idx differ diff --git a/src/.cache/clangd/index/degreeofcureform.cpp.5EFABD55810BB92D.idx b/src/.cache/clangd/index/degreeofcureform.cpp.5EFABD55810BB92D.idx new file mode 100644 index 0000000..d087db6 Binary files /dev/null and b/src/.cache/clangd/index/degreeofcureform.cpp.5EFABD55810BB92D.idx differ diff --git a/src/.cache/clangd/index/degreeofcureform.h.478F961572F20B2F.idx b/src/.cache/clangd/index/degreeofcureform.h.478F961572F20B2F.idx new file mode 100644 index 0000000..d3a8b11 Binary files /dev/null and b/src/.cache/clangd/index/degreeofcureform.h.478F961572F20B2F.idx differ diff --git a/src/.cache/clangd/index/doc_src_qtxlsx.cpp.268808BC7ABE9E5A.idx b/src/.cache/clangd/index/doc_src_qtxlsx.cpp.268808BC7ABE9E5A.idx new file mode 100644 index 0000000..fd9fd93 Binary files /dev/null and b/src/.cache/clangd/index/doc_src_qtxlsx.cpp.268808BC7ABE9E5A.idx differ diff --git a/src/.cache/clangd/index/enthalpydatacorrectionform.cpp.68AFA0E514804F2E.idx b/src/.cache/clangd/index/enthalpydatacorrectionform.cpp.68AFA0E514804F2E.idx new file mode 100644 index 0000000..6b07c38 Binary files /dev/null and b/src/.cache/clangd/index/enthalpydatacorrectionform.cpp.68AFA0E514804F2E.idx differ diff --git a/src/.cache/clangd/index/enthalpydatacorrectionform.h.17930260BCDE1AD8.idx b/src/.cache/clangd/index/enthalpydatacorrectionform.h.17930260BCDE1AD8.idx new file mode 100644 index 0000000..0d66150 Binary files /dev/null and b/src/.cache/clangd/index/enthalpydatacorrectionform.h.17930260BCDE1AD8.idx differ diff --git a/src/.cache/clangd/index/eventhandler.cpp.B73F016B9FDD9C7B.idx b/src/.cache/clangd/index/eventhandler.cpp.B73F016B9FDD9C7B.idx new file mode 100644 index 0000000..b826953 Binary files /dev/null and b/src/.cache/clangd/index/eventhandler.cpp.B73F016B9FDD9C7B.idx differ diff --git a/src/.cache/clangd/index/eventhandler.h.973D5677004D1A01.idx b/src/.cache/clangd/index/eventhandler.h.973D5677004D1A01.idx new file mode 100644 index 0000000..0205b9f Binary files /dev/null and b/src/.cache/clangd/index/eventhandler.h.973D5677004D1A01.idx differ diff --git a/src/.cache/clangd/index/experimentsettingform.cpp.A895DF59E29886BD.idx b/src/.cache/clangd/index/experimentsettingform.cpp.A895DF59E29886BD.idx new file mode 100644 index 0000000..3ca28f0 Binary files /dev/null and b/src/.cache/clangd/index/experimentsettingform.cpp.A895DF59E29886BD.idx differ diff --git a/src/.cache/clangd/index/experimentsettingform.h.549E2F7B66B45F74.idx b/src/.cache/clangd/index/experimentsettingform.h.549E2F7B66B45F74.idx new file mode 100644 index 0000000..eadb4e3 Binary files /dev/null and b/src/.cache/clangd/index/experimentsettingform.h.549E2F7B66B45F74.idx differ diff --git a/src/.cache/clangd/index/filemanager.cpp.525FCE6AC2C893C9.idx b/src/.cache/clangd/index/filemanager.cpp.525FCE6AC2C893C9.idx new file mode 100644 index 0000000..8feb65f Binary files /dev/null and b/src/.cache/clangd/index/filemanager.cpp.525FCE6AC2C893C9.idx differ diff --git a/src/.cache/clangd/index/filemanager.h.4B45DF84DAD9C56E.idx b/src/.cache/clangd/index/filemanager.h.4B45DF84DAD9C56E.idx new file mode 100644 index 0000000..a015db2 Binary files /dev/null and b/src/.cache/clangd/index/filemanager.h.4B45DF84DAD9C56E.idx differ diff --git a/src/.cache/clangd/index/global.cpp.D9F28B29E8B8D1A4.idx b/src/.cache/clangd/index/global.cpp.D9F28B29E8B8D1A4.idx new file mode 100644 index 0000000..f775086 Binary files /dev/null and b/src/.cache/clangd/index/global.cpp.D9F28B29E8B8D1A4.idx differ diff --git a/src/.cache/clangd/index/global.h.FE9BA478DF7D1A22.idx b/src/.cache/clangd/index/global.h.FE9BA478DF7D1A22.idx new file mode 100644 index 0000000..a5cce58 Binary files /dev/null and b/src/.cache/clangd/index/global.h.FE9BA478DF7D1A22.idx differ diff --git a/src/.cache/clangd/index/instrumentcoefficientform.cpp.425903C8387F1E3F.idx b/src/.cache/clangd/index/instrumentcoefficientform.cpp.425903C8387F1E3F.idx new file mode 100644 index 0000000..7e2dcb1 Binary files /dev/null and b/src/.cache/clangd/index/instrumentcoefficientform.cpp.425903C8387F1E3F.idx differ diff --git a/src/.cache/clangd/index/instrumentcoefficientform.h.9937F91DBC9FBE49.idx b/src/.cache/clangd/index/instrumentcoefficientform.h.9937F91DBC9FBE49.idx new file mode 100644 index 0000000..30d4e60 Binary files /dev/null and b/src/.cache/clangd/index/instrumentcoefficientform.h.9937F91DBC9FBE49.idx differ diff --git a/src/.cache/clangd/index/itemmanager.cpp.0EAE24FCB65A984C.idx b/src/.cache/clangd/index/itemmanager.cpp.0EAE24FCB65A984C.idx new file mode 100644 index 0000000..1110f54 Binary files /dev/null and b/src/.cache/clangd/index/itemmanager.cpp.0EAE24FCB65A984C.idx differ diff --git a/src/.cache/clangd/index/itemmanager.h.F8184D5A2B5EE74D.idx b/src/.cache/clangd/index/itemmanager.h.F8184D5A2B5EE74D.idx new file mode 100644 index 0000000..2ee99cc Binary files /dev/null and b/src/.cache/clangd/index/itemmanager.h.F8184D5A2B5EE74D.idx differ diff --git a/src/.cache/clangd/index/leftwidget.cpp.C3497D6A59EAB924.idx b/src/.cache/clangd/index/leftwidget.cpp.C3497D6A59EAB924.idx new file mode 100644 index 0000000..e902d0f Binary files /dev/null and b/src/.cache/clangd/index/leftwidget.cpp.C3497D6A59EAB924.idx differ diff --git a/src/.cache/clangd/index/leftwidget.h.233B27437BA39CF7.idx b/src/.cache/clangd/index/leftwidget.h.233B27437BA39CF7.idx new file mode 100644 index 0000000..f9548d3 Binary files /dev/null and b/src/.cache/clangd/index/leftwidget.h.233B27437BA39CF7.idx differ diff --git a/src/.cache/clangd/index/localcustomplot.cpp.55D449C0CE3DB096.idx b/src/.cache/clangd/index/localcustomplot.cpp.55D449C0CE3DB096.idx new file mode 100644 index 0000000..927a8f1 Binary files /dev/null and b/src/.cache/clangd/index/localcustomplot.cpp.55D449C0CE3DB096.idx differ diff --git a/src/.cache/clangd/index/localcustomplot.h.46B2EF9AF523E314.idx b/src/.cache/clangd/index/localcustomplot.h.46B2EF9AF523E314.idx new file mode 100644 index 0000000..b397d7d Binary files /dev/null and b/src/.cache/clangd/index/localcustomplot.h.46B2EF9AF523E314.idx differ diff --git a/src/.cache/clangd/index/logger.cpp.E1E75B2A818E94E5.idx b/src/.cache/clangd/index/logger.cpp.E1E75B2A818E94E5.idx new file mode 100644 index 0000000..1a94d9e Binary files /dev/null and b/src/.cache/clangd/index/logger.cpp.E1E75B2A818E94E5.idx differ diff --git a/src/.cache/clangd/index/logger.h.B07D0A6D07CDAF5B.idx b/src/.cache/clangd/index/logger.h.B07D0A6D07CDAF5B.idx new file mode 100644 index 0000000..5451559 Binary files /dev/null and b/src/.cache/clangd/index/logger.h.B07D0A6D07CDAF5B.idx differ diff --git a/src/.cache/clangd/index/lowesssmoother.cpp.355E8556C83B97CC.idx b/src/.cache/clangd/index/lowesssmoother.cpp.355E8556C83B97CC.idx new file mode 100644 index 0000000..9e78b7e Binary files /dev/null and b/src/.cache/clangd/index/lowesssmoother.cpp.355E8556C83B97CC.idx differ diff --git a/src/.cache/clangd/index/lowesssmoother.h.62DCD35F9168F5D8.idx b/src/.cache/clangd/index/lowesssmoother.h.62DCD35F9168F5D8.idx new file mode 100644 index 0000000..d3ee431 Binary files /dev/null and b/src/.cache/clangd/index/lowesssmoother.h.62DCD35F9168F5D8.idx differ diff --git a/src/.cache/clangd/index/main.cpp.0EAC258B229EC6FF.idx b/src/.cache/clangd/index/main.cpp.0EAC258B229EC6FF.idx new file mode 100644 index 0000000..4c823a9 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.0EAC258B229EC6FF.idx differ diff --git a/src/.cache/clangd/index/main.cpp.1466285FC0A01ABD.idx b/src/.cache/clangd/index/main.cpp.1466285FC0A01ABD.idx new file mode 100644 index 0000000..71a6daa Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.1466285FC0A01ABD.idx differ diff --git a/src/.cache/clangd/index/main.cpp.1CE4B57EFFBC08F0.idx b/src/.cache/clangd/index/main.cpp.1CE4B57EFFBC08F0.idx new file mode 100644 index 0000000..0ea7a0d Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.1CE4B57EFFBC08F0.idx differ diff --git a/src/.cache/clangd/index/main.cpp.1FAB249E9DB1281B.idx b/src/.cache/clangd/index/main.cpp.1FAB249E9DB1281B.idx new file mode 100644 index 0000000..f169e90 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.1FAB249E9DB1281B.idx differ diff --git a/src/.cache/clangd/index/main.cpp.25F90907AF30CF73.idx b/src/.cache/clangd/index/main.cpp.25F90907AF30CF73.idx new file mode 100644 index 0000000..e2a7f44 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.25F90907AF30CF73.idx differ diff --git a/src/.cache/clangd/index/main.cpp.2C0D6FE25F0E87E0.idx b/src/.cache/clangd/index/main.cpp.2C0D6FE25F0E87E0.idx new file mode 100644 index 0000000..4471b9b Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.2C0D6FE25F0E87E0.idx differ diff --git a/src/.cache/clangd/index/main.cpp.36EB7F6C84240259.idx b/src/.cache/clangd/index/main.cpp.36EB7F6C84240259.idx new file mode 100644 index 0000000..46c3fb3 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.36EB7F6C84240259.idx differ diff --git a/src/.cache/clangd/index/main.cpp.47396D81DFE867D5.idx b/src/.cache/clangd/index/main.cpp.47396D81DFE867D5.idx new file mode 100644 index 0000000..e39a09d Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.47396D81DFE867D5.idx differ diff --git a/src/.cache/clangd/index/main.cpp.4915AE9A01646925.idx b/src/.cache/clangd/index/main.cpp.4915AE9A01646925.idx new file mode 100644 index 0000000..145727c Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.4915AE9A01646925.idx differ diff --git a/src/.cache/clangd/index/main.cpp.4CC7A2F9E82EF3C1.idx b/src/.cache/clangd/index/main.cpp.4CC7A2F9E82EF3C1.idx new file mode 100644 index 0000000..5842daf Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.4CC7A2F9E82EF3C1.idx differ diff --git a/src/.cache/clangd/index/main.cpp.5663F355D5B4C825.idx b/src/.cache/clangd/index/main.cpp.5663F355D5B4C825.idx new file mode 100644 index 0000000..dabf976 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.5663F355D5B4C825.idx differ diff --git a/src/.cache/clangd/index/main.cpp.66E364F6927606E7.idx b/src/.cache/clangd/index/main.cpp.66E364F6927606E7.idx new file mode 100644 index 0000000..78f4db1 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.66E364F6927606E7.idx differ diff --git a/src/.cache/clangd/index/main.cpp.6D546819C5AB4369.idx b/src/.cache/clangd/index/main.cpp.6D546819C5AB4369.idx new file mode 100644 index 0000000..d8a1eb6 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.6D546819C5AB4369.idx differ diff --git a/src/.cache/clangd/index/main.cpp.730669DCCE407A91.idx b/src/.cache/clangd/index/main.cpp.730669DCCE407A91.idx new file mode 100644 index 0000000..21efadb Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.730669DCCE407A91.idx differ diff --git a/src/.cache/clangd/index/main.cpp.7BBE747E8F719544.idx b/src/.cache/clangd/index/main.cpp.7BBE747E8F719544.idx new file mode 100644 index 0000000..1d6730c Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.7BBE747E8F719544.idx differ diff --git a/src/.cache/clangd/index/main.cpp.8E121437A3EF8572.idx b/src/.cache/clangd/index/main.cpp.8E121437A3EF8572.idx new file mode 100644 index 0000000..b805ec8 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.8E121437A3EF8572.idx differ diff --git a/src/.cache/clangd/index/main.cpp.9CA7C4CB3C3149E1.idx b/src/.cache/clangd/index/main.cpp.9CA7C4CB3C3149E1.idx new file mode 100644 index 0000000..dfade93 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.9CA7C4CB3C3149E1.idx differ diff --git a/src/.cache/clangd/index/main.cpp.A080E34BA8D85D40.idx b/src/.cache/clangd/index/main.cpp.A080E34BA8D85D40.idx new file mode 100644 index 0000000..2ef118e Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.A080E34BA8D85D40.idx differ diff --git a/src/.cache/clangd/index/main.cpp.CE44B1C34EAC967A.idx b/src/.cache/clangd/index/main.cpp.CE44B1C34EAC967A.idx new file mode 100644 index 0000000..ac6b546 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.CE44B1C34EAC967A.idx differ diff --git a/src/.cache/clangd/index/main.cpp.CE59A87BCFEE07E0.idx b/src/.cache/clangd/index/main.cpp.CE59A87BCFEE07E0.idx new file mode 100644 index 0000000..b7e49ad Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.CE59A87BCFEE07E0.idx differ diff --git a/src/.cache/clangd/index/main.cpp.E53FA38F406E9B81.idx b/src/.cache/clangd/index/main.cpp.E53FA38F406E9B81.idx new file mode 100644 index 0000000..edd0211 Binary files /dev/null and b/src/.cache/clangd/index/main.cpp.E53FA38F406E9B81.idx differ diff --git a/src/.cache/clangd/index/mainwindow.cpp.9EA7619C9360D044.idx b/src/.cache/clangd/index/mainwindow.cpp.9EA7619C9360D044.idx new file mode 100644 index 0000000..312d8df Binary files /dev/null and b/src/.cache/clangd/index/mainwindow.cpp.9EA7619C9360D044.idx differ diff --git a/src/.cache/clangd/index/mainwindow.h.D832B59191103771.idx b/src/.cache/clangd/index/mainwindow.h.D832B59191103771.idx new file mode 100644 index 0000000..9883781 Binary files /dev/null and b/src/.cache/clangd/index/mainwindow.h.D832B59191103771.idx differ diff --git a/src/.cache/clangd/index/oitautoanalysis.cpp.7AE63ABFF101D70A.idx b/src/.cache/clangd/index/oitautoanalysis.cpp.7AE63ABFF101D70A.idx new file mode 100644 index 0000000..a6b8c59 Binary files /dev/null and b/src/.cache/clangd/index/oitautoanalysis.cpp.7AE63ABFF101D70A.idx differ diff --git a/src/.cache/clangd/index/oitautoanalysis.h.A0C40E816B636DB4.idx b/src/.cache/clangd/index/oitautoanalysis.h.A0C40E816B636DB4.idx new file mode 100644 index 0000000..24b2101 Binary files /dev/null and b/src/.cache/clangd/index/oitautoanalysis.h.A0C40E816B636DB4.idx differ diff --git a/src/.cache/clangd/index/oitautoanalysisparamform.cpp.6F60BD2D78CB9943.idx b/src/.cache/clangd/index/oitautoanalysisparamform.cpp.6F60BD2D78CB9943.idx new file mode 100644 index 0000000..605b603 Binary files /dev/null and b/src/.cache/clangd/index/oitautoanalysisparamform.cpp.6F60BD2D78CB9943.idx differ diff --git a/src/.cache/clangd/index/oitautoanalysisparamform.h.AF09A830433F54F9.idx b/src/.cache/clangd/index/oitautoanalysisparamform.h.AF09A830433F54F9.idx new file mode 100644 index 0000000..658a590 Binary files /dev/null and b/src/.cache/clangd/index/oitautoanalysisparamform.h.AF09A830433F54F9.idx differ diff --git a/src/.cache/clangd/index/pointcalculate.cpp.11565CA901556D42.idx b/src/.cache/clangd/index/pointcalculate.cpp.11565CA901556D42.idx new file mode 100644 index 0000000..42397f5 Binary files /dev/null and b/src/.cache/clangd/index/pointcalculate.cpp.11565CA901556D42.idx differ diff --git a/src/.cache/clangd/index/pointcalculate.h.0CA82BDEF76AA8B7.idx b/src/.cache/clangd/index/pointcalculate.h.0CA82BDEF76AA8B7.idx new file mode 100644 index 0000000..432ce8b Binary files /dev/null and b/src/.cache/clangd/index/pointcalculate.h.0CA82BDEF76AA8B7.idx differ diff --git a/src/.cache/clangd/index/printereditform.cpp.EB05336258288E05.idx b/src/.cache/clangd/index/printereditform.cpp.EB05336258288E05.idx new file mode 100644 index 0000000..6b0379b Binary files /dev/null and b/src/.cache/clangd/index/printereditform.cpp.EB05336258288E05.idx differ diff --git a/src/.cache/clangd/index/printereditform.h.A2A0841CE52D4353.idx b/src/.cache/clangd/index/printereditform.h.A2A0841CE52D4353.idx new file mode 100644 index 0000000..3253687 Binary files /dev/null and b/src/.cache/clangd/index/printereditform.h.A2A0841CE52D4353.idx differ diff --git a/src/.cache/clangd/index/printpreviewform.cpp.0987180A0D6CC747.idx b/src/.cache/clangd/index/printpreviewform.cpp.0987180A0D6CC747.idx new file mode 100644 index 0000000..d4a0793 Binary files /dev/null and b/src/.cache/clangd/index/printpreviewform.cpp.0987180A0D6CC747.idx differ diff --git a/src/.cache/clangd/index/printpreviewform.h.F0E9B93866F6F4A2.idx b/src/.cache/clangd/index/printpreviewform.h.F0E9B93866F6F4A2.idx new file mode 100644 index 0000000..6354bc3 Binary files /dev/null and b/src/.cache/clangd/index/printpreviewform.h.F0E9B93866F6F4A2.idx differ diff --git a/src/.cache/clangd/index/protocol.h.AA475E7AB5DFD2BC.idx b/src/.cache/clangd/index/protocol.h.AA475E7AB5DFD2BC.idx new file mode 100644 index 0000000..355e39c Binary files /dev/null and b/src/.cache/clangd/index/protocol.h.AA475E7AB5DFD2BC.idx differ diff --git a/src/.cache/clangd/index/qcustomplot.cpp.4F1374C3CCFD3D47.idx b/src/.cache/clangd/index/qcustomplot.cpp.4F1374C3CCFD3D47.idx new file mode 100644 index 0000000..70d0ee1 Binary files /dev/null and b/src/.cache/clangd/index/qcustomplot.cpp.4F1374C3CCFD3D47.idx differ diff --git a/src/.cache/clangd/index/qcustomplot.h.DC663C8D01B5B4E6.idx b/src/.cache/clangd/index/qcustomplot.h.DC663C8D01B5B4E6.idx new file mode 100644 index 0000000..50f2c8c Binary files /dev/null and b/src/.cache/clangd/index/qcustomplot.h.DC663C8D01B5B4E6.idx differ diff --git a/src/.cache/clangd/index/realtimedataform.cpp.DED8448999B11705.idx b/src/.cache/clangd/index/realtimedataform.cpp.DED8448999B11705.idx new file mode 100644 index 0000000..655ba5a Binary files /dev/null and b/src/.cache/clangd/index/realtimedataform.cpp.DED8448999B11705.idx differ diff --git a/src/.cache/clangd/index/realtimedataform.h.624092FE7A6EB6AF.idx b/src/.cache/clangd/index/realtimedataform.h.624092FE7A6EB6AF.idx new file mode 100644 index 0000000..27d54dd Binary files /dev/null and b/src/.cache/clangd/index/realtimedataform.h.624092FE7A6EB6AF.idx differ diff --git a/src/.cache/clangd/index/rightwidget.cpp.1FCF6B608492C17A.idx b/src/.cache/clangd/index/rightwidget.cpp.1FCF6B608492C17A.idx new file mode 100644 index 0000000..a5d8679 Binary files /dev/null and b/src/.cache/clangd/index/rightwidget.cpp.1FCF6B608492C17A.idx differ diff --git a/src/.cache/clangd/index/rightwidget.h.B60CA2D7221790F8.idx b/src/.cache/clangd/index/rightwidget.h.B60CA2D7221790F8.idx new file mode 100644 index 0000000..75846e4 Binary files /dev/null and b/src/.cache/clangd/index/rightwidget.h.B60CA2D7221790F8.idx differ diff --git a/src/.cache/clangd/index/serialport.cpp.DF9884438B5CA214.idx b/src/.cache/clangd/index/serialport.cpp.DF9884438B5CA214.idx new file mode 100644 index 0000000..bd5f900 Binary files /dev/null and b/src/.cache/clangd/index/serialport.cpp.DF9884438B5CA214.idx differ diff --git a/src/.cache/clangd/index/serialport.h.2BC3BD628EC85962.idx b/src/.cache/clangd/index/serialport.h.2BC3BD628EC85962.idx new file mode 100644 index 0000000..1c366c1 Binary files /dev/null and b/src/.cache/clangd/index/serialport.h.2BC3BD628EC85962.idx differ diff --git a/src/.cache/clangd/index/specificheatcomparisonmethodform.cpp.0D47E3581C6954DF.idx b/src/.cache/clangd/index/specificheatcomparisonmethodform.cpp.0D47E3581C6954DF.idx new file mode 100644 index 0000000..71a5f96 Binary files /dev/null and b/src/.cache/clangd/index/specificheatcomparisonmethodform.cpp.0D47E3581C6954DF.idx differ diff --git a/src/.cache/clangd/index/specificheatcomparisonmethodform.h.4A08D9CB361D33D6.idx b/src/.cache/clangd/index/specificheatcomparisonmethodform.h.4A08D9CB361D33D6.idx new file mode 100644 index 0000000..1d15739 Binary files /dev/null and b/src/.cache/clangd/index/specificheatcomparisonmethodform.h.4A08D9CB361D33D6.idx differ diff --git a/src/.cache/clangd/index/tst_cellreferencetest.cpp.F9DAF390D7FE32E4.idx b/src/.cache/clangd/index/tst_cellreferencetest.cpp.F9DAF390D7FE32E4.idx new file mode 100644 index 0000000..93718a2 Binary files /dev/null and b/src/.cache/clangd/index/tst_cellreferencetest.cpp.F9DAF390D7FE32E4.idx differ diff --git a/src/.cache/clangd/index/tst_conditionalformattingtest.cpp.1EA401352000EA8D.idx b/src/.cache/clangd/index/tst_conditionalformattingtest.cpp.1EA401352000EA8D.idx new file mode 100644 index 0000000..fa6e108 Binary files /dev/null and b/src/.cache/clangd/index/tst_conditionalformattingtest.cpp.1EA401352000EA8D.idx differ diff --git a/src/.cache/clangd/index/tst_docpropsapptest.cpp.F79BFFB1E7E3F71F.idx b/src/.cache/clangd/index/tst_docpropsapptest.cpp.F79BFFB1E7E3F71F.idx new file mode 100644 index 0000000..23b973f Binary files /dev/null and b/src/.cache/clangd/index/tst_docpropsapptest.cpp.F79BFFB1E7E3F71F.idx differ diff --git a/src/.cache/clangd/index/tst_documenttest.cpp.84219F5B4E36664A.idx b/src/.cache/clangd/index/tst_documenttest.cpp.84219F5B4E36664A.idx new file mode 100644 index 0000000..47e67b5 Binary files /dev/null and b/src/.cache/clangd/index/tst_documenttest.cpp.84219F5B4E36664A.idx differ diff --git a/src/.cache/clangd/index/tst_formattest.cpp.1D602F1DAF5FACA3.idx b/src/.cache/clangd/index/tst_formattest.cpp.1D602F1DAF5FACA3.idx new file mode 100644 index 0000000..b5e44d8 Binary files /dev/null and b/src/.cache/clangd/index/tst_formattest.cpp.1D602F1DAF5FACA3.idx differ diff --git a/src/.cache/clangd/index/tst_propscoretest.cpp.2166F69867189C88.idx b/src/.cache/clangd/index/tst_propscoretest.cpp.2166F69867189C88.idx new file mode 100644 index 0000000..76e1b27 Binary files /dev/null and b/src/.cache/clangd/index/tst_propscoretest.cpp.2166F69867189C88.idx differ diff --git a/src/.cache/clangd/index/tst_relationshipstest.cpp.D0766D8853EE1289.idx b/src/.cache/clangd/index/tst_relationshipstest.cpp.D0766D8853EE1289.idx new file mode 100644 index 0000000..ad952de Binary files /dev/null and b/src/.cache/clangd/index/tst_relationshipstest.cpp.D0766D8853EE1289.idx differ diff --git a/src/.cache/clangd/index/tst_richstringtest.cpp.66810ACFE34F6E0D.idx b/src/.cache/clangd/index/tst_richstringtest.cpp.66810ACFE34F6E0D.idx new file mode 100644 index 0000000..8bd8663 Binary files /dev/null and b/src/.cache/clangd/index/tst_richstringtest.cpp.66810ACFE34F6E0D.idx differ diff --git a/src/.cache/clangd/index/tst_sharedstringstest.cpp.29121E9F98D290FD.idx b/src/.cache/clangd/index/tst_sharedstringstest.cpp.29121E9F98D290FD.idx new file mode 100644 index 0000000..86852c5 Binary files /dev/null and b/src/.cache/clangd/index/tst_sharedstringstest.cpp.29121E9F98D290FD.idx differ diff --git a/src/.cache/clangd/index/tst_stylestest.cpp.2AAA76AA2D7CE0C9.idx b/src/.cache/clangd/index/tst_stylestest.cpp.2AAA76AA2D7CE0C9.idx new file mode 100644 index 0000000..33c9821 Binary files /dev/null and b/src/.cache/clangd/index/tst_stylestest.cpp.2AAA76AA2D7CE0C9.idx differ diff --git a/src/.cache/clangd/index/tst_utilitytest.cpp.A87C0A9D5C546A96.idx b/src/.cache/clangd/index/tst_utilitytest.cpp.A87C0A9D5C546A96.idx new file mode 100644 index 0000000..94075aa Binary files /dev/null and b/src/.cache/clangd/index/tst_utilitytest.cpp.A87C0A9D5C546A96.idx differ diff --git a/src/.cache/clangd/index/tst_worksheet.cpp.647C05C2F9CEF964.idx b/src/.cache/clangd/index/tst_worksheet.cpp.647C05C2F9CEF964.idx new file mode 100644 index 0000000..ca58c30 Binary files /dev/null and b/src/.cache/clangd/index/tst_worksheet.cpp.647C05C2F9CEF964.idx differ diff --git a/src/.cache/clangd/index/tst_xmlspacetest.cpp.A07D0B05B01D1EE2.idx b/src/.cache/clangd/index/tst_xmlspacetest.cpp.A07D0B05B01D1EE2.idx new file mode 100644 index 0000000..2d8fc77 Binary files /dev/null and b/src/.cache/clangd/index/tst_xmlspacetest.cpp.A07D0B05B01D1EE2.idx differ diff --git a/src/.cache/clangd/index/tst_zipreadertest.cpp.2DC839D1DAAD7C1A.idx b/src/.cache/clangd/index/tst_zipreadertest.cpp.2DC839D1DAAD7C1A.idx new file mode 100644 index 0000000..b90ed4d Binary files /dev/null and b/src/.cache/clangd/index/tst_zipreadertest.cpp.2DC839D1DAAD7C1A.idx differ diff --git a/src/.cache/clangd/index/txthandler.cpp.EB42E5D67EB01535.idx b/src/.cache/clangd/index/txthandler.cpp.EB42E5D67EB01535.idx new file mode 100644 index 0000000..c0bc9b3 Binary files /dev/null and b/src/.cache/clangd/index/txthandler.cpp.EB42E5D67EB01535.idx differ diff --git a/src/.cache/clangd/index/txthandler.h.7374F25EA0A2D97E.idx b/src/.cache/clangd/index/txthandler.h.7374F25EA0A2D97E.idx new file mode 100644 index 0000000..4f2b8d6 Binary files /dev/null and b/src/.cache/clangd/index/txthandler.h.7374F25EA0A2D97E.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractooxmlfile.cpp.566E430844629C30.idx b/src/.cache/clangd/index/xlsxabstractooxmlfile.cpp.566E430844629C30.idx new file mode 100644 index 0000000..8bfe449 Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractooxmlfile.cpp.566E430844629C30.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractooxmlfile.h.89D11F684FBA7E59.idx b/src/.cache/clangd/index/xlsxabstractooxmlfile.h.89D11F684FBA7E59.idx new file mode 100644 index 0000000..39cfb5d Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractooxmlfile.h.89D11F684FBA7E59.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractooxmlfile_p.h.00C4471A5B066731.idx b/src/.cache/clangd/index/xlsxabstractooxmlfile_p.h.00C4471A5B066731.idx new file mode 100644 index 0000000..c9e2aa3 Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractooxmlfile_p.h.00C4471A5B066731.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractsheet.cpp.9DE0974ABC0E6DA9.idx b/src/.cache/clangd/index/xlsxabstractsheet.cpp.9DE0974ABC0E6DA9.idx new file mode 100644 index 0000000..1192d66 Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractsheet.cpp.9DE0974ABC0E6DA9.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractsheet.h.E70B9E066E5B9109.idx b/src/.cache/clangd/index/xlsxabstractsheet.h.E70B9E066E5B9109.idx new file mode 100644 index 0000000..da90920 Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractsheet.h.E70B9E066E5B9109.idx differ diff --git a/src/.cache/clangd/index/xlsxabstractsheet_p.h.87B50C2B6BA07C39.idx b/src/.cache/clangd/index/xlsxabstractsheet_p.h.87B50C2B6BA07C39.idx new file mode 100644 index 0000000..29072ae Binary files /dev/null and b/src/.cache/clangd/index/xlsxabstractsheet_p.h.87B50C2B6BA07C39.idx differ diff --git a/src/.cache/clangd/index/xlsxcell.cpp.FD88A65601EFF824.idx b/src/.cache/clangd/index/xlsxcell.cpp.FD88A65601EFF824.idx new file mode 100644 index 0000000..a3aea98 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcell.cpp.FD88A65601EFF824.idx differ diff --git a/src/.cache/clangd/index/xlsxcell.h.AF9E93D43AAB0098.idx b/src/.cache/clangd/index/xlsxcell.h.AF9E93D43AAB0098.idx new file mode 100644 index 0000000..0bc0832 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcell.h.AF9E93D43AAB0098.idx differ diff --git a/src/.cache/clangd/index/xlsxcell_p.h.606E6D2C527C6377.idx b/src/.cache/clangd/index/xlsxcell_p.h.606E6D2C527C6377.idx new file mode 100644 index 0000000..cd53496 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcell_p.h.606E6D2C527C6377.idx differ diff --git a/src/.cache/clangd/index/xlsxcellformula.cpp.00FF286F9792BE11.idx b/src/.cache/clangd/index/xlsxcellformula.cpp.00FF286F9792BE11.idx new file mode 100644 index 0000000..debdc0c Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellformula.cpp.00FF286F9792BE11.idx differ diff --git a/src/.cache/clangd/index/xlsxcellformula.h.A697005907186F28.idx b/src/.cache/clangd/index/xlsxcellformula.h.A697005907186F28.idx new file mode 100644 index 0000000..2063430 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellformula.h.A697005907186F28.idx differ diff --git a/src/.cache/clangd/index/xlsxcellformula_p.h.4B9717626FE72820.idx b/src/.cache/clangd/index/xlsxcellformula_p.h.4B9717626FE72820.idx new file mode 100644 index 0000000..0ed13c5 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellformula_p.h.4B9717626FE72820.idx differ diff --git a/src/.cache/clangd/index/xlsxcellrange.cpp.4940EE7F54460166.idx b/src/.cache/clangd/index/xlsxcellrange.cpp.4940EE7F54460166.idx new file mode 100644 index 0000000..f35d9b9 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellrange.cpp.4940EE7F54460166.idx differ diff --git a/src/.cache/clangd/index/xlsxcellrange.h.E337D11A0B3A71AB.idx b/src/.cache/clangd/index/xlsxcellrange.h.E337D11A0B3A71AB.idx new file mode 100644 index 0000000..5602fbb Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellrange.h.E337D11A0B3A71AB.idx differ diff --git a/src/.cache/clangd/index/xlsxcellreference.cpp.088A4D98F1223B11.idx b/src/.cache/clangd/index/xlsxcellreference.cpp.088A4D98F1223B11.idx new file mode 100644 index 0000000..609b3c0 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellreference.cpp.088A4D98F1223B11.idx differ diff --git a/src/.cache/clangd/index/xlsxcellreference.h.98BC927ADF5D2E9A.idx b/src/.cache/clangd/index/xlsxcellreference.h.98BC927ADF5D2E9A.idx new file mode 100644 index 0000000..db4f858 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcellreference.h.98BC927ADF5D2E9A.idx differ diff --git a/src/.cache/clangd/index/xlsxchart.cpp.016CB8E3FFCC67B2.idx b/src/.cache/clangd/index/xlsxchart.cpp.016CB8E3FFCC67B2.idx new file mode 100644 index 0000000..c519b40 Binary files /dev/null and b/src/.cache/clangd/index/xlsxchart.cpp.016CB8E3FFCC67B2.idx differ diff --git a/src/.cache/clangd/index/xlsxchart.h.81C4B019FC995500.idx b/src/.cache/clangd/index/xlsxchart.h.81C4B019FC995500.idx new file mode 100644 index 0000000..fe99089 Binary files /dev/null and b/src/.cache/clangd/index/xlsxchart.h.81C4B019FC995500.idx differ diff --git a/src/.cache/clangd/index/xlsxchart_p.h.0808D2CE2D38C3FE.idx b/src/.cache/clangd/index/xlsxchart_p.h.0808D2CE2D38C3FE.idx new file mode 100644 index 0000000..8a7269e Binary files /dev/null and b/src/.cache/clangd/index/xlsxchart_p.h.0808D2CE2D38C3FE.idx differ diff --git a/src/.cache/clangd/index/xlsxchartsheet.cpp.CF4134C1744FF8CF.idx b/src/.cache/clangd/index/xlsxchartsheet.cpp.CF4134C1744FF8CF.idx new file mode 100644 index 0000000..3b73717 Binary files /dev/null and b/src/.cache/clangd/index/xlsxchartsheet.cpp.CF4134C1744FF8CF.idx differ diff --git a/src/.cache/clangd/index/xlsxchartsheet.h.2F2CB6F0DC9F8C1C.idx b/src/.cache/clangd/index/xlsxchartsheet.h.2F2CB6F0DC9F8C1C.idx new file mode 100644 index 0000000..69c4d46 Binary files /dev/null and b/src/.cache/clangd/index/xlsxchartsheet.h.2F2CB6F0DC9F8C1C.idx differ diff --git a/src/.cache/clangd/index/xlsxchartsheet_p.h.C7A70B48C0F9BF69.idx b/src/.cache/clangd/index/xlsxchartsheet_p.h.C7A70B48C0F9BF69.idx new file mode 100644 index 0000000..0c78dab Binary files /dev/null and b/src/.cache/clangd/index/xlsxchartsheet_p.h.C7A70B48C0F9BF69.idx differ diff --git a/src/.cache/clangd/index/xlsxcolor.cpp.779F56E5E8ACC1A5.idx b/src/.cache/clangd/index/xlsxcolor.cpp.779F56E5E8ACC1A5.idx new file mode 100644 index 0000000..329825e Binary files /dev/null and b/src/.cache/clangd/index/xlsxcolor.cpp.779F56E5E8ACC1A5.idx differ diff --git a/src/.cache/clangd/index/xlsxcolor_p.h.1457A89EE48A52D9.idx b/src/.cache/clangd/index/xlsxcolor_p.h.1457A89EE48A52D9.idx new file mode 100644 index 0000000..56fa112 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcolor_p.h.1457A89EE48A52D9.idx differ diff --git a/src/.cache/clangd/index/xlsxconditionalformatting.cpp.290D5AB620CE50F6.idx b/src/.cache/clangd/index/xlsxconditionalformatting.cpp.290D5AB620CE50F6.idx new file mode 100644 index 0000000..a0064ed Binary files /dev/null and b/src/.cache/clangd/index/xlsxconditionalformatting.cpp.290D5AB620CE50F6.idx differ diff --git a/src/.cache/clangd/index/xlsxconditionalformatting.h.2A783D2F506A1175.idx b/src/.cache/clangd/index/xlsxconditionalformatting.h.2A783D2F506A1175.idx new file mode 100644 index 0000000..917062a Binary files /dev/null and b/src/.cache/clangd/index/xlsxconditionalformatting.h.2A783D2F506A1175.idx differ diff --git a/src/.cache/clangd/index/xlsxconditionalformatting_p.h.A93D299237C70106.idx b/src/.cache/clangd/index/xlsxconditionalformatting_p.h.A93D299237C70106.idx new file mode 100644 index 0000000..8a693eb Binary files /dev/null and b/src/.cache/clangd/index/xlsxconditionalformatting_p.h.A93D299237C70106.idx differ diff --git a/src/.cache/clangd/index/xlsxcontenttypes.cpp.74D1A790AFA84549.idx b/src/.cache/clangd/index/xlsxcontenttypes.cpp.74D1A790AFA84549.idx new file mode 100644 index 0000000..ea94015 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcontenttypes.cpp.74D1A790AFA84549.idx differ diff --git a/src/.cache/clangd/index/xlsxcontenttypes_p.h.A105116C5FC5DD8A.idx b/src/.cache/clangd/index/xlsxcontenttypes_p.h.A105116C5FC5DD8A.idx new file mode 100644 index 0000000..d196c97 Binary files /dev/null and b/src/.cache/clangd/index/xlsxcontenttypes_p.h.A105116C5FC5DD8A.idx differ diff --git a/src/.cache/clangd/index/xlsxdatavalidation.cpp.84EA717ACA17A8B7.idx b/src/.cache/clangd/index/xlsxdatavalidation.cpp.84EA717ACA17A8B7.idx new file mode 100644 index 0000000..3abc290 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdatavalidation.cpp.84EA717ACA17A8B7.idx differ diff --git a/src/.cache/clangd/index/xlsxdatavalidation.h.B2DD872B5795D95D.idx b/src/.cache/clangd/index/xlsxdatavalidation.h.B2DD872B5795D95D.idx new file mode 100644 index 0000000..5c027c7 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdatavalidation.h.B2DD872B5795D95D.idx differ diff --git a/src/.cache/clangd/index/xlsxdatavalidation_p.h.D80C03F55796058B.idx b/src/.cache/clangd/index/xlsxdatavalidation_p.h.D80C03F55796058B.idx new file mode 100644 index 0000000..573349e Binary files /dev/null and b/src/.cache/clangd/index/xlsxdatavalidation_p.h.D80C03F55796058B.idx differ diff --git a/src/.cache/clangd/index/xlsxdocpropsapp.cpp.CCAACFB706D337DE.idx b/src/.cache/clangd/index/xlsxdocpropsapp.cpp.CCAACFB706D337DE.idx new file mode 100644 index 0000000..29f7c70 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocpropsapp.cpp.CCAACFB706D337DE.idx differ diff --git a/src/.cache/clangd/index/xlsxdocpropsapp_p.h.EA6A925C5F0839C6.idx b/src/.cache/clangd/index/xlsxdocpropsapp_p.h.EA6A925C5F0839C6.idx new file mode 100644 index 0000000..8ad0d46 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocpropsapp_p.h.EA6A925C5F0839C6.idx differ diff --git a/src/.cache/clangd/index/xlsxdocpropscore.cpp.C39DF159600C6689.idx b/src/.cache/clangd/index/xlsxdocpropscore.cpp.C39DF159600C6689.idx new file mode 100644 index 0000000..2777b35 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocpropscore.cpp.C39DF159600C6689.idx differ diff --git a/src/.cache/clangd/index/xlsxdocpropscore_p.h.1333814AF3F3C048.idx b/src/.cache/clangd/index/xlsxdocpropscore_p.h.1333814AF3F3C048.idx new file mode 100644 index 0000000..f188988 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocpropscore_p.h.1333814AF3F3C048.idx differ diff --git a/src/.cache/clangd/index/xlsxdocument.cpp.BC50EF3AE13DD7EE.idx b/src/.cache/clangd/index/xlsxdocument.cpp.BC50EF3AE13DD7EE.idx new file mode 100644 index 0000000..0cdd914 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocument.cpp.BC50EF3AE13DD7EE.idx differ diff --git a/src/.cache/clangd/index/xlsxdocument.h.D847E77372A3532B.idx b/src/.cache/clangd/index/xlsxdocument.h.D847E77372A3532B.idx new file mode 100644 index 0000000..d41954e Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocument.h.D847E77372A3532B.idx differ diff --git a/src/.cache/clangd/index/xlsxdocument_p.h.F2A1F8E5F23DF4E9.idx b/src/.cache/clangd/index/xlsxdocument_p.h.F2A1F8E5F23DF4E9.idx new file mode 100644 index 0000000..8e2dc23 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdocument_p.h.F2A1F8E5F23DF4E9.idx differ diff --git a/src/.cache/clangd/index/xlsxdrawing.cpp.BF1A5DEA8A6907A4.idx b/src/.cache/clangd/index/xlsxdrawing.cpp.BF1A5DEA8A6907A4.idx new file mode 100644 index 0000000..426aecb Binary files /dev/null and b/src/.cache/clangd/index/xlsxdrawing.cpp.BF1A5DEA8A6907A4.idx differ diff --git a/src/.cache/clangd/index/xlsxdrawing_p.h.85DFCD23F434A041.idx b/src/.cache/clangd/index/xlsxdrawing_p.h.85DFCD23F434A041.idx new file mode 100644 index 0000000..fefcb9b Binary files /dev/null and b/src/.cache/clangd/index/xlsxdrawing_p.h.85DFCD23F434A041.idx differ diff --git a/src/.cache/clangd/index/xlsxdrawinganchor.cpp.BFBBA45B014B58DB.idx b/src/.cache/clangd/index/xlsxdrawinganchor.cpp.BFBBA45B014B58DB.idx new file mode 100644 index 0000000..140f415 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdrawinganchor.cpp.BFBBA45B014B58DB.idx differ diff --git a/src/.cache/clangd/index/xlsxdrawinganchor_p.h.27D14374D2B629F5.idx b/src/.cache/clangd/index/xlsxdrawinganchor_p.h.27D14374D2B629F5.idx new file mode 100644 index 0000000..cff4246 Binary files /dev/null and b/src/.cache/clangd/index/xlsxdrawinganchor_p.h.27D14374D2B629F5.idx differ diff --git a/src/.cache/clangd/index/xlsxformat.cpp.B281873D4BDBBA9A.idx b/src/.cache/clangd/index/xlsxformat.cpp.B281873D4BDBBA9A.idx new file mode 100644 index 0000000..cddbb9a Binary files /dev/null and b/src/.cache/clangd/index/xlsxformat.cpp.B281873D4BDBBA9A.idx differ diff --git a/src/.cache/clangd/index/xlsxformat.h.87956B2952AC77A3.idx b/src/.cache/clangd/index/xlsxformat.h.87956B2952AC77A3.idx new file mode 100644 index 0000000..782b2d0 Binary files /dev/null and b/src/.cache/clangd/index/xlsxformat.h.87956B2952AC77A3.idx differ diff --git a/src/.cache/clangd/index/xlsxformat_p.h.E84456A83A854D97.idx b/src/.cache/clangd/index/xlsxformat_p.h.E84456A83A854D97.idx new file mode 100644 index 0000000..c566ed5 Binary files /dev/null and b/src/.cache/clangd/index/xlsxformat_p.h.E84456A83A854D97.idx differ diff --git a/src/.cache/clangd/index/xlsxglobal.h.3C2FF599ECED543E.idx b/src/.cache/clangd/index/xlsxglobal.h.3C2FF599ECED543E.idx new file mode 100644 index 0000000..f3c9428 Binary files /dev/null and b/src/.cache/clangd/index/xlsxglobal.h.3C2FF599ECED543E.idx differ diff --git a/src/.cache/clangd/index/xlsxhandler.cpp.C9D7A5942D7C7DA3.idx b/src/.cache/clangd/index/xlsxhandler.cpp.C9D7A5942D7C7DA3.idx new file mode 100644 index 0000000..66201a6 Binary files /dev/null and b/src/.cache/clangd/index/xlsxhandler.cpp.C9D7A5942D7C7DA3.idx differ diff --git a/src/.cache/clangd/index/xlsxhandler.h.E5EC45CCB478161A.idx b/src/.cache/clangd/index/xlsxhandler.h.E5EC45CCB478161A.idx new file mode 100644 index 0000000..8390ab8 Binary files /dev/null and b/src/.cache/clangd/index/xlsxhandler.h.E5EC45CCB478161A.idx differ diff --git a/src/.cache/clangd/index/xlsxmediafile.cpp.B0E68905E36989E7.idx b/src/.cache/clangd/index/xlsxmediafile.cpp.B0E68905E36989E7.idx new file mode 100644 index 0000000..492b5c0 Binary files /dev/null and b/src/.cache/clangd/index/xlsxmediafile.cpp.B0E68905E36989E7.idx differ diff --git a/src/.cache/clangd/index/xlsxmediafile_p.h.DFF7E3A802B818A2.idx b/src/.cache/clangd/index/xlsxmediafile_p.h.DFF7E3A802B818A2.idx new file mode 100644 index 0000000..a7d75bf Binary files /dev/null and b/src/.cache/clangd/index/xlsxmediafile_p.h.DFF7E3A802B818A2.idx differ diff --git a/src/.cache/clangd/index/xlsxnumformatparser.cpp.23A0413001080DBA.idx b/src/.cache/clangd/index/xlsxnumformatparser.cpp.23A0413001080DBA.idx new file mode 100644 index 0000000..8410d54 Binary files /dev/null and b/src/.cache/clangd/index/xlsxnumformatparser.cpp.23A0413001080DBA.idx differ diff --git a/src/.cache/clangd/index/xlsxnumformatparser_p.h.B06ED6B1A56CD015.idx b/src/.cache/clangd/index/xlsxnumformatparser_p.h.B06ED6B1A56CD015.idx new file mode 100644 index 0000000..e3fba4d Binary files /dev/null and b/src/.cache/clangd/index/xlsxnumformatparser_p.h.B06ED6B1A56CD015.idx differ diff --git a/src/.cache/clangd/index/xlsxrelationships.cpp.D1757832E8C0C75C.idx b/src/.cache/clangd/index/xlsxrelationships.cpp.D1757832E8C0C75C.idx new file mode 100644 index 0000000..7c9decc Binary files /dev/null and b/src/.cache/clangd/index/xlsxrelationships.cpp.D1757832E8C0C75C.idx differ diff --git a/src/.cache/clangd/index/xlsxrelationships_p.h.302F6B0093F921B1.idx b/src/.cache/clangd/index/xlsxrelationships_p.h.302F6B0093F921B1.idx new file mode 100644 index 0000000..a9ef8c9 Binary files /dev/null and b/src/.cache/clangd/index/xlsxrelationships_p.h.302F6B0093F921B1.idx differ diff --git a/src/.cache/clangd/index/xlsxrichstring.cpp.DB0F7C94DE8E09B9.idx b/src/.cache/clangd/index/xlsxrichstring.cpp.DB0F7C94DE8E09B9.idx new file mode 100644 index 0000000..97473e4 Binary files /dev/null and b/src/.cache/clangd/index/xlsxrichstring.cpp.DB0F7C94DE8E09B9.idx differ diff --git a/src/.cache/clangd/index/xlsxrichstring.h.7725B8ABF8CA2C7F.idx b/src/.cache/clangd/index/xlsxrichstring.h.7725B8ABF8CA2C7F.idx new file mode 100644 index 0000000..be7418d Binary files /dev/null and b/src/.cache/clangd/index/xlsxrichstring.h.7725B8ABF8CA2C7F.idx differ diff --git a/src/.cache/clangd/index/xlsxrichstring_p.h.078E523A55471EEA.idx b/src/.cache/clangd/index/xlsxrichstring_p.h.078E523A55471EEA.idx new file mode 100644 index 0000000..5403420 Binary files /dev/null and b/src/.cache/clangd/index/xlsxrichstring_p.h.078E523A55471EEA.idx differ diff --git a/src/.cache/clangd/index/xlsxsharedstrings.cpp.7719B9AF7557D37D.idx b/src/.cache/clangd/index/xlsxsharedstrings.cpp.7719B9AF7557D37D.idx new file mode 100644 index 0000000..0620ea7 Binary files /dev/null and b/src/.cache/clangd/index/xlsxsharedstrings.cpp.7719B9AF7557D37D.idx differ diff --git a/src/.cache/clangd/index/xlsxsharedstrings_p.h.C27E06C8A632CA9D.idx b/src/.cache/clangd/index/xlsxsharedstrings_p.h.C27E06C8A632CA9D.idx new file mode 100644 index 0000000..114234e Binary files /dev/null and b/src/.cache/clangd/index/xlsxsharedstrings_p.h.C27E06C8A632CA9D.idx differ diff --git a/src/.cache/clangd/index/xlsxsheetmodel.cpp.2916BD08F5362201.idx b/src/.cache/clangd/index/xlsxsheetmodel.cpp.2916BD08F5362201.idx new file mode 100644 index 0000000..78c7864 Binary files /dev/null and b/src/.cache/clangd/index/xlsxsheetmodel.cpp.2916BD08F5362201.idx differ diff --git a/src/.cache/clangd/index/xlsxsheetmodel.h.E0F351D7626A515B.idx b/src/.cache/clangd/index/xlsxsheetmodel.h.E0F351D7626A515B.idx new file mode 100644 index 0000000..448d8d3 Binary files /dev/null and b/src/.cache/clangd/index/xlsxsheetmodel.h.E0F351D7626A515B.idx differ diff --git a/src/.cache/clangd/index/xlsxsheetmodel_p.h.FC8ED2BCF3A38232.idx b/src/.cache/clangd/index/xlsxsheetmodel_p.h.FC8ED2BCF3A38232.idx new file mode 100644 index 0000000..f305290 Binary files /dev/null and b/src/.cache/clangd/index/xlsxsheetmodel_p.h.FC8ED2BCF3A38232.idx differ diff --git a/src/.cache/clangd/index/xlsxsimpleooxmlfile.cpp.934244609E8FADE1.idx b/src/.cache/clangd/index/xlsxsimpleooxmlfile.cpp.934244609E8FADE1.idx new file mode 100644 index 0000000..509111b Binary files /dev/null and b/src/.cache/clangd/index/xlsxsimpleooxmlfile.cpp.934244609E8FADE1.idx differ diff --git a/src/.cache/clangd/index/xlsxsimpleooxmlfile_p.h.9E9352ECD539A743.idx b/src/.cache/clangd/index/xlsxsimpleooxmlfile_p.h.9E9352ECD539A743.idx new file mode 100644 index 0000000..78c8d6d Binary files /dev/null and b/src/.cache/clangd/index/xlsxsimpleooxmlfile_p.h.9E9352ECD539A743.idx differ diff --git a/src/.cache/clangd/index/xlsxstyles.cpp.03766CE131F2BB78.idx b/src/.cache/clangd/index/xlsxstyles.cpp.03766CE131F2BB78.idx new file mode 100644 index 0000000..bc1f855 Binary files /dev/null and b/src/.cache/clangd/index/xlsxstyles.cpp.03766CE131F2BB78.idx differ diff --git a/src/.cache/clangd/index/xlsxstyles_p.h.B50133F4EB803D80.idx b/src/.cache/clangd/index/xlsxstyles_p.h.B50133F4EB803D80.idx new file mode 100644 index 0000000..2a165cd Binary files /dev/null and b/src/.cache/clangd/index/xlsxstyles_p.h.B50133F4EB803D80.idx differ diff --git a/src/.cache/clangd/index/xlsxtheme.cpp.11979BC230C89479.idx b/src/.cache/clangd/index/xlsxtheme.cpp.11979BC230C89479.idx new file mode 100644 index 0000000..1e18d5d Binary files /dev/null and b/src/.cache/clangd/index/xlsxtheme.cpp.11979BC230C89479.idx differ diff --git a/src/.cache/clangd/index/xlsxtheme_p.h.C305E603200B381B.idx b/src/.cache/clangd/index/xlsxtheme_p.h.C305E603200B381B.idx new file mode 100644 index 0000000..19af897 Binary files /dev/null and b/src/.cache/clangd/index/xlsxtheme_p.h.C305E603200B381B.idx differ diff --git a/src/.cache/clangd/index/xlsxutility.cpp.68F3C02A5018EEC4.idx b/src/.cache/clangd/index/xlsxutility.cpp.68F3C02A5018EEC4.idx new file mode 100644 index 0000000..9171cd2 Binary files /dev/null and b/src/.cache/clangd/index/xlsxutility.cpp.68F3C02A5018EEC4.idx differ diff --git a/src/.cache/clangd/index/xlsxutility_p.h.9B6D29CCEDD209E6.idx b/src/.cache/clangd/index/xlsxutility_p.h.9B6D29CCEDD209E6.idx new file mode 100644 index 0000000..c7d4e28 Binary files /dev/null and b/src/.cache/clangd/index/xlsxutility_p.h.9B6D29CCEDD209E6.idx differ diff --git a/src/.cache/clangd/index/xlsxworkbook.cpp.FFABCDC210FD2CCF.idx b/src/.cache/clangd/index/xlsxworkbook.cpp.FFABCDC210FD2CCF.idx new file mode 100644 index 0000000..45621ac Binary files /dev/null and b/src/.cache/clangd/index/xlsxworkbook.cpp.FFABCDC210FD2CCF.idx differ diff --git a/src/.cache/clangd/index/xlsxworkbook.h.7D10622E5EE87E35.idx b/src/.cache/clangd/index/xlsxworkbook.h.7D10622E5EE87E35.idx new file mode 100644 index 0000000..7f5051c Binary files /dev/null and b/src/.cache/clangd/index/xlsxworkbook.h.7D10622E5EE87E35.idx differ diff --git a/src/.cache/clangd/index/xlsxworkbook_p.h.04169CA2B969B943.idx b/src/.cache/clangd/index/xlsxworkbook_p.h.04169CA2B969B943.idx new file mode 100644 index 0000000..c4d5adf Binary files /dev/null and b/src/.cache/clangd/index/xlsxworkbook_p.h.04169CA2B969B943.idx differ diff --git a/src/.cache/clangd/index/xlsxworksheet.cpp.12251B9F359491FD.idx b/src/.cache/clangd/index/xlsxworksheet.cpp.12251B9F359491FD.idx new file mode 100644 index 0000000..8afd8a3 Binary files /dev/null and b/src/.cache/clangd/index/xlsxworksheet.cpp.12251B9F359491FD.idx differ diff --git a/src/.cache/clangd/index/xlsxworksheet.h.7A7724FE4DFC224A.idx b/src/.cache/clangd/index/xlsxworksheet.h.7A7724FE4DFC224A.idx new file mode 100644 index 0000000..9726056 Binary files /dev/null and b/src/.cache/clangd/index/xlsxworksheet.h.7A7724FE4DFC224A.idx differ diff --git a/src/.cache/clangd/index/xlsxworksheet_p.h.CAAA890AC96E413A.idx b/src/.cache/clangd/index/xlsxworksheet_p.h.CAAA890AC96E413A.idx new file mode 100644 index 0000000..155f48f Binary files /dev/null and b/src/.cache/clangd/index/xlsxworksheet_p.h.CAAA890AC96E413A.idx differ diff --git a/src/.cache/clangd/index/xlsxzipreader.cpp.FEAEC3B14B41599A.idx b/src/.cache/clangd/index/xlsxzipreader.cpp.FEAEC3B14B41599A.idx new file mode 100644 index 0000000..37a2201 Binary files /dev/null and b/src/.cache/clangd/index/xlsxzipreader.cpp.FEAEC3B14B41599A.idx differ diff --git a/src/.cache/clangd/index/xlsxzipreader_p.h.7570264D0C8CF488.idx b/src/.cache/clangd/index/xlsxzipreader_p.h.7570264D0C8CF488.idx new file mode 100644 index 0000000..d482469 Binary files /dev/null and b/src/.cache/clangd/index/xlsxzipreader_p.h.7570264D0C8CF488.idx differ diff --git a/src/.cache/clangd/index/xlsxzipwriter.cpp.C0EA8EE1013177CD.idx b/src/.cache/clangd/index/xlsxzipwriter.cpp.C0EA8EE1013177CD.idx new file mode 100644 index 0000000..fdb6395 Binary files /dev/null and b/src/.cache/clangd/index/xlsxzipwriter.cpp.C0EA8EE1013177CD.idx differ diff --git a/src/.cache/clangd/index/xlsxzipwriter_p.h.9513B7D9F4D95DE2.idx b/src/.cache/clangd/index/xlsxzipwriter_p.h.9513B7D9F4D95DE2.idx new file mode 100644 index 0000000..17e8d23 Binary files /dev/null and b/src/.cache/clangd/index/xlsxzipwriter_p.h.9513B7D9F4D95DE2.idx differ diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json index a3f8fa1..d0997cb 100644 --- a/src/.vscode/launch.json +++ b/src/.vscode/launch.json @@ -18,7 +18,7 @@ ], "externalConsole": false, "miDebuggerPath": "D:/qt/Qt5.14.2/5.14.2/mingw73_64/bin/gdb.exe", - "visualizerFile": "c:\\Users\\sunqu\\AppData\\Roaming\\Trae CN\\User\\workspaceStorage\\7f93734217a2e383fe34beaf49d497fe\\tonka3000.qtvsctools\\qt.natvis.xml" + "visualizerFile": "c:\\Users\\sunqu\\AppData\\Roaming\\Code\\User\\workspaceStorage\\7f93734217a2e383fe34beaf49d497fe\\tonka3000.qtvsctools\\qt.natvis.xml" } ] } \ No newline at end of file diff --git a/src/DSCAnalysisTool.pro b/src/DSCAnalysisTool.pro index 3fb11e3..7854328 100644 --- a/src/DSCAnalysisTool.pro +++ b/src/DSCAnalysisTool.pro @@ -9,7 +9,7 @@ CONFIG+=precompile_header PRECOMPILED_HEADER=stable.h # -VERSION = 1.2.0 +VERSION = 1.3.0 # 设置目标文件名,包含版本号 TARGET = DSCAnalysisTool_$${VERSION} diff --git a/src/data/xlsxhandler.cpp b/src/data/xlsxhandler.cpp index 67bd2ca..372c4e0 100644 --- a/src/data/xlsxhandler.cpp +++ b/src/data/xlsxhandler.cpp @@ -3,7 +3,7 @@ #include "analysisoperationrecorder.h" #include "global.h" -namespace AnaOpRecorder = AnalysisOperationRecorder; +namespace AnaOpRecorder = AnalysisOperationRecorder; using AnaOpRecorderOperation = AnalysisOperationRecorder::AnalysisOperation; using AnalysisMode = AnalysisOperationRecorder::AnalysisMode; @@ -11,8 +11,7 @@ using AnalysisMode = AnalysisOperationRecorder::AnalysisMode; QString XlsxHandler::_currentFilePath; -void XlsxHandler::test() -{ +void XlsxHandler::test() { #if 0 QString sourceFilePath = QDir::currentPath() + "/sample.xlsx"; qDebug() << "fileName:" << sourceFilePath; @@ -23,11 +22,9 @@ void XlsxHandler::test() writeExperimentFile(sourceFilePath); } -int XlsxHandler::readFile(const QString filePath, Global::CurveFileData &cfd) -{ - if(!QFile::exists(filePath)) - { - logde<< "xlsx file not existed:" << filePath.toStdString(); +int XlsxHandler::readFile(const QString filePath, Global::CurveFileData &cfd) { + if (!QFile::exists(filePath)) { + logde << "xlsx file not existed:" << filePath.toStdString(); return 1; } @@ -50,63 +47,78 @@ int XlsxHandler::readFile(const QString filePath, Global::CurveFileData &cfd) QXlsx::Document xlsx(filePath); QXlsx::Worksheet *workSheet = xlsx.currentWorksheet(); - if(!workSheet) - { + if (!workSheet) { logde << "current sheet is empty."; return 3; } // - int index = 2; - Global::ExperimentInfo& ei = cfd.ei; - ei.sampleName = workSheet->cellAt(index++, 2)->value().toString(); - ei.sampleWeight = workSheet->cellAt(index++, 2)->value().toString(); - logde<<"xlsx sample weight:"<cellAt(index++, 2)->value().toString(); + ei.sampleWeight = workSheet->cellAt(index++, 2)->value().toString(); + logde << "xlsx sample weight:" << ei.sampleWeight.toStdString(); - index++; // skip crucible weight. + index++; // skip crucible weight. ei.date = workSheet->cellAt(index++, 2)->value().toString(); ei.experimentor = workSheet->cellAt(index++, 2)->value().toString(); - index++; // skip measure type. - ei.phaseSize = workSheet->cellAt(index++, 2)->value().toInt(); + index++; // skip measure type. + ei.phaseSize = workSheet->cellAt(index++, 2)->value().toInt(); +#endif - QVector& phaseTotalVtr = cfd.phaseTotalVtr; - int dataIndex = 9; - for(int i = 0; i < ei.phaseSize; i++) - { + ei.sampleName = getCellStringValue(workSheet, index++, 2); + ei.sampleWeight = getCellStringValue(workSheet, index++, 2); + logde << "xlsx sample weight:" << ei.sampleWeight.toStdString(); + + index++; // skip crucible weight. + ei.date = getCellStringValue(workSheet, index++, 2); + ei.experimentor = getCellStringValue(workSheet, index++, 2); + index++; // skip measure type. + ei.phaseSize = getCellIntValue(workSheet, index++, 2); + + QVector &phaseTotalVtr = cfd.phaseTotalVtr; + int dataIndex = 9; + for (int i = 0; i < ei.phaseSize; i++) { Global::PhaseTotalInfo phaseTotal; phaseTotal.phaseIndex = i + 1; readPhaseData(workSheet, dataIndex, phaseTotal); phaseTotalVtr.push_back(phaseTotal); - } - readAnalysisOperation(workSheet,dataIndex,cfd); + readAnalysisOperation(workSheet, dataIndex, cfd); return 0; } void XlsxHandler::readPhaseData(QXlsx::Worksheet *workSheet, int &startLineIndex, - Global::PhaseTotalInfo &phaseTotal) -{ + Global::PhaseTotalInfo &phaseTotal) { // skip.# Time/min Temp/℃ Voltage/mW startLineIndex++; // skip.第一段 startLineIndex++; // logde<<"startLineIndex:"<cellAt(startLineIndex++, 2)->value().toDouble(); phaseTotal.phase.temp_flow = workSheet->cellAt(startLineIndex++, 2)->value().toDouble(); phaseTotal.phase.constant_temp_time_min = (uint16_t)(workSheet->cellAt(startLineIndex++, 2)->value().toInt()); phaseTotal.phase.gas = static_cast(workSheet->cellAt(startLineIndex++, 2)->value().toInt()); - int dataSize = workSheet->cellAt(startLineIndex++, 2)->value().toInt(); -// logde<<"data size:"<(getCellIntValue(workSheet, startLineIndex++, 2)); + int dataSize = getCellIntValue(workSheet, startLineIndex++, 2); + + // logde<<"data size:"<cellAt(startLineIndex, 2)->value().toDouble(); - data.sampleTemp = workSheet->cellAt(startLineIndex, 3)->value().toDouble(); - data.dsc = workSheet->cellAt(startLineIndex, 4)->value().toDouble(); +#if 0 + data.runTime = workSheet->cellAt(startLineIndex, 2)->value().toDouble(); + data.sampleTemp = workSheet->cellAt(startLineIndex, 3)->value().toDouble(); + data.dsc = workSheet->cellAt(startLineIndex, 4)->value().toDouble(); data.constantTempTime = workSheet->cellAt(startLineIndex, 5)->value().toDouble(); +#endif + data.runTime = getCellDoubleValue(workSheet, startLineIndex, 2); + data.sampleTemp = getCellDoubleValue(workSheet, startLineIndex, 3); + data.dsc = getCellDoubleValue(workSheet, startLineIndex, 4); + data.constantTempTime = getCellDoubleValue(workSheet, startLineIndex, 5); - if(data.runTime != 0){ + if (data.runTime != 0) { phaseTotal.dataVtr.push_back(data); } @@ -128,9 +146,8 @@ void XlsxHandler::readPhaseData(QXlsx::Worksheet *workSheet, int &startLineIndex } } -void XlsxHandler::writeExperimentFile(const QString filePath) -{ - logde<<"write file..."; +void XlsxHandler::writeExperimentFile(const QString filePath) { + logde << "write file..."; #if 0 if(Global::_curveExperimentDataVtr.empty()){ @@ -139,207 +156,206 @@ void XlsxHandler::writeExperimentFile(const QString filePath) } #endif - Global::ExperimentInfo& ei = Global::_experimentInfo; + Global::ExperimentInfo &ei = Global::_experimentInfo; QXlsx::Document xlsx; - xlsx.addSheet("Sheet1"); // 添加一个新的工作表 + xlsx.addSheet("Sheet1"); // 添加一个新的工作表 // Write experiment info. int row = 1; - xlsx.write(row++ , 1, ConFileDataInfo); + xlsx.write(row++, 1, ConFileDataInfo); - xlsx.write(row , 1, ConSampleName); + xlsx.write(row, 1, ConSampleName); QString sampleName = ei.sampleName; - if(sampleName.isEmpty()){ + if (sampleName.isEmpty()) { sampleName = "sample"; } - xlsx.write(row , 2, sampleName); + xlsx.write(row, 2, sampleName); row++; - xlsx.write(row , 1, ConSampleWeight); + xlsx.write(row, 1, ConSampleWeight); QString sampleWeight = ei.sampleWeight; - if(sampleWeight.isEmpty()){ + if (sampleWeight.isEmpty()) { sampleWeight = "1"; } - xlsx.write(row , 2, sampleWeight); + xlsx.write(row, 2, sampleWeight); - xlsx.write(row , 3, ConUnitMg); + xlsx.write(row, 3, ConUnitMg); row++; - xlsx.write(row , 1, ConCrucibleWeight); - xlsx.write(row , 2, 0); - xlsx.write(row , 3, ConUnitMg); + xlsx.write(row, 1, ConCrucibleWeight); + xlsx.write(row, 2, 0); + xlsx.write(row, 3, ConUnitMg); row++; - xlsx.write(row , 1, Conexperimenter); + xlsx.write(row, 1, Conexperimenter); QString experimentor = ei.experimentor; - if(experimentor.isEmpty()){ + if (experimentor.isEmpty()) { experimentor = "experimentor"; } - xlsx.write(row , 2, experimentor); + xlsx.write(row, 2, experimentor); row++; - xlsx.write(row , 1, ConDate); + xlsx.write(row, 1, ConDate); QString date = ei.date; - if(date.isEmpty()){ + if (date.isEmpty()) { date = "20250101"; } - xlsx.write(row , 2, date); + xlsx.write(row, 2, date); row++; - xlsx.write(row , 1, ConMeasureType); - xlsx.write(row , 2, "样品"); + xlsx.write(row, 1, ConMeasureType); + xlsx.write(row, 2, "样品"); row++; int phaseSizeRow = row; - int phaseCount = 0; - xlsx.write(row , 1, ConPhaseSize); - xlsx.write(row , 2, ei.phaseVtr.size()); + int phaseCount = 0; + xlsx.write(row, 1, ConPhaseSize); + xlsx.write(row, 2, ei.phaseVtr.size()); row++; // Write phase data. int dataSizeRow = 0; - logde<<"phase vtr size:"< edVtr = - Global::_curveExperimentDataVtr.at(i).dataVtr; + Global::_curveExperimentDataVtr.at(i).dataVtr; - if(!Global::_curveExperimentDataVtr.at(i).smoothDataVtr.empty()){ + if (!Global::_curveExperimentDataVtr.at(i).smoothDataVtr.empty()) { edVtr = Global::_curveExperimentDataVtr.at(i).smoothDataVtr; } // phase data size. dataSizeRow = row; - xlsx.write(row , 1, ConPhaseDataSize); - xlsx.write(row , 2, edVtr.size()); + xlsx.write(row, 1, ConPhaseDataSize); + xlsx.write(row, 2, edVtr.size()); row++; // logde<<"edVtr size:"<currentWorksheet(); - if(!sheet) - { + if (!sheet) { logde << "current sheet is empty."; return; } int index = sheet->dimension().lastRow(); - logde<<"lastRow:"<saveAs(filePath)) { - logde<<"Save xlsx failed."; + logde << "Save xlsx failed."; delete xlsx; - return ; + return; } #endif // delete xlsx; - logde<<"Save xlsx succ."; + logde << "Save xlsx succ."; } -QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) { +QXlsx::Document *XlsxHandler::openXlsxFile(const QString &sourceFilePath) { // 检查文件是否存在 if (!QFile::exists(sourceFilePath)) { logde << "xlsx file not existed:" << sourceFilePath.toStdString(); - QXlsx::Document* xlsx = new QXlsx::Document(sourceFilePath); + QXlsx::Document *xlsx = new QXlsx::Document(sourceFilePath); return xlsx; } QFileInfo fileInfo(sourceFilePath); @@ -353,9 +369,9 @@ QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) { return nullptr; } - QXlsx::Document* xlsx = new QXlsx::Document(sourceFilePath); + QXlsx::Document *xlsx = new QXlsx::Document(sourceFilePath); - QXlsx::Worksheet* workSheet = xlsx->currentWorksheet(); + QXlsx::Worksheet *workSheet = xlsx->currentWorksheet(); if (!workSheet) { qDebug() << "current sheet is empty."; delete xlsx; @@ -366,42 +382,41 @@ QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) { } void XlsxHandler::readAnalysisOperation( - QXlsx::Worksheet *sheet, int &startLineIndex,Global::CurveFileData& cfd) -{ + QXlsx::Worksheet *sheet, int &startLineIndex, Global::CurveFileData &cfd) { QXlsx::Cell *cell = sheet->cellAt(startLineIndex, 2); if (!cell) { logde << "Cell does not exist."; return; } - int size = sheet->cellAt(startLineIndex++, 2)->value().toInt(); + int size = sheet->cellAt(startLineIndex++, 2)->value().toInt(); - logde<<"ana op size:"<cellAt(startLineIndex, 1)->value().toString(); - if(modeStr == AnaOpRecorder::NumericalLabelStr){ + if (modeStr == AnaOpRecorder::NumericalLabelStr) { ao.mode = AnalysisMode::NumericalLabel; - }else if(modeStr == AnaOpRecorder::StartPointStr){ + } else if (modeStr == AnaOpRecorder::StartPointStr) { ao.mode = AnalysisMode::StartPoint; - }else if(modeStr == AnaOpRecorder::StopPointStr){ + } else if (modeStr == AnaOpRecorder::StopPointStr) { ao.mode = AnalysisMode::StopPoint; - }else if(modeStr == AnaOpRecorder::PeakSynthesisAnalysisStr){ + } else if (modeStr == AnaOpRecorder::PeakSynthesisAnalysisStr) { ao.mode = AnalysisMode::PeakSynthesisAnalysis; - }else if(modeStr == AnaOpRecorder::GlassTransitionStr){ + } else if (modeStr == AnaOpRecorder::GlassTransitionStr) { ao.mode = AnalysisMode::GlassTransition; - }else if(modeStr == AnaOpRecorder::OnsetTemperaturePointStr){ + } else if (modeStr == AnaOpRecorder::OnsetTemperaturePointStr) { ao.mode = AnalysisMode::OnsetTemperaturePoint; - }else if(modeStr == AnaOpRecorder::EndsetTemperaturePointStr){ + } else if (modeStr == AnaOpRecorder::EndsetTemperaturePointStr) { ao.mode = AnalysisMode::EndsetTemperaturePoint; - }else if(modeStr == AnaOpRecorder::OITStr){ + } else if (modeStr == AnaOpRecorder::OITStr) { ao.mode = AnalysisMode::OIT; } @@ -412,207 +427,199 @@ void XlsxHandler::readAnalysisOperation( startLineIndex++; - logde<<" ao mode:"<& aoVtr = - AnalysisOperationRecorder::_analysisOperationVtr; + QVector &aoVtr = + AnalysisOperationRecorder::_analysisOperationVtr; - if(aoVtr.empty()){ + if (aoVtr.empty()) { return; } - xlsx->write(localRow , 1, ConAnalysisOperationCount); - xlsx->write(localRow , 2, aoVtr.size()); + xlsx->write(localRow, 1, ConAnalysisOperationCount); + xlsx->write(localRow, 2, aoVtr.size()); localRow++; - for (AnaOpRecorderOperation& ao:aoVtr){ + for (AnaOpRecorderOperation &ao : aoVtr) { QString analysisOpName; - switch(ao.mode){ - case AnalysisMode::NumericalLabel: - { - analysisOpName = AnalysisOperationRecorder::NumericalLabelStr; - break; - } - case AnalysisMode::StartPoint: - { - analysisOpName = AnalysisOperationRecorder::StartPointStr; - break; - } - case AnalysisMode::StopPoint: - { - analysisOpName = AnalysisOperationRecorder::StopPointStr; - break; - } - case AnalysisMode::PeakSynthesisAnalysis: - { - analysisOpName = AnalysisOperationRecorder::PeakSynthesisAnalysisStr; - break; - } - case AnalysisMode::GlassTransition: - { - analysisOpName = AnalysisOperationRecorder::GlassTransitionStr; - break; - } - case AnalysisMode::OnsetTemperaturePoint: - { - analysisOpName = AnalysisOperationRecorder::OnsetTemperaturePointStr; - break; - } - case AnalysisMode::EndsetTemperaturePoint: - { - analysisOpName = AnalysisOperationRecorder::EndsetTemperaturePointStr; - break; - } - case AnalysisMode::OIT: - { - analysisOpName = AnalysisOperationRecorder::OITStr; - break; - } - default:break; + switch (ao.mode) { + case AnalysisMode::NumericalLabel: { + analysisOpName = AnalysisOperationRecorder::NumericalLabelStr; + break; + } + case AnalysisMode::StartPoint: { + analysisOpName = AnalysisOperationRecorder::StartPointStr; + break; + } + case AnalysisMode::StopPoint: { + analysisOpName = AnalysisOperationRecorder::StopPointStr; + break; + } + case AnalysisMode::PeakSynthesisAnalysis: { + analysisOpName = AnalysisOperationRecorder::PeakSynthesisAnalysisStr; + break; + } + case AnalysisMode::GlassTransition: { + analysisOpName = AnalysisOperationRecorder::GlassTransitionStr; + break; + } + case AnalysisMode::OnsetTemperaturePoint: { + analysisOpName = AnalysisOperationRecorder::OnsetTemperaturePointStr; + break; + } + case AnalysisMode::EndsetTemperaturePoint: { + analysisOpName = AnalysisOperationRecorder::EndsetTemperaturePointStr; + break; + } + case AnalysisMode::OIT: { + analysisOpName = AnalysisOperationRecorder::OITStr; + break; + } + default: + break; } - xlsx->write(localRow , 1, analysisOpName); - xlsx->write(localRow , 2, ao.x1); - xlsx->write(localRow , 3, ao.x2); + xlsx->write(localRow, 1, analysisOpName); + xlsx->write(localRow, 2, ao.x1); + xlsx->write(localRow, 3, ao.x2); localRow++; } } -void XlsxHandler::writeSmoothnessFile(const QString filePath) -{ - if(Global::_curveFileDataVtr.empty()){ - logde<<"curve file data vtr empty..."; +void XlsxHandler::writeSmoothnessFile(const QString filePath) { + if (Global::_curveFileDataVtr.empty()) { + logde << "curve file data vtr empty..."; return; } - Global::ExperimentInfo& ei = Global::_curveFileDataVtr.first().ei; + Global::ExperimentInfo &ei = Global::_curveFileDataVtr.first().ei; QXlsx::Document xlsx; - xlsx.addSheet("Sheet1"); // 添加一个新的工作表 + xlsx.addSheet("Sheet1"); // 添加一个新的工作表 // Write experiment info. int row = 1; - xlsx.write(row++ , 1, ConFileDataInfo); + xlsx.write(row++, 1, ConFileDataInfo); - xlsx.write(row , 1, ConSampleName); + xlsx.write(row, 1, ConSampleName); QString sampleName = ei.sampleName; - if(sampleName.isEmpty()){ + if (sampleName.isEmpty()) { sampleName = "sample"; } - xlsx.write(row , 2, sampleName); + xlsx.write(row, 2, sampleName); row++; - xlsx.write(row , 1, ConSampleWeight); + xlsx.write(row, 1, ConSampleWeight); QString sampleWeight = ei.sampleWeight; - if(sampleWeight.isEmpty()){ + if (sampleWeight.isEmpty()) { sampleWeight = "1"; } - xlsx.write(row , 2, sampleWeight); + xlsx.write(row, 2, sampleWeight); - xlsx.write(row , 3, ConUnitMg); + xlsx.write(row, 3, ConUnitMg); row++; - xlsx.write(row , 1, ConCrucibleWeight); - xlsx.write(row , 2, 0); - xlsx.write(row , 3, ConUnitMg); + xlsx.write(row, 1, ConCrucibleWeight); + xlsx.write(row, 2, 0); + xlsx.write(row, 3, ConUnitMg); row++; - xlsx.write(row , 1, Conexperimenter); + xlsx.write(row, 1, Conexperimenter); QString experimentor = ei.experimentor; - if(experimentor.isEmpty()){ + if (experimentor.isEmpty()) { experimentor = "experimentor"; } - xlsx.write(row , 2, experimentor); + xlsx.write(row, 2, experimentor); row++; - xlsx.write(row , 1, ConDate); + xlsx.write(row, 1, ConDate); QString date = ei.date; - if(date.isEmpty()){ + if (date.isEmpty()) { date = "20250101"; } - xlsx.write(row , 2, date); + xlsx.write(row, 2, date); row++; - xlsx.write(row , 1, ConMeasureType); - xlsx.write(row , 2, "样品"); + xlsx.write(row, 1, ConMeasureType); + xlsx.write(row, 2, "样品"); row++; int phaseSizeRow = row; - int phaseCount = 0; - xlsx.write(row , 1, ConPhaseSize); - xlsx.write(row , 2, ei.phaseVtr.size()); + int phaseCount = 0; + xlsx.write(row, 1, ConPhaseSize); + xlsx.write(row, 2, ei.phaseVtr.size()); row++; // Write phase data. - logde<<"curve file vtr size:"<& phaseVtr = - Global::_curveFileDataVtr.first().phaseTotalVtr; + logde << "curve file vtr size:" << Global::_curveFileDataVtr.size(); + QVector &phaseVtr = + Global::_curveFileDataVtr.first().phaseTotalVtr; int dataSizeRow = 0; // logde<<"phase vtr size:"< edVtr = - phaseVtr.at(i).dataVtr; - if(!phaseVtr.at(i).smoothDataVtr.empty()){ + phaseVtr.at(i).dataVtr; + if (!phaseVtr.at(i).smoothDataVtr.empty()) { edVtr = phaseVtr.at(i).smoothDataVtr; } // phase data size. dataSizeRow = row; - xlsx.write(row , 1, ConPhaseDataSize); - xlsx.write(row , 2, edVtr.size()); + xlsx.write(row, 1, ConPhaseDataSize); + xlsx.write(row, 2, edVtr.size()); row++; // logde<<"edVtr size:"<& phaseVtr = - Global::_curveFileDataVtr.first().phaseTotalVtr; + QVector &phaseVtr = + Global::_curveFileDataVtr.first().phaseTotalVtr; writeSmoothnessFile(filePath); @@ -682,35 +688,58 @@ void XlsxHandler::writeXlsxFile(const QString filePath) #endif } -int XlsxHandler::deleteInvalidRow(QXlsx::Document *doc) -{ +int XlsxHandler::deleteInvalidRow(QXlsx::Document *doc) { QXlsx::Worksheet *sheet = doc->currentWorksheet(); - if(!sheet) - { + if (!sheet) { logde << "current sheet is empty."; return 0; } int lastRow = doc->dimension().lastRow(); - logde<<"lastRow:"<= startRow; --row) { QString cellValue = sheet->read(row, 0).toString(); if (cellValue.isEmpty() - || cellValue == ConAnalysisOperationCount - || cellValue == AnaOpRecorder::NumericalLabelStr - || cellValue == AnaOpRecorder::StartPointStr - || cellValue == AnaOpRecorder::StopPointStr - || cellValue == AnaOpRecorder::PeakSynthesisAnalysisStr - || cellValue == AnaOpRecorder::GlassTransitionStr - || cellValue == AnaOpRecorder::OnsetTemperaturePointStr - || cellValue == AnaOpRecorder::EndsetTemperaturePointStr - ) { + || cellValue == ConAnalysisOperationCount + || cellValue == AnaOpRecorder::NumericalLabelStr + || cellValue == AnaOpRecorder::StartPointStr + || cellValue == AnaOpRecorder::StopPointStr + || cellValue == AnaOpRecorder::PeakSynthesisAnalysisStr + || cellValue == AnaOpRecorder::GlassTransitionStr + || cellValue == AnaOpRecorder::OnsetTemperaturePointStr + || cellValue == AnaOpRecorder::EndsetTemperaturePointStr) { qDebug() << "Row" << row << "is empty or contains specified string. Deleting row."; // sheet->deleteRows(row, 1); // 删除当前行 // sheet->deleteRow(row); } } } +double XlsxHandler::getCellDoubleValue(QXlsx::Worksheet *workSheet, int row, int col, double defaultValue) { + auto cell = workSheet->cellAt(row, col); + if (cell && !cell->value().isNull()) { + return cell->value().toDouble(); + } else { + return defaultValue; + } +} + +QString XlsxHandler::getCellStringValue(QXlsx::Worksheet *workSheet, int row, int col, const QString &defaultValue ) { + auto cell = workSheet->cellAt(row, col); + if (cell && !cell->value().isNull()) { + return cell->value().toString(); + } else { + return defaultValue; + } +} + +int XlsxHandler::getCellIntValue(QXlsx::Worksheet *workSheet, int row, int col, int defaultValue) { + auto cell = workSheet->cellAt(row, col); + if (cell && !cell->value().isNull()) { + return cell->value().toInt(); + } else { + return defaultValue; + } +} diff --git a/src/data/xlsxhandler.h b/src/data/xlsxhandler.h index 0c992ab..d66e854 100644 --- a/src/data/xlsxhandler.h +++ b/src/data/xlsxhandler.h @@ -19,11 +19,16 @@ namespace XlsxHandler { * 3:Sheet is empty. */ QXlsx::Document* openXlsxFile(const QString& sourceFilePath); - + // read. int readFile(const QString filePath,Global::CurveFileData&); void readPhaseData(QXlsx::Worksheet*,int& startLineIndex,Global::PhaseTotalInfo&); void readAnalysisOperation(QXlsx::Worksheet*,int& startLineIndex,Global::CurveFileData&); + double getCellDoubleValue(QXlsx::Worksheet* workSheet, int row, int col, double defaultValue = 0.0); + int getCellIntValue(QXlsx::Worksheet* workSheet, int row, int col, int defaultValue = 0); + QString getCellStringValue(QXlsx::Worksheet* workSheet, int row, int col, const QString& defaultValue = ""); + + // write. void writeExperimentFile(const QString filePath); void writeXlsxFile(const QString filePath); diff --git a/src/global.cpp b/src/global.cpp index 9fbe875..e5aa544 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -4,178 +4,191 @@ #include "global.h" namespace Global { -Mode _mode = Mode::Analysis; + Mode _mode = Mode::Analysis; -AxisMode _axisMode = AxisMode::SingleY; + AxisMode _axisMode = AxisMode::SingleY; -QVector _curveFileDataVtr; + QVector _curveFileDataVtr; -int _currentPhase = 0; -ExperimentInfo _experimentInfo; -QVector _curveExperimentDataVtr; -CurveExperimentData* _currentCurveExperimentDataPtr = nullptr; + int _currentPhase = 0; + ExperimentInfo _experimentInfo; + QVector _curveExperimentDataVtr; + CurveExperimentData *_currentCurveExperimentDataPtr = nullptr; -bool _smoothnessFlag = false; -QVector _curveSmoothnessDataVtr; -QString _smoothnessFileName; + bool _smoothnessFlag = false; + QVector _curveSmoothnessDataVtr; + QString _smoothnessFileName; -bool _enthalpyCoefficientEnableFlag = false; -QVector _enthalpyCoefficientVtr; + bool _enthalpyCoefficientEnableFlag = false; + QVector _enthalpyCoefficientVtr; -bool _displayTimeValue = false; + bool _displayTimeValue = false; -LanguageType _languageType = LanguageType::Chinese; + LanguageType _languageType = LanguageType::Chinese; -bool _experimentOITFlag = false; + bool _experimentOITFlag = false; -// OIT auto mode. -bool _OITAutoAnalysisModeFlag = false; -double _OITAutoAnalysisCoefficient = OITAutoAnalysisDefaultCoefficient; -double _OITAutoAnalysisThreshold = OITAutoAnalysisDefaultThreshold; + // OIT auto mode. + bool _OITAutoAnalysisModeFlag = false; + double _OITAutoAnalysisCoefficient = OITAutoAnalysisDefaultCoefficient; + double _OITAutoAnalysisThreshold = OITAutoAnalysisDefaultThreshold; + // 实验文件 + QStringList _fileList; -QString converDoubleToStr(const double num) -{ - return QString::number(num,'f',3); -} - -void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]) -{ - if (n < 3) { - throw std::invalid_argument("At least 3 data points are required for quadratic fitting"); + QString converDoubleToStr(const double num) { + return QString::number(num, 'f', 3); } - double sum_x = 0, sum_x2 = 0, sum_x3 = 0, sum_x4 = 0; - double sum_y = 0, sum_xy = 0, sum_x2y = 0; + void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]) { + if (n < 3) { + throw std::invalid_argument("At least 3 data points are required for quadratic fitting"); + } - // 计算各项累加和 - for (int i = 0; i < n; ++i) { - double xi = x[i]; - double xi2 = xi * xi; - double xi3 = xi2 * xi; - double xi4 = xi3 * xi; - double yi = y[i]; + double sum_x = 0, sum_x2 = 0, sum_x3 = 0, sum_x4 = 0; + double sum_y = 0, sum_xy = 0, sum_x2y = 0; - sum_x += xi; - sum_x2 += xi2; - sum_x3 += xi3; - sum_x4 += xi4; - sum_y += yi; - sum_xy += xi * yi; - sum_x2y += xi2 * yi; - } + // 计算各项累加和 + for (int i = 0; i < n; ++i) { + double xi = x[i]; + double xi2 = xi * xi; + double xi3 = xi2 * xi; + double xi4 = xi3 * xi; + double yi = y[i]; - // 构建正规方程组的增广矩阵 - double matrix[3][4] = { - {sum_x4, sum_x3, sum_x2, sum_x2y}, // 对应方程: a*Σx⁴ + b*Σx³ + c*Σx² = Σx²y - {sum_x3, sum_x2, sum_x, sum_xy}, // 对应方程: a*Σx³ + b*Σx² + c*Σx = Σxy - {sum_x2, sum_x, static_cast(n), sum_y} // 对应方程: a*Σx² + b*Σx + c*n = Σy - }; + sum_x += xi; + sum_x2 += xi2; + sum_x3 += xi3; + sum_x4 += xi4; + sum_y += yi; + sum_xy += xi * yi; + sum_x2y += xi2 * yi; + } - // 高斯消元法解方程组 - for (int i = 0; i < 3; ++i) { - // 部分主元选择 - int maxRow = i; - for (int k = i + 1; k < 3; ++k) { - if (std::abs(matrix[k][i]) > std::abs(matrix[maxRow][i])) { - maxRow = k; + // 构建正规方程组的增广矩阵 + double matrix[3][4] = { + { sum_x4, sum_x3, sum_x2, sum_x2y }, // 对应方程: a*Σx⁴ + b*Σx³ + c*Σx² = Σx²y + { sum_x3, sum_x2, sum_x, sum_xy }, // 对应方程: a*Σx³ + b*Σx² + c*Σx = Σxy + { sum_x2, sum_x, static_cast(n), sum_y } // 对应方程: a*Σx² + b*Σx + c*n = Σy + }; + + // 高斯消元法解方程组 + for (int i = 0; i < 3; ++i) { + // 部分主元选择 + int maxRow = i; + for (int k = i + 1; k < 3; ++k) { + if (std::abs(matrix[k][i]) > std::abs(matrix[maxRow][i])) { + maxRow = k; + } + } + + // 交换行 + for (int k = i; k < 4; ++k) { + std::swap(matrix[i][k], matrix[maxRow][k]); + } + + // 消元 + for (int k = i + 1; k < 3; ++k) { + double factor = matrix[k][i] / matrix[i][i]; + for (int j = i; j < 4; ++j) { + matrix[k][j] -= factor * matrix[i][j]; + } } } - // 交换行 - for (int k = i; k < 4; ++k) { - std::swap(matrix[i][k], matrix[maxRow][k]); - } - - // 消元 - for (int k = i + 1; k < 3; ++k) { - double factor = matrix[k][i] / matrix[i][i]; - for (int j = i; j < 4; ++j) { - matrix[k][j] -= factor * matrix[i][j]; - } - } + // 回代求解 + coeff[2] = matrix[2][3] / matrix[2][2]; // c + coeff[1] = (matrix[1][3] - matrix[1][2] * coeff[2]) / matrix[1][1]; // b + coeff[0] = (matrix[0][3] - matrix[0][2] * coeff[2] - matrix[0][1] * coeff[1]) / matrix[0][0]; // a } - // 回代求解 - coeff[2] = matrix[2][3] / matrix[2][2]; // c - coeff[1] = (matrix[1][3] - matrix[1][2] * coeff[2]) / matrix[1][1]; // b - coeff[0] = (matrix[0][3] - matrix[0][2] * coeff[2] - matrix[0][1] * coeff[1]) / matrix[0][0]; // a -} + // 计算一元一次函数在给定区间内开始变成负值的点 + double findNegativeStartPoint(double m, double b, double start, double end) { + // 处理斜率为零的情况 + if (m == 0) { + // 当斜率为 0 时,函数值为常数 b + if (b < 0) { + return start; // 若 b 为负,函数在区间起始点就为负 + } else { + return std::numeric_limits::infinity(); // 若 b 非负,函数在区间内不会变负 + } + } -// 计算一元一次函数在给定区间内开始变成负值的点 -double findNegativeStartPoint(double m, double b, double start, double end) { - // 处理斜率为零的情况 - if (m == 0) { - // 当斜率为 0 时,函数值为常数 b - if (b < 0) { - return start; // 若 b 为负,函数在区间起始点就为负 + // 计算零点 + double zeroPoint = -b / m; + + // 检查零点是否在给定区间内 + if (zeroPoint >= start && zeroPoint <= end) { + return zeroPoint; // 零点在区间内,函数在此点开始变负 + } + + // 根据斜率正负判断函数单调性,进而判断函数在区间内是否会变负 + if (m > 0) { + // 斜率大于 0,函数单调递增 + if (m * start + b < 0) { + return start; // 起始点函数值为负,函数在起始点就为负 + } } else { - return std::numeric_limits::infinity(); // 若 b 非负,函数在区间内不会变负 + // 斜率小于 0,函数单调递减 + if (m * end + b < 0) { + return end; // 结束点函数值为负,函数在结束点开始为负 + } } + + // 函数在区间内不会变负 + return std::numeric_limits::infinity(); } - // 计算零点 - double zeroPoint = -b / m; - - // 检查零点是否在给定区间内 - if (zeroPoint >= start && zeroPoint <= end) { - return zeroPoint; // 零点在区间内,函数在此点开始变负 + void clearExperimentData() { + _curveExperimentDataVtr.clear(); + _currentCurveExperimentDataPtr = nullptr; + _currentPhase = -1; } - // 根据斜率正负判断函数单调性,进而判断函数在区间内是否会变负 - if (m > 0) { - // 斜率大于 0,函数单调递增 - if (m * start + b < 0) { - return start; // 起始点函数值为负,函数在起始点就为负 - } - } else { - // 斜率小于 0,函数单调递减 - if (m * end + b < 0) { - return end; // 结束点函数值为负,函数在结束点开始为负 - } + bool isZero(double value, double epsilon) { + return std::abs(value) < epsilon; } - // 函数在区间内不会变负 - return std::numeric_limits::infinity(); -} + bool isEqual(const double a, const double b) { + const double tolerance = 1e-5; // 容差值,可以根据需要调整 + return std::fabs(a - b) < tolerance; + } -void clearExperimentData() -{ - _curveExperimentDataVtr.clear(); - _currentCurveExperimentDataPtr = nullptr; - _currentPhase = -1; -} + QString getFileName(const QString filePath) { + QFileInfo fileInfo(filePath); -bool isZero(double value, double epsilon) { - return std::abs(value) < epsilon; -} + // 获取文件的后缀名并转换为小写,方便比较 + QString fileSuffix = fileInfo.suffix().toLower(); -bool isEqual(const double a, const double b) { - const double tolerance = 1e-5; // 容差值,可以根据需要调整 - return std::fabs(a - b) < tolerance; -} + return fileInfo.fileName(); + } -QString getFileName(const QString filePath) -{ - QFileInfo fileInfo(filePath); - - // 获取文件的后缀名并转换为小写,方便比较 - QString fileSuffix = fileInfo.suffix().toLower(); - - return fileInfo.fileName(); -} - -double converStrToDouble(const QString str) -{ - bool ok; - double value = str.toDouble(&ok); // 将字符串转换为 double,并检查是否成功 + double converStrToDouble(const QString str) { + bool ok; + double value = str.toDouble(&ok); // 将字符串转换为 double,并检查是否成功 if (!ok) { qDebug() << "转换失败,输入的字符串不是有效的数字"; - return 0.0; // 如果转换失败,返回默认值 + return 0.0; // 如果转换失败,返回默认值 } return value; + } + bool isFileExist(const QString &fileName) { + return _fileList.contains(fileName); + } + + +void updateFileList() +{ + _fileList.clear(); + + QDir dir(SampleDataFloder); + _fileList.append(dir.entryList(QDir::Files)); + dir.setPath(BaseLineFolder); + _fileList.append(dir.entryList(QDir::Files)); + dir.setPath(AnalysisStateFolder); + _fileList.append(dir.entryList(QDir::Files)); } -} +} // namespace Global #if 0 Global::Global() diff --git a/src/global.h b/src/global.h index 8cc3c0c..46379b9 100644 --- a/src/global.h +++ b/src/global.h @@ -9,142 +9,132 @@ #include "analysisoperationrecorder.h" namespace Global { -const QString ExperimentDirPath = QDir::currentPath()+"/../experiment_data"; + const QString ExperimentDirPath = QDir::currentPath() + "/../experiment_data"; -const QString SampleDataFloder = ExperimentDirPath + "/sample_data"; -const QString BaseLineFolder = ExperimentDirPath + "/base_line"; -const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state"; + const QString SampleDataFloder = ExperimentDirPath + "/sample_data"; + const QString BaseLineFolder = ExperimentDirPath + "/base_line"; + const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state"; -const QString CurveOfTimeTypeObjectName("curve_time"); + const QString CurveOfTimeTypeObjectName("curve_time"); -const int PhaseIndexDefault = -1; + const int PhaseIndexDefault = -1; -// json string. -const QString AtomsphereData("atomsphereData"); -const QString SampleData("sampleData"); + // json string. + const QString AtomsphereData("atomsphereData"); + const QString SampleData("sampleData"); -const QString Atmosphere("atmosphere"); -const QString HeatingRate("heatingRate"); + const QString Atmosphere("atmosphere"); + const QString HeatingRate("heatingRate"); -const QString ElementName("elementName"); -const QString SampleName("sampleName"); -const QString TemperatureStr("temperature"); -const QString RateStr("rate"); + const QString ElementName("elementName"); + const QString SampleName("sampleName"); + const QString TemperatureStr("temperature"); + const QString RateStr("rate"); -// -const double DefaultParamter = 8.177; -const double OnsetAndEndSetRate = 0.01; + // + const double DefaultParamter = 8.177; + const double OnsetAndEndSetRate = 0.01; -//curve object name -const QString ObjectNameExperiemnt("experiment"); -const QString ObjectNameSmooth("smooth"); -const QString Separator("___"); -// -enum LanguageType{ - Chinese, - English -}; + // curve object name + const QString ObjectNameExperiemnt("experiment"); + const QString ObjectNameSmooth("smooth"); + const QString Separator("___"); + // + enum LanguageType { + Chinese, + English + }; -enum AxisMode{ - SingleY, - DoubleY -}; + enum AxisMode { + SingleY, + DoubleY + }; -const QString EnglishStr("English"); -const QString ChineseStr("中文"); + const QString EnglishStr("English"); + const QString ChineseStr("中文"); -enum Mode{ - None, - Analysis, - ConnectedToDev, - DeliveredData, - Experiment -}; + enum Mode { + None, + Analysis, + ConnectedToDev, + DeliveredData, + Experiment + }; -enum DeviceConnectionStatus{ - Disconnected, - Connected -}; + enum DeviceConnectionStatus { + Disconnected, + Connected + }; -struct ExperimentData { - float runTime; - float constantTempTime; - float sampleTemp; - float dsc; - int phaseIndex; + struct ExperimentData { + float runTime; + float constantTempTime; + float sampleTemp; + float dsc; + int phaseIndex; - ExperimentData() - :runTime(0.0) - ,constantTempTime(0.0) - ,sampleTemp(0.0) - ,dsc(0.0) - ,phaseIndex(PhaseIndexDefault) - {} -}; + ExperimentData() + : runTime(0.0), constantTempTime(0.0), sampleTemp(0.0), dsc(0.0), phaseIndex(PhaseIndexDefault) {} + }; -enum TestType{ - OIT, - NoneOIT -}; + enum TestType { + OIT, + NoneOIT + }; -struct ExperimentInfo{ - // experiment info - QString sampleName; - QString sampleWeight; - QString date; - QString experimentor; - // phase info - TestType testType; - GasType initialAtmosPhere; - int phaseSize; + struct ExperimentInfo { + // experiment info + QString sampleName; + QString sampleWeight; + QString date; + QString experimentor; + // phase info + TestType testType; + GasType initialAtmosPhere; + int phaseSize; - QVector phaseVtr; + QVector phaseVtr; - ExperimentInfo() - :sampleName("new") - ,sampleWeight("0") - ,date("20250101") - ,experimentor("experimentor") - {} -}; + ExperimentInfo() + : sampleName("new"), sampleWeight("0"), date("20250101"), experimentor("experimentor") {} + }; -struct PhaseTotalInfo{ - int phaseIndex; // from 1 to 6. - Phase phase; - QCPCurve * curve; - QVector dataVtr; - QVector smoothDataVtr; -}; + struct PhaseTotalInfo { + int phaseIndex; // from 1 to 6. + Phase phase; + QCPCurve *curve; + QVector dataVtr; + QVector smoothDataVtr; + }; -struct CurveFileData{ - QString filePath; - Global::ExperimentInfo ei; - QVector phaseTotalVtr; - QVector analysisOperationVtr; -}; + struct CurveFileData { + QString filePath; + Global::ExperimentInfo ei; + QVector phaseTotalVtr; + QVector analysisOperationVtr; + }; -struct CurveExperimentData{ - int phaseIndex; // from 1 to 6. - QCPCurve * curve; - QString fileName; // discard - QVector dataVtr; - QVector smoothDataVtr; + struct CurveExperimentData { + int phaseIndex; // from 1 to 6. + QCPCurve *curve; + QString fileName; // discard + QVector dataVtr; + QVector smoothDataVtr; - CurveExperimentData() - :phaseIndex(PhaseIndexDefault) - ,curve(nullptr){} -}; + CurveExperimentData() + : phaseIndex(PhaseIndexDefault), curve(nullptr) {} + }; -// Soft mode. -extern Mode _mode; -// Xlsx file data. -extern QVector _curveFileDataVtr; -// Experiment setting data. -extern int _currentPhase; -extern ExperimentInfo _experimentInfo; -extern QVector _curveExperimentDataVtr; -extern CurveExperimentData* _currentCurveExperimentDataPtr; -//extern bool _smoothnessFlag; + // Soft mode. + extern Mode _mode; + // Xlsx file data. + extern QVector _curveFileDataVtr; + // Experiment setting data. + extern int _currentPhase; + extern ExperimentInfo _experimentInfo; + extern QVector _curveExperimentDataVtr; + extern CurveExperimentData *_currentCurveExperimentDataPtr; + // extern bool _smoothnessFlag; #if 0 // Smoothness data @@ -152,39 +142,44 @@ extern QVector _curveSmoothnessDataVtr; extern QString _smoothnessFileName; #endif -// Call clear function at the right time. -void clearExperimentData(); + // Call clear function at the right time. + void clearExperimentData(); -// Instrument coefficient. -extern bool _enthalpyCoefficientEnableFlag; -///abc -extern QVector _enthalpyCoefficientVtr; -// peak comprehensive ananlysis -extern bool _displayTimeValue; -// -extern LanguageType _languageType; + // Instrument coefficient. + extern bool _enthalpyCoefficientEnableFlag; + /// abc + extern QVector _enthalpyCoefficientVtr; + // peak comprehensive ananlysis + extern bool _displayTimeValue; + // + extern LanguageType _languageType; -extern AxisMode _axisMode; + extern AxisMode _axisMode; -extern bool _experimentOITFlag; + extern bool _experimentOITFlag; -// OIT auto mode. -const double OITAutoAnalysisDefaultCoefficient = 10.0; -const double OITAutoAnalysisDefaultThreshold = 2.0; + // OIT auto mode. + const double OITAutoAnalysisDefaultCoefficient = 10.0; + const double OITAutoAnalysisDefaultThreshold = 2.0; -extern bool _OITAutoAnalysisModeFlag; -extern double _OITAutoAnalysisCoefficient; -extern double _OITAutoAnalysisThreshold; + extern bool _OITAutoAnalysisModeFlag; + extern double _OITAutoAnalysisCoefficient; + extern double _OITAutoAnalysisThreshold; -// common func -QString converDoubleToStr(const double); -double converStrToDouble(const QString); -void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]); -double findNegativeStartPoint(double m, double b, double start, double end); -bool isZero(double value, double epsilon = 1e-9); -bool isEqual(const double a,const double b); -QString getFileName(const QString filePath); + // common func + QString converDoubleToStr(const double); + double converStrToDouble(const QString); + void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]); + double findNegativeStartPoint(double m, double b, double start, double end); + bool isZero(double value, double epsilon = 1e-9); + bool isEqual(const double a, const double b); + QString getFileName(const QString filePath); -}; + // 实验文件 + extern QStringList _fileList; + void updateFileList(); + bool isFileExist(const QString &fileName); -#endif // GLOBAL_H +}; // namespace Global + +#endif // GLOBAL_H diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9f2d06f..b984c93 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -17,21 +17,7 @@ MainWindow::MainWindow(QWidget *parent) _leftWidget(new LeftWidget(this)), _expertmentSettingForm(new ExperimentSettingForm(this)), _realTimeDataForm(new RealTimeDataForm(this)), - _rightWidget(new QDockWidget(this)) - ,_analysisSettingWidget(new AnalysisSettingForm(this)) - ,_contextMenu(new QMenu(this)) - ,_specificHeatComparisonMethodForm(new SpecificHeatComparisonMethodForm(this)) - ,_instrumentCoefficientForm(new InstrumentCoefficientForm(this)) - ,_degreeOfCureForm(new DegreeOfCureForm(this)) - ,_OITAutoAnalysisParamForm(new OITAutoAnalysisParamForm(this)) - ,_degreeOfCrystallinityForm(new DegreeOfCrystallinityForm(this)) - ,_aboutForm(new AboutForm(this)) - ,_enthalpyDataCorrectionForm(new EnthalpyDataCorrectionForm(this)) - ,_coefficientSelectionForm(new CoefficientSelectionForm(this)) - ,_printPreviewForm(new PrintPreviewForm(this)) - ,_axisSettingForm(new AxisSettingForm(this)) - ,_manuallyStopTheExperimentFlag(false) -{ + _rightWidget(new QDockWidget(this)), _analysisSettingWidget(new AnalysisSettingForm(this)), _contextMenu(new QMenu(this)), _specificHeatComparisonMethodForm(new SpecificHeatComparisonMethodForm(this)), _instrumentCoefficientForm(new InstrumentCoefficientForm(this)), _degreeOfCureForm(new DegreeOfCureForm(this)), _OITAutoAnalysisParamForm(new OITAutoAnalysisParamForm(this)), _degreeOfCrystallinityForm(new DegreeOfCrystallinityForm(this)), _aboutForm(new AboutForm(this)), _enthalpyDataCorrectionForm(new EnthalpyDataCorrectionForm(this)), _coefficientSelectionForm(new CoefficientSelectionForm(this)), _printPreviewForm(new PrintPreviewForm(this)), _axisSettingForm(new AxisSettingForm(this)), _manuallyStopTheExperimentFlag(false) { ui->setupUi(this); ui->actionOITAutoAnalysisMode->setVisible(false); this->setToolTip("....."); @@ -76,51 +62,43 @@ MainWindow::MainWindow(QWidget *parent) connections(); // // ui->actionStop->setEnabled(false); - } -MainWindow::~MainWindow() -{ +MainWindow::~MainWindow() { delete ui; } -void MainWindow::slotContextMenuShow(const QPoint point) -{ +void MainWindow::slotContextMenuShow(const QPoint point) { _contextMenu->exec(point); } -void MainWindow::slotUpdateStatusbarMsg(const QString msg) -{ +void MainWindow::slotUpdateStatusbarMsg(const QString msg) { ui->statusbar->showMessage(msg); } -void MainWindow::slotOITAutoAnalysis(const double x1,const double x2) -{ +void MainWindow::slotOITAutoAnalysis(const double x1, const double x2) { on_actionStop_triggered(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::OIT); - _centralWidget->setVerticalLineRange(x1,x2); + _centralWidget->setVerticalLineRange(x1, x2); } -void MainWindow::slotStartExperiment() -{ - startExperiment(); +void MainWindow::slotStartExperiment() { + startExperimentByDeviceInfo(); } -void MainWindow::closeEvent(QCloseEvent *event) -{ +void MainWindow::closeEvent(QCloseEvent *event) { // 弹出确认对话框 QMessageBox::StandardButton reply; reply = QMessageBox::question(this, "确认退出", "你确定要退出吗?", QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { - event->accept(); // 接受关闭事件,关闭窗口 + event->accept(); // 接受关闭事件,关闭窗口 } else { - event->ignore(); // 忽略关闭事件,不关闭窗口 + event->ignore(); // 忽略关闭事件,不关闭窗口 } } -void MainWindow::connections() -{ +void MainWindow::connections() { // ui connect(_expertmentSettingForm, &ExperimentSettingForm::sigDeliverData, SerialPort::instance(), &SerialPort::slotDeliverData); @@ -141,13 +119,13 @@ void MainWindow::connections() _centralWidget, &CentralWidget::slotAxisModify); connect(SerialPort::instance(), &SerialPort::sigUpdateStatusbarMsg, - this,&MainWindow::slotUpdateStatusbarMsg); + this, &MainWindow::slotUpdateStatusbarMsg); connect(SerialPort::instance(), &SerialPort::sigSaveExperimentalDataMsgBox, - this,&MainWindow::slotSaveExperimentalDataMsgBox); + this, &MainWindow::slotSaveExperimentalDataMsgBox); connect(SerialPort::instance(), &SerialPort::sigStartExperiment, - this,&MainWindow::slotStartExperiment); + this, &MainWindow::slotStartExperiment); #endif @@ -156,55 +134,53 @@ void MainWindow::connections() // connect(Global::instance(), &Global::sigModeModify, // _centralWidget, &CentralWidget::slotModeModify); - //analysis - connect(_leftWidget,&LeftWidget::sigSendAnalysisFileName, - _centralWidget,&CentralWidget::slotRecvAnalysisFileName); - connect(_centralWidget,&CentralWidget::sigSendLineXCoord, - _analysisSettingWidget,&AnalysisSettingForm::slotRecvLineXCoord); + // analysis + connect(_leftWidget, &LeftWidget::sigSendAnalysisFileName, + _centralWidget, &CentralWidget::slotRecvAnalysisFileName); + connect(_centralWidget, &CentralWidget::sigSendLineXCoord, + _analysisSettingWidget, &AnalysisSettingForm::slotRecvLineXCoord); - connect(_analysisSettingWidget,&AnalysisSettingForm::sigApply, - _centralWidget,&CentralWidget::slotAnalysisSettingApply); - connect(_analysisSettingWidget,&AnalysisSettingForm::sigUndo, - _centralWidget,&CentralWidget::slotAnalysisSettingUndo); - connect(_analysisSettingWidget,&AnalysisSettingForm::sigConfirm, - _centralWidget,&CentralWidget::slotAnalysisSettingConfirm); - connect(_analysisSettingWidget,&AnalysisSettingForm::sigCancel, - _centralWidget,&CentralWidget::slotAnalysisSettingCancel); + connect(_analysisSettingWidget, &AnalysisSettingForm::sigApply, + _centralWidget, &CentralWidget::slotAnalysisSettingApply); + connect(_analysisSettingWidget, &AnalysisSettingForm::sigUndo, + _centralWidget, &CentralWidget::slotAnalysisSettingUndo); + connect(_analysisSettingWidget, &AnalysisSettingForm::sigConfirm, + _centralWidget, &CentralWidget::slotAnalysisSettingConfirm); + connect(_analysisSettingWidget, &AnalysisSettingForm::sigCancel, + _centralWidget, &CentralWidget::slotAnalysisSettingCancel); - connect(_centralWidget,&CentralWidget::sigRightDockWidgetHide, - [&](){ _rightWidget->hide(); }); + connect(_centralWidget, &CentralWidget::sigRightDockWidgetHide, + [&]() { _rightWidget->hide(); }); - connect(_degreeOfCrystallinityForm,&DegreeOfCrystallinityForm::sigDrawCustomText, - _centralWidget,&CentralWidget::slotDrawCustomText); - connect(_specificHeatComparisonMethodForm,&SpecificHeatComparisonMethodForm::sigDrawCustomText, - _centralWidget,&CentralWidget::slotDrawCustomText); + connect(_degreeOfCrystallinityForm, &DegreeOfCrystallinityForm::sigDrawCustomText, + _centralWidget, &CentralWidget::slotDrawCustomText); + connect(_specificHeatComparisonMethodForm, &SpecificHeatComparisonMethodForm::sigDrawCustomText, + _centralWidget, &CentralWidget::slotDrawCustomText); // SpecificHeatComparisonMethodForm - connect(_eventHandler,&EventHandler::sigSetCurve, + connect(_eventHandler, &EventHandler::sigSetCurve, _specificHeatComparisonMethodForm, &SpecificHeatComparisonMethodForm::slotSetCurve); // Axis settings. - connect(_axisSettingForm,&AxisSettingForm::sigGetAxisInfo, - _centralWidget,&CentralWidget::slotGetAxisInfo); - connect(_centralWidget,&CentralWidget::sigGetAxisInfoWithData, - _axisSettingForm,&AxisSettingForm::slotGetAxisInfoWithData); - connect(_axisSettingForm,&AxisSettingForm::sigSetAxisSettings, - _centralWidget,&CentralWidget::slotSetAxisSettings); + connect(_axisSettingForm, &AxisSettingForm::sigGetAxisInfo, + _centralWidget, &CentralWidget::slotGetAxisInfo); + connect(_centralWidget, &CentralWidget::sigGetAxisInfoWithData, + _axisSettingForm, &AxisSettingForm::slotGetAxisInfoWithData); + connect(_axisSettingForm, &AxisSettingForm::sigSetAxisSettings, + _centralWidget, &CentralWidget::slotSetAxisSettings); // OIT - connect(OITAutoAnalysis::getInstance(),&OITAutoAnalysis::sigExperimentStop, - this,&MainWindow::slotOITAutoAnalysis); + connect(OITAutoAnalysis::getInstance(), &OITAutoAnalysis::sigExperimentStop, + this, &MainWindow::slotOITAutoAnalysis); } -void MainWindow::setActionEnable(const bool flag) -{ - if (flag) - { +void MainWindow::setActionEnable(const bool flag) { + if (flag) { ui->actionNew->setEnabled(true); ui->actionStart->setEnabled(true); ui->actionStop->setEnabled(true); ui->actionRealTimeWidget->setEnabled(true); - }else{ + } else { ui->actionNew->setEnabled(false); ui->actionStart->setEnabled(false); ui->actionStop->setEnabled(false); @@ -212,12 +188,11 @@ void MainWindow::setActionEnable(const bool flag) } } -void MainWindow::setSubWidgetAttribute(QWidget *widget) -{ +void MainWindow::setSubWidgetAttribute(QWidget *widget) { widget->setWindowModality(Qt::ApplicationModal); widget->setWindowFlags(Qt::Dialog); - widget->setFixedSize(widget->geometry().width(),widget->geometry().height()); + widget->setFixedSize(widget->geometry().width(), widget->geometry().height()); } #if 0 @@ -264,38 +239,37 @@ bool MainWindow::saveAnalysisFile(const QString fileName) } #endif -bool MainWindow::saveFile(const QString fileName,const Global::Mode mode, - QString& finalFileName,const bool autoSaveFlag) -{ - logde<<"save file..."; +bool MainWindow::saveFile(const QString fileName, const Global::Mode mode, + QString &finalFileName, const bool autoSaveFlag) { + logde << "save file..."; QString localFileName = fileName; - if(fileName.isEmpty()){ + if (fileName.isEmpty()) { localFileName = "new"; } QString folder; - if(mode == Global::Mode::None){ + if (mode == Global::Mode::None) { folder = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); - }else if(mode == Global::Mode::Analysis){ + } else if (mode == Global::Mode::Analysis) { folder = Global::AnalysisStateFolder; - }else if(mode == Global::Mode::Experiment){ + } else if (mode == Global::Mode::Experiment) { folder = Global::SampleDataFloder; } QString filePath; - if(autoSaveFlag){ - localFileName = _leftWidget->filePathCheck(fileName,folder); - filePath = folder + "/" + localFileName + ".xlsx"; - }else{ + if (autoSaveFlag) { + localFileName = _leftWidget->filePathCheck(fileName, folder); + filePath = folder + "/" + localFileName + ".xlsx"; + } else { QString xlsxfilePath = folder + "/" + localFileName + ".xlsx"; - filePath = QFileDialog::getSaveFileName(nullptr, "Save experiment file", - xlsxfilePath, "Excel Files (*.xlsx)"); + filePath = QFileDialog::getSaveFileName(nullptr, "Save experiment file", + xlsxfilePath, "Excel Files (*.xlsx)"); } // finalFileName = localFileName + ".xlsx"; - logde<<"filePath:"<deleteCurveByObjectName(Global::ObjectNameExperiemnt); // 添加所有平滑后的curve. - for(auto & item:Global::_curveExperimentDataVtr){ - item.smoothDataVtr = smoothnessDetail(level,item.dataVtr); - item.curve = _centralWidget->addCurveData(item.smoothDataVtr, - Global::ObjectNameExperiemnt); + for (auto &item : Global::_curveExperimentDataVtr) { + item.smoothDataVtr = smoothnessDetail(level, item.dataVtr); + item.curve = _centralWidget->addCurveData(item.smoothDataVtr, + Global::ObjectNameExperiemnt); } - }else{ + } else { // 当前数据为文件分析数据时,需要把当前文件下的所有数据都进行平滑处理。 QString selectedCurveObjectName = _centralWidget->getCurrentCurve()->objectName(); _centralWidget->deleteCurveByObjectName(selectedCurveObjectName); - for(Global::CurveFileData &cfd :Global::_curveFileDataVtr){ - if(selectedCurveObjectName.contains(cfd.filePath)){ - for(Global::PhaseTotalInfo& pti:cfd.phaseTotalVtr){ - pti.smoothDataVtr = smoothnessDetail(level,pti.dataVtr); - pti.curve = _centralWidget->addCurveData(pti.smoothDataVtr, - cfd.filePath); + for (Global::CurveFileData &cfd : Global::_curveFileDataVtr) { + if (selectedCurveObjectName.contains(cfd.filePath)) { + for (Global::PhaseTotalInfo &pti : cfd.phaseTotalVtr) { + pti.smoothDataVtr = smoothnessDetail(level, pti.dataVtr); + pti.curve = _centralWidget->addCurveData(pti.smoothDataVtr, + cfd.filePath); } } } } - } -QVector MainWindow::smoothnessDetail(const int level,const QVector&dataVtr) -{ +QVector MainWindow::smoothnessDetail(const int level, const QVector &dataVtr) { Lowess::Config config; - config.smoothingFactor = level * 0.01; + config.smoothingFactor = level * 0.01; config.robustnessIterations = 3; std::vector x; std::vector y; - for(const Global::ExperimentData& ed:dataVtr){ - if(Global::_axisMode == Global::AxisMode::SingleY){ + for (const Global::ExperimentData &ed : dataVtr) { + if (Global::_axisMode == Global::AxisMode::SingleY) { x.push_back(ed.sampleTemp); - }else{ + } else { x.push_back(ed.runTime); } @@ -383,8 +354,8 @@ QVector MainWindow::smoothnessDetail(const int level,con slotUpdateStatusbarMsg("数据平滑计算中..."); QVector resultVtr; - logde<<"smooth start..."; - logde<<"x,y size:"<statusbar->showMessage("数据平滑计算中..."); ui->statusbar->showMessage("数据平滑计算中..."); @@ -392,28 +363,28 @@ QVector MainWindow::smoothnessDetail(const int level,con ui->statusbar->showMessage("数据平滑计算中..."); std::vector yest = Lowess::smooth(x, y, config); - if(yest.empty()){ + if (yest.empty()) { slotUpdateStatusbarMsg("数据平滑完成."); return resultVtr; } slotUpdateStatusbarMsg("数据平滑完成."); - logde<<"smooth end..."; + logde << "smooth end..."; // result data vector. - for(int i = 0; i < x.size();i++){ + for (int i = 0; i < x.size(); i++) { Global::ExperimentData ed; - if(Global::_axisMode == Global::AxisMode::SingleY){ + if (Global::_axisMode == Global::AxisMode::SingleY) { ed.sampleTemp = x.at(i); - ed.runTime = dataVtr.at(i).runTime; - }else{ - ed.runTime = x.at(i); + ed.runTime = dataVtr.at(i).runTime; + } else { + ed.runTime = x.at(i); ed.sampleTemp = dataVtr.at(i).sampleTemp; } - ed.dsc = yest.at(i); + ed.dsc = yest.at(i); ed.constantTempTime = dataVtr.at(i).constantTempTime; resultVtr.push_back(ed); @@ -422,8 +393,7 @@ QVector MainWindow::smoothnessDetail(const int level,con return resultVtr; } -void MainWindow::smoothnessExperimentData(const int level) -{ +void MainWindow::smoothnessExperimentData(const int level) { #if 0 for(int i = 0;i < Global::_curveExperimentDataVtr.size();i++){ Global::CurveExperimentData ced = Global::_curveExperimentDataVtr.at(i); @@ -431,101 +401,110 @@ void MainWindow::smoothnessExperimentData(const int level) } #endif - for(auto & item:Global::_curveExperimentDataVtr){ - smoothnessDetail(level,item.dataVtr); + for (auto &item : Global::_curveExperimentDataVtr) { + smoothnessDetail(level, item.dataVtr); } - } -void MainWindow::startExperiment() -{ +void MainWindow::startExperiment() { QByteArray ba = DataParser::setDeviceStartStop(DeviceStartMode::Start); QString hexData = ba.toHex(' '); - qDebug() << "on_actionStart_triggered info (hex):" << hexData; SerialPort::instance()->slotSendData(ba); Global::_mode = Global::Mode::Experiment; - _manuallyStopTheExperimentFlag = false; - _centralWidget->startExperiment(); } -void MainWindow::on_actionStop_triggered() +void MainWindow::startExperimentByDeviceInfo() { - logde<<" Stop experiment ..."; + Global::_mode = Global::Mode::Experiment; + _manuallyStopTheExperimentFlag = false; + _centralWidget->startExperiment(); +} - if(Global::_mode == Global::Mode::Experiment) - { +void MainWindow::on_actionStop_triggered() { + logde << " Stop experiment ...++++++++++++++++++"; + + if (!SerialPort::instance()->isOpen()) { + showMesgBox("设备未连接,请先连接设备。"); + return; + } + + if (Global::_mode == Global::Mode::Experiment) { QByteArray ba = DataParser::setDeviceStartStop(DeviceStartMode::Stop); SerialPort::instance()->slotSendData(ba); // Set software mode to analysis. _manuallyStopTheExperimentFlag = true; - logde<<"_manuallyStopTheExperimentFlag:"<<_manuallyStopTheExperimentFlag; + logde << "_manuallyStopTheExperimentFlag:" << _manuallyStopTheExperimentFlag; Global::_mode = Global::Mode::Analysis; // Save data. #if 1 - logde<<"on_actionStop_triggered saveFile ..."; + logde << "on_actionStop_triggered saveFile ..."; QString finalFileName; - if(saveFile(Global::_experimentInfo.sampleName,Global::Mode::Experiment,finalFileName,true)){ + if (saveFile(Global::_experimentInfo.sampleName, Global::Mode::Experiment, finalFileName, true)) { _leftWidget->reloadFileName(); QString str = QString("%1 文件保存成功。").arg(finalFileName); - QMessageBox::information(this, "文件保存", str,QMessageBox::Yes ); + QMessageBox::information(this, "文件保存", str, QMessageBox::Yes); } #endif - } } -void MainWindow::on_actionNew_triggered() -{ +void MainWindow::on_actionNew_triggered() { + if (!SerialPort::instance()->isOpen()) { + showMesgBox("设备未连接,请先连接设备。"); + return; + } _expertmentSettingForm->show(); } -void MainWindow::on_actionStart_triggered() -{ - logde<<"start experiment,set soft into experiment mode."; +void MainWindow::on_actionStart_triggered() { + logde << "start experiment,set soft into experiment mode."; + logde<<"```````````````````````````````"; + + if (!SerialPort::instance()->isOpen()) { + showMesgBox("设备未连接,请先连接设备。"); + return; + } on_actionClearAllData_triggered(); -startExperiment(); + startExperiment(); } -void MainWindow::on_actionReadOnly_triggered() -{ +void MainWindow::on_actionReadOnly_triggered() { Global::_mode = Global::Mode::Experiment; SerialPort::instance()->openSp(); } -void MainWindow::on_actionRealTimeWidget_triggered() -{ +void MainWindow::on_actionRealTimeWidget_triggered() { _realTimeDataForm->show(); } -void MainWindow::slotSaveExperimentalDataMsgBox() -{ - logde<<"_manuallyStopTheExperimentFlag:"<<_manuallyStopTheExperimentFlag; +void MainWindow::slotSaveExperimentalDataMsgBox() { + logde << "_manuallyStopTheExperimentFlag:" << _manuallyStopTheExperimentFlag; - if(_manuallyStopTheExperimentFlag){ - logde<<"_manuallyStopTheExperimentFlag..."; + if (_manuallyStopTheExperimentFlag) { + logde << "_manuallyStopTheExperimentFlag..."; return; } // auto save file. - logde<<"slotSaveExperimentalDataMsgBox saveFile ..."; + logde << "slotSaveExperimentalDataMsgBox saveFile ..."; QString finalFileName; - if(saveFile(Global::_experimentInfo.sampleName,Global::Mode::Experiment,finalFileName,true)){ + if (saveFile(Global::_experimentInfo.sampleName, Global::Mode::Experiment, finalFileName, true)) { _leftWidget->reloadFileName(); QString str = QString("%1 文件保存成功。").arg(finalFileName); - QMessageBox::information(this, "文件保存", str,QMessageBox::Yes ); + QMessageBox::information(this, "文件保存", str, QMessageBox::Yes); } #if 0 @@ -534,6 +513,7 @@ void MainWindow::slotSaveExperimentalDataMsgBox() QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { QString finaleFileName; + saveFile(Global::_experimentInfo.sampleName,Global::Mode::Experiment,finaleFileName); _leftWidget->reloadFileName(); } else { @@ -542,249 +522,228 @@ void MainWindow::slotSaveExperimentalDataMsgBox() #endif } -void MainWindow::on_actionConnectToDev_triggered() -{ - if(SerialPort::instance()->isOpen()){ +void MainWindow::on_actionConnectToDev_triggered() { + logde << "connect to device..."; + + if (SerialPort::instance()->isOpen()) { SerialPort::instance()->closeSp(); ui->actionConnectToDev->setIcon(QIcon(":/images/connect.png")); ui->actionConnectToDev->setText("连接设备"); - logde<<"close serial port."; - }else{ - if (SerialPort::instance()->openSp()) - { + logde << "close serial port."; + // + QString str("设备已断开。"); + slotUpdateStatusbarMsg(str); + showMesgBox(str); + } else { + if (SerialPort::instance()->openSp()) { + + logde << "open serial port success. 1"; + setActionEnable(true); // Global::instance()->setMode(Global::Mode::ConnectedToDev); Global::_mode = Global::Mode::ConnectedToDev; + logde << "open serial port success. 2"; + QByteArray ba = DataParser::inquirePhaseInfo(); SerialPort::instance()->sendData(ba); ui->actionConnectToDev->setIcon(QIcon(":/images/disconnect.png")); ui->actionConnectToDev->setText("断开连接"); - logde<<"open serial port."; - } - else - { - QMessageBox::warning(this, "warnning", "Serial Port open failed."); + logde << "open serial port."; + // + logde << "open serial port success. 3"; + + QString str("设备已连接。"); + slotUpdateStatusbarMsg(str); + showMesgBox(str); + } else { + // QMessageBox::warning(this, "warnning", "Serial Port open failed."); + showMesgBox("设备打开失败。"); } } } -void MainWindow::on_actionStartPoint_triggered() -{ +void MainWindow::on_actionStartPoint_triggered() { + logde<<"start experiment..."; + _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::StartPoint); } -void MainWindow::on_actionStopPoint_triggered() -{ +void MainWindow::on_actionStopPoint_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::StopPoint); } -void MainWindow::on_actionNumericalLabel_triggered() -{ +void MainWindow::on_actionNumericalLabel_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::NumericalLabel); } -void MainWindow::on_actionPeakSynthesisAnalysis_triggered() -{ +void MainWindow::on_actionPeakSynthesisAnalysis_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::PeakSynthesisAnalysis); } -void MainWindow::on_actionClearAllData_triggered() -{ +void MainWindow::on_actionClearAllData_triggered() { slotUpdateStatusbarMsg(""); _rightWidget->hide(); _centralWidget->clearAllData(); } -void MainWindow::on_actionGlassTransition_triggered() -{ +void MainWindow::on_actionGlassTransition_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::GlassTransition); } -void MainWindow::on_actionOIT_triggered() -{ +void MainWindow::on_actionOIT_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::OIT); } -void MainWindow::on_actionSpecificHeatCompMethod_triggered() -{ +void MainWindow::on_actionSpecificHeatCompMethod_triggered() { _specificHeatComparisonMethodForm->show(); } -void MainWindow::on_actionDegreeOfCrystallinity_triggered() -{ +void MainWindow::on_actionDegreeOfCrystallinity_triggered() { // QMessageBox::warning(this, "warnning", "结晶度."); _degreeOfCrystallinityForm->show(); } -void MainWindow::on_actionInstrumentParameter_triggered() -{ +void MainWindow::on_actionInstrumentParameter_triggered() { _instrumentCoefficientForm->show(); } -void MainWindow::on_actionOITAutoAnalysisParam_triggered() -{ +void MainWindow::on_actionOITAutoAnalysisParam_triggered() { _OITAutoAnalysisParamForm->show(); } -void MainWindow::on_actionOITAutoAnalysisMode_triggered() -{ - +void MainWindow::on_actionOITAutoAnalysisMode_triggered() { } -void MainWindow::on_actionTimeAxisAnalysisPCTMode_triggered() -{ +void MainWindow::on_actionTimeAxisAnalysisPCTMode_triggered() { Global::_displayTimeValue = ui->actionTimeAxisAnalysisPCTMode->isChecked(); } -void MainWindow::on_actionDegreeOfCuring_triggered() -{ +void MainWindow::on_actionDegreeOfCuring_triggered() { // _degreeOfCureForm->show(); } -void MainWindow::on_actionAbout_triggered() -{ +void MainWindow::on_actionAbout_triggered() { _aboutForm->show(); } -void MainWindow::on_actionEnthalpyCorrectionEdit_triggered() -{ +void MainWindow::on_actionEnthalpyCorrectionEdit_triggered() { _enthalpyDataCorrectionForm->show(); } -void MainWindow::on_actionEnthalpyCorrectionSelection_triggered() -{ +void MainWindow::on_actionEnthalpyCorrectionSelection_triggered() { _coefficientSelectionForm->show(); } -void MainWindow::on_actionPrintPreview_triggered() -{ +void MainWindow::on_actionPrintPreview_triggered() { // _printPreviewForm->show(); _printPreviewForm->setPixmap(_centralWidget->getPixMap()); _printPreviewForm->_customPrintPreviewDialog->showMaximized(); } -void MainWindow::on_actionOnsetTemperaturePoint_triggered() -{ +void MainWindow::on_actionOnsetTemperaturePoint_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::OnsetTemperaturePoint); } -void MainWindow::on_actionEndsetTemperaturePoint_triggered() -{ +void MainWindow::on_actionEndsetTemperaturePoint_triggered() { _rightWidget->show(); _centralWidget->setAnalysisMode(CentralWidget::AnalysisMode::EndsetTemperaturePoint); } -void MainWindow::on_actionYAxis_triggered() -{ +void MainWindow::on_actionYAxis_triggered() { _centralWidget->switchAxisMode(); } -void MainWindow::on_actionAxisSetting_triggered() -{ +void MainWindow::on_actionAxisSetting_triggered() { _axisSettingForm->show(); } -void MainWindow::on_actionSaveData_triggered() -{ +void MainWindow::on_actionSaveData_triggered() { QString finaleFileName; - saveFile(Global::_experimentInfo.sampleName,Global::_mode,finaleFileName); + saveFile(Global::_experimentInfo.sampleName, Global::_mode, finaleFileName); _leftWidget->reloadFileName(); } -void MainWindow::on_actionSaveas_triggered() -{ +void MainWindow::on_actionSaveas_triggered() { QString finaleFileName; - saveFile(Global::_experimentInfo.sampleName,Global::Mode::None,finaleFileName); + saveFile(Global::_experimentInfo.sampleName, Global::Mode::None, finaleFileName); _leftWidget->reloadFileName(); } -void MainWindow::on_actionLanguage_triggered() -{ - if(Global::_languageType == Global::LanguageType::Chinese){ +void MainWindow::on_actionLanguage_triggered() { + if (Global::_languageType == Global::LanguageType::Chinese) { Global::_languageType = Global::LanguageType::English; ui->actionLanguage->setText(Global::EnglishStr); - }else{ + } else { Global::_languageType = Global::LanguageType::Chinese; ui->actionLanguage->setText(Global::ChineseStr); } } -void MainWindow::on_actionSmoothness1_triggered() -{ +void MainWindow::on_actionSmoothness1_triggered() { smoothness(1); } -void MainWindow::on_actionSmoothness2_triggered() -{ +void MainWindow::on_actionSmoothness2_triggered() { smoothness(2); } -void MainWindow::on_actionSmoothness3_triggered() -{ +void MainWindow::on_actionSmoothness3_triggered() { smoothness(3); } -void MainWindow::on_actionSmoothness4_triggered() -{ +void MainWindow::on_actionSmoothness4_triggered() { smoothness(4); } -void MainWindow::on_actionSmoothness5_triggered() -{ +void MainWindow::on_actionSmoothness5_triggered() { smoothness(5); } -void MainWindow::on_actionSmoothness6_triggered() -{ +void MainWindow::on_actionSmoothness6_triggered() { smoothness(6); } -void MainWindow::on_actionSmoothness7_triggered() -{ +void MainWindow::on_actionSmoothness7_triggered() { smoothness(7); } -void MainWindow::on_actionSmoothness8_triggered() -{ +void MainWindow::on_actionSmoothness8_triggered() { smoothness(8); } -void MainWindow::on_actionSmoothness9_triggered() -{ +void MainWindow::on_actionSmoothness9_triggered() { smoothness(9); } -void MainWindow::on_actionSmoothness10_triggered() -{ +void MainWindow::on_actionSmoothness10_triggered() { smoothness(10); } -void MainWindow::on_actionOriginalData_triggered() -{ - if(!Global::_curveExperimentDataVtr.empty()){ +void MainWindow::on_actionOriginalData_triggered() { + if (!Global::_curveExperimentDataVtr.empty()) { // 删除所有objectName为experiment的curve. _centralWidget->deleteCurveByObjectName(Global::ObjectNameExperiemnt); - for(auto & item:Global::_curveExperimentDataVtr){ + for (auto &item : Global::_curveExperimentDataVtr) { item.smoothDataVtr.clear(); - item.curve = _centralWidget->addCurveData(item.dataVtr,Global::ObjectNameExperiemnt); + item.curve = _centralWidget->addCurveData(item.dataVtr, Global::ObjectNameExperiemnt); } - }else{ + } else { // 当前数据为文件分析数据时,需要把当前文件下的所有数据都进行平滑处理。 QString selectedCurveObjectName = _centralWidget->getCurrentCurve()->objectName(); _centralWidget->deleteCurveByObjectName(selectedCurveObjectName); - for(Global::CurveFileData &cfd :Global::_curveFileDataVtr){ - if(selectedCurveObjectName.contains(cfd.filePath)){ - for(Global::PhaseTotalInfo& pti:cfd.phaseTotalVtr){ + for (Global::CurveFileData &cfd : Global::_curveFileDataVtr) { + if (selectedCurveObjectName.contains(cfd.filePath)) { + for (Global::PhaseTotalInfo &pti : cfd.phaseTotalVtr) { pti.smoothDataVtr.clear(); pti.curve = _centralWidget->addCurveData(pti.dataVtr, cfd.filePath); @@ -829,3 +788,12 @@ void MainWindow::on_actionOriginalData_triggered() *curvePtrPtr = _centralWidget->getCurrentCurve(); #endif } + +void MainWindow::showMesgBox(const QString str) { + static bool isShow = false; + if (!isShow) { + isShow = true; + QMessageBox::information(this, "提示", str); + isShow = false; + } +} diff --git a/src/mainwindow.h b/src/mainwindow.h index a8a40e5..0f166be 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -130,6 +130,9 @@ private: void smoothnessExperimentData(const int level); void startExperiment(); + void startExperimentByDeviceInfo(); + + void showMesgBox(const QString str); private: bool _manuallyStopTheExperimentFlag; Ui::MainWindow *ui; diff --git a/src/serialport/serialport.cpp b/src/serialport/serialport.cpp index 66040b7..98f0ad2 100644 --- a/src/serialport/serialport.cpp +++ b/src/serialport/serialport.cpp @@ -15,13 +15,11 @@ using namespace std; -const u16 conVid = 1155; // 0x0483 -const u16 conPid = 22336; // 0x5740 +const u16 conVid = 1155; // 0x0483 +const u16 conPid = 22336; // 0x5740 SerialPort::SerialPort(QObject *parent) - : QObject(parent) - ,_sp(new QSerialPort(this)) -{ + : QObject(parent), _sp(new QSerialPort(this)) { // displayPortInfo(); #if 0 @@ -73,16 +71,15 @@ SerialPort::SerialPort(QObject *parent) #endif } -SerialPort *SerialPort::instance() -{ +SerialPort *SerialPort::instance() { static SerialPort ins; return &ins; } -SerialPort::~SerialPort() -{ - if (_sp && _sp->isOpen()) - { +SerialPort::~SerialPort() { + logde<<"serialport destructor."; + + if (_sp && _sp->isOpen()) { _sp->clear(); _sp->close(); } @@ -90,31 +87,28 @@ SerialPort::~SerialPort() _sp = nullptr; } -void SerialPort::timerEvent(QTimerEvent *event) -{ +void SerialPort::timerEvent(QTimerEvent *event) { } -void SerialPort::slotReadData() -{ +void SerialPort::slotReadData() { QByteArray ba = _sp->readAll(); - if(ba.size() == 0){ + if (ba.size() == 0) { return; } #if 0 - QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 + QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 logde << "receive info (hex):" << hexData.toStdString(); #endif SerialPortProtocol *spp = (SerialPortProtocol *)ba.data(); - if (FRANE_HEAD != spp->head) - { + if (FRANE_HEAD != spp->head) { qDebug() << "Data header error."; return; } - //phase setting data - if(spp->addr == PHASE_START_ADDR){ + // phase setting data + if (spp->addr == PHASE_START_ADDR) { emit sigSendPhaseInfo(ba); return; } @@ -122,34 +116,28 @@ void SerialPort::slotReadData() int dataLength = spp->len - 5; CommonData cd; - u8 *cdPtr = (u8 *)&cd; + u8 *cdPtr = (u8 *)&cd; memcpy(cdPtr + spp->addr, spp->data_buf, dataLength); - if (WRITE_CMD == spp->cmd) - { + if (WRITE_CMD == spp->cmd) { commonDataParser(dataLength, spp->addr, cd); - } - else if (READ_CMD == spp->cmd) - { + } else if (READ_CMD == spp->cmd) { // DataParser::experimentalStateSwitching(cd); updateStatus(cd); - if (spp->addr == 0) - { - if (Global::Mode::Experiment == Global::_mode) - { + if (spp->addr == 0) { + if (Global::Mode::Experiment == Global::_mode) { emit sigSendCommonData(cd); } // emit sigSendCommonDataToRealDataForm(cd); - }else{ - QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 + } else { + QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 logde << "receive info (hex):" << hexData.toStdString(); } } } -void SerialPort::updateStatus(const CommonData &cd) -{ +void SerialPort::updateStatus(const CommonData &cd) { #if 0 // logde<<"phase:"<<(int)cd.current_phase; // logde<<"run type:"<<(int)cd.run_type; @@ -157,27 +145,28 @@ void SerialPort::updateStatus(const CommonData &cd) #endif // Switch the software mode accord to the serial port data. - switch(cd.run_type){ + switch (cd.run_type) { case DeviceRunStatus::Heat: case DeviceRunStatus::ConstantTemp: - if(Global::_mode != Global::Mode::Experiment){ + if (Global::_mode != Global::Mode::Experiment) { Global::_mode = Global::Mode::Experiment; } break; case DeviceRunStatus::Idle: case DeviceRunStatus::Cooling: - if(Global::_mode != Global::Mode::Analysis){ + if (Global::_mode != Global::Mode::Analysis) { Global::_mode = Global::Mode::Analysis; } break; - default:break; + default: + break; } // If phase update, add new phase data to the global param. - if(Global::_mode == Global::Mode::Experiment){ - if(Global::_currentPhase != (int)cd.current_phase){ + if (Global::_mode == Global::Mode::Experiment) { + if (Global::_currentPhase != (int)cd.current_phase) { - logde<<"mode experiment,phase not equeal."; + logde << "mode experiment,phase not equeal."; Global::_currentPhase = (int)cd.current_phase; @@ -200,30 +189,31 @@ void SerialPort::updateStatus(const CommonData &cd) updateAxis(); // Update axis. - bool experimentEnded = false; + bool experimentEnded = false; QString devRunModeStr; - switch(cd.run_type){ + switch (cd.run_type) { case DeviceRunStatus::Heat: - devRunModeStr = "升温"; + devRunModeStr = "升温"; experimentEnded = true; break; case DeviceRunStatus::ConstantTemp: - devRunModeStr = "实验"; + devRunModeStr = "实验"; experimentEnded = true; break; case DeviceRunStatus::Idle: case DeviceRunStatus::Cooling: - devRunModeStr = "冷却"; + devRunModeStr = "冷却"; experimentEnded = false; break; break; - default:break; + default: + break; } QString msg; - if(experimentEnded){ + if (experimentEnded) { msg = QString("设备运行状态:%2 实验阶段:%3 实验进行中").arg(devRunModeStr).arg(cd.current_phase); - }else{ + } else { msg = QString("设备运行状态:%2 实验阶段:%3 实验结束").arg(devRunModeStr).arg(cd.current_phase); } @@ -231,39 +221,39 @@ void SerialPort::updateStatus(const CommonData &cd) #if 1 // If save experiment data. - static Global::Mode preMode = Global::Mode::Analysis; - bool sendSaveSignalFlag = false; - if(Global::_mode != preMode){ - if(preMode == Global::Mode::Experiment - && Global::_mode == Global::Mode::Analysis){ + static Global::Mode preMode = Global::Mode::Analysis; + bool sendSaveSignalFlag = false; + if (Global::_mode != preMode) { + if (preMode == Global::Mode::Experiment + && Global::_mode == Global::Mode::Analysis) { sendSaveSignalFlag = true; - }else if(preMode == Global::Mode::Analysis - && Global::_mode == Global::Mode::Experiment){ + } else if (preMode == Global::Mode::Analysis + && Global::_mode == Global::Mode::Experiment) { + logde<<"update status accord to device data..."; + logde<<"--------------------------------------"; emit sigStartExperiment(); } preMode = Global::_mode; } - if(sendSaveSignalFlag && !Global::_OITAutoAnalysisModeFlag){ + if (sendSaveSignalFlag && !Global::_OITAutoAnalysisModeFlag) { emit sigSaveExperimentalDataMsgBox(); } #endif } void SerialPort::commonDataParser(const int dataLength, const u16 addr, - const CommonData &cd) -{ + const CommonData &cd) { int localLength = dataLength; - int localAddr = addr; + int localAddr = addr; - int phaseByteSize = sizeof(Phase); - auto phaseParserFunc = [&](const int index) - { + int phaseByteSize = sizeof(Phase); + auto phaseParserFunc = [&](const int index) { Phase phase; - phase.onoff = 1; - phase.gas = cd.phase_data[index].gas; - phase.temp_flow = cd.phase_data[index].temp_flow; + phase.onoff = 1; + phase.gas = cd.phase_data[index].gas; + phase.temp_flow = cd.phase_data[index].temp_flow; phase.cutoff_temp = cd.phase_data[index].cutoff_temp; phase.constant_temp_time_min = cd.phase_data[index].constant_temp_time_min; @@ -272,20 +262,19 @@ void SerialPort::commonDataParser(const int dataLength, const u16 addr, localAddr += phaseByteSize; }; - while (localLength) - { - qDebug()<<"localLength:"<setMode(Global::Mode::Analysis); Global::_mode = Global::Mode::Analysis; - logde<<"set global mode analysis.common data parser."; + logde << "set global mode analysis.common data parser."; + break; + default: break; - default:break; } localAddr += 1; @@ -293,24 +282,22 @@ void SerialPort::commonDataParser(const int dataLength, const u16 addr, break; } - case offsetof(CommonData, current_gas): // 当前气氛 + case offsetof(CommonData, current_gas): // 当前气氛 // gas_type_set(dev->temp, msg_data.current_gas); localAddr += 1; localLength -= 1; break; - case offsetof(CommonData, auto_pid_temp_flow): // 自整定升温速率 + case offsetof(CommonData, auto_pid_temp_flow): // 自整定升温速率 localAddr += 4; localLength -= 4; break; - case offsetof(CommonData, run_mode): - { + case offsetof(CommonData, run_mode): { DeviceStartMode mode = (DeviceStartMode)cd.run_mode; - switch (mode) - { + switch (mode) { case DeviceStartMode::Stop: Global::_mode = Global::Mode::Analysis; - logde<<"set global mode analysis."; + logde << "set global mode analysis."; break; case DeviceStartMode::Start: Global::_mode = Global::Mode::Experiment; @@ -343,32 +330,29 @@ void SerialPort::commonDataParser(const int dataLength, const u16 addr, phaseParserFunc(5); break; default: + localLength--; break; }; } } -bool SerialPort::openSp() -{ - if (_sp != nullptr && _sp->isOpen()) - { +bool SerialPort::openSp() { + logde << "openSp 1"; + if (_sp != nullptr && _sp->isOpen()) { return true; } - - foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) - { + logde << "openSp 2"; + foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) { u16 pid = info.productIdentifier(); u16 vid = info.vendorIdentifier(); - if ((pid == conPid) && (vid == conVid)) - { + if ((pid == conPid) && (vid == conVid)) { _sp->setPort(info); break; } } - - if (_sp == nullptr) - { + logde << "openSp 3"; + if (_sp == nullptr) { qDebug() << "Device not found."; return false; } @@ -376,61 +360,54 @@ bool SerialPort::openSp() // 设置波特率和读写方向 _sp->setBaudRate(QSerialPort::Baud115200, QSerialPort::AllDirections); - _sp->setDataBits(QSerialPort::Data8); // 数据位为8位 - _sp->setFlowControl(QSerialPort::NoFlowControl); // 无流控制 - _sp->setParity(QSerialPort::NoParity); // 无校验位 - _sp->setStopBits(QSerialPort::OneStop); // 一位停止位 + _sp->setDataBits(QSerialPort::Data8); // 数据位为8位 + _sp->setFlowControl(QSerialPort::NoFlowControl); // 无流控制 + _sp->setParity(QSerialPort::NoParity); // 无校验位 + _sp->setStopBits(QSerialPort::OneStop); // 一位停止位 // 4.连接信号槽 connect(_sp, &QSerialPort::readyRead, this, &SerialPort::slotReadData); + logde << "openSp 4"; // 2.打开串口 - if (!_sp->open(QIODevice::ReadWrite)) - { + if (!_sp->open(QIODevice::ReadWrite)) { qDebug() << "open failed." << _sp->error(); return false; - } - else - { - qDebug() << "open succ."; + } else { + // qDebug() << "open succ."; + logde<<"openSp 5."; // 设置 DTR 信号为就绪状态(true 表示低电平) _sp->setDataTerminalReady(true); } + + logde << "openSp 6.before return."; return true; } -bool SerialPort::closeSp() -{ - if (_sp && _sp->isOpen()) - { +bool SerialPort::closeSp() { + if (_sp && _sp->isOpen()) { _sp->clear(); _sp->close(); } } -void SerialPort::sendCmd(const SerialPort::E_CMD_TYPE e) -{ +void SerialPort::sendCmd(const SerialPort::E_CMD_TYPE e) { #if 1 - int length = 20; - char in_char[21] = {'\0'}; + int length = 20; + char in_char[21] = { '\0' }; - if (e == e_zero) - { + if (e == e_zero) { // char data[10] = {'55','aa','0b','0a','20', // '4e','00','00','00','c3'}; const char *data = "55aa0b0a204e000000c3"; memcpy(in_char, data, length); - } - else if (e == e_back) - { + } else if (e == e_back) { // char data[10] = {'55','aa','08','10','27', // 'f0','d8','ff','ff','c3'}; const char *data = "55aa081027f0d8ffffc3"; memcpy(in_char, data, length); - } - else if (e == e_forward) - { + } else if (e == e_forward) { // char data[10] = {'55','aa','08','10','27', // '10','27','00','00','c3'}; const char *data = "55aa08102710270000c3"; @@ -440,26 +417,21 @@ void SerialPort::sendCmd(const SerialPort::E_CMD_TYPE e) #endif // char in_char[] = "55aa0b0a204e000000c3"; - char out_char[21] = {'\0'}; - int hex_length = 10; + char out_char[21] = { '\0' }; + int hex_length = 10; toHex(in_char, hex_length, out_char); int num = _sp->write(out_char, hex_length); - if (num == -1) - { + if (num == -1) { qDebug() << "write failed."; - } - else - { + } else { qDebug() << "write ok|num:" << num; } } -void SerialPort::toHex(char *in_char, int char_length, char *out_char) -{ - while (char_length--) - { +void SerialPort::toHex(char *in_char, int char_length, char *out_char) { + while (char_length--) { *out_char = (*in_char & 0x40 ? *in_char + 9 : *in_char) << 4; ++in_char; *out_char |= (*in_char & 0x40 ? *in_char + 9 : *in_char) & 0xF; @@ -468,14 +440,12 @@ void SerialPort::toHex(char *in_char, int char_length, char *out_char) } } -void SerialPort::displayPortInfo() -{ +void SerialPort::displayPortInfo() { // 获取系统中所有可用的串口信息 QList serialPorts = QSerialPortInfo::availablePorts(); // 遍历每个串口信息 - for (const QSerialPortInfo &portInfo : serialPorts) - { + for (const QSerialPortInfo &portInfo : serialPorts) { qDebug() << "================================================"; // 打印串口的名称 qDebug() << "串口名称: " << portInfo.portName(); @@ -492,16 +462,14 @@ void SerialPort::displayPortInfo() // 打印是否有产品标识符 qDebug() << "是否有产品标识符: " << (portInfo.hasProductIdentifier() ? "是" : "否"); // 如果有虚拟调制解调器,打印其标识符 - if (portInfo.hasVendorIdentifier()) - { + if (portInfo.hasVendorIdentifier()) { qint16 vid = portInfo.vendorIdentifier(); qDebug() << "虚拟调制解调器标识符: " << vid; QString hexStr = QString("0x%1").arg(vid, 4, 16, QChar('0')).toUpper(); qDebug() << "vid 0x" << hexStr; } // 如果有产品标识符,打印其标识符 - if (portInfo.hasProductIdentifier()) - { + if (portInfo.hasProductIdentifier()) { qint16 pid = portInfo.productIdentifier(); qDebug() << "产品标识符: " << pid; QString hexStr = QString("0x%1").arg(pid, 4, 16, QChar('0')).toUpper(); @@ -510,32 +478,29 @@ void SerialPort::displayPortInfo() } } -void SerialPort::updateAxis() -{ - static Global::Mode previousMode = Global::Analysis; // 记录上一次的模式 +void SerialPort::updateAxis() { + static Global::Mode previousMode = Global::Analysis; // 记录上一次的模式 - if (previousMode == Global::Analysis && - Global::_mode == Global::Experiment) { + if (previousMode == Global::Analysis && Global::_mode == Global::Experiment) { // std::cout << "Mode has changed from Analysis to Experiment!" << std::endl; - Global::ExperimentInfo & eti = Global::_experimentInfo; - if(eti.phaseVtr.size() > 0){ - logde<<"serialport set axis."; + Global::ExperimentInfo &eti = Global::_experimentInfo; + if (eti.phaseVtr.size() > 0) { + logde << "serialport set axis."; float temp = eti.phaseVtr.at(0).cutoff_temp; - emit sigAxisModify(temp); + emit sigAxisModify(temp); } } - if(previousMode != Global::_mode){ + if (previousMode != Global::_mode) { previousMode = Global::_mode; } } -void SerialPort::parserTest() -{ - const uchar data[] = {0xa5, 0x5a, 0x2d, 0x83, - 0x00, 0x00, - 0x00, 0x01, 0x23, 0x23, - 0x23, 0x23, 0x23, 0x23, 0x23, - 0x23, 0x07, 0xbc, 0xb5, 0xf2, 0xc8, 0x57, 0x38, 0x40, 0x1b, 0x63, 0x27, 0xbc, 0x04, 0xa7, 0xf2, 0x3f, 0x55, 0x55, 0x55, 0xd5, 0x04, 0xf3, 0xab, 0xbf, 0xfa, 0x2b, 0xcd, 0x41, 0x00, 0x00, 0x93, 0xba}; +void SerialPort::parserTest() { + const uchar data[] = { 0xa5, 0x5a, 0x2d, 0x83, + 0x00, 0x00, + 0x00, 0x01, 0x23, 0x23, + 0x23, 0x23, 0x23, 0x23, 0x23, + 0x23, 0x07, 0xbc, 0xb5, 0xf2, 0xc8, 0x57, 0x38, 0x40, 0x1b, 0x63, 0x27, 0xbc, 0x04, 0xa7, 0xf2, 0x3f, 0x55, 0x55, 0x55, 0xd5, 0x04, 0xf3, 0xab, 0xbf, 0xfa, 0x2b, 0xcd, 0x41, 0x00, 0x00, 0x93, 0xba }; CommonData *serialPortData = nullptr; qDebug() << "data length:" << sizeof(data) / sizeof(uchar); @@ -570,22 +535,20 @@ void SerialPort::parserTest() #endif } -void SerialPort::slotDeliverData(const QByteArray &ba) -{ +void SerialPort::slotDeliverData(const QByteArray &ba) { openSp(); slotSendData(ba); } -void SerialPort::slotSendData(const QByteArray &ba) -{ +void SerialPort::slotSendData(const QByteArray &ba) { #if 1 + logde << "slotSendData =========================="; logde << "slotSendData:" << ba.size(); - QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 + QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 logde << "slotSendData:" << hexData.toStdString(); #endif - if (_sp != nullptr && _sp->isOpen()) - { + if (_sp != nullptr && _sp->isOpen()) { int bytesWritten = _sp->write(ba); if (bytesWritten == -1) { logde << "Write failed." << _sp->errorString().toStdString(); @@ -594,18 +557,14 @@ void SerialPort::slotSendData(const QByteArray &ba) } else { logde << "All data writen."; } - } - else - { - logde<< "sp not open."; + } else { + logde << "sp not open."; return; } } -void SerialPort::slotCloseSp() -{ - if (_sp != nullptr && _sp->isOpen()) - { +void SerialPort::slotCloseSp() { + if (_sp != nullptr && _sp->isOpen()) { _sp->close(); } } diff --git a/src/ui/experimentsettingform.cpp b/src/ui/experimentsettingform.cpp index 91024c4..e040365 100644 --- a/src/ui/experimentsettingform.cpp +++ b/src/ui/experimentsettingform.cpp @@ -10,16 +10,15 @@ #include "filemanager.h" #include "logger.h" -QString extractObjectName(const QString& fullObjectName) { - return fullObjectName.mid(4); // 去掉前 4 个字符("ui->") +QString extractObjectName(const QString &fullObjectName) { + return fullObjectName.mid(4); // 去掉前 4 个字符("ui->") } #define SET_OBJECT_NAME(WIDGET) \ WIDGET->setObjectName(extractObjectName(#WIDGET)) ExperimentSettingForm::ExperimentSettingForm(QWidget *parent) : QWidget(parent), - ui(new Ui::ExperimentSettingForm) -{ + ui(new Ui::ExperimentSettingForm) { ui->setupUi(this); ui->sampleNameLineEdit->setText("new"); @@ -53,13 +52,11 @@ ExperimentSettingForm::ExperimentSettingForm(QWidget *parent) : QWidget(parent), this, &ExperimentSettingForm::slotCancel); } -ExperimentSettingForm::~ExperimentSettingForm() -{ +ExperimentSettingForm::~ExperimentSettingForm() { delete ui; } -void ExperimentSettingForm::uiReset() -{ +void ExperimentSettingForm::uiReset() { // init data and status. // default value @@ -127,7 +124,7 @@ void ExperimentSettingForm::uiReset() ui->checkBox_phase_5->setTristate(false); ui->checkBox_phase_6->setTristate(false); - //set objectName + // set objectName SET_OBJECT_NAME(ui->checkBox_phase_1); SET_OBJECT_NAME(ui->checkBox_phase_2); SET_OBJECT_NAME(ui->checkBox_phase_3); @@ -167,79 +164,84 @@ void ExperimentSettingForm::uiReset() SET_OBJECT_NAME(ui->comboBox_initial_atmosphere); } -void ExperimentSettingForm::uiSetPhaseEnable(const int index) -{ +void ExperimentSettingForm::uiSetPhaseEnable(const int index) { switch (index) { - case 1: - ui->checkBox_phase_1->setTristate(true); - ui->phase_1_cutoff_temp->setEnabled(true); - ui->phase_1_scan_rate->setEnabled(true); - ui->phase_1_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - case 2: - ui->checkBox_phase_2->setTristate(true); - ui->phase_2_cutoff_temp->setEnabled(true); - ui->phase_2_scan_rate->setEnabled(true); - ui->phase_3_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - case 3: - ui->checkBox_phase_1->setTristate(true); - ui->phase_1_cutoff_temp->setEnabled(true); - ui->phase_1_scan_rate->setEnabled(true); - ui->phase_1_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - case 4: - ui->checkBox_phase_1->setTristate(true); - ui->phase_1_cutoff_temp->setEnabled(true); - ui->phase_1_scan_rate->setEnabled(true); - ui->phase_1_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - case 5: - ui->checkBox_phase_1->setTristate(true); - ui->phase_1_cutoff_temp->setEnabled(true); - ui->phase_1_scan_rate->setEnabled(true); - ui->phase_1_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - case 6: - ui->checkBox_phase_1->setTristate(true); - ui->phase_1_cutoff_temp->setEnabled(true); - ui->phase_1_scan_rate->setEnabled(true); - ui->phase_1_constant_temp->setEnabled(true); - ui->comboBox_phase_1_atmosphere->setEnabled(true); - break; - default: - break; + case 1: + ui->checkBox_phase_1->setTristate(true); + ui->phase_1_cutoff_temp->setEnabled(true); + ui->phase_1_scan_rate->setEnabled(true); + ui->phase_1_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + case 2: + ui->checkBox_phase_2->setTristate(true); + ui->phase_2_cutoff_temp->setEnabled(true); + ui->phase_2_scan_rate->setEnabled(true); + ui->phase_3_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + case 3: + ui->checkBox_phase_1->setTristate(true); + ui->phase_1_cutoff_temp->setEnabled(true); + ui->phase_1_scan_rate->setEnabled(true); + ui->phase_1_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + case 4: + ui->checkBox_phase_1->setTristate(true); + ui->phase_1_cutoff_temp->setEnabled(true); + ui->phase_1_scan_rate->setEnabled(true); + ui->phase_1_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + case 5: + ui->checkBox_phase_1->setTristate(true); + ui->phase_1_cutoff_temp->setEnabled(true); + ui->phase_1_scan_rate->setEnabled(true); + ui->phase_1_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + case 6: + ui->checkBox_phase_1->setTristate(true); + ui->phase_1_cutoff_temp->setEnabled(true); + ui->phase_1_scan_rate->setEnabled(true); + ui->phase_1_constant_temp->setEnabled(true); + ui->comboBox_phase_1_atmosphere->setEnabled(true); + break; + default: + break; } } -GasType ExperimentSettingForm::conver2GasType(const int index) -{ +GasType ExperimentSettingForm::conver2GasType(const int index) { switch (index) { - case 0: return GasType::NC; break; // 假设 GAS_AIR 是 gas_type 的枚举值 - case 1: return GasType::N2; break; - case 2: return GasType::O2; break; - default: return GasType::NC; break; // 处理未知情况 + case 0: + return GasType::NC; + break; // 假设 GAS_AIR 是 gas_type 的枚举值 + case 1: + return GasType::N2; + break; + case 2: + return GasType::O2; + break; + default: + return GasType::NC; + break; // 处理未知情况 } return GasType::NC; } -bool ExperimentSettingForm::phaseCufoffTempAndTempFlowCheck(const int phaseIndex, +bool ExperimentSettingForm::phaseCufoffTempAndTempFlowCheck(const int phaseIndex, const float prePhaseCufoffTemp, const float currentPhaseCufoffTemp, - const float tempFlow) -{ - if(tempFlow < 0){ + const float tempFlow) { + if (tempFlow < 0) { phaseScanRateErrorMesgBox(phaseIndex); return false; } - if(prePhaseCufoffTemp != currentPhaseCufoffTemp - && tempFlow == 0){ + if (prePhaseCufoffTemp != currentPhaseCufoffTemp + && tempFlow == 0) { phaseScanRateErrorMesgBox(phaseIndex); return false; } @@ -247,26 +249,19 @@ bool ExperimentSettingForm::phaseCufoffTempAndTempFlowCheck(const int phaseIndex return true; } -void ExperimentSettingForm::slotPhase2StateChanged(int state) -{ +void ExperimentSettingForm::slotPhase2StateChanged(int state) { qDebug() << "slotPhase2StateChanged:" << state; - if (state == Qt::PartiallyChecked) - { + if (state == Qt::PartiallyChecked) { ui->phase_2_cutoff_temp->setEnabled(true); ui->phase_2_scan_rate->setEnabled(true); ui->phase_2_constant_temp->setEnabled(true); ui->comboBox_phase_2_atmosphere->setEnabled(true); - } - else - { + } else { // unchecked - if (ui->checkBox_phase_3->isChecked()) - { + if (ui->checkBox_phase_3->isChecked()) { ui->checkBox_phase_2->setChecked(true); - } - else - { + } else { ui->phase_2_cutoff_temp->setEnabled(false); ui->phase_2_scan_rate->setEnabled(false); ui->phase_2_constant_temp->setEnabled(false); @@ -275,30 +270,20 @@ void ExperimentSettingForm::slotPhase2StateChanged(int state) } } -void ExperimentSettingForm::slotPhase3StateChanged(int state) -{ - if (state == Qt::PartiallyChecked) - { - if (ui->checkBox_phase_2->isChecked()) - { +void ExperimentSettingForm::slotPhase3StateChanged(int state) { + if (state == Qt::PartiallyChecked) { + if (ui->checkBox_phase_2->isChecked()) { ui->phase_3_cutoff_temp->setEnabled(true); ui->phase_3_scan_rate->setEnabled(true); ui->phase_3_constant_temp->setEnabled(true); ui->comboBox_phase_3_atmosphere->setEnabled(true); - } - else - { + } else { ui->checkBox_phase_3->setChecked(false); } - } - else - { - if (ui->checkBox_phase_4->isChecked()) - { + } else { + if (ui->checkBox_phase_4->isChecked()) { ui->checkBox_phase_3->setChecked(true); - } - else - { + } else { ui->phase_3_cutoff_temp->setEnabled(false); ui->phase_3_scan_rate->setEnabled(false); ui->phase_3_constant_temp->setEnabled(false); @@ -307,30 +292,20 @@ void ExperimentSettingForm::slotPhase3StateChanged(int state) } } -void ExperimentSettingForm::slotPhase4StateChanged(int state) -{ - if (state == Qt::PartiallyChecked) - { - if (ui->checkBox_phase_3->isChecked()) - { +void ExperimentSettingForm::slotPhase4StateChanged(int state) { + if (state == Qt::PartiallyChecked) { + if (ui->checkBox_phase_3->isChecked()) { ui->phase_4_cutoff_temp->setEnabled(true); ui->phase_4_scan_rate->setEnabled(true); ui->phase_4_constant_temp->setEnabled(true); ui->comboBox_phase_4_atmosphere->setEnabled(true); - } - else - { + } else { ui->checkBox_phase_4->setChecked(false); } - } - else - { - if (ui->checkBox_phase_5->isChecked()) - { + } else { + if (ui->checkBox_phase_5->isChecked()) { ui->checkBox_phase_4->setChecked(true); - } - else - { + } else { ui->phase_4_cutoff_temp->setEnabled(false); ui->phase_4_scan_rate->setEnabled(false); ui->phase_4_constant_temp->setEnabled(false); @@ -339,30 +314,20 @@ void ExperimentSettingForm::slotPhase4StateChanged(int state) } } -void ExperimentSettingForm::slotPhase5StateChanged(int state) -{ - if (state == Qt::PartiallyChecked) - { - if (ui->checkBox_phase_4->isChecked()) - { +void ExperimentSettingForm::slotPhase5StateChanged(int state) { + if (state == Qt::PartiallyChecked) { + if (ui->checkBox_phase_4->isChecked()) { ui->phase_5_cutoff_temp->setEnabled(true); ui->phase_5_scan_rate->setEnabled(true); ui->phase_5_constant_temp->setEnabled(true); ui->comboBox_phase_5_atmosphere->setEnabled(true); - } - else - { + } else { ui->checkBox_phase_5->setChecked(false); } - } - else - { - if (ui->checkBox_phase_6->isChecked()) - { + } else { + if (ui->checkBox_phase_6->isChecked()) { ui->checkBox_phase_5->setChecked(true); - } - else - { + } else { ui->phase_5_cutoff_temp->setEnabled(false); ui->phase_5_scan_rate->setEnabled(false); ui->phase_5_constant_temp->setEnabled(false); @@ -371,26 +336,19 @@ void ExperimentSettingForm::slotPhase5StateChanged(int state) } } -void ExperimentSettingForm::slotPhase6StateChanged(int state) -{ +void ExperimentSettingForm::slotPhase6StateChanged(int state) { qDebug() << "slotPhase2StateChanged:" << state; - if (state == Qt::PartiallyChecked) - { - if (ui->checkBox_phase_5->isChecked()) - { + if (state == Qt::PartiallyChecked) { + if (ui->checkBox_phase_5->isChecked()) { ui->phase_6_cutoff_temp->setEnabled(true); ui->phase_6_scan_rate->setEnabled(true); ui->phase_6_constant_temp->setEnabled(true); ui->comboBox_phase_6_atmosphere->setEnabled(true); - } - else - { + } else { ui->checkBox_phase_6->setChecked(false); } - } - else - { + } else { ui->phase_6_cutoff_temp->setEnabled(false); ui->phase_6_scan_rate->setEnabled(false); ui->phase_6_constant_temp->setEnabled(false); @@ -398,8 +356,7 @@ void ExperimentSettingForm::slotPhase6StateChanged(int state) } } -void ExperimentSettingForm::on_pushButton_deliverData_clicked() -{ +void ExperimentSettingForm::on_pushButton_deliverData_clicked() { float phase1CutoffTemp = 0.0; float phase2CutoffTemp = 0.0; float phase3CutoffTemp = 0.0; @@ -410,9 +367,9 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() QVector phaseVtr; { Phase phase; - phase.onoff = ui->checkBox_phase_1->checkState()?1:0; - phase.cutoff_temp = ui->phase_1_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_1_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_1->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_1_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_1_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_1_constant_temp->text().toInt(); phase.gas = conver2GasType(ui->comboBox_phase_1_atmosphere->currentIndex()); @@ -421,27 +378,26 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() // phase1CutoffTemp = phase.cutoff_temp; // - if(phase.temp_flow <= 0){ + if (phase.temp_flow <= 0) { phaseScanRateErrorMesgBox(1); return; } - } { Phase phase; - phase.onoff = ui->checkBox_phase_2->checkState()?1:0; - phase.cutoff_temp = ui->phase_2_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_2_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_2->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_2_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_2_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_2_constant_temp->text().toInt(); - phase.gas = conver2GasType(ui->comboBox_phase_2_atmosphere->currentIndex()); + phase.gas = conver2GasType(ui->comboBox_phase_2_atmosphere->currentIndex()); phaseVtr.push_back(phase); // - if(phase.onoff){ - logde<<"phase 2 enable."; + if (phase.onoff) { + logde << "phase 2 enable."; phase2CutoffTemp = phase.cutoff_temp; - if(phase2CutoffTemp < phase1CutoffTemp){ + if (phase2CutoffTemp < phase1CutoffTemp) { phaseCufoffTempErrorMesgBox(2); return; } @@ -459,30 +415,29 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() return; } #endif - if(!phaseCufoffTempAndTempFlowCheck(2, - phase1CutoffTemp, - phase2CutoffTemp, - phase.temp_flow)){ + if (!phaseCufoffTempAndTempFlowCheck(2, + phase1CutoffTemp, + phase2CutoffTemp, + phase.temp_flow)) { return; } - } } { Phase phase; - phase.onoff = ui->checkBox_phase_3->checkState()?1:0; - phase.cutoff_temp = ui->phase_3_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_3_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_3->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_3_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_3_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_3_constant_temp->text().toInt(); - phase.gas = conver2GasType(ui->comboBox_phase_3_atmosphere->currentIndex()); + phase.gas = conver2GasType(ui->comboBox_phase_3_atmosphere->currentIndex()); phaseVtr.push_back(phase); // - if(phase.onoff){ - logde<<"phase 3 enable."; + if (phase.onoff) { + logde << "phase 3 enable."; phase3CutoffTemp = phase.cutoff_temp; - if(phase3CutoffTemp < phase2CutoffTemp){ + if (phase3CutoffTemp < phase2CutoffTemp) { phaseCufoffTempErrorMesgBox(3); return; } @@ -492,10 +447,10 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() return; } #endif - if(!phaseCufoffTempAndTempFlowCheck(3, - phase2CutoffTemp, - phase3CutoffTemp, - phase.temp_flow)){ + if (!phaseCufoffTempAndTempFlowCheck(3, + phase2CutoffTemp, + phase3CutoffTemp, + phase.temp_flow)) { return; } } @@ -503,18 +458,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() { Phase phase; - phase.onoff = ui->checkBox_phase_4->checkState()?1:0; - phase.cutoff_temp = ui->phase_4_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_4_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_4->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_4_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_4_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_4_constant_temp->text().toInt(); - phase.gas = conver2GasType(ui->comboBox_phase_4_atmosphere->currentIndex()); + phase.gas = conver2GasType(ui->comboBox_phase_4_atmosphere->currentIndex()); phaseVtr.push_back(phase); // - if(phase.onoff){ - logde<<"phase 4 enable."; + if (phase.onoff) { + logde << "phase 4 enable."; phase4CutoffTemp = phase.cutoff_temp; - if(phase4CutoffTemp < phase3CutoffTemp){ + if (phase4CutoffTemp < phase3CutoffTemp) { phaseCufoffTempErrorMesgBox(4); return; } @@ -524,10 +479,10 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() return; } #endif - if(!phaseCufoffTempAndTempFlowCheck(4, - phase3CutoffTemp, - phase4CutoffTemp, - phase.temp_flow)){ + if (!phaseCufoffTempAndTempFlowCheck(4, + phase3CutoffTemp, + phase4CutoffTemp, + phase.temp_flow)) { return; } } @@ -535,18 +490,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() { Phase phase; - phase.onoff = ui->checkBox_phase_5->checkState()?1:0; - phase.cutoff_temp = ui->phase_5_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_5_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_5->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_5_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_5_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_5_constant_temp->text().toInt(); - phase.gas = conver2GasType(ui->comboBox_phase_5_atmosphere->currentIndex()); + phase.gas = conver2GasType(ui->comboBox_phase_5_atmosphere->currentIndex()); phaseVtr.push_back(phase); // - if(phase.onoff){ - logde<<"phase 5 enable."; + if (phase.onoff) { + logde << "phase 5 enable."; phase5CutoffTemp = phase.cutoff_temp; - if(phase5CutoffTemp < phase4CutoffTemp){ + if (phase5CutoffTemp < phase4CutoffTemp) { phaseCufoffTempErrorMesgBox(5); return; } @@ -556,10 +511,10 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() return; } #endif - if(!phaseCufoffTempAndTempFlowCheck(5, - phase4CutoffTemp, - phase5CutoffTemp, - phase.temp_flow)){ + if (!phaseCufoffTempAndTempFlowCheck(5, + phase4CutoffTemp, + phase5CutoffTemp, + phase.temp_flow)) { return; } } @@ -567,18 +522,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() { Phase phase; - phase.onoff = ui->checkBox_phase_6->checkState()?1:0; - phase.cutoff_temp = ui->phase_6_cutoff_temp->text().toFloat(); - phase.temp_flow = ui->phase_6_scan_rate->text().toFloat(); + phase.onoff = ui->checkBox_phase_6->checkState() ? 1 : 0; + phase.cutoff_temp = ui->phase_6_cutoff_temp->text().toFloat(); + phase.temp_flow = ui->phase_6_scan_rate->text().toFloat(); phase.constant_temp_time_min = (uint16_t)ui->phase_6_constant_temp->text().toInt(); - phase.gas = conver2GasType(ui->comboBox_phase_6_atmosphere->currentIndex()); + phase.gas = conver2GasType(ui->comboBox_phase_6_atmosphere->currentIndex()); phaseVtr.push_back(phase); // - if(phase.onoff){ - logde<<"phase 6 enable."; + if (phase.onoff) { + logde << "phase 6 enable."; phase6CutoffTemp = phase.cutoff_temp; - if(phase6CutoffTemp < phase5CutoffTemp){ + if (phase6CutoffTemp < phase5CutoffTemp) { phaseCufoffTempErrorMesgBox(6); return; } @@ -588,20 +543,20 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() return; } #endif - if(!phaseCufoffTempAndTempFlowCheck(6, - phase5CutoffTemp, - phase6CutoffTemp, - phase.temp_flow)){ + if (!phaseCufoffTempAndTempFlowCheck(6, + phase5CutoffTemp, + phase6CutoffTemp, + phase.temp_flow)) { return; } } } // - Global::ExperimentInfo& ei = Global::_experimentInfo; - ei.sampleName = ui->sampleNameLineEdit->text(); - ei.sampleWeight = ui->sampleWeightLineEdit->text(); - ei.date = ui->dateTimeLineEdit->text(); - ei.experimentor = ui->userLineEdit->text(); + Global::ExperimentInfo &ei = Global::_experimentInfo; + ei.sampleName = ui->sampleNameLineEdit->text(); + ei.sampleWeight = ui->sampleWeightLineEdit->text(); + ei.date = ui->dateTimeLineEdit->text(); + ei.experimentor = ui->userLineEdit->text(); #if 0 ei.phaseVtr = phaseVtr; @@ -616,25 +571,31 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() // initial data. QByteArray initialBa; - if(ui->radioButton_OIT->isChecked()){ + if (ui->radioButton_OIT->isChecked()) { initialBa.append((char)0); Global::_experimentOITFlag = true; - logde<<"Global::_experimentOITFlag = true;"; - }else{ + logde << "Global::_experimentOITFlag = true;"; + } else { initialBa.append((char)1); Global::_experimentOITFlag = false; - logde<<"Global::_experimentOITFlag = false;"; + logde << "Global::_experimentOITFlag = false;"; } char index = ui->comboBox_initial_atmosphere->currentIndex(); initialBa.append(index); + // 实验名称检查 + if (Global::isFileExist(ei.sampleName)) { + QMessageBox::question(this, "实验名称重复", "实验名称已存在,请重新输入!", + QMessageBox::Yes); + return; + } // - QByteArray ba = DataParser::setExperimentInfo(phaseVtr,initialBa); + QByteArray ba = DataParser::setExperimentInfo(phaseVtr, initialBa); qDebug() << "ba size:" << ba.size(); @@ -642,73 +603,55 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked() hide(); } -void ExperimentSettingForm::slotCancel() -{ +void ExperimentSettingForm::slotCancel() { hide(); } -void ExperimentSettingForm::phaseCufoffTempErrorMesgBox(const int phaseNum) -{ +void ExperimentSettingForm::phaseCufoffTempErrorMesgBox(const int phaseNum) { QString title = QString("阶段%1截止温度错误").arg(QString::number(phaseNum)); - QString text = QString("阶段%1截止温度不能小于上一阶段截止温度! ").arg(QString::number(phaseNum)); + QString text = QString("阶段%1截止温度不能小于上一阶段截止温度! ").arg(QString::number(phaseNum)); QMessageBox::question(this, title, text, QMessageBox::Yes); } -void ExperimentSettingForm::phaseScanRateErrorMesgBox(const int phaseNum) -{ +void ExperimentSettingForm::phaseScanRateErrorMesgBox(const int phaseNum) { QString title = QString("阶段%1扫描速率错误").arg(QString::number(phaseNum)); - QString text = QString("阶段%1扫描速率必须大于0! ").arg(QString::number(phaseNum)); + QString text = QString("阶段%1扫描速率必须大于0! ").arg(QString::number(phaseNum)); QMessageBox::question(this, title, text, QMessageBox::Yes); } -void ExperimentSettingForm::slotPhaseCheck() -{ - if (sender() == ui->checkBox_phase_2) - { - if (ui->checkBox_phase_2->isChecked()) - { +void ExperimentSettingForm::slotPhaseCheck() { + if (sender() == ui->checkBox_phase_2) { + if (ui->checkBox_phase_2->isChecked()) { ui->phase_2_cutoff_temp->setEnabled(true); ui->phase_2_scan_rate->setEnabled(true); ui->phase_2_constant_temp->setEnabled(true); ui->comboBox_phase_2_atmosphere->setEnabled(true); - } - else - { + } else { ui->phase_2_cutoff_temp->setEnabled(false); ui->phase_2_scan_rate->setEnabled(false); ui->phase_2_constant_temp->setEnabled(false); ui->comboBox_phase_2_atmosphere->setEnabled(false); } - } - else if (sender() == ui->checkBox_phase_3) - { - if (ui->checkBox_phase_3->isChecked()) - { + } else if (sender() == ui->checkBox_phase_3) { + if (ui->checkBox_phase_3->isChecked()) { ui->phase_3_cutoff_temp->setEnabled(true); ui->phase_3_scan_rate->setEnabled(true); ui->phase_3_constant_temp->setEnabled(true); ui->comboBox_phase_3_atmosphere->setEnabled(true); - } - else - { + } else { ui->phase_3_cutoff_temp->setEnabled(false); ui->phase_3_scan_rate->setEnabled(false); ui->phase_3_constant_temp->setEnabled(false); ui->comboBox_phase_3_atmosphere->setEnabled(false); } - } - else if (sender() == ui->checkBox_phase_4) - { - if (ui->checkBox_phase_4->isChecked()) - { + } else if (sender() == ui->checkBox_phase_4) { + if (ui->checkBox_phase_4->isChecked()) { ui->phase_4_cutoff_temp->setEnabled(true); ui->phase_4_scan_rate->setEnabled(true); ui->phase_4_constant_temp->setEnabled(true); ui->comboBox_phase_4_atmosphere->setEnabled(true); - } - else - { + } else { ui->phase_4_cutoff_temp->setEnabled(false); ui->phase_4_scan_rate->setEnabled(false); ui->phase_4_constant_temp->setEnabled(false); @@ -717,22 +660,23 @@ void ExperimentSettingForm::slotPhaseCheck() } } -void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) -{ - logde<<"----------------------- recv"; - QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 - qDebug() << "slotRecvPhaseInfo hex:" << hexData; +void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) { + logde << "----------------------- recv"; - QByteArray localba = ba; - SerialPortProtocol *spp = (SerialPortProtocol *)localba.data(); +#if 0 + QString hexData = ba.toHex(' '); // ' ' 作为分隔符,可选参数 + qDebug() << "slotRecvPhaseInfo hex:" << hexData; +#endif + + QByteArray localba = ba; + SerialPortProtocol *spp = (SerialPortProtocol *)localba.data(); u8 *data = spp->data_buf; int phaseSize = spp->len / PHASE_BYTE_SIZE; QVector phaseVtr; - for (int i = 0; i < phaseSize; i++) - { + for (int i = 0; i < phaseSize; i++) { #if 0 Phase *phase = (Phase *)(data + i * PHASE_BYTE_SIZE); phaseVtr.push_back(*phase); @@ -774,8 +718,8 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) phaseVtr.push_back(phase); #endif - uint8_t* localData = data + i * PHASE_BYTE_SIZE; - int index = 0; + uint8_t *localData = data + i * PHASE_BYTE_SIZE; + int index = 0; Phase phase; // 解析 onoff @@ -798,72 +742,72 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) // 解析 gas uint8_t gasType = *(localData + index); switch (gasType) { - case NC: - phase.gas = NC; - break; - case N2: - phase.gas = N2; - break; - case O2: - phase.gas = O2; - break; - default: - phase.gas = NC; // 默认值,表示未知类型 - break; + case NC: + phase.gas = NC; + break; + case N2: + phase.gas = N2; + break; + case O2: + phase.gas = O2; + break; + default: + phase.gas = NC; // 默认值,表示未知类型 + break; } phaseVtr.push_back(phase); } Global::_experimentInfo.phaseVtr = phaseVtr; - //ui update - // logde<<"phaseVtr size:"<(this->findChild(checkBoxName)); + QString checkBoxName = QString("checkBox_phase_%1").arg(i); + QCheckBox *checkBox_phase = qobject_cast(this->findChild(checkBoxName)); if (checkBox_phase) { checkBox_phase->setChecked(true); // qDebug()<<"found..."; - }else{ + } else { // qDebug()<<"not found..."; } - QString cutOffTempLineEditName = QString("phase_%1_cutoff_temp").arg(i); - QLineEdit *cutOffTempLineEdit = qobject_cast(this->findChild(cutOffTempLineEditName)); - if(cutOffTempLineEdit){ - cutOffTempLineEdit->setText(QString::number(phase.cutoff_temp,'f',3)); + QString cutOffTempLineEditName = QString("phase_%1_cutoff_temp").arg(i); + QLineEdit *cutOffTempLineEdit = qobject_cast(this->findChild(cutOffTempLineEditName)); + if (cutOffTempLineEdit) { + cutOffTempLineEdit->setText(QString::number(phase.cutoff_temp, 'f', 3)); cutOffTempLineEdit->setEnabled(true); } - QString scanRateLineEditName = QString("phase_%1_scan_rate").arg(i); + QString scanRateLineEditName = QString("phase_%1_scan_rate").arg(i); QLineEdit *scanRateLineEdit = - qobject_cast(this->findChild(scanRateLineEditName)); - if(scanRateLineEdit){ - scanRateLineEdit->setText(QString::number(phase.temp_flow,'f',3)); + qobject_cast(this->findChild(scanRateLineEditName)); + if (scanRateLineEdit) { + scanRateLineEdit->setText(QString::number(phase.temp_flow, 'f', 3)); scanRateLineEdit->setEnabled(true); } - QString constantTempLineEditName = QString("phase_%1_constant_temp").arg(i); + QString constantTempLineEditName = QString("phase_%1_constant_temp").arg(i); QLineEdit *constantTempLineEdit = - qobject_cast(this->findChild(constantTempLineEditName)); - if(constantTempLineEdit){ + qobject_cast(this->findChild(constantTempLineEditName)); + if (constantTempLineEdit) { constantTempLineEdit->setText(QString::number(phase.constant_temp_time_min)); constantTempLineEdit->setEnabled(true); } - QString atmoshpereComboBoxName = QString("comboBox_phase_%1_atmosphere").arg(i); + QString atmoshpereComboBoxName = QString("comboBox_phase_%1_atmosphere").arg(i); QComboBox *atmoshpereComboBox = - qobject_cast(this->findChild(atmoshpereComboBoxName)); - if(atmoshpereComboBox){ + qobject_cast(this->findChild(atmoshpereComboBoxName)); + if (atmoshpereComboBox) { atmoshpereComboBox->setCurrentIndex(phase.gas % 256); atmoshpereComboBox->setEnabled(true); } @@ -874,9 +818,9 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) // comboBox_initial_atmosphere u8 *oitValue = (data + 72); - logde<<"oit value:"<<(int)*oitValue; + logde << "oit value:" << (int)*oitValue; - if(*oitValue){ + if (*oitValue) { ui->radioButton_OIT->setChecked(false); ui->radioButton_OIT_not->setChecked(true); #if 0 @@ -887,12 +831,12 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) oitRadioButton->setChecked(true); } #endif - }else{ + } else { ui->radioButton_OIT->setChecked(true); ui->radioButton_OIT_not->setChecked(false); Global::_experimentOITFlag = true; - logde<<"Global::_experimentOITFlag = true;"; + logde << "Global::_experimentOITFlag = true;"; #if 0 QString oitNotRadioButtonName("radioButton_OIT_not"); QRadioButton *oitNotRadioButton = @@ -904,7 +848,7 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) } u8 *initAtmosphereValue = (data + 73); - logde<<"initAtmosphereValue:"<< (int)(*initAtmosphereValue); + logde << "initAtmosphereValue:" << (int)(*initAtmosphereValue); ui->comboBox_initial_atmosphere->setCurrentIndex((int)*initAtmosphereValue); #if 0 @@ -915,14 +859,11 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba) initialAtmosphereComboBox->setCurrentIndex(*initAtmosphereValue); } #endif - - } -void ExperimentSettingForm::showEvent(QShowEvent *event) -{ - QDateTime currentDateTime = QDateTime::currentDateTime(); - QString internationalFormat = currentDateTime.toString("yyyy/MM/dd hh:mm:ss"); +void ExperimentSettingForm::showEvent(QShowEvent *event) { + QDateTime currentDateTime = QDateTime::currentDateTime(); + QString internationalFormat = currentDateTime.toString("yyyy/MM/dd hh:mm:ss"); ui->dateTimeLineEdit->setText(internationalFormat); } diff --git a/src/ui/leftwidget.cpp b/src/ui/leftwidget.cpp index 4f84f52..4bbe996 100644 --- a/src/ui/leftwidget.cpp +++ b/src/ui/leftwidget.cpp @@ -6,7 +6,8 @@ #include "filemanager.h" #include "global.h" -LeftWidget::LeftWidget(QWidget *parent ): QDockWidget(parent) +LeftWidget::LeftWidget(QWidget *parent ): + QDockWidget(parent) { // setStyleSheet("background-color: yellow;"); @@ -37,6 +38,8 @@ LeftWidget::LeftWidget(QWidget *parent ): QDockWidget(parent) expandAll(_baseLineItem); expandAll(_analysisStateItem); + Global::updateFileList(); + //connections connect(_treeWidget,&QTreeWidget::itemDoubleClicked, this,&LeftWidget::slotTreeWidgetItemClicked); @@ -51,6 +54,8 @@ void LeftWidget::reloadFileName() initFileName(_sampleDataItem,Global::SampleDataFloder); initFileName(_baseLineItem,Global::BaseLineFolder); initFileName(_analysisStateItem,Global::AnalysisStateFolder); + // 更新文件列表 + Global::updateFileList(); } QString LeftWidget::filePathCheck(const QString fileName,const QString folderPath) @@ -92,7 +97,6 @@ void LeftWidget::initData() QString content = file.readAll(); qDebug() << "读取文件 " << fileInfo.absoluteFilePath() << " 内容: " << content; file.close(); - // 写入文件操作示例:这里简单在文件末尾追加一行内容 if (file.open(QIODevice::Append | QIODevice::Text)) { file.write("\n这是通过递归写入添加的内容"); @@ -161,6 +165,7 @@ void LeftWidget::clearAllChildItems(QTreeWidgetItem *parentItem) } } + #if 0 void LeftWidget::recursiveFolderOperation(const QString& folderPath) { QDir dir(folderPath); @@ -198,3 +203,5 @@ void LeftWidget::recursiveFolderOperation(const QString& folderPath) { } } #endif + + diff --git a/src/ui/leftwidget.h b/src/ui/leftwidget.h index 99f6abb..0e84046 100644 --- a/src/ui/leftwidget.h +++ b/src/ui/leftwidget.h @@ -28,9 +28,12 @@ private slots: void slotTreeWidgetItemClicked(QTreeWidgetItem *item, int column); private: QTreeWidget *_treeWidget; + QTreeWidgetItem *_analysisStateItem, *_baseLineItem, *_sampleDataItem; + + }; #endif // LEFTWIDGET_H diff --git a/src/ui/realtimedataform.cpp b/src/ui/realtimedataform.cpp index ee3593b..e3da723 100644 --- a/src/ui/realtimedataform.cpp +++ b/src/ui/realtimedataform.cpp @@ -6,6 +6,7 @@ RealTimeDataForm::RealTimeDataForm(QWidget *parent) : QWidget(parent), ui(new Ui::RealTimeDataForm) { ui->setupUi(this); + setWindowTitle("实时数据窗口"); } RealTimeDataForm::~RealTimeDataForm()