merge code
This commit is contained in:
commit
06a91d4cf1
@ -176,37 +176,37 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="619"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="625"/>
|
||||||
<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="650"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="656"/>
|
||||||
<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="682"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="688"/>
|
||||||
<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="714"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="720"/>
|
||||||
<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="746"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="752"/>
|
||||||
<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="799"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="805"/>
|
||||||
<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="815"/>
|
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="821"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -393,6 +393,367 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>AddImageDlg</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="14"/>
|
||||||
|
<source>Add Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="20"/>
|
||||||
|
<source>File Selection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="32"/>
|
||||||
|
<source>File Path:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="48"/>
|
||||||
|
<source>Select curve data file...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="61"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="74"/>
|
||||||
|
<source>File Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="87"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="113"/>
|
||||||
|
<source>-</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="100"/>
|
||||||
|
<source>File Size:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="123"/>
|
||||||
|
<source>Angular Axis</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="135"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="292"/>
|
||||||
|
<source>Title:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="148"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="305"/>
|
||||||
|
<source>Enter axis title...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="161"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="318"/>
|
||||||
|
<source>Min:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="193"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="350"/>
|
||||||
|
<source>Max:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="225"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="382"/>
|
||||||
|
<source>Count:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="257"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="414"/>
|
||||||
|
<source>Unit:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="270"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="427"/>
|
||||||
|
<source>Enter axis Unit...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="280"/>
|
||||||
|
<source>Radial Axis</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="437"/>
|
||||||
|
<source>Curve Management</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="445"/>
|
||||||
|
<source>Curves:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="477"/>
|
||||||
|
<source>Add</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="496"/>
|
||||||
|
<source>Remove</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="521"/>
|
||||||
|
<source>Selected Curve Properties</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="533"/>
|
||||||
|
<source>Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="546"/>
|
||||||
|
<source>Enter curve name...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="559"/>
|
||||||
|
<source>Color:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="580"/>
|
||||||
|
<source>Select Color</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="593"/>
|
||||||
|
<source>background-color: rgb(255, 0, 0); border: 1px solid black;</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="624"/>
|
||||||
|
<source>Angular:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="656"/>
|
||||||
|
<source>Radial:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="685"/>
|
||||||
|
<source>X Value:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="711"/>
|
||||||
|
<source>Y Value:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="761"/>
|
||||||
|
<source>Add File</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="777"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="786"/>
|
||||||
|
<source>Chart Properties</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="808"/>
|
||||||
|
<source>Time:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="821"/>
|
||||||
|
<source>Chart Name:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="834"/>
|
||||||
|
<source>Chart 1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageDlg.ui" line="837"/>
|
||||||
|
<source>Enter chart name...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>AddImageFileDlg</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="35"/>
|
||||||
|
<source>Data Files (*.txt *.csv *.dat);;All Files (*.*)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="40"/>
|
||||||
|
<source>Add Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="49"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="57"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="64"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="71"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="78"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="96"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="103"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="112"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="120"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="127"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="136"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="142"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="154"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="160"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="169"/>
|
||||||
|
<source>Validation Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="49"/>
|
||||||
|
<source>Please select a data file.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="57"/>
|
||||||
|
<source>Selected file does not exist.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="64"/>
|
||||||
|
<source>Selected file is not readable. Please check file permissions.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="71"/>
|
||||||
|
<source>File is too large (over 100MB). Please select a smaller file.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="78"/>
|
||||||
|
<source>At least one curve must be defined.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="97"/>
|
||||||
|
<source>Curve %1 name cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="104"/>
|
||||||
|
<source>Curve name '%1' is duplicated. Please use different names.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="113"/>
|
||||||
|
<source>Curve name '%1' is too long. Please limit to 50 characters.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="121"/>
|
||||||
|
<source>Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="128"/>
|
||||||
|
<source>Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="136"/>
|
||||||
|
<source>Chart name cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="142"/>
|
||||||
|
<source>Chart name is too long. Please limit to 100 characters.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="154"/>
|
||||||
|
<source>Angular axis minimum value must be less than maximum value.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="160"/>
|
||||||
|
<source>Radial axis minimum value must be less than maximum value.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="169"/>
|
||||||
|
<source>Time parameter cannot be negative.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="451"/>
|
||||||
|
<source>Curve %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="501"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="533"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="559"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="567"/>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="501"/>
|
||||||
|
<source>Failed to create file entry</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="533"/>
|
||||||
|
<source>Unable to get current workspace</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="544"/>
|
||||||
|
<source>Polar file count has reached the limit (9 files)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="547"/>
|
||||||
|
<source>File already exists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="550"/>
|
||||||
|
<source>File copy failed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="553"/>
|
||||||
|
<source>Invalid file</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="556"/>
|
||||||
|
<source>Failed to add file</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddImageFileDlg.cpp" line="567"/>
|
||||||
|
<source>Failed to create Polar file entry.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AddLightFileDlg</name>
|
<name>AddLightFileDlg</name>
|
||||||
<message>
|
<message>
|
||||||
@ -893,6 +1254,166 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>AddPolarFileDlg</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="33"/>
|
||||||
|
<source>Data Files (*.txt *.csv *.dat);;All Files (*.*)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="38"/>
|
||||||
|
<source>Add Polar</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="47"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="55"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="62"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="69"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="76"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="94"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="101"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="110"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="118"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="125"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="134"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="140"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="152"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="158"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="167"/>
|
||||||
|
<source>Validation Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="47"/>
|
||||||
|
<source>Please select a data file.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="55"/>
|
||||||
|
<source>Selected file does not exist.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="62"/>
|
||||||
|
<source>Selected file is not readable. Please check file permissions.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="69"/>
|
||||||
|
<source>File is too large (over 100MB). Please select a smaller file.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="76"/>
|
||||||
|
<source>At least one curve must be defined.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="95"/>
|
||||||
|
<source>Curve %1 name cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="102"/>
|
||||||
|
<source>Curve name '%1' is duplicated. Please use different names.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="111"/>
|
||||||
|
<source>Curve name '%1' is too long. Please limit to 50 characters.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="119"/>
|
||||||
|
<source>Curve '%1' X value is out of range. Please ensure it is between -1000000 and 1000000.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="126"/>
|
||||||
|
<source>Curve '%1' Y value is out of range. Please ensure it is between -1000000 and 1000000.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="134"/>
|
||||||
|
<source>Chart name cannot be empty.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="140"/>
|
||||||
|
<source>Chart name is too long. Please limit to 100 characters.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="152"/>
|
||||||
|
<source>Angular axis minimum value must be less than maximum value.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="158"/>
|
||||||
|
<source>Radial axis minimum value must be less than maximum value.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="167"/>
|
||||||
|
<source>Time parameter cannot be negative.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="449"/>
|
||||||
|
<source>Curve %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="499"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="531"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="557"/>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="565"/>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="499"/>
|
||||||
|
<source>Failed to create file entry</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="531"/>
|
||||||
|
<source>Unable to get current workspace</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="542"/>
|
||||||
|
<source>Polar file count has reached the limit (9 files)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="545"/>
|
||||||
|
<source>File already exists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="548"/>
|
||||||
|
<source>File copy failed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="551"/>
|
||||||
|
<source>Invalid file</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="554"/>
|
||||||
|
<source>Failed to add file</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="565"/>
|
||||||
|
<source>Failed to create Polar file entry.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AddSurfaceFileDlg</name>
|
<name>AddSurfaceFileDlg</name>
|
||||||
<message>
|
<message>
|
||||||
@ -1879,22 +2400,22 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/MainWindow.cpp" line="61"/>
|
<location filename="../ui/MainWindow.cpp" line="65"/>
|
||||||
<source>model elements</source>
|
<source>model elements</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/MainWindow.cpp" line="70"/>
|
<location filename="../ui/MainWindow.cpp" line="74"/>
|
||||||
<source>preset models</source>
|
<source>preset models</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/MainWindow.cpp" line="78"/>
|
<location filename="../ui/MainWindow.cpp" line="82"/>
|
||||||
<source>attribte</source>
|
<source>attribte</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/MainWindow.cpp" line="93"/>
|
<location filename="../ui/MainWindow.cpp" line="97"/>
|
||||||
<source>Main View</source>
|
<source>Main View</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2174,6 +2695,7 @@
|
|||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="188"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="188"/>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="236"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="236"/>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="285"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="285"/>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="301"/>
|
||||||
<source>prompt</source>
|
<source>prompt</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2184,6 +2706,7 @@
|
|||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="188"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="188"/>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="236"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="236"/>
|
||||||
<location filename="../ui/Menu/FileManagerMenu.cpp" line="285"/>
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="285"/>
|
||||||
|
<location filename="../ui/Menu/FileManagerMenu.cpp" line="301"/>
|
||||||
<source>please create workspace first</source>
|
<source>please create workspace first</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@ -17,16 +17,6 @@ DockWidgetTitleBar::~DockWidgetTitleBar() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//QSize DockWidgetTitleBar::minimumSizeHint() const {
|
|
||||||
// QDockWidget* dw = qobject_cast<QDockWidget*>(parentWidget());
|
|
||||||
// Q_ASSERT(dw);
|
|
||||||
// QSize result(0, 90);
|
|
||||||
// if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar)
|
|
||||||
// result.transpose();
|
|
||||||
// return result;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
DockWidget::DockWidget(const QString& title, QWidget* parent)
|
DockWidget::DockWidget(const QString& title, QWidget* parent)
|
||||||
: QDockWidget(title, parent) {
|
: QDockWidget(title, parent) {
|
||||||
setFeatures(DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable);
|
setFeatures(DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable);
|
||||||
@ -42,6 +32,10 @@ DockWidget::DockWidget(const QString& title, QWidget* parent)
|
|||||||
DockWidget::DockWidget(QWidget* parent)
|
DockWidget::DockWidget(QWidget* parent)
|
||||||
: QDockWidget(parent) {
|
: QDockWidget(parent) {
|
||||||
setFeatures(DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable);
|
setFeatures(DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable);
|
||||||
|
SystemManagerMenu* windowManagerMenu = MainFrame::Get().GetMenuManager<SystemManagerMenu>("system_manager");
|
||||||
|
if (nullptr != windowManagerMenu) {
|
||||||
|
windowManagerMenu->AddDockWidget(this);
|
||||||
|
}
|
||||||
m_bMax = false;
|
m_bMax = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,9 @@ MainWindow::MainWindow(QWidget* parent)
|
|||||||
, ui(new Ui::MainWindow) {
|
, ui(new Ui::MainWindow) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
LOG_INFO("MainWindow::MainWindow - Constructor called, about to call InitUI");
|
||||||
InitUI();
|
InitUI();
|
||||||
|
LOG_INFO("MainWindow::MainWindow - Constructor completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow() {
|
MainWindow::~MainWindow() {
|
||||||
@ -48,6 +50,8 @@ MainWindow::~MainWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::InitUI() {
|
void MainWindow::InitUI() {
|
||||||
|
LOG_INFO("MainWindow::InitUI - Function started");
|
||||||
|
|
||||||
QWidget* centralWidget = takeCentralWidget();
|
QWidget* centralWidget = takeCentralWidget();
|
||||||
if (nullptr != centralWidget) {
|
if (nullptr != centralWidget) {
|
||||||
delete centralWidget;
|
delete centralWidget;
|
||||||
@ -63,7 +67,7 @@ void MainWindow::InitUI() {
|
|||||||
model->setObjectName("Dock.ModelBrowser");
|
model->setObjectName("Dock.ModelBrowser");
|
||||||
modelBrowser_ = new ModelBrowser(0);
|
modelBrowser_ = new ModelBrowser(0);
|
||||||
modelBrowser_->AttachDock(model);
|
modelBrowser_->AttachDock(model);
|
||||||
m_mapDockWidget.insert("ModelBrowser", model);
|
mapDockWidget_.insert("ModelBrowser", model);
|
||||||
addDockWidget(Qt::LeftDockWidgetArea, model);
|
addDockWidget(Qt::LeftDockWidgetArea, model);
|
||||||
|
|
||||||
// 创建预制模型面板
|
// 创建预制模型面板
|
||||||
@ -73,7 +77,7 @@ void MainWindow::InitUI() {
|
|||||||
presetModelPanel_ = new PresetModelPanel(0);
|
presetModelPanel_ = new PresetModelPanel(0);
|
||||||
presetModelPanel_->AttachDock(presetModel);
|
presetModelPanel_->AttachDock(presetModel);
|
||||||
addDockWidget(Qt::LeftDockWidgetArea, presetModel);
|
addDockWidget(Qt::LeftDockWidgetArea, presetModel);
|
||||||
m_mapDockWidget.insert("PresetModelPanel", presetModel);
|
mapDockWidget_.insert("PresetModelPanel", presetModel);
|
||||||
|
|
||||||
DockWidget* attribte = new DockWidget(tr("attribte"), 0);
|
DockWidget* attribte = new DockWidget(tr("attribte"), 0);
|
||||||
attribte->SetDockWidgetTitleBar(new DockTitleBar(attribte));
|
attribte->SetDockWidgetTitleBar(new DockTitleBar(attribte));
|
||||||
@ -81,7 +85,7 @@ void MainWindow::InitUI() {
|
|||||||
//addDockWidget(pSettingUI->GetArea("PropertyBrowser"), attribte);
|
//addDockWidget(pSettingUI->GetArea("PropertyBrowser"), attribte);
|
||||||
propertyBrowser_ = new PropertyBrowser(0);
|
propertyBrowser_ = new PropertyBrowser(0);
|
||||||
propertyBrowser_->AttachDock(attribte);
|
propertyBrowser_->AttachDock(attribte);
|
||||||
m_mapDockWidget.insert("PropertyBrowser", attribte);
|
mapDockWidget_.insert("PropertyBrowser", attribte);
|
||||||
addDockWidget(Qt::RightDockWidgetArea, attribte);
|
addDockWidget(Qt::RightDockWidgetArea, attribte);
|
||||||
|
|
||||||
connect(modelBrowser_, &ModelBrowser::WorkSpaceChange, propertyBrowser_, &PropertyBrowser::OnWorkSpaceChange);
|
connect(modelBrowser_, &ModelBrowser::WorkSpaceChange, propertyBrowser_, &PropertyBrowser::OnWorkSpaceChange);
|
||||||
@ -95,152 +99,27 @@ void MainWindow::InitUI() {
|
|||||||
viewDock->setObjectName("Dock.MainView");
|
viewDock->setObjectName("Dock.MainView");
|
||||||
viewDock->setWidget(qtOsgViewWidget_);
|
viewDock->setWidget(qtOsgViewWidget_);
|
||||||
addDockWidget(Qt::LeftDockWidgetArea, viewDock);
|
addDockWidget(Qt::LeftDockWidgetArea, viewDock);
|
||||||
m_mapDockWidget.insert("MainView", viewDock);
|
mapDockWidget_.insert("MainView", viewDock);
|
||||||
|
|
||||||
splitDockWidget(model, viewDock, Qt::Horizontal);
|
splitDockWidget(model, viewDock, Qt::Horizontal);
|
||||||
|
|
||||||
// 将预制模型面板与模型浏览器标签化
|
// 将预制模型面板与模型浏览器标签化
|
||||||
tabifyDockWidget(model, presetModel);
|
tabifyDockWidget(model, presetModel);
|
||||||
|
|
||||||
//QString wavePath ="", speedPath = "", rdPath = "", matlabParam="";
|
|
||||||
//if (WorkSpaceManager::Get().GetCurrent())
|
|
||||||
//{
|
|
||||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetWavePath().isEmpty())
|
|
||||||
// {
|
|
||||||
// wavePath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetWavePath();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetReportPath().isEmpty())
|
|
||||||
// {
|
|
||||||
// speedPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetReportPath();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetRDPath().isEmpty())
|
|
||||||
// {
|
|
||||||
// rdPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetRDPath();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!WorkSpaceManager::Get().GetCurrent()->GetMatlabParam().isEmpty())
|
|
||||||
// {
|
|
||||||
// matlabParam = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetMatlabParam();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//DockWidget* fitCurveDock = new DockWidget(tr("Wave Curve"), 0);
|
|
||||||
//fitCurveDock->SetDockWidgetTitleBar(new DockTitleBar(fitCurveDock));
|
|
||||||
//fitCurveDock->setObjectName("Dock.WaveCurveDialog");
|
|
||||||
//fitCurveDlg_ = new FitCurveDialog();
|
|
||||||
//fitCurveDlg_->AttachDock(fitCurveDock);
|
|
||||||
//m_mapDockWidget.insert("WaveCurveDialog", fitCurveDock);
|
|
||||||
//addDockWidget(Qt::BottomDockWidgetArea, fitCurveDock);
|
|
||||||
|
|
||||||
//fitCurveDlg_->InitWaveFile(wavePath);
|
|
||||||
//DockWidget* fitLgCurveDock = new DockWidget(tr("Speed Curve"), 0);
|
|
||||||
//fitLgCurveDock->SetDockWidgetTitleBar(new DockTitleBar(fitLgCurveDock));
|
|
||||||
//fitLgCurveDock->setObjectName("Dock.SpeedCurveDialog");
|
|
||||||
|
|
||||||
//fitYLgCurveDlg_ = new FitCurveDialog();
|
|
||||||
//fitYLgCurveDlg_->AttachDock(fitLgCurveDock);
|
|
||||||
//m_mapDockWidget.insert("SpeedCurveDialog", fitLgCurveDock);
|
|
||||||
//addDockWidget(Qt::BottomDockWidgetArea, fitLgCurveDock);
|
|
||||||
//tabifyDockWidget(fitCurveDock, fitLgCurveDock);
|
|
||||||
|
|
||||||
|
|
||||||
//fitYLgCurveDlg_->InitReportFile(speedPath);
|
|
||||||
|
|
||||||
//DockWidget* surfaceCurveDock = new DockWidget(tr("3D Curve"), 0);
|
|
||||||
//surfaceCurveDock->SetDockWidgetTitleBar(new DockTitleBar(surfaceCurveDock));
|
|
||||||
//surfaceCurveDock->setObjectName("Dock.3DCurveDialog");
|
|
||||||
|
|
||||||
//surfaceDlg_ = new SurfaceDialog();
|
|
||||||
//surfaceDlg_->AttachDock(surfaceCurveDock);
|
|
||||||
//m_mapDockWidget.insert("3DCurveDialog", surfaceCurveDock);
|
|
||||||
//addDockWidget(Qt::BottomDockWidgetArea, surfaceCurveDock);
|
|
||||||
//tabifyDockWidget(fitCurveDock, surfaceCurveDock);
|
|
||||||
|
|
||||||
//surfaceDlg_->InitRD(rdPath);
|
|
||||||
|
|
||||||
//{
|
|
||||||
// targetUITable_ = new TargetListWgt;
|
|
||||||
|
|
||||||
// QStringList headerLabels;
|
|
||||||
// headerLabels << tr("Target number") << tr("Signal-to-noise ratio")
|
|
||||||
// << tr("Azimuth line of sight") << tr("Pitch gaze angle")
|
|
||||||
// << tr("azimuth") << tr("Pitch angle")
|
|
||||||
// << tr("attribute") << tr("Doppler")
|
|
||||||
// << tr("course") << tr("Speed")
|
|
||||||
// << tr("longitude") << tr("latitude")
|
|
||||||
// << tr("distance") << tr("velocity")
|
|
||||||
// << tr("Radial dimensions") << tr("Target RCS");
|
|
||||||
|
|
||||||
// targetUITable_->SetHeader(headerLabels);
|
|
||||||
// //const QString reportPath = RecourceHelper::Get().GetBasePath() + "/workspace/Report.txt";
|
|
||||||
// //targetUITable_->InitFile(speedPath, 50);
|
|
||||||
|
|
||||||
// DockWidget* dataTableDock = new DockWidget(tr("Report Table"), 0);
|
|
||||||
// dataTableDock->SetDockWidgetTitleBar(new DockTitleBar(dataTableDock));
|
|
||||||
// dataTableDock->setObjectName("Dock.TargetListWgt_Table");
|
|
||||||
// // addDockWidget(pSettingUI->GetArea("TargetListWgt"), dataTableDock);
|
|
||||||
// targetUITable_->AttachDock(dataTableDock);
|
|
||||||
// m_mapDockWidget.insert("TargetListWgt_Table", dataTableDock);
|
|
||||||
// addDockWidget(Qt::BottomDockWidgetArea, dataTableDock);
|
|
||||||
// tabifyDockWidget(fitCurveDock, dataTableDock);
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
//const QString lampPath = RecourceHelper::Get().GetBasePath() + "/workspace/Lamp.txt";
|
|
||||||
|
|
||||||
//DockWidget* signalIndicatorLampDock = new DockWidget(tr("Signal Indicator Lamp"), 0);
|
|
||||||
//signalIndicatorLampDock->SetDockWidgetTitleBar(new DockTitleBar(signalIndicatorLampDock));
|
|
||||||
//signalIndicatorLampDock->setObjectName("Dock.SignalIndicatorLampUI");
|
|
||||||
//signalIndicatorLampUI_ = new SignalIndicatorLampUI;
|
|
||||||
//signalIndicatorLampUI_->AttachDock(signalIndicatorLampDock);
|
|
||||||
////signalIndicatorLampUI_->InitLamp(lampPath);
|
|
||||||
|
|
||||||
//m_mapDockWidget.insert("SignalIndicatorLampUI", signalIndicatorLampDock);
|
|
||||||
//addDockWidget(Qt::BottomDockWidgetArea, signalIndicatorLampDock);
|
|
||||||
//tabifyDockWidget(fitCurveDock, signalIndicatorLampDock);
|
|
||||||
|
|
||||||
// DockWidget* addParamSettingDock = new DockWidget(tr("ParamSetting"), 0);
|
|
||||||
// addParamSettingDock->SetDockWidgetTitleBar(new DockTitleBar(addParamSettingDock));
|
|
||||||
// addParamSettingDock->setObjectName("Dock.ParamSetting");
|
|
||||||
// addParamDlg_ = new AddParamSetting(matlabParam);
|
|
||||||
// addParamDlg_->AttachDock(addParamSettingDock);
|
|
||||||
// m_mapDockWidget.insert("ParamSetting", addParamSettingDock);
|
|
||||||
// addDockWidget(Qt::BottomDockWidgetArea, addParamSettingDock);
|
|
||||||
// tabifyDockWidget(fitCurveDock, addParamSettingDock);
|
|
||||||
|
|
||||||
//DockWidget* matlabDock = new DockWidget(tr("bat File"), 0);
|
|
||||||
//matlabDock->SetDockWidgetTitleBar(new DockTitleBar(matlabDock));
|
|
||||||
//matlabDock->setObjectName("Dock.Matlab");
|
|
||||||
//matlabFileDlg_ = new CodeEdtUI;
|
|
||||||
//matlabFileDlg_->AttachDock(matlabDock);
|
|
||||||
//m_mapDockWidget.insert("Matlab", matlabDock);
|
|
||||||
// addDockWidget(Qt::BottomDockWidgetArea, matlabDock);
|
|
||||||
// tabifyDockWidget(fitCurveDock, matlabDock);
|
|
||||||
|
|
||||||
//ui->discript->setText(tr("name: 5year 0412"));
|
|
||||||
//ui->status->setText(tr("start: no start"));
|
|
||||||
|
|
||||||
// InitDockLayout();
|
|
||||||
|
|
||||||
dataPanelManager_ = new DataPanelManager(this, this);
|
dataPanelManager_ = new DataPanelManager(this, this);
|
||||||
|
|
||||||
connect(&WorkSpaceManager::Get(), &WorkSpaceManager::WorkSpaceChanged,
|
connect(&WorkSpaceManager::Get(), &WorkSpaceManager::WorkSpaceChanged,
|
||||||
dataPanelManager_, &DataPanelManager::OnWorkspaceChanged);
|
dataPanelManager_, &DataPanelManager::OnWorkspaceChanged);
|
||||||
|
|
||||||
// Restore previous UI layout if available
|
// Restore previous UI layout if available
|
||||||
|
LOG_INFO("MainWindow::InitUI - About to call UiLayoutManager::Restore");
|
||||||
UiLayoutManager::Restore(this, 1);
|
UiLayoutManager::Restore(this, 1);
|
||||||
|
LOG_INFO("MainWindow::InitUI - UiLayoutManager::Restore completed");
|
||||||
//InitChartLayout();
|
|
||||||
|
|
||||||
//ui->viewWidget->layout()->addWidget(qtOsgViewWidget_);
|
//ui->viewWidget->layout()->addWidget(qtOsgViewWidget_);
|
||||||
qtOsgViewWidget_->LoadDefaultScene();
|
qtOsgViewWidget_->LoadDefaultScene();
|
||||||
/*OsgViewer::Get().Initialize();
|
|
||||||
OsgViewer::Get().OnFrame();*/
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// MatlabObject* mtlb = new MatlabObject;
|
|
||||||
MatlabObject::GetInstance()->RunMatlabFile("");
|
MatlabObject::GetInstance()->RunMatlabFile("");
|
||||||
#endif // 1
|
#endif // 1
|
||||||
}
|
}
|
||||||
@ -277,150 +156,4 @@ void MainWindow::slotResetWorkSpace()
|
|||||||
rdPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetRDPath();
|
rdPath = RecourceHelper::Get().GetBasePath() + "/" + WorkSpaceManager::Get().GetCurrent()->GetRDPath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//fitCurveDlg_->InitWaveFile(wavePath);
|
|
||||||
//fitYLgCurveDlg_->InitReportFile(speedPath);
|
|
||||||
//surfaceDlg_->InitRD(rdPath);
|
|
||||||
//targetUITable_->InitFile(speedPath, 50);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::InitChartLayout()
|
|
||||||
{
|
|
||||||
QString strChart = RecourceHelper::Get().GetBasePath() + "/workspace/Chart.xml";
|
|
||||||
m_mgrChart.Load(strChart);
|
|
||||||
|
|
||||||
QVariantList varList = m_mgrChart.GetChartWgt();
|
|
||||||
for (int nI = 0; nI < varList.size(); nI++)
|
|
||||||
{
|
|
||||||
QVariantMap mapWgt = varList.at(nI).toMap();
|
|
||||||
QString strWgt = mapWgt.value("Name").toString();
|
|
||||||
QVariantList listChart = mapWgt.value("Chart").toList();
|
|
||||||
|
|
||||||
QMainWindow* mainWindow_ = new QMainWindow;
|
|
||||||
//connect(mainWindow_, &QMainWindow::tabifiedDockWidgetActivated, this, &MainWindow::OnTabifiedDockWidgetActivated);
|
|
||||||
|
|
||||||
DockWidget* wgtDock = new DockWidget(strWgt, 0);
|
|
||||||
wgtDock->SetDockWidgetTitleBar(new DockTitleBar(wgtDock));
|
|
||||||
wgtDock->setWidget(mainWindow_);
|
|
||||||
addDockWidget(Qt::BottomDockWidgetArea, wgtDock);
|
|
||||||
|
|
||||||
for (int nJ = 0; nJ < listChart.size(); nJ++)
|
|
||||||
{
|
|
||||||
QVariantMap mapChart = listChart.at(nJ).toMap();
|
|
||||||
InitChart(mapChart, mainWindow_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QDockWidget *MainWindow::InitChart(QVariantMap mapChart, QMainWindow* mainWindow)
|
|
||||||
{
|
|
||||||
QString strName = mapChart.value("Name").toString();
|
|
||||||
QString strType = mapChart.value("Type").toString();
|
|
||||||
QString after = mapChart.value("after").toString();
|
|
||||||
QString orientation = mapChart.value("orientation").toString();
|
|
||||||
int nT = mapChart.value("t").toInt();
|
|
||||||
QString strFile = mapChart.value("File").toString();
|
|
||||||
|
|
||||||
DockWidget* pDock = new DockWidget(strName, 0);
|
|
||||||
|
|
||||||
if (strType == "Wave" || strType == "Report")
|
|
||||||
{
|
|
||||||
QString xTitle = mapChart.value("xTitle").toString();
|
|
||||||
QString yTitle = mapChart.value("yTitle").toString();
|
|
||||||
float xMin = mapChart.value("xMin").toFloat();
|
|
||||||
float xMax = mapChart.value("xMax").toFloat();
|
|
||||||
int xCount = mapChart.value("xCount").toInt();
|
|
||||||
float yMin = mapChart.value("yMin").toFloat();
|
|
||||||
float yMax = mapChart.value("yMax").toFloat();
|
|
||||||
int yCount = mapChart.value("yCount").toInt();
|
|
||||||
QVariantList listCurve = mapChart.value("Curve").toList();
|
|
||||||
|
|
||||||
FitCurveDialog *fitCurveDlg = new FitCurveDialog();
|
|
||||||
fitCurveDlg->AttachDock(pDock);
|
|
||||||
fitCurveDlg->updateTitle(strName + "-" + strFile);
|
|
||||||
fitCurveDlg->updateTitleAxis(xTitle, yTitle);
|
|
||||||
fitCurveDlg->updateMinMaxX(xMin, xMax, xCount);
|
|
||||||
fitCurveDlg->updateMinMaxY(yMin, yMax, yCount);
|
|
||||||
|
|
||||||
if (strType == "Wave")
|
|
||||||
{
|
|
||||||
fitCurveDlg->updateParseWaveFile(strFile, nT, listCurve);
|
|
||||||
}
|
|
||||||
else if (strType == "Report")
|
|
||||||
{
|
|
||||||
fitCurveDlg->updateParseReportFile(strFile, nT, listCurve);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strType == "Table")
|
|
||||||
{
|
|
||||||
QString head = mapChart.value("head").toString();
|
|
||||||
QVariantList listCurve = mapChart.value("Curve").toList();
|
|
||||||
|
|
||||||
TargetListWgt *targetUITable = new TargetListWgt;
|
|
||||||
targetUITable->AttachDock(pDock);
|
|
||||||
targetUITable->SetHead(head);
|
|
||||||
targetUITable->updateTitle(strName + "-" + strFile);
|
|
||||||
targetUITable->updateParseFile(strFile, nT, listCurve);
|
|
||||||
}
|
|
||||||
else if (strType == "Lamp")
|
|
||||||
{
|
|
||||||
QString openColor = mapChart.value("openColor").toString();
|
|
||||||
QString closeColor = mapChart.value("closeColor").toString();
|
|
||||||
QVariantList listCurve = mapChart.value("Curve").toList();
|
|
||||||
|
|
||||||
SignalIndicatorLampUI *signalIndicatorLamp = new SignalIndicatorLampUI;
|
|
||||||
signalIndicatorLamp->AttachDock(pDock);
|
|
||||||
signalIndicatorLamp->updateTitle(strName + "-" + strFile);
|
|
||||||
signalIndicatorLamp->updateLampColor(openColor, closeColor);
|
|
||||||
signalIndicatorLamp->updateParseFile(strFile, nT, listCurve);
|
|
||||||
}
|
|
||||||
else if (strType == "Surface")
|
|
||||||
{
|
|
||||||
QString xTitle = mapChart.value("xTitle").toString();
|
|
||||||
QString yTitle = mapChart.value("yTitle").toString();
|
|
||||||
QString zTitle = mapChart.value("zTitle").toString();
|
|
||||||
float xMin = mapChart.value("xMin").toFloat();
|
|
||||||
float xMax = mapChart.value("xMax").toFloat();
|
|
||||||
int xCount = mapChart.value("xCount").toInt();
|
|
||||||
float yMin = mapChart.value("yMin").toFloat();
|
|
||||||
float yMax = mapChart.value("yMax").toFloat();
|
|
||||||
int yCount = mapChart.value("yCount").toInt();
|
|
||||||
float zMin = mapChart.value("zMin").toFloat();
|
|
||||||
float zMax = mapChart.value("zMax").toFloat();
|
|
||||||
int zCount = mapChart.value("zCount").toInt();
|
|
||||||
QVariantList listCurve = mapChart.value("Curve").toList();
|
|
||||||
|
|
||||||
SurfaceDialog *surfaceDlg = new SurfaceDialog();
|
|
||||||
surfaceDlg->AttachDock(pDock);
|
|
||||||
surfaceDlg->updateTitle(strName + "-" + strFile);
|
|
||||||
surfaceDlg->updateTitleAxis(xTitle, yTitle, zTitle);
|
|
||||||
surfaceDlg->updateMinMaxX(xMin, xMax, xCount);
|
|
||||||
surfaceDlg->updateMinMaxY(yMin, yMax, yCount);
|
|
||||||
surfaceDlg->updateMinMaxZ(zMin, zMax, zCount);
|
|
||||||
surfaceDlg->updateParseFile(strFile, nT, listCurve);
|
|
||||||
}
|
|
||||||
|
|
||||||
mainWindow->addDockWidget(Qt::LeftDockWidgetArea, pDock);
|
|
||||||
|
|
||||||
QDockWidget* afterDock = m_mapChartWidget.value(after);
|
|
||||||
if (afterDock)
|
|
||||||
{
|
|
||||||
if (orientation == QString("Horizontal"))
|
|
||||||
{
|
|
||||||
mainWindow->splitDockWidget(afterDock, pDock, Qt::Horizontal);
|
|
||||||
}
|
|
||||||
else if (orientation == QString("Vertical"))
|
|
||||||
{
|
|
||||||
mainWindow->splitDockWidget(afterDock, pDock, Qt::Vertical);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_mapChartWidget.insert(strName, pDock);
|
|
||||||
|
|
||||||
return pDock;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDockWidget * MainWindow::InitCurveChart(QVariantMap mapChart, QMainWindow * mainWindow)
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,16 +32,6 @@ public:
|
|||||||
return qtOsgViewWidget_;
|
return qtOsgViewWidget_;
|
||||||
}
|
}
|
||||||
|
|
||||||
class FitCurveDialog* GetFitCurveDlg() const {
|
|
||||||
return fitCurveDlg_;
|
|
||||||
}
|
|
||||||
class FitCurveDialog* GetFitYLgCurveDlg() const {
|
|
||||||
return fitYLgCurveDlg_;
|
|
||||||
}
|
|
||||||
class SurfaceDialog* GetSurfaceDlg() const {
|
|
||||||
return surfaceDlg_;
|
|
||||||
}
|
|
||||||
|
|
||||||
DataPanelManager* GetDataPanelManager() const {
|
DataPanelManager* GetDataPanelManager() const {
|
||||||
return dataPanelManager_;
|
return dataPanelManager_;
|
||||||
}
|
}
|
||||||
@ -53,10 +43,6 @@ private:
|
|||||||
void InitUI();
|
void InitUI();
|
||||||
void UninitUI();
|
void UninitUI();
|
||||||
|
|
||||||
void InitChartLayout();
|
|
||||||
QDockWidget *InitChart(QVariantMap mapChart, QMainWindow* mainWindow);
|
|
||||||
QDockWidget *InitCurveChart(QVariantMap mapChart, QMainWindow* mainWindow);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
|
|
||||||
@ -66,20 +52,11 @@ private:
|
|||||||
class QWebEngineView* webEngineView_{ nullptr };
|
class QWebEngineView* webEngineView_{ nullptr };
|
||||||
class OsgWidget* qtOsgViewWidget_{ nullptr };
|
class OsgWidget* qtOsgViewWidget_{ nullptr };
|
||||||
|
|
||||||
class FitCurveDialog* fitCurveDlg_{ nullptr };
|
|
||||||
class FitCurveDialog* fitYLgCurveDlg_{ nullptr };
|
|
||||||
class SurfaceDialog* surfaceDlg_{ nullptr };
|
|
||||||
class TargetListWgt* targetUITable_{ nullptr };
|
|
||||||
class QTabWidget* tabWidget_{ nullptr };
|
|
||||||
class SignalIndicatorLampUI* signalIndicatorLampUI_{ nullptr };
|
class SignalIndicatorLampUI* signalIndicatorLampUI_{ nullptr };
|
||||||
class CodeEdtUI* matlabFileDlg_{ nullptr };
|
class CodeEdtUI* matlabFileDlg_{ nullptr };
|
||||||
class AddParamSetting* addParamDlg_{ nullptr };
|
class AddParamSetting* addParamDlg_{ nullptr };
|
||||||
|
|
||||||
DataPanelManager* dataPanelManager_{ nullptr };
|
DataPanelManager* dataPanelManager_{ nullptr };
|
||||||
|
|
||||||
QMap<QString, QDockWidget*> m_mapDockWidget;
|
QMap<QString, QDockWidget*> mapDockWidget_;
|
||||||
|
|
||||||
ChartXMLMgr m_mgrChart;
|
|
||||||
|
|
||||||
QMap<QString, QDockWidget*> m_mapChartWidget;
|
|
||||||
};
|
};
|
||||||
@ -7,6 +7,7 @@
|
|||||||
#include "workspace/FileEntry.h"
|
#include "workspace/FileEntry.h"
|
||||||
#include "workspace/Timestep.h"
|
#include "workspace/Timestep.h"
|
||||||
#include "common/SpdLogger.h"
|
#include "common/SpdLogger.h"
|
||||||
|
#include "utils/UiLayoutManager.h"
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -65,6 +66,8 @@ void DataPanelManager::SetWorkspace(WorkSpace* workspace)
|
|||||||
UpdatePanelsForType(FileEntryType::Table);
|
UpdatePanelsForType(FileEntryType::Table);
|
||||||
UpdatePanelsForType(FileEntryType::Light);
|
UpdatePanelsForType(FileEntryType::Light);
|
||||||
UpdatePanelsForType(FileEntryType::Polar);
|
UpdatePanelsForType(FileEntryType::Polar);
|
||||||
|
LOG_INFO("DataPanelManager::SetWorkspace - Reapplying UI layout after panels created");
|
||||||
|
UiLayoutManager::Restore(mainWindow_, 1);
|
||||||
} else {
|
} else {
|
||||||
ClearAllPanels();
|
ClearAllPanels();
|
||||||
}
|
}
|
||||||
@ -200,6 +203,8 @@ DataPanel* DataPanelManager::CreateDataPanel(FileEntryType fileType, const QStri
|
|||||||
// Add to main window
|
// Add to main window
|
||||||
mainWindow_->addDockWidget(Qt::RightDockWidgetArea, dockWidget);
|
mainWindow_->addDockWidget(Qt::RightDockWidgetArea, dockWidget);
|
||||||
|
|
||||||
|
// Do not force visibility here; let UiLayoutManager restore saved state
|
||||||
|
|
||||||
// Create panel using factory
|
// Create panel using factory
|
||||||
DataPanel* panel = DataPanelFactory::CreatePanel(fileType, index, filePath, dockWidget);
|
DataPanel* panel = DataPanelFactory::CreatePanel(fileType, index, filePath, dockWidget);
|
||||||
if (!panel) {
|
if (!panel) {
|
||||||
|
|||||||
@ -2,37 +2,122 @@
|
|||||||
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QDir>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
#include <QDockWidget>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
#include "common/RecourceHelper.h"
|
#include "common/RecourceHelper.h"
|
||||||
|
#include "common/SpdLogger.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static inline QString layoutIniPath() {
|
static inline QString layoutIniPath() {
|
||||||
return RecourceHelper::Get().GetBasePath() + "/config/UIState.ini";
|
return RecourceHelper::Get().GetBasePath() + "/config/UIState.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool ensureConfigDirectory() {
|
||||||
|
const QString configDir = RecourceHelper::Get().GetBasePath() + "/config";
|
||||||
|
QDir dir;
|
||||||
|
if (!dir.exists(configDir)) {
|
||||||
|
if (!dir.mkpath(configDir)) {
|
||||||
|
LOG_ERROR("Failed to create config directory: {}", configDir.toStdString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
LOG_INFO("Created config directory: {}", configDir.toStdString());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UiLayoutManager::Save(QMainWindow* mainWindow, int version) {
|
void UiLayoutManager::Save(QMainWindow* mainWindow, int version) {
|
||||||
if (!mainWindow) return;
|
if (!mainWindow) {
|
||||||
|
LOG_WARN("MainWindow is null, cannot save layout");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ensureConfigDirectory()) {
|
||||||
|
LOG_ERROR("Cannot create config directory, layout will not be saved");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const QString iniPath = layoutIniPath();
|
const QString iniPath = layoutIniPath();
|
||||||
|
LOG_INFO("Saving UI layout to: {}", iniPath.toStdString());
|
||||||
|
|
||||||
QSettings settings(iniPath, QSettings::IniFormat);
|
QSettings settings(iniPath, QSettings::IniFormat);
|
||||||
settings.setValue("MainWindow/geometry", mainWindow->saveGeometry());
|
settings.setValue("MainWindow/geometry", mainWindow->saveGeometry());
|
||||||
settings.setValue("MainWindow/state", mainWindow->saveState(version));
|
settings.setValue("MainWindow/state", mainWindow->saveState(version));
|
||||||
|
|
||||||
|
// Force sync to ensure data is written to disk
|
||||||
|
settings.sync();
|
||||||
|
|
||||||
|
if (settings.status() != QSettings::NoError) {
|
||||||
|
LOG_ERROR("Failed to save UI layout settings, status: {}", static_cast<int>(settings.status()));
|
||||||
|
} else {
|
||||||
|
LOG_INFO("UI layout saved successfully");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UiLayoutManager::Restore(QMainWindow* mainWindow, int version) {
|
void UiLayoutManager::Restore(QMainWindow* mainWindow, int version) {
|
||||||
if (!mainWindow) return;
|
LOG_INFO("UiLayoutManager::Restore - Starting layout restoration for version {}", version);
|
||||||
const QString iniPath = layoutIniPath();
|
|
||||||
if (!QFile::exists(iniPath)) {
|
if (!mainWindow) {
|
||||||
|
LOG_WARN("MainWindow is null, cannot restore layout");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString iniPath = layoutIniPath();
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Using config file: {}", iniPath.toStdString());
|
||||||
|
|
||||||
|
if (!QFile::exists(iniPath)) {
|
||||||
|
LOG_INFO("Layout file does not exist: {}, using default layout", iniPath.toStdString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("Restoring UI layout from: {}", iniPath.toStdString());
|
||||||
|
|
||||||
QSettings settings(iniPath, QSettings::IniFormat);
|
QSettings settings(iniPath, QSettings::IniFormat);
|
||||||
const QByteArray geometry = settings.value("MainWindow/geometry").toByteArray();
|
const QByteArray geometry = settings.value("MainWindow/geometry").toByteArray();
|
||||||
if (!geometry.isEmpty()) {
|
|
||||||
mainWindow->restoreGeometry(geometry);
|
|
||||||
}
|
|
||||||
const QByteArray state = settings.value("MainWindow/state").toByteArray();
|
const QByteArray state = settings.value("MainWindow/state").toByteArray();
|
||||||
|
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Geometry data size: {} bytes", geometry.size());
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - State data size: {} bytes", state.size());
|
||||||
|
|
||||||
|
if (!geometry.isEmpty()) {
|
||||||
|
bool geometryRestored = mainWindow->restoreGeometry(geometry);
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Geometry restoration: {}", geometryRestored ? "SUCCESS" : "FAILED");
|
||||||
|
} else {
|
||||||
|
LOG_WARN("UiLayoutManager::Restore - No geometry data found");
|
||||||
|
}
|
||||||
|
|
||||||
if (!state.isEmpty()) {
|
if (!state.isEmpty()) {
|
||||||
mainWindow->restoreState(state, version);
|
bool stateRestored = mainWindow->restoreState(state, version);
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - State restoration: {}", stateRestored ? "SUCCESS" : "FAILED");
|
||||||
|
|
||||||
|
// Log dock widget information
|
||||||
|
QList<QDockWidget*> dockWidgets = mainWindow->findChildren<QDockWidget*>();
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Found {} dock widgets after restoration", dockWidgets.size());
|
||||||
|
for (QDockWidget* dock : dockWidgets) {
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - DockWidget: {} - Visible: {}, Floating: {}, Area: {}",
|
||||||
|
dock->objectName().toStdString(),
|
||||||
|
dock->isVisible(),
|
||||||
|
dock->isFloating(),
|
||||||
|
static_cast<int>(mainWindow->dockWidgetArea(dock)));
|
||||||
|
|
||||||
|
// Ensure essential dock widgets are visible after restoration
|
||||||
|
QString objName = dock->objectName();
|
||||||
|
if (objName == "Dock.ModelBrowser" ||
|
||||||
|
objName == "Dock.PresetModelPanel" ||
|
||||||
|
objName == "Dock.PropertyBrowser" ||
|
||||||
|
objName == "Dock.MainView") {
|
||||||
|
if (!dock->isVisible()) {
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Making essential DockWidget visible: {}", objName.toStdString());
|
||||||
|
dock->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG_WARN("UiLayoutManager::Restore - No state data found");
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("UiLayoutManager::Restore - Layout restoration completed");
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user