modified lightpanel
This commit is contained in:
commit
eea7b2a3ee
@ -54,6 +54,11 @@
|
|||||||
<source>Chart Name:</source>
|
<source>Chart Name:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="94"/>
|
||||||
|
<source>Chart 1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="97"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="97"/>
|
||||||
<source>Enter chart name...</source>
|
<source>Enter chart name...</source>
|
||||||
@ -65,157 +70,142 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="112"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="114"/>
|
||||||
<source>Wave</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="117"/>
|
|
||||||
<source>Report</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="125"/>
|
|
||||||
<source>X Axis Title:</source>
|
<source>X Axis Title:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="132"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="121"/>
|
||||||
<source>Enter X axis title...</source>
|
<source>Enter X axis title...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="139"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="128"/>
|
||||||
<source>Y Axis Title:</source>
|
<source>Y Axis Title:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="146"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="135"/>
|
||||||
<source>Enter Y axis title...</source>
|
<source>Enter Y axis title...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="153"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="142"/>
|
||||||
<source>Time Parameter:</source>
|
<source>Time:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="176"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="155"/>
|
||||||
<source>Axis Range Settings</source>
|
<source>Axis Range Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="228"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="187"/>
|
||||||
<source>X Min:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="288"/>
|
|
||||||
<source>X Max:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="242"/>
|
|
||||||
<source>Y Min:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="235"/>
|
|
||||||
<source>Y Max:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="208"/>
|
|
||||||
<source>X Tick Count:</source>
|
<source>X Tick Count:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="383"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="207"/>
|
||||||
<source>Curve Name:</source>
|
<source>X Min:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="94"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="214"/>
|
||||||
<source>Chart 1</source>
|
<source>Y Max:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="295"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="221"/>
|
||||||
|
<source>Y Min:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="267"/>
|
||||||
|
<source>X Max:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="274"/>
|
||||||
<source>Y Tick Count:</source>
|
<source>Y Tick Count:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="305"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="284"/>
|
||||||
<source>Curve Management</source>
|
<source>Curve Management</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="313"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="292"/>
|
||||||
<source>Curves:</source>
|
<source>Curves:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="339"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="318"/>
|
||||||
<source>Add Curve</source>
|
<source>Add Curve</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="352"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="331"/>
|
||||||
<source>Remove</source>
|
<source>Remove</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="377"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="356"/>
|
||||||
<source>Selected Curve Properties</source>
|
<source>Selected Curve Properties</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="390"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="362"/>
|
||||||
|
<source>Curve Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="369"/>
|
||||||
<source>Enter curve name...</source>
|
<source>Enter curve name...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="397"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="376"/>
|
||||||
<source>Curve Color:</source>
|
<source>Curve Color:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="412"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="391"/>
|
||||||
<source>Select Color</source>
|
<source>Select Color</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="425"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="404"/>
|
||||||
<source>background-color: rgb(255, 0, 0); border: 1px solid black;</source>
|
<source>background-color: rgb(255, 0, 0); border: 1px solid black;</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="450"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="429"/>
|
||||||
<source>Data Start:</source>
|
<source>Data Start:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="470"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="449"/>
|
||||||
<source>Data Stop:</source>
|
<source>Data Stop:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="490"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="472"/>
|
||||||
<source>X Value:</source>
|
<source>X Value:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="516"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="498"/>
|
||||||
<source>Y Value:</source>
|
<source>Y Value:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="563"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="542"/>
|
||||||
<source>Add File</source>
|
<source>Add File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="573"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="552"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -405,6 +395,11 @@
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AddLightFileDlg</name>
|
<name>AddLightFileDlg</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="14"/>
|
||||||
|
<source>Add Light Data File</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="20"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="20"/>
|
||||||
<source>File Selection</source>
|
<source>File Selection</source>
|
||||||
@ -415,11 +410,6 @@
|
|||||||
<source>File Path:</source>
|
<source>File Path:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="14"/>
|
|
||||||
<source>Add Light Data File</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="36"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="36"/>
|
||||||
<source>Select light data file...</source>
|
<source>Select light data file...</source>
|
||||||
@ -438,6 +428,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="57"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="57"/>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="71"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="71"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="328"/>
|
||||||
<source>-</source>
|
<source>-</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -489,7 +480,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="230"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="230"/>
|
||||||
<source>Add Light</source>
|
<source>Add Light Row</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -503,63 +494,78 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="274"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="276"/>
|
||||||
<source>Light Name:</source>
|
<source>Light Names:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="281"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="283"/>
|
||||||
<source>Enter light name...</source>
|
<source>Enter light names (comma separated)...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="288"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="290"/>
|
||||||
<source>Light Index:</source>
|
<source>Light Data:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="329"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="299"/>
|
||||||
|
<source>Enter data values (comma separated integers)...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="312"/>
|
||||||
|
<source>Edit Data</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="321"/>
|
||||||
|
<source>Row Index:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="358"/>
|
||||||
<source>Add File</source>
|
<source>Add File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="336"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="365"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="302"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="359"/>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="339"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="396"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="302"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="359"/>
|
||||||
<source>Unable to get current workspace</source>
|
<source>Unable to get current workspace</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="324"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="381"/>
|
||||||
<source>Curve file count has reached the limit (9 files)</source>
|
<source>Curve file count has reached the limit (9 files)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="327"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="384"/>
|
||||||
<source>File already exists</source>
|
<source>File already exists</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="330"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="387"/>
|
||||||
<source>File copy failed</source>
|
<source>File copy failed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="333"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="390"/>
|
||||||
<source>Invalid file</source>
|
<source>Invalid file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="336"/>
|
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="393"/>
|
||||||
<source>Failed to add file</source>
|
<source>Failed to add file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -652,6 +658,11 @@
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AddSurfaceFileDlg</name>
|
<name>AddSurfaceFileDlg</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="14"/>
|
||||||
|
<source>Add Surface File</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="20"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="20"/>
|
||||||
<source>File Selection</source>
|
<source>File Selection</source>
|
||||||
@ -662,11 +673,6 @@
|
|||||||
<source>Select surface data file...</source>
|
<source>Select surface data file...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="14"/>
|
|
||||||
<source>Add Surface File</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="33"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="33"/>
|
||||||
<source>Browse...</source>
|
<source>Browse...</source>
|
||||||
@ -809,11 +815,6 @@
|
|||||||
<source>,</source>
|
<source>,</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="524"/>
|
|
||||||
<source>Has Header Row</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="484"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="484"/>
|
||||||
<source>X Grid Size:</source>
|
<source>X Grid Size:</source>
|
||||||
@ -825,13 +826,8 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="112"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="524"/>
|
||||||
<source>Select Surface Data File</source>
|
<source>Has Header Row</source>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="118"/>
|
|
||||||
<source>Please add at least one surface.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -839,12 +835,22 @@
|
|||||||
<source>Surface Data Files (*.txt *.dat *.csv);;All Files (*.*)</source>
|
<source>Surface Data Files (*.txt *.dat *.csv);;All Files (*.*)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="112"/>
|
||||||
|
<source>Select Surface Data File</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="118"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="118"/>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="124"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="124"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="118"/>
|
||||||
|
<source>Please add at least one surface.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="124"/>
|
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.cpp" line="124"/>
|
||||||
<source>Please fill in all axis titles.</source>
|
<source>Please fill in all axis titles.</source>
|
||||||
@ -906,190 +912,281 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="81"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="27"/>
|
||||||
|
<source>File Selection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="33"/>
|
||||||
|
<source>File Path:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="43"/>
|
||||||
|
<source>Select table data file...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="50"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="57"/>
|
||||||
|
<source>File Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="64"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="78"/>
|
||||||
|
<source>-</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="71"/>
|
||||||
|
<source>File Size:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="88"/>
|
||||||
<source>Basic Information</source>
|
<source>Basic Information</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="110"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="110"/>
|
||||||
<source>Table Name:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="103"/>
|
|
||||||
<source>Enter table name...</source>
|
<source>Enter table name...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="117"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="117"/>
|
||||||
|
<source>Table Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="124"/>
|
||||||
<source>Time Parameter:</source>
|
<source>Time Parameter:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="20"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="134"/>
|
||||||
<source>File Selection</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="26"/>
|
|
||||||
<source>File Path:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="36"/>
|
|
||||||
<source>Select table data file...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="43"/>
|
|
||||||
<source>...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="50"/>
|
|
||||||
<source>File Name:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="57"/>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="71"/>
|
|
||||||
<source>-</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="64"/>
|
|
||||||
<source>File Size:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="193"/>
|
|
||||||
<source>Encoding:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="201"/>
|
|
||||||
<source>UTF-8</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="206"/>
|
|
||||||
<source>GBK</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="211"/>
|
|
||||||
<source>ASCII</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="216"/>
|
|
||||||
<source>ISO-8859-1</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="176"/>
|
|
||||||
<source>Skip Rows:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="133"/>
|
|
||||||
<source>File has header row</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="127"/>
|
|
||||||
<source>Table Headers Configuration</source>
|
<source>Table Headers Configuration</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="143"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="140"/>
|
||||||
<source>Headers (comma-separated):</source>
|
<source>File has header row</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="150"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="150"/>
|
||||||
|
<source>Headers (comma-separated):</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="157"/>
|
||||||
<source>e.g., Time, Value1, Value2, Value3...</source>
|
<source>e.g., Time, Value1, Value2, Value3...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="160"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="167"/>
|
||||||
<source>Tip: Headers will be auto-detected if file has header row</source>
|
<source>Tip: Headers will be auto-detected if file has header row</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="170"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="177"/>
|
||||||
<source>Parsing Parameters</source>
|
<source>Parsing Parameters</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="183"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="183"/>
|
||||||
|
<source>Skip Rows:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="190"/>
|
||||||
<source>Auto-detect parameters</source>
|
<source>Auto-detect parameters</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="240"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="200"/>
|
||||||
<source>Preview</source>
|
<source>Encoding:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="296"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="208"/>
|
||||||
|
<source>UTF-8</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="213"/>
|
||||||
|
<source>GBK</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="218"/>
|
||||||
|
<source>ASCII</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="223"/>
|
||||||
|
<source>ISO-8859-1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="251"/>
|
||||||
|
<source>Curves Configuration</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="259"/>
|
||||||
|
<source>Add Curve</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="269"/>
|
||||||
|
<source>Remove Curve</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="307"/>
|
||||||
|
<source>Curve Properties</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="313"/>
|
||||||
|
<source>Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="320"/>
|
||||||
|
<source>Enter curve name...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="327"/>
|
||||||
|
<source>Color:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="342"/>
|
||||||
|
<source>Select Color</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="383"/>
|
||||||
|
<source>Data:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="390"/>
|
||||||
|
<source>Enter data values (comma-separated)...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="400"/>
|
||||||
|
<source>Data values must match the number of headers</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="435"/>
|
||||||
<source>Add File</source>
|
<source>Add File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="306"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="445"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="118"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="100"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="295"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="302"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="312"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="318"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="324"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="350"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="118"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="100"/>
|
||||||
<source>Please enter a table name.</source>
|
<source>Please configure table headers first.</source>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="126"/>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="151"/>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="176"/>
|
|
||||||
<source>Error</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="126"/>
|
|
||||||
<source>Failed to create table file entry.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="151"/>
|
|
||||||
<source>Unable to get current workspace</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="161"/>
|
|
||||||
<source>Table file count has reached the limit</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="164"/>
|
|
||||||
<source>File already exists</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="167"/>
|
|
||||||
<source>File copy failed</source>
|
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="170"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="170"/>
|
||||||
|
<source>Select Curve Color</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="296"/>
|
||||||
|
<source>Please configure table headers.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="303"/>
|
||||||
|
<source>Please add at least one curve.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="313"/>
|
||||||
|
<source>Curve %1 name cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="319"/>
|
||||||
|
<source>Curve '%1' data cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="325"/>
|
||||||
|
<source>Curve '%1' data count (%2) doesn't match headers count (%3).</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="350"/>
|
||||||
|
<source>Please enter a table name.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="358"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="381"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="406"/>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="358"/>
|
||||||
|
<source>Failed to create table file entry.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="381"/>
|
||||||
|
<source>Unable to get current workspace</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="391"/>
|
||||||
|
<source>Table file count has reached the limit</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="394"/>
|
||||||
|
<source>File already exists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="397"/>
|
||||||
|
<source>File copy failed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="400"/>
|
||||||
<source>Invalid file</source>
|
<source>Invalid file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="173"/>
|
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="403"/>
|
||||||
<source>Failed to add file</source>
|
<source>Failed to add file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1409,14 +1506,6 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>FitCurve</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/Panel/FitCurve.ui" line="14"/>
|
|
||||||
<source>FitCurveDialog</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>FitCurveChartView</name>
|
<name>FitCurveChartView</name>
|
||||||
<message>
|
<message>
|
||||||
@ -1879,30 +1968,6 @@
|
|||||||
<source>altitude:</source>
|
<source>altitude:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8051"/>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8245"/>
|
|
||||||
<source>Curve[%1]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8052"/>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8246"/>
|
|
||||||
<source>Surface[%1]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8053"/>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8247"/>
|
|
||||||
<source>Table[%1]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8054"/>
|
|
||||||
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8248"/>
|
|
||||||
<source>Light[%1]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="54"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="54"/>
|
||||||
<source>Open Workspace</source>
|
<source>Open Workspace</source>
|
||||||
@ -1969,14 +2034,6 @@
|
|||||||
<source>Failed to create file entry</source>
|
<source>Failed to create file entry</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="126"/>
|
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="171"/>
|
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="216"/>
|
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="261"/>
|
|
||||||
<source>invalid file</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="114"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="114"/>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="159"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="159"/>
|
||||||
@ -2001,6 +2058,38 @@
|
|||||||
<source>copy file failed</source>
|
<source>copy file failed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="126"/>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="171"/>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="216"/>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="261"/>
|
||||||
|
<source>invalid file</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8051"/>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8245"/>
|
||||||
|
<source>Curve[%1]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8052"/>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8246"/>
|
||||||
|
<source>Surface[%1]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8053"/>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8247"/>
|
||||||
|
<source>Table[%1]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8054"/>
|
||||||
|
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8248"/>
|
||||||
|
<source>Light[%1]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>QtBoolEdit</name>
|
<name>QtBoolEdit</name>
|
||||||
|
|||||||
@ -102,7 +102,7 @@ void DataPanelManager::OnWorkspaceChanged(WorkSpace* workspace)
|
|||||||
SetWorkspace(workspace);
|
SetWorkspace(workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataPanelManager::OnFilesChanged(FileEntryType type)
|
void DataPanelManager::OnFilesChanged(FileEntryType type, std::shared_ptr<FileEntry> fileEntry)
|
||||||
{
|
{
|
||||||
// Only respond to supported file types
|
// Only respond to supported file types
|
||||||
if (!DataPanelFactory::IsTypeSupported(type)) {
|
if (!DataPanelFactory::IsTypeSupported(type)) {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public slots:
|
|||||||
* @brief Handle file changes
|
* @brief Handle file changes
|
||||||
* @param type File type
|
* @param type File type
|
||||||
*/
|
*/
|
||||||
void OnFilesChanged(FileEntryType type);
|
void OnFilesChanged(FileEntryType type, std::shared_ptr<FileEntry> fileEntry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Handle panel close event
|
* @brief Handle panel close event
|
||||||
|
|||||||
@ -65,7 +65,7 @@ void LightPanel::OnDataPanelUpdated(FileEntryLight* fileEntry)
|
|||||||
updateLampColor(openColor, closeColor);
|
updateLampColor(openColor, closeColor);
|
||||||
|
|
||||||
QString strFile = fileEntry->GetPath() + "/" + fileEntry->GetFileName();
|
QString strFile = fileEntry->GetPath() + "/" + fileEntry->GetFileName();
|
||||||
FileEntryLight::LightProperties listCurve = fileEntry->GetLightProperties();
|
FileEntryLight::LightRowProperties listCurve = fileEntry->GetLightProperties();
|
||||||
updateParseFile(strFile, propChart.timeParam, listCurve);
|
updateParseFile(strFile, propChart.timeParam, listCurve);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ void LightPanel::updateTitle(const QString & title)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight::LightProperties listCurve)
|
void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight::LightRowProperties listCurve)
|
||||||
{
|
{
|
||||||
if (strFile.isEmpty())
|
if (strFile.isEmpty())
|
||||||
{
|
{
|
||||||
@ -114,14 +114,12 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
|
|||||||
QFile file(strFile);
|
QFile file(strFile);
|
||||||
if (file.open(QIODevice::ReadOnly))
|
if (file.open(QIODevice::ReadOnly))
|
||||||
{
|
{
|
||||||
/*QGridLayout* pMainLyt = new QGridLayout(this);
|
QGridLayout* pMainLyt = new QGridLayout(this);
|
||||||
for (int nI = 0; nI < listCurve.size(); nI++)
|
for (int nI = 0; nI < listCurve.size(); nI++)
|
||||||
{
|
{
|
||||||
QVariantMap mapCurve = listCurve.at(nI).toMap();
|
FileEntryLight::LightRowProperty prop = listCurve.at(nI);
|
||||||
QString strName = mapCurve.value("Name").toString();
|
|
||||||
QStringList lamps = strName.split(",");
|
|
||||||
|
|
||||||
for (auto i = 0; i < lamps.size(); ++i)
|
for (auto i = 0; i < prop.name.size(); ++i)
|
||||||
{
|
{
|
||||||
SignalLabel* pLampLab = new SignalLabel;
|
SignalLabel* pLampLab = new SignalLabel;
|
||||||
pLampLab->setFixedSize(24, 24);
|
pLampLab->setFixedSize(24, 24);
|
||||||
@ -130,7 +128,7 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
|
|||||||
pLampLab->setStyleSheet(strStyle);
|
pLampLab->setStyleSheet(strStyle);
|
||||||
|
|
||||||
QLabel* pTextLab = new QLabel;
|
QLabel* pTextLab = new QLabel;
|
||||||
pTextLab->setText(lamps[i]);
|
pTextLab->setText(prop.name.at(i));
|
||||||
|
|
||||||
QHBoxLayout* pLyt = new QHBoxLayout;
|
QHBoxLayout* pLyt = new QHBoxLayout;
|
||||||
pLyt->addWidget(pLampLab);
|
pLyt->addWidget(pLampLab);
|
||||||
@ -154,13 +152,11 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
|
|||||||
QVariantMap mapData;
|
QVariantMap mapData;
|
||||||
for (int nI = 0; nI < listCurve.size(); nI++)
|
for (int nI = 0; nI < listCurve.size(); nI++)
|
||||||
{
|
{
|
||||||
QVariantMap mapCurve = listCurve.at(nI).toMap();
|
FileEntryLight::LightRowProperty prop = listCurve.at(nI);
|
||||||
QString strData = mapCurve.value("Data").toString();
|
|
||||||
QStringList lamps = strData.split(",");
|
|
||||||
|
|
||||||
for (int nJ = 0; nJ < lamps.size(); ++nJ)
|
for (int nJ = 0; nJ < prop.data.size(); ++nJ)
|
||||||
{
|
{
|
||||||
int nIndex = lamps.at(nJ).toInt();
|
int nIndex = prop.data.at(nJ);
|
||||||
QString nState = listLine.at(nIndex);
|
QString nState = listLine.at(nIndex);
|
||||||
QString strKey = QString::number(nI) + "-" + QString::number(nJ);
|
QString strKey = QString::number(nI) + "-" + QString::number(nJ);
|
||||||
mapData.insert(strKey, nState);
|
mapData.insert(strKey, nState);
|
||||||
@ -168,7 +164,7 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
|
|||||||
}
|
}
|
||||||
m_dataLamp.insert(t, mapData);
|
m_dataLamp.insert(t, mapData);
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void updateTitle(const QString& title);
|
void updateTitle(const QString& title);
|
||||||
void updateParseFile(const QString& strFile, int nT, FileEntryLight::LightProperties listCurve);
|
void updateParseFile(const QString& strFile, int nT, FileEntryLight::LightRowProperties listCurve);
|
||||||
void updateLampColor(const QString& strOpenColor, const QString& strCloseColor);
|
void updateLampColor(const QString& strOpenColor, const QString& strCloseColor);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -175,7 +175,7 @@ void PropertyBrowser::InitPropertyManager() {
|
|||||||
doubleSpinBoxFactory);
|
doubleSpinBoxFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyBrowser::OnWorkspaceFilesChanged(FileEntryType /*type*/) {
|
void PropertyBrowser::OnWorkspaceFilesChanged(FileEntryType /*type*/, std::shared_ptr<FileEntry> /*fileEntry*/) {
|
||||||
if (!currentWorkspace_) return;
|
if (!currentWorkspace_) return;
|
||||||
auto it = idToProperty_.find(tr("WorkSpace"));
|
auto it = idToProperty_.find(tr("WorkSpace"));
|
||||||
if (it == idToProperty_.end()) return;
|
if (it == idToProperty_.end()) return;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public:
|
|||||||
|
|
||||||
void OnWorkSpaceChange(const QVariant& value);
|
void OnWorkSpaceChange(const QVariant& value);
|
||||||
void OnEntityChange(const QVariant& value);
|
void OnEntityChange(const QVariant& value);
|
||||||
void OnWorkspaceFilesChanged(enum class FileEntryType type);
|
void OnWorkspaceFilesChanged(enum class FileEntryType type, std::shared_ptr<FileEntry> fileEntry);
|
||||||
|
|
||||||
void Test();
|
void Test();
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,8 @@ void AddLightFileDlg::setupConnections() {
|
|||||||
|
|
||||||
// Light properties connections
|
// Light properties connections
|
||||||
connect(ui->lightNameEdit, &QLineEdit::textChanged, this, &AddLightFileDlg::onLightNameChanged);
|
connect(ui->lightNameEdit, &QLineEdit::textChanged, this, &AddLightFileDlg::onLightNameChanged);
|
||||||
connect(ui->lightIndexSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddLightFileDlg::onLightIndexChanged);
|
connect(ui->lightDataEdit, &QLineEdit::textChanged, this, &AddLightFileDlg::onLightDataChanged);
|
||||||
|
connect(ui->editDataBtn, &QPushButton::clicked, this, &AddLightFileDlg::onEditDataClicked);
|
||||||
|
|
||||||
// Dialog buttons
|
// Dialog buttons
|
||||||
connect(ui->addFileBtn, &QPushButton::clicked, this, &AddLightFileDlg::onSure);
|
connect(ui->addFileBtn, &QPushButton::clicked, this, &AddLightFileDlg::onSure);
|
||||||
@ -107,17 +108,16 @@ void AddLightFileDlg::onAddLightClicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create new light with default properties
|
// Create new light with default properties
|
||||||
FileEntryLight::LightProperty newLight;
|
FileEntryLight::LightRowProperty newLight;
|
||||||
newLight.name = generateLightName();
|
newLight.name = QStringList() << generateLightName();
|
||||||
newLight.index = lights_.size();
|
|
||||||
|
|
||||||
// Add to lights list
|
// Add to lights list
|
||||||
lights_.append(newLight);
|
lights_.append(newLight);
|
||||||
|
|
||||||
// Add to UI list widget
|
// Add to UI list widget
|
||||||
QListWidgetItem* item = new QListWidgetItem(QString("%1 [Index: %2]")
|
QListWidgetItem* item = new QListWidgetItem(QString("%1 [Row: %2]")
|
||||||
.arg(newLight.name)
|
.arg(newLight.name.join(", "))
|
||||||
.arg(newLight.index));
|
.arg(lights_.size() - 1));
|
||||||
ui->lightListWidget->addItem(item);
|
ui->lightListWidget->addItem(item);
|
||||||
|
|
||||||
// Select the new item
|
// Select the new item
|
||||||
@ -151,14 +151,13 @@ void AddLightFileDlg::onRemoveLightClicked() {
|
|||||||
updateLightProperties();
|
updateLightProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update list display with new indices
|
// Update list display with new row indices
|
||||||
for (int i = 0; i < lights_.size(); ++i) {
|
for (int i = 0; i < lights_.size(); ++i) {
|
||||||
lights_[i].index = i;
|
|
||||||
QListWidgetItem* item = ui->lightListWidget->item(i);
|
QListWidgetItem* item = ui->lightListWidget->item(i);
|
||||||
if (item) {
|
if (item) {
|
||||||
item->setText(QString("%1 [Index: %2]")
|
item->setText(QString("%1 [Row: %2]")
|
||||||
.arg(lights_[i].name)
|
.arg(lights_[i].name.join(", "))
|
||||||
.arg(lights_[i].index));
|
.arg(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,30 +188,19 @@ void AddLightFileDlg::onLightSelectionChanged() {
|
|||||||
|
|
||||||
void AddLightFileDlg::onLightNameChanged() {
|
void AddLightFileDlg::onLightNameChanged() {
|
||||||
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
||||||
QString newName = ui->lightNameEdit->text();
|
QString namesText = ui->lightNameEdit->text();
|
||||||
lights_[currentLightIndex_].name = newName;
|
QStringList names = namesText.split(",", Qt::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < names.size(); ++i) {
|
||||||
// Update list widget item text
|
names[i] = names[i].trimmed();
|
||||||
QListWidgetItem* item = ui->lightListWidget->item(currentLightIndex_);
|
|
||||||
if (item) {
|
|
||||||
item->setText(QString("%1 [Index: %2]")
|
|
||||||
.arg(newName)
|
|
||||||
.arg(lights_[currentLightIndex_].index));
|
|
||||||
}
|
}
|
||||||
}
|
lights_[currentLightIndex_].name = names;
|
||||||
}
|
|
||||||
|
|
||||||
void AddLightFileDlg::onLightIndexChanged() {
|
|
||||||
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
|
||||||
int newIndex = ui->lightIndexSpinBox->value();
|
|
||||||
lights_[currentLightIndex_].index = newIndex;
|
|
||||||
|
|
||||||
// Update list widget item text
|
// Update list widget item text
|
||||||
QListWidgetItem* item = ui->lightListWidget->item(currentLightIndex_);
|
QListWidgetItem* item = ui->lightListWidget->item(currentLightIndex_);
|
||||||
if (item) {
|
if (item) {
|
||||||
item->setText(QString("%1 [Index: %2]")
|
item->setText(QString("%1 [Row: %2]")
|
||||||
.arg(lights_[currentLightIndex_].name)
|
.arg(names.join(", "))
|
||||||
.arg(newIndex));
|
.arg(currentLightIndex_));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,31 +221,63 @@ void AddLightFileDlg::updateCloseColorPreview(const QColor& color) {
|
|||||||
ui->closeColorPreview->setStyleSheet(styleSheet);
|
ui->closeColorPreview->setStyleSheet(styleSheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::addLightToList(const FileEntryLight::LightProperty& light) {
|
void AddLightFileDlg::addLightToList(const FileEntryLight::LightRowProperty& light) {
|
||||||
QListWidgetItem* item = new QListWidgetItem(QString("%1 [Index: %2]")
|
QListWidgetItem* item = new QListWidgetItem(QString("%1 [Row: %2]")
|
||||||
.arg(light.name)
|
.arg(light.name.join(", "))
|
||||||
.arg(light.index));
|
.arg(lights_.size()));
|
||||||
ui->lightListWidget->addItem(item);
|
ui->lightListWidget->addItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::updateLightProperties() {
|
void AddLightFileDlg::updateLightProperties() {
|
||||||
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
||||||
const FileEntryLight::LightProperty& light = lights_[currentLightIndex_];
|
const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_];
|
||||||
ui->lightNameEdit->setText(light.name);
|
ui->lightNameEdit->setText(light.name.join(", "));
|
||||||
ui->lightIndexSpinBox->setValue(light.index);
|
|
||||||
|
// Update data edit
|
||||||
|
QStringList dataStrings;
|
||||||
|
for (int dataValue : light.data) {
|
||||||
|
dataStrings.append(QString::number(dataValue));
|
||||||
|
}
|
||||||
|
ui->lightDataEdit->setText(dataStrings.join(", "));
|
||||||
|
|
||||||
|
// Update row index display
|
||||||
|
ui->rowIndexValue->setText(QString::number(currentLightIndex_));
|
||||||
|
|
||||||
|
// Update data display
|
||||||
|
updateDataDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::saveLightProperties() {
|
void AddLightFileDlg::saveLightProperties() {
|
||||||
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
||||||
lights_[currentLightIndex_].name = ui->lightNameEdit->text();
|
// Save names
|
||||||
lights_[currentLightIndex_].index = ui->lightIndexSpinBox->value();
|
QString namesText = ui->lightNameEdit->text();
|
||||||
|
QStringList names = namesText.split(",", Qt::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < names.size(); ++i) {
|
||||||
|
names[i] = names[i].trimmed();
|
||||||
|
}
|
||||||
|
lights_[currentLightIndex_].name = names;
|
||||||
|
|
||||||
|
// Save data
|
||||||
|
QString dataText = ui->lightDataEdit->text();
|
||||||
|
QStringList dataStrings = dataText.split(",", Qt::SkipEmptyParts);
|
||||||
|
QList<int> dataValues;
|
||||||
|
|
||||||
|
for (const QString& str : dataStrings) {
|
||||||
|
bool ok;
|
||||||
|
int dataValue = str.trimmed().toInt(&ok);
|
||||||
|
if (ok) {
|
||||||
|
dataValues.append(dataValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lights_[currentLightIndex_].data = dataValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::clearLightProperties() {
|
void AddLightFileDlg::clearLightProperties() {
|
||||||
ui->lightNameEdit->clear();
|
ui->lightNameEdit->clear();
|
||||||
ui->lightIndexSpinBox->setValue(0);
|
ui->lightDataEdit->clear();
|
||||||
|
ui->rowIndexValue->setText("-");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLightFileDlg::enableLightProperties(bool enabled) {
|
void AddLightFileDlg::enableLightProperties(bool enabled) {
|
||||||
@ -265,7 +285,44 @@ void AddLightFileDlg::enableLightProperties(bool enabled) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString AddLightFileDlg::generateLightName() {
|
QString AddLightFileDlg::generateLightName() {
|
||||||
return QString("Light %1").arg(lights_.size() + 1);
|
return QString("Light_%1").arg(lights_.size() + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddLightFileDlg::updateDataDisplay() {
|
||||||
|
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
||||||
|
const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_];
|
||||||
|
QStringList dataStrings;
|
||||||
|
for (int dataValue : light.data) {
|
||||||
|
dataStrings.append(QString::number(dataValue));
|
||||||
|
}
|
||||||
|
ui->lightDataEdit->setText(dataStrings.join(", "));
|
||||||
|
} else {
|
||||||
|
ui->lightDataEdit->clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddLightFileDlg::onLightDataChanged() {
|
||||||
|
// Parse comma-separated data values and store them
|
||||||
|
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) {
|
||||||
|
QString dataText = ui->lightDataEdit->text();
|
||||||
|
QStringList dataStrings = dataText.split(',', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
|
QList<int> dataValues;
|
||||||
|
for (const QString& str : dataStrings) {
|
||||||
|
bool ok;
|
||||||
|
int dataValue = str.trimmed().toInt(&ok);
|
||||||
|
if (ok) {
|
||||||
|
dataValues.append(dataValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lights_[currentLightIndex_].data = dataValues;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddLightFileDlg::onEditDataClicked() {
|
||||||
|
// Future implementation: could open a detailed data editor dialog
|
||||||
|
// For now, just focus on the data edit field
|
||||||
|
ui->lightDataEdit->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddLightFileDlg::validateSpecificParams() {
|
bool AddLightFileDlg::validateSpecificParams() {
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QSpinBox;
|
|
||||||
class QDoubleSpinBox;
|
class QDoubleSpinBox;
|
||||||
class QTextEdit;
|
class QTextEdit;
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
@ -42,25 +41,29 @@ private slots:
|
|||||||
void onLightListWidgetItemClicked(QListWidgetItem* item);
|
void onLightListWidgetItemClicked(QListWidgetItem* item);
|
||||||
void onLightSelectionChanged();
|
void onLightSelectionChanged();
|
||||||
void onLightNameChanged();
|
void onLightNameChanged();
|
||||||
void onLightIndexChanged();
|
|
||||||
void onSure();
|
void onSure();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupConnections();
|
void setupConnections();
|
||||||
void updateOpenColorPreview(const QColor& color);
|
void updateOpenColorPreview(const QColor& color);
|
||||||
void updateCloseColorPreview(const QColor& color);
|
void updateCloseColorPreview(const QColor& color);
|
||||||
void addLightToList(const FileEntryLight::LightProperty& light);
|
void addLightToList(const FileEntryLight::LightRowProperty& light);
|
||||||
void updateLightProperties();
|
void updateLightProperties();
|
||||||
void saveLightProperties();
|
void saveLightProperties();
|
||||||
void clearLightProperties();
|
void clearLightProperties();
|
||||||
void enableLightProperties(bool enabled);
|
void enableLightProperties(bool enabled);
|
||||||
QString generateLightName();
|
QString generateLightName();
|
||||||
|
|
||||||
|
// New methods for data handling
|
||||||
|
void updateDataDisplay();
|
||||||
|
void onLightDataChanged();
|
||||||
|
void onEditDataClicked();
|
||||||
|
|
||||||
Ui::AddLightFileDlg* ui;
|
Ui::AddLightFileDlg* ui;
|
||||||
int currentLightIndex_;
|
int currentLightIndex_;
|
||||||
QColor openColor_;
|
QColor openColor_;
|
||||||
QColor closeColor_;
|
QColor closeColor_;
|
||||||
|
|
||||||
FileEntryLight::ColorProperties colorProperties_;
|
FileEntryLight::ColorProperties colorProperties_;
|
||||||
FileEntryLight::LightProperties lights_;
|
FileEntryLight::LightRowProperties lights_;
|
||||||
};
|
};
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>487</height>
|
<height>516</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -222,12 +222,12 @@
|
|||||||
<widget class="QPushButton" name="addLightBtn">
|
<widget class="QPushButton" name="addLightBtn">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>180</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add Light</string>
|
<string>Add Light Row</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -267,40 +267,69 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Selected Light Properties</string>
|
<string>Selected Light Properties</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="lightPropertiesGridLayout">
|
<layout class="QVBoxLayout" name="lightPropertiesVLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="lightNameLabel">
|
<layout class="QGridLayout" name="lightPropertiesGridLayout">
|
||||||
<property name="text">
|
<item row="0" column="0">
|
||||||
<string>Light Name:</string>
|
<widget class="QLabel" name="lightNameLabel">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Light Names:</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="0" column="1">
|
</widget>
|
||||||
<widget class="QLineEdit" name="lightNameEdit">
|
</item>
|
||||||
<property name="placeholderText">
|
<item row="0" column="1">
|
||||||
<string>Enter light name...</string>
|
<widget class="QLineEdit" name="lightNameEdit">
|
||||||
</property>
|
<property name="placeholderText">
|
||||||
</widget>
|
<string>Enter light names (comma separated)...</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="0">
|
</widget>
|
||||||
<widget class="QLabel" name="lightIndexLabel">
|
</item>
|
||||||
<property name="text">
|
<item row="1" column="0">
|
||||||
<string>Light Index:</string>
|
<widget class="QLabel" name="lightDataLabel">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Light Data:</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="1">
|
</widget>
|
||||||
<widget class="QSpinBox" name="lightIndexSpinBox">
|
</item>
|
||||||
<property name="minimum">
|
<item row="1" column="1">
|
||||||
<number>0</number>
|
<layout class="QHBoxLayout" name="lightDataLayout">
|
||||||
</property>
|
<item>
|
||||||
<property name="maximum">
|
<widget class="QLineEdit" name="lightDataEdit">
|
||||||
<number>999999</number>
|
<property name="placeholderText">
|
||||||
</property>
|
<string>Enter data values (comma separated integers)...</string>
|
||||||
<property name="value">
|
</property>
|
||||||
<number>0</number>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
|
<widget class="QPushButton" name="editDataBtn">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Edit Data</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="rowIndexLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Row Index:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="rowIndexValue">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QColorDialog>
|
||||||
|
|
||||||
#include "app/Application.h"
|
#include "app/Application.h"
|
||||||
#include "common/SpdLogger.h"
|
#include "common/SpdLogger.h"
|
||||||
@ -14,7 +15,8 @@
|
|||||||
|
|
||||||
AddTableFileDlg::AddTableFileDlg(QWidget* parent)
|
AddTableFileDlg::AddTableFileDlg(QWidget* parent)
|
||||||
: BaseAddFileDlg(FileEntryType::Table, parent)
|
: BaseAddFileDlg(FileEntryType::Table, parent)
|
||||||
, ui(new Ui::AddTableFileDlg) {
|
, ui(new Ui::AddTableFileDlg)
|
||||||
|
, m_currentCurveIndex(-1) {
|
||||||
|
|
||||||
SetupUI(ui);
|
SetupUI(ui);
|
||||||
SetTitle(getDialogTitle());
|
SetTitle(getDialogTitle());
|
||||||
@ -27,28 +29,26 @@ AddTableFileDlg::~AddTableFileDlg() {
|
|||||||
|
|
||||||
void AddTableFileDlg::setupConnections() {
|
void AddTableFileDlg::setupConnections() {
|
||||||
// Connect file selection
|
// Connect file selection
|
||||||
connect(ui->selectFileBtn, &QToolButton::clicked, this, &AddTableFileDlg::onSelectFileClicked);
|
connect(ui->selectFileBtn, &QToolButton::clicked, this, &AddTableFileDlg::OnSelectFile);
|
||||||
connect(ui->filePathEdit, &QLineEdit::textChanged, this, &AddTableFileDlg::onFilePathChanged);
|
connect(ui->filePathEdit, &QLineEdit::textChanged, this, &AddTableFileDlg::onFilePathChanged);
|
||||||
|
|
||||||
connect(ui->hasHeaderCheckBox, &QCheckBox::toggled, this, &AddTableFileDlg::onHeaderToggled);
|
connect(ui->hasHeaderCheckBox, &QCheckBox::toggled, this, &AddTableFileDlg::onHeaderToggled);
|
||||||
|
connect(ui->headersEdit, &QLineEdit::textChanged, this, &AddTableFileDlg::onHeadersChanged);
|
||||||
|
|
||||||
|
// Connect curve management
|
||||||
|
connect(ui->addCurveBtn, &QPushButton::clicked, this, &AddTableFileDlg::onAddCurveClicked);
|
||||||
|
connect(ui->removeCurveBtn, &QPushButton::clicked, this, &AddTableFileDlg::onRemoveCurveClicked);
|
||||||
|
connect(ui->curvesListWidget, &QListWidget::currentRowChanged, this, &AddTableFileDlg::onCurveSelectionChanged);
|
||||||
|
|
||||||
|
// Connect curve properties
|
||||||
|
connect(ui->curveNameEdit, &QLineEdit::textChanged, this, &AddTableFileDlg::onCurveNameChanged);
|
||||||
|
connect(ui->colorBtn, &QPushButton::clicked, this, &AddTableFileDlg::onCurveColorClicked);
|
||||||
|
connect(ui->curveDataEdit, &QLineEdit::textChanged, this, &AddTableFileDlg::onCurveDataChanged);
|
||||||
|
|
||||||
connect(ui->addBtn, &QPushButton::clicked, this, [this]() { OnSure(); });
|
connect(ui->addBtn, &QPushButton::clicked, this, [this]() { OnSure(); });
|
||||||
connect(ui->cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
|
connect(ui->cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddTableFileDlg::onSelectFileClicked() {
|
|
||||||
const QString workspacePath = Application::GetWorkSpacePath();
|
|
||||||
QString filePath = QFileDialog::getOpenFileName(
|
|
||||||
this,
|
|
||||||
QStringLiteral("Select Table File"),
|
|
||||||
workspacePath,
|
|
||||||
getFileFilter()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!filePath.isEmpty()) {
|
|
||||||
ui->filePathEdit->setText(filePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddTableFileDlg::onFilePathChanged(const QString& filePath) {
|
void AddTableFileDlg::onFilePathChanged(const QString& filePath) {
|
||||||
updateFileInfo(filePath);
|
updateFileInfo(filePath);
|
||||||
}
|
}
|
||||||
@ -56,6 +56,7 @@ void AddTableFileDlg::onFilePathChanged(const QString& filePath) {
|
|||||||
void AddTableFileDlg::updateFileInfo(const QString& filePath) {
|
void AddTableFileDlg::updateFileInfo(const QString& filePath) {
|
||||||
QFileInfo fileInfo(filePath);
|
QFileInfo fileInfo(filePath);
|
||||||
ui->fileNameValue->setText(fileInfo.fileName());
|
ui->fileNameValue->setText(fileInfo.fileName());
|
||||||
|
ui->filePathEdit->setText(filePath);
|
||||||
|
|
||||||
qint64 size = fileInfo.size();
|
qint64 size = fileInfo.size();
|
||||||
QString sizeText;
|
QString sizeText;
|
||||||
@ -77,6 +78,203 @@ void AddTableFileDlg::onHeaderToggled(bool hasHeader) {
|
|||||||
// Handle header toggle if needed
|
// Handle header toggle if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onHeadersChanged() {
|
||||||
|
// Update data validation when headers change
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
QString data = ui->curveDataEdit->text();
|
||||||
|
QStringList headers = getHeadersList();
|
||||||
|
|
||||||
|
if (!data.isEmpty() && !validateCurveData(data, headers.size())) {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data values must match the number of headers (%1)").arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: red; font-size: 11px;");
|
||||||
|
} else {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data values must match the number of headers (%1)").arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: gray; font-size: 11px;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onAddCurveClicked() {
|
||||||
|
QStringList headers = getHeadersList();
|
||||||
|
if (headers.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"), tr("Please configure table headers first."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save current curve properties if any
|
||||||
|
saveCurveProperties();
|
||||||
|
|
||||||
|
// Create new curve with default values
|
||||||
|
CurveData newCurve;
|
||||||
|
newCurve.name = QString("Curve %1").arg(m_curves.size() + 1);
|
||||||
|
newCurve.color = QColor::fromHsv((m_curves.size() * 60) % 360, 200, 200); // Different colors
|
||||||
|
|
||||||
|
m_curves.append(newCurve);
|
||||||
|
updateCurvesList();
|
||||||
|
|
||||||
|
// Select the new curve
|
||||||
|
ui->curvesListWidget->setCurrentRow(m_curves.size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onRemoveCurveClicked() {
|
||||||
|
int currentRow = ui->curvesListWidget->currentRow();
|
||||||
|
if (currentRow >= 0 && currentRow < m_curves.size()) {
|
||||||
|
m_curves.removeAt(currentRow);
|
||||||
|
updateCurvesList();
|
||||||
|
|
||||||
|
if (m_curves.isEmpty()) {
|
||||||
|
m_currentCurveIndex = -1;
|
||||||
|
ui->curvePropertiesGroupBox->setEnabled(false);
|
||||||
|
ui->removeCurveBtn->setEnabled(false);
|
||||||
|
} else {
|
||||||
|
// Select previous curve or first curve
|
||||||
|
int newIndex = qMin(currentRow, m_curves.size() - 1);
|
||||||
|
ui->curvesListWidget->setCurrentRow(newIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onCurveSelectionChanged() {
|
||||||
|
// Save current curve properties before switching
|
||||||
|
saveCurveProperties();
|
||||||
|
|
||||||
|
int currentRow = ui->curvesListWidget->currentRow();
|
||||||
|
m_currentCurveIndex = currentRow;
|
||||||
|
|
||||||
|
if (currentRow >= 0 && currentRow < m_curves.size()) {
|
||||||
|
ui->curvePropertiesGroupBox->setEnabled(true);
|
||||||
|
ui->removeCurveBtn->setEnabled(true);
|
||||||
|
updateCurveProperties();
|
||||||
|
} else {
|
||||||
|
ui->curvePropertiesGroupBox->setEnabled(false);
|
||||||
|
ui->removeCurveBtn->setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onCurveNameChanged() {
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
QString newName = ui->curveNameEdit->text();
|
||||||
|
m_curves[m_currentCurveIndex].name = newName;
|
||||||
|
|
||||||
|
// Update list item text
|
||||||
|
QListWidgetItem* item = ui->curvesListWidget->item(m_currentCurveIndex);
|
||||||
|
if (item) {
|
||||||
|
item->setText(newName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onCurveColorClicked() {
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
QColor currentColor = m_curves[m_currentCurveIndex].color;
|
||||||
|
QColor newColor = QColorDialog::getColor(currentColor, this, tr("Select Curve Color"));
|
||||||
|
|
||||||
|
if (newColor.isValid()) {
|
||||||
|
m_curves[m_currentCurveIndex].color = newColor;
|
||||||
|
|
||||||
|
// Update color preview
|
||||||
|
QString colorStyle = QString("background-color: rgb(%1, %2, %3); border: 1px solid gray;")
|
||||||
|
.arg(newColor.red()).arg(newColor.green()).arg(newColor.blue());
|
||||||
|
ui->colorPreviewLabel->setStyleSheet(colorStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::onCurveDataChanged() {
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
QString dataText = ui->curveDataEdit->text();
|
||||||
|
QStringList dataList = dataText.split(',', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
|
// Trim whitespace from each data item
|
||||||
|
for (QString& data : dataList) {
|
||||||
|
data = data.trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_curves[m_currentCurveIndex].data = dataList;
|
||||||
|
|
||||||
|
// Validate data count
|
||||||
|
QStringList headers = getHeadersList();
|
||||||
|
if (!dataText.isEmpty() && !validateCurveData(dataText, headers.size())) {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data count (%1) doesn't match headers count (%2)")
|
||||||
|
.arg(dataList.size()).arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: red; font-size: 11px;");
|
||||||
|
} else {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data values must match the number of headers (%1)").arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: gray; font-size: 11px;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::updateCurvesList() {
|
||||||
|
ui->curvesListWidget->clear();
|
||||||
|
|
||||||
|
for (const CurveData& curve : m_curves) {
|
||||||
|
ui->curvesListWidget->addItem(curve.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::updateCurveProperties() {
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
const CurveData& curve = m_curves[m_currentCurveIndex];
|
||||||
|
|
||||||
|
// Block signals to prevent recursive updates
|
||||||
|
ui->curveNameEdit->blockSignals(true);
|
||||||
|
ui->curveDataEdit->blockSignals(true);
|
||||||
|
|
||||||
|
ui->curveNameEdit->setText(curve.name);
|
||||||
|
ui->curveDataEdit->setText(curve.data.join(", "));
|
||||||
|
|
||||||
|
// Update color preview
|
||||||
|
QString colorStyle = QString("background-color: rgb(%1, %2, %3); border: 1px solid gray;")
|
||||||
|
.arg(curve.color.red()).arg(curve.color.green()).arg(curve.color.blue());
|
||||||
|
ui->colorPreviewLabel->setStyleSheet(colorStyle);
|
||||||
|
|
||||||
|
ui->curveNameEdit->blockSignals(false);
|
||||||
|
ui->curveDataEdit->blockSignals(false);
|
||||||
|
|
||||||
|
// Update validation
|
||||||
|
QStringList headers = getHeadersList();
|
||||||
|
if (!curve.data.isEmpty() && !validateCurveData(curve.data.join(", "), headers.size())) {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data count (%1) doesn't match headers count (%2)")
|
||||||
|
.arg(curve.data.size()).arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: red; font-size: 11px;");
|
||||||
|
} else {
|
||||||
|
ui->dataValidationLabel->setText(QString("Data values must match the number of headers (%1)").arg(headers.size()));
|
||||||
|
ui->dataValidationLabel->setStyleSheet("color: gray; font-size: 11px;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTableFileDlg::saveCurveProperties() {
|
||||||
|
if (m_currentCurveIndex >= 0 && m_currentCurveIndex < m_curves.size()) {
|
||||||
|
// Properties are already saved in real-time through signal handlers
|
||||||
|
// This method is kept for consistency and future extensions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AddTableFileDlg::validateCurveData(const QString& data, int expectedCount) {
|
||||||
|
if (data.isEmpty()) {
|
||||||
|
return true; // Empty data is allowed
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList dataList = data.split(',', Qt::SkipEmptyParts);
|
||||||
|
return dataList.size() == expectedCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList AddTableFileDlg::getHeadersList() const {
|
||||||
|
QString headersText = ui->headersEdit->text().trimmed();
|
||||||
|
if (headersText.isEmpty()) {
|
||||||
|
return QStringList();
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList headers = headersText.split(',', Qt::SkipEmptyParts);
|
||||||
|
for (QString& header : headers) {
|
||||||
|
header = header.trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
bool AddTableFileDlg::validateSpecificParams() {
|
bool AddTableFileDlg::validateSpecificParams() {
|
||||||
if (ui->filePathEdit->text().isEmpty()) {
|
if (ui->filePathEdit->text().isEmpty()) {
|
||||||
QMessageBox::warning(this, QStringLiteral("Warning"),
|
QMessageBox::warning(this, QStringLiteral("Warning"),
|
||||||
@ -91,6 +289,45 @@ bool AddTableFileDlg::validateSpecificParams() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validate headers
|
||||||
|
QStringList headers = getHeadersList();
|
||||||
|
if (headers.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Please configure table headers."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate curves
|
||||||
|
if (m_curves.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Please add at least one curve."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate each curve's data
|
||||||
|
for (int i = 0; i < m_curves.size(); ++i) {
|
||||||
|
const CurveData& curve = m_curves[i];
|
||||||
|
|
||||||
|
if (curve.name.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Curve %1 name cannot be empty.").arg(i + 1));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curve.data.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Curve '%1' data cannot be empty.").arg(curve.name));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curve.data.size() != headers.size()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Curve '%1' data count (%2) doesn't match headers count (%3).")
|
||||||
|
.arg(curve.name).arg(curve.data.size()).arg(headers.size()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,11 +345,6 @@ QString AddTableFileDlg::getSelectedFilePath() const {
|
|||||||
|
|
||||||
void AddTableFileDlg::accept()
|
void AddTableFileDlg::accept()
|
||||||
{
|
{
|
||||||
// Validate parameters
|
|
||||||
if (!validateSpecificParams()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate table-specific parameters
|
// Validate table-specific parameters
|
||||||
if (ui->tableNameEdit->text().isEmpty()) {
|
if (ui->tableNameEdit->text().isEmpty()) {
|
||||||
QMessageBox::warning(this, tr("Warning"), tr("Please enter a table name."));
|
QMessageBox::warning(this, tr("Warning"), tr("Please enter a table name."));
|
||||||
|
|||||||
@ -1,11 +1,23 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <QColor>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AddTableFileDlg;
|
class AddTableFileDlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "BaseAddFileDlg.h"
|
#include "BaseAddFileDlg.h"
|
||||||
|
|
||||||
|
struct CurveData {
|
||||||
|
QString name;
|
||||||
|
QColor color;
|
||||||
|
QStringList data;
|
||||||
|
|
||||||
|
CurveData() : color(Qt::blue) {}
|
||||||
|
CurveData(const QString& n, const QColor& c, const QStringList& d)
|
||||||
|
: name(n), color(c), data(d) {}
|
||||||
|
};
|
||||||
|
|
||||||
class AddTableFileDlg : public BaseAddFileDlg {
|
class AddTableFileDlg : public BaseAddFileDlg {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -29,10 +41,18 @@ protected:
|
|||||||
bool validateSpecificParams() override;
|
bool validateSpecificParams() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onSelectFileClicked();
|
|
||||||
void onFilePathChanged(const QString& filePath);
|
void onFilePathChanged(const QString& filePath);
|
||||||
void onDelimiterChanged();
|
void onDelimiterChanged();
|
||||||
void onHeaderToggled(bool hasHeader);
|
void onHeaderToggled(bool hasHeader);
|
||||||
|
void onHeadersChanged();
|
||||||
|
|
||||||
|
// Curve management slots
|
||||||
|
void onAddCurveClicked();
|
||||||
|
void onRemoveCurveClicked();
|
||||||
|
void onCurveSelectionChanged();
|
||||||
|
void onCurveNameChanged();
|
||||||
|
void onCurveColorClicked();
|
||||||
|
void onCurveDataChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void accept() override;
|
void accept() override;
|
||||||
@ -40,6 +60,13 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
void setupConnections();
|
void setupConnections();
|
||||||
void updateFileInfo(const QString& filePath);
|
void updateFileInfo(const QString& filePath);
|
||||||
|
void updateCurvesList();
|
||||||
|
void updateCurveProperties();
|
||||||
|
void saveCurveProperties();
|
||||||
|
bool validateCurveData(const QString& data, int expectedCount);
|
||||||
|
QStringList getHeadersList() const;
|
||||||
|
|
||||||
Ui::AddTableFileDlg* ui;
|
Ui::AddTableFileDlg* ui;
|
||||||
|
QList<CurveData> m_curves;
|
||||||
|
int m_currentCurveIndex;
|
||||||
};
|
};
|
||||||
@ -7,272 +7,411 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>676</width>
|
<width>676</width>
|
||||||
<height>683</height>
|
<height>600</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Add Table Data File</string>
|
<string>Add Table Data File</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="mainVerticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="fileGroupBox">
|
<widget class="QSplitter" name="mainSplitter">
|
||||||
<property name="title">
|
<property name="orientation">
|
||||||
<string>File Selection</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="fileGridLayout">
|
<widget class="QWidget" name="leftWidget">
|
||||||
<item row="0" column="0">
|
<layout class="QVBoxLayout" name="leftVerticalLayout">
|
||||||
<widget class="QLabel" name="filePathLabel">
|
<item>
|
||||||
<property name="text">
|
<widget class="QGroupBox" name="fileGroupBox">
|
||||||
<string>File Path:</string>
|
<property name="title">
|
||||||
</property>
|
<string>File Selection</string>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="filePathEdit">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Select table data file...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QToolButton" name="selectFileBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="fileNameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>File Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QLabel" name="fileNameValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>-</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="fileSizeLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>File Size:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="2">
|
|
||||||
<widget class="QLabel" name="fileSizeValue">
|
|
||||||
<property name="text">
|
|
||||||
<string>-</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="basicInfoGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Basic Information</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="basicInfoGridLayout">
|
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QDoubleSpinBox" name="timeParamSpinBox">
|
|
||||||
<property name="decimals">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>0.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>999999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>1.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="2">
|
|
||||||
<widget class="QLineEdit" name="tableNameEdit">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Enter table name...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="tableNameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Table Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="timeParamLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Time Parameter:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="headersGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Table Headers Configuration</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="headersVerticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="hasHeaderCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>File has header row</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="headersLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Headers (comma-separated):</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="headersEdit">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>e.g., Time, Value1, Value2, Value3...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="headersHintLabel">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: gray; font-size: 11px;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Tip: Headers will be auto-detected if file has header row</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="paramsGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Parsing Parameters</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="paramsGridLayout">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="skipRowsLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Skip Rows:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="autoDetectCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto-detect parameters</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="encodingLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Encoding:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="encodingComboBox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>UTF-8</string>
|
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<layout class="QGridLayout" name="fileGridLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<property name="text">
|
<widget class="QLabel" name="filePathLabel">
|
||||||
<string>GBK</string>
|
<property name="text">
|
||||||
|
<string>File Path:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="filePathEdit">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Select table data file...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="selectFileBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="fileNameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>File Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QLabel" name="fileNameValue">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="fileSizeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>File Size:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="2">
|
||||||
|
<widget class="QLabel" name="fileSizeValue">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="basicInfoGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Basic Information</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<layout class="QGridLayout" name="basicInfoGridLayout">
|
||||||
<item>
|
<item row="1" column="1" colspan="2">
|
||||||
<property name="text">
|
<widget class="QDoubleSpinBox" name="timeParamSpinBox">
|
||||||
<string>ASCII</string>
|
<property name="decimals">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="tableNameEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Enter table name...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="tableNameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Table Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="timeParamLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Time Parameter:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="headersGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Table Headers Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<layout class="QVBoxLayout" name="headersVerticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<widget class="QCheckBox" name="hasHeaderCheckBox">
|
||||||
<string>ISO-8859-1</string>
|
<property name="text">
|
||||||
|
<string>File has header row</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="headersLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Headers (comma-separated):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="headersEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>e.g., Time, Value1, Value2, Value3...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="headersHintLabel">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: gray; font-size: 11px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tip: Headers will be auto-detected if file has header row</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="paramsGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Parsing Parameters</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<layout class="QGridLayout" name="paramsGridLayout">
|
||||||
</widget>
|
<item row="1" column="0">
|
||||||
</item>
|
<widget class="QLabel" name="skipRowsLabel">
|
||||||
<item row="1" column="1">
|
<property name="text">
|
||||||
<widget class="QSpinBox" name="skipRowsSpinBox">
|
<string>Skip Rows:</string>
|
||||||
<property name="minimum">
|
</property>
|
||||||
<number>0</number>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="maximum">
|
<item row="2" column="0" colspan="2">
|
||||||
<number>1000</number>
|
<widget class="QCheckBox" name="autoDetectCheckBox">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="value">
|
<string>Auto-detect parameters</string>
|
||||||
<number>0</number>
|
</property>
|
||||||
</property>
|
<property name="checked">
|
||||||
</widget>
|
<bool>true</bool>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="0" column="0">
|
||||||
<item>
|
<widget class="QLabel" name="encodingLabel">
|
||||||
<widget class="QGroupBox" name="previewGroupBox">
|
<property name="text">
|
||||||
<property name="title">
|
<string>Encoding:</string>
|
||||||
<string>Preview</string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<layout class="QVBoxLayout" name="previewVerticalLayout">
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<widget class="QTableWidget" name="previewTable">
|
<widget class="QComboBox" name="encodingComboBox">
|
||||||
<property name="maximumSize">
|
<item>
|
||||||
<size>
|
<property name="text">
|
||||||
<width>16777215</width>
|
<string>UTF-8</string>
|
||||||
<height>120</height>
|
</property>
|
||||||
</size>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<property name="alternatingRowColors">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>GBK</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="selectionMode">
|
</item>
|
||||||
<enum>QAbstractItemView::NoSelection</enum>
|
<item>
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="rowCount">
|
<string>ASCII</string>
|
||||||
<number>5</number>
|
</property>
|
||||||
</property>
|
</item>
|
||||||
<property name="columnCount">
|
<item>
|
||||||
<number>5</number>
|
<property name="text">
|
||||||
</property>
|
<string>ISO-8859-1</string>
|
||||||
<row/>
|
</property>
|
||||||
<row/>
|
</item>
|
||||||
<row/>
|
</widget>
|
||||||
<row/>
|
</item>
|
||||||
<row/>
|
<item row="1" column="1">
|
||||||
<column/>
|
<widget class="QSpinBox" name="skipRowsSpinBox">
|
||||||
<column/>
|
<property name="minimum">
|
||||||
<column/>
|
<number>0</number>
|
||||||
<column/>
|
</property>
|
||||||
<column/>
|
<property name="maximum">
|
||||||
</widget>
|
<number>1000</number>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="rightWidget">
|
||||||
|
<layout class="QVBoxLayout" name="rightVerticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="curvesGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Curves Configuration</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="curvesVerticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="curveButtonsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="addCurveBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add Curve</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="removeCurveBtn">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove Curve</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="curveButtonsSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="curvesListWidget">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>150</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="curvePropertiesGroupBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Curve Properties</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="curvePropertiesGridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="curveNameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="curveNameEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Enter curve name...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="curveColorLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Color:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="colorLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="colorBtn">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="colorPreviewLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(0, 0, 255); border: 1px solid gray;</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="colorSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="curveDataLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Data:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="curveDataEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Enter data values (comma-separated)...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="dataValidationLabel">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: gray; font-size: 11px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Data values must match the number of headers</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@ -38,7 +38,7 @@ void BaseAddFileDlg::OnSelectFile() {
|
|||||||
QString filePath = QFileDialog::getOpenFileName(
|
QString filePath = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
getDialogTitle(),
|
getDialogTitle(),
|
||||||
QString(),
|
workspacePath,
|
||||||
getFileFilter()
|
getFileFilter()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -467,6 +467,109 @@ bool FileEntryCurve::SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocumen
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FileEntryLight SaveFiles implementation
|
||||||
|
bool FileEntryLight::SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) {
|
||||||
|
if (!scene || !doc) {
|
||||||
|
LOG_ERROR("Invalid XML parameters");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建 <chart> 元素
|
||||||
|
tinyxml2::XMLElement* chartElement = doc->NewElement("chart");
|
||||||
|
scene->InsertEndChild(chartElement);
|
||||||
|
|
||||||
|
// 设置chart属性
|
||||||
|
chartElement->SetAttribute("name", name_.toUtf8().constData());
|
||||||
|
chartElement->SetAttribute("path", fileName_.toUtf8().constData());
|
||||||
|
|
||||||
|
// 保存颜色属性
|
||||||
|
chartElement->SetAttribute("openColor", QColorToString(colorProperties_.openColor).toUtf8().constData());
|
||||||
|
chartElement->SetAttribute("closeColor", QColorToString(colorProperties_.closeColor).toUtf8().constData());
|
||||||
|
|
||||||
|
// 为每个LightRowProperty创建<light>元素
|
||||||
|
for (const auto& lightRow : lightProperties_) {
|
||||||
|
tinyxml2::XMLElement* lightElement = doc->NewElement("curve");
|
||||||
|
chartElement->InsertEndChild(lightElement);
|
||||||
|
|
||||||
|
// 保存name列表(以逗号分隔)
|
||||||
|
QString nameStr = lightRow.name.join(",");
|
||||||
|
lightElement->SetAttribute("name", nameStr.toUtf8().constData());
|
||||||
|
|
||||||
|
// 保存data列表(以逗号分隔)
|
||||||
|
QStringList dataStrList;
|
||||||
|
for (int value : lightRow.data) {
|
||||||
|
dataStrList.append(QString::number(value));
|
||||||
|
}
|
||||||
|
QString dataStr = dataStrList.join(",");
|
||||||
|
lightElement->SetAttribute("data", dataStr.toUtf8().constData());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FileEntryLight ParseFiles implementation
|
||||||
|
bool FileEntryLight::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
||||||
|
if (!chartElement) {
|
||||||
|
LOG_ERROR("Invalid XML element");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析chart属性
|
||||||
|
const char* nameAttr = chartElement->Attribute("name");
|
||||||
|
const char* pathAttr = chartElement->Attribute("path");
|
||||||
|
if (nameAttr) name_ = QString::fromUtf8(nameAttr);
|
||||||
|
if (pathAttr) {
|
||||||
|
QString fullPath = QString::fromUtf8(pathAttr);
|
||||||
|
QFileInfo fileInfo(fullPath);
|
||||||
|
fileName_ = fileInfo.fileName();
|
||||||
|
path_ = fileInfo.absolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析颜色属性
|
||||||
|
const char* openColorAttr = chartElement->Attribute("openColor");
|
||||||
|
const char* closeColorAttr = chartElement->Attribute("closeColor");
|
||||||
|
if (openColorAttr) {
|
||||||
|
colorProperties_.openColor = StringToQColor(QString::fromUtf8(openColorAttr));
|
||||||
|
}
|
||||||
|
if (closeColorAttr) {
|
||||||
|
colorProperties_.closeColor = StringToQColor(QString::fromUtf8(closeColorAttr));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析所有<light>元素
|
||||||
|
lightProperties_.clear();
|
||||||
|
for (const tinyxml2::XMLElement* lightElement = chartElement->FirstChildElement("curve");
|
||||||
|
lightElement != nullptr;
|
||||||
|
lightElement = lightElement->NextSiblingElement("curve")) {
|
||||||
|
|
||||||
|
LightRowProperty lightRow;
|
||||||
|
|
||||||
|
// 解析name属性(逗号分隔的字符串列表)
|
||||||
|
const char* nameAttr = lightElement->Attribute("name");
|
||||||
|
if (nameAttr) {
|
||||||
|
QString nameStr = QString::fromUtf8(nameAttr);
|
||||||
|
lightRow.name = nameStr.split(",", Qt::SkipEmptyParts);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析data属性(逗号分隔的整数列表)
|
||||||
|
const char* dataAttr = lightElement->Attribute("data");
|
||||||
|
if (dataAttr) {
|
||||||
|
QString dataStr = QString::fromUtf8(dataAttr);
|
||||||
|
QStringList dataStrList = dataStr.split(",", Qt::SkipEmptyParts);
|
||||||
|
for (const QString& str : dataStrList) {
|
||||||
|
bool ok;
|
||||||
|
int value = str.trimmed().toInt(&ok);
|
||||||
|
if (ok) {
|
||||||
|
lightRow.data.append(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lightProperties_.append(lightRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// FileEntryCurve ParseFiles implementation
|
// FileEntryCurve ParseFiles implementation
|
||||||
bool FileEntryCurve::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
bool FileEntryCurve::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
||||||
if (!chartElement) {
|
if (!chartElement) {
|
||||||
@ -546,53 +649,3 @@ bool FileEntryCurve::ParseFiles(const tinyxml2::XMLElement* chartElement) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileEntryLight::SaveFiles(tinyxml2::XMLElement * scene, tinyxml2::XMLDocument * doc)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileEntryLight::ParseFiles(const tinyxml2::XMLElement * element)
|
|
||||||
{
|
|
||||||
if (!element) {
|
|
||||||
LOG_ERROR("Invalid XML element");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析chart属性
|
|
||||||
const char* nameAttr = element->Attribute("name");
|
|
||||||
const char* pathAttr = element->Attribute("path");
|
|
||||||
if (nameAttr) name_ = QString::fromUtf8(nameAttr);
|
|
||||||
if (pathAttr) {
|
|
||||||
QString fullPath = QString::fromUtf8(pathAttr);
|
|
||||||
QFileInfo fileInfo(fullPath);
|
|
||||||
fileName_ = fileInfo.fileName();
|
|
||||||
path_ = fileInfo.absolutePath();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* openColorAttr = element->Attribute("openColor");
|
|
||||||
if (openColorAttr) colorProperties_.openColor = StringToQColor(QString::fromUtf8(openColorAttr));
|
|
||||||
|
|
||||||
const char* closeColorAttr = element->Attribute("closeColor");
|
|
||||||
if (closeColorAttr) colorProperties_.closeColor = StringToQColor(QString::fromUtf8(closeColorAttr));
|
|
||||||
|
|
||||||
colorProperties_.timeParam = element->DoubleAttribute("t", 0.0);
|
|
||||||
|
|
||||||
// 解析所有<curve>元素
|
|
||||||
lightProperties_.clear();
|
|
||||||
for (const tinyxml2::XMLElement* curveElement = element->FirstChildElement("curve");
|
|
||||||
curveElement != nullptr;
|
|
||||||
curveElement = curveElement->NextSiblingElement("curve")) {
|
|
||||||
|
|
||||||
LightProperty light;
|
|
||||||
|
|
||||||
const char* curveNameAttr = curveElement->Attribute("name");
|
|
||||||
const char* dataAttr = curveElement->Attribute("data");
|
|
||||||
//if (curveNameAttr) light.names = QString::fromUtf8(curveNameAttr);
|
|
||||||
//if (dataAttr) light.datas = QString::fromUtf8(dataAttr);
|
|
||||||
|
|
||||||
lightProperties_.append(light);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -268,13 +268,12 @@ public:
|
|||||||
double timeParam;
|
double timeParam;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LightProperty {
|
struct LightRowProperty {
|
||||||
QString name;
|
QStringList name;
|
||||||
int indexRow;
|
QList<int> data;
|
||||||
int indexColumn;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using LightProperties = QList<LightProperty>;
|
using LightRowProperties = QList<LightRowProperty>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileEntryLight() { type_ = FileEntryType::Light; }
|
FileEntryLight() { type_ = FileEntryType::Light; }
|
||||||
@ -282,18 +281,17 @@ public:
|
|||||||
void SetColorProperties(const ColorProperties& props) { colorProperties_ = props; }
|
void SetColorProperties(const ColorProperties& props) { colorProperties_ = props; }
|
||||||
const ColorProperties& GetColorProperties() const { return colorProperties_; }
|
const ColorProperties& GetColorProperties() const { return colorProperties_; }
|
||||||
|
|
||||||
void AddLightProperty(const LightProperty& prop) { lightProperties_.append(prop); }
|
void AddLightProperty(const LightRowProperty& prop) { lightProperties_.append(prop); }
|
||||||
void RemoveLightProperty(int index) { lightProperties_.removeAt(index); }
|
void RemoveLightProperty(int index) { lightProperties_.removeAt(index); }
|
||||||
const LightProperties& GetLightProperties() const { return lightProperties_; }
|
const LightRowProperties& GetLightProperties() const { return lightProperties_; }
|
||||||
|
|
||||||
FileEntryLight* AsLight() override { return this; }
|
FileEntryLight* AsLight() override { return this; }
|
||||||
|
|
||||||
// XML处理方法
|
|
||||||
bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) override;
|
bool SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocument* doc) override;
|
||||||
bool ParseFiles(const tinyxml2::XMLElement* element) override;
|
bool ParseFiles(const tinyxml2::XMLElement* element) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ColorProperties colorProperties_;
|
ColorProperties colorProperties_;
|
||||||
LightProperties lightProperties_;
|
LightRowProperties lightProperties_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -165,8 +165,7 @@ WorkSpace::FileEntryResult WorkSpace::SetFileEntry(std::shared_ptr<FileEntry> fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update file entry with workspace-relative path
|
// Update file entry with workspace-relative path
|
||||||
fileName = fileInfo.fileName();
|
fileEntry->SetPath(targetPath);
|
||||||
fileEntry->SetFileNanme(fileInfo.fileName());
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QString filePath = QString("%1/%2").arg(GetDir(), fileEntry->GetFileName());
|
QString filePath = QString("%1/%2").arg(GetDir(), fileEntry->GetFileName());
|
||||||
@ -178,7 +177,7 @@ WorkSpace::FileEntryResult WorkSpace::SetFileEntry(std::shared_ptr<FileEntry> fi
|
|||||||
vec.push_back(fileEntry);
|
vec.push_back(fileEntry);
|
||||||
++filesSeq_;
|
++filesSeq_;
|
||||||
|
|
||||||
emit FilesChanged(type);
|
emit FilesChanged(type, fileEntry);
|
||||||
LOG_INFO("Successfully added file entry: {} (type: {})",
|
LOG_INFO("Successfully added file entry: {} (type: {})",
|
||||||
fileName.toUtf8().constData(),
|
fileName.toUtf8().constData(),
|
||||||
FileEntryTypeToString(type));
|
FileEntryTypeToString(type));
|
||||||
@ -231,7 +230,7 @@ bool WorkSpace::SetFileEntryCount(FileEntryType type, int count) {
|
|||||||
vec.resize(count);
|
vec.resize(count);
|
||||||
}
|
}
|
||||||
++filesSeq_;
|
++filesSeq_;
|
||||||
emit FilesChanged(type);
|
emit FilesChanged(type, nullptr); // No specific fileEntry for batch operations
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ Q_SIGNALS:
|
|||||||
void EntityRemoved(class Entity* entity);
|
void EntityRemoved(class Entity* entity);
|
||||||
void TimestepChanged(class Timestep* timestep);
|
void TimestepChanged(class Timestep* timestep);
|
||||||
void LampStatusChanged(class LampStatus* lampStatus);
|
void LampStatusChanged(class LampStatus* lampStatus);
|
||||||
void FilesChanged(FileEntryType type);
|
void FilesChanged(FileEntryType type, std::shared_ptr<FileEntry> fileEntry);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const QString& GetSimMatlabName() const {
|
const QString& GetSimMatlabName() const {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user