增加RCS数据导入数据库工程
parent
0050f45a01
commit
9de386695b
|
@ -1,7 +1,103 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<clangFormatSettings>
|
||||
<option name="ENABLED" value="true" />
|
||||
</clangFormatSettings>
|
||||
<RiderCodeStyleSettings>
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
</RiderCodeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -26,7 +26,5 @@ namespace stdlamp {
|
|||
};
|
||||
|
||||
// BASECPPLIBRARYAPI void LAMPnothing(void);
|
||||
|
||||
|
||||
}
|
||||
#endif // LAMPCAE_CPP11UPCPP17_H
|
||||
|
|
|
@ -29,7 +29,7 @@ file(TO_NATIVE_PATH "${_rpath}/${INSTALL_LIBDIR}" _lib_rpath)
|
|||
|
||||
# 遗漏两个,临时解决方案
|
||||
list(APPEND LAMPCAE_Runtimes_Libraries VTK::loguru VTK::gl2ps Qt5::DBus VTK::IOChemistry )
|
||||
list(APPEND LAMPCAE_Runtimes_Libraries Qt5::Qml Qt5::Network )
|
||||
list(APPEND LAMPCAE_Runtimes_Libraries Qt5::Qml Qt5::Network Qt5::Sql)
|
||||
list(APPEND LAMPCAE_Runtimes_Libraries
|
||||
OpenCASCADE::TKOpenGl OpenCASCADE::TKOffset OpenCASCADE::TKSTL OpenCASCADE::Freetype OpenCASCADE::TKBO OpenCASCADE::TKBRep OpenCASCADE::TKBool OpenCASCADE::TKCAF OpenCASCADE::TKCDF OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKHLR OpenCASCADE::TKIGES OpenCASCADE::TKLCAF OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKPrim OpenCASCADE::TKSTEP OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEPBase OpenCASCADE::TKService OpenCASCADE::TKShHealing OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d OpenCASCADE::TKVCAF OpenCASCADE::TKXCAF OpenCASCADE::TKXDEIGES OpenCASCADE::TKXSBase OpenCASCADE::TKernel Qt5::Widgets Qt5::Xml VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::FiltersCore VTK::FiltersExtraction VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersSources VTK::FiltersStatistics VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::IOXMLParser VTK::ImagingCore VTK::ImagingFourier VTK::ImagingMath VTK::InteractionStyle VTK::ParallelCore VTK::ParallelDIY VTK::RenderingCore VTK::RenderingFreeType VTK::RenderingOpenGL2 VTK::RenderingUI VTK::RenderingVolume VTK::RenderingVolumeOpenGL2 VTK::doubleconversion VTK::expat VTK::freetype VTK::glew VTK::lz4 VTK::lzma VTK::sys VTK::zlib VTK::IOGeometry
|
||||
VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::FiltersCore VTK::FiltersExtraction VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersSources VTK::FiltersStatistics VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::IOXMLParser VTK::ImagingCore VTK::ImagingFourier VTK::ImagingMath VTK::InteractionStyle VTK::ParallelCore VTK::ParallelDIY VTK::RenderingCore VTK::RenderingFreeType VTK::RenderingOpenGL2 VTK::RenderingUI VTK::RenderingVolume VTK::RenderingVolumeOpenGL2 VTK::doubleconversion VTK::expat VTK::freetype VTK::glew VTK::lz4 VTK::lzma VTK::sys VTK::zlib VTK::IOGeometry
|
||||
|
@ -82,8 +82,6 @@ foreach(_TestPlugin ${_TestPlugins})
|
|||
endforeach()
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 安装LAMPCAE,定义项目的安装目录
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -93,7 +91,7 @@ install(
|
|||
LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT lib
|
||||
)
|
||||
|
||||
list(APPEND _plugins PluginAddTree PluginLAMPScatterProcess PluginCustomizer PluginMeshDataExchange PluginWBFZExchangePlugin PluginMotorBike PluginRasterTool )
|
||||
list(APPEND _plugins PluginAddTree PluginRCSDBManager PluginCustomizer PluginMeshDataExchange PluginWBFZExchangePlugin PluginMotorBike PluginRasterTool )
|
||||
|
||||
foreach(_plugin ${_plugins})
|
||||
list(APPEND LAMPCAE_Runtimes_Libraries ${LAMPCAE_${_plugin}_Runtimes_Libraries})
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||
|
@ -25,6 +28,17 @@ namespace Common {
|
|||
std::cout << boost::stacktrace::stacktrace() << std::endl;
|
||||
}
|
||||
|
||||
std::string getCurrentTimeInHex() {
|
||||
// 获取当前时间点,系统时钟,精确到毫秒
|
||||
auto now = std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now());
|
||||
auto value = now.time_since_epoch().count();
|
||||
|
||||
// 将时间戳转换为16进制字符串
|
||||
std::stringstream ss;
|
||||
ss << std::hex << value; // 转换为16进制
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
||||
void DebugLogger::info(const char* file, int line, const char* format, ...)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "CommonAPI.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <cstdarg>
|
||||
|
||||
|
||||
|
@ -47,6 +47,9 @@ namespace Common {
|
|||
static void output(const char* file, int line, const char* format, int level, va_list args);
|
||||
};
|
||||
void COMMONAPI function_to_trace();
|
||||
|
||||
std::string COMMONAPI getCurrentTimeInHex();
|
||||
|
||||
} // namespace Common
|
||||
|
||||
// 用宏OUTPUT_DEBUG_INFO控制调试信息是否输出的开关
|
||||
|
|
|
@ -557,6 +557,11 @@ namespace GUI {
|
|||
connect(_ui->actionForestScaneStructMeasurement,SIGNAL(triggered()), this,SIGNAL(onactionForestScaneStructMeasurement_SIGNAL ()));
|
||||
connect(_ui->actionForestScanePhysicochemicalMeasurement,SIGNAL(triggered()), this,SIGNAL(onactionForestScanePhysicochemicalMeasurement_SIGNAL ()));
|
||||
|
||||
connect(_ui->actionImportRCSData,SIGNAL(triggered()), this,SIGNAL(on_actionImportRCSDataSIGNAL()));
|
||||
|
||||
connect(_ui->actionShowRCSTable,SIGNAL(triggered()), this,SIGNAL(on_actionShowRCSTableSIGNAL()));
|
||||
|
||||
connect(_ui->actionQueryRCSData,SIGNAL(triggered()), this,SIGNAL(on_actionactionQueryRCSDataSIGNAL()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,9 @@ namespace GUI {
|
|||
|
||||
void on_actionLine2FaceSIGNAL();
|
||||
|
||||
|
||||
void on_actionImportRCSDataSIGNAL();
|
||||
void on_actionShowRCSTableSIGNAL();
|
||||
void on_actionactionQueryRCSDataSIGNAL();
|
||||
// 网格操作
|
||||
void on_deleteMeshSIGNAL(GUI::MainWindow* m);
|
||||
void on_copyMeshSIGNAL(GUI::MainWindow* m);
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1294</width>
|
||||
<height>734</height>
|
||||
<width>881</width>
|
||||
<height>644</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -272,8 +272,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1294</width>
|
||||
<height>23</height>
|
||||
<width>881</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -908,6 +908,14 @@
|
|||
<addaction name="ProcessFlow_MenuVegetationScene"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuRCS">
|
||||
<property name="title">
|
||||
<string>RCS数据库管理</string>
|
||||
</property>
|
||||
<addaction name="actionImportRCSData"/>
|
||||
<addaction name="actionShowRCSTable"/>
|
||||
<addaction name="actionQueryRCSData"/>
|
||||
</widget>
|
||||
<addaction name="actionImageSetting"/>
|
||||
<addaction name="actionFEKO2csv"/>
|
||||
<addaction name="actionScatterExport"/>
|
||||
|
@ -922,6 +930,7 @@
|
|||
<addaction name="actionImageShowTool"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menuTargetProcessFlow"/>
|
||||
<addaction name="menuRCS"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuTargetWBZB">
|
||||
<property name="title">
|
||||
|
@ -945,9 +954,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuForestTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionForestTargetStructMeasurement"/>
|
||||
<addaction name="actionForestTargetPhysicochemicalMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuCropTarget">
|
||||
<property name="title">
|
||||
|
@ -962,9 +968,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuCropTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionCropTargetStructMeasurement"/>
|
||||
<addaction name="actionCropTargetPhysicochemicalMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuGrasslandTarget">
|
||||
<property name="title">
|
||||
|
@ -979,9 +982,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuGrasslandTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionGrassLandTargetStructMeasurement"/>
|
||||
<addaction name="actionGrassLandTargetPhysicochemicalMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuWaterBodyTarget">
|
||||
<property name="title">
|
||||
|
@ -996,8 +996,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuWaterBodyTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionWaterBodyTargetSalinityMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuSoilTarget">
|
||||
<property name="title">
|
||||
|
@ -1013,9 +1011,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuSoilTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionSoilTargetRoughnessMeasurement"/>
|
||||
<addaction name="actionSoilTargetHumidityMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuDynamicWaterBodyTarget">
|
||||
<property name="title">
|
||||
|
@ -1031,9 +1026,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuDynamicWaterBodyTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionDynamicWaterBodyTargetWindSpeedMeasurement"/>
|
||||
<addaction name="actionDynamicWaterBodyTargetWaveHeightMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuRoadTarget">
|
||||
<property name="title">
|
||||
|
@ -1050,8 +1042,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuRoadTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionRoadTargetRoughnessMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuArtificialTarget">
|
||||
<property name="title">
|
||||
|
@ -1067,8 +1057,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuArtificialTarget_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionPreArtificialTarget3DMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuGeometricCorrectionScene">
|
||||
<property name="title">
|
||||
|
@ -1083,8 +1071,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuGeometricCorrectionScene_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionGeometricSceneMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuRadiometricCorrectionScene">
|
||||
<property name="title">
|
||||
|
@ -1099,8 +1085,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuRadiometricCorrectionScene_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionRadioSceneMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuLandSurfaceScene">
|
||||
<property name="title">
|
||||
|
@ -1123,9 +1107,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuLandSurfaceScene_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionLandScaneRoughnessMeasurement"/>
|
||||
<addaction name="actionLandScaneHumidityMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuWaterBodyScene">
|
||||
<property name="title">
|
||||
|
@ -1141,9 +1122,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuWaterBodyScene_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionWaterScaneWindSpeedMeasurement"/>
|
||||
<addaction name="actionWaterScaneWaveHeightMeasurement"/> -->
|
||||
</widget>
|
||||
<widget class="QMenu" name="WBZB_MenuVegetationScene">
|
||||
<property name="title">
|
||||
|
@ -1166,9 +1144,6 @@
|
|||
<addaction name="actionExportMesh"/>
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuVegetationScene_ModelGenerator"/>
|
||||
<!-- <addaction name="separator"/>
|
||||
<addaction name="actionForestScaneStructMeasurement"/>
|
||||
<addaction name="actionForestScanePhysicochemicalMeasurement"/> -->
|
||||
</widget>
|
||||
<addaction name="WBZB_MenuForestTarget"/>
|
||||
<addaction name="WBZB_MenuCropTarget"/>
|
||||
|
@ -1701,6 +1676,8 @@
|
|||
<addaction name="actionRemoveSurface"/>
|
||||
<addaction name="actionFillGap"/>
|
||||
</widget>
|
||||
<addaction name="actionStartCAEApp"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionUndo"/>
|
||||
<addaction name="actionRedo"/>
|
||||
<addaction name="separator"/>
|
||||
|
@ -3679,6 +3656,26 @@
|
|||
<string>导入测量后向散射系数数据</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionStartCAEApp">
|
||||
<property name="text">
|
||||
<string>启动CAE编辑器</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionImportRCSData">
|
||||
<property name="text">
|
||||
<string>导入RCS数据</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowRCSTable">
|
||||
<property name="text">
|
||||
<string>展示RCS数据</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQueryRCSData">
|
||||
<property name="text">
|
||||
<string>查询RCS数据</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../qrc/qianfan.qrc"/>
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# 插件RCS数据库管理模块
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 头文件搜索路径
|
||||
#-----------------------------------------------------------------------------
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
# boost
|
||||
include_directories(D:/vcpkg/installed/x64-windows/include)
|
||||
|
||||
## qt5
|
||||
#include_directories(C:/Qt/5.15.2/msvc2019_64/include/QtQml)
|
||||
|
||||
# json
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../json)
|
||||
|
||||
# qscintilla2
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2/lexers)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2/include)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2/lexlib)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2/Qt4Qt5)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qscintilla2/src)
|
||||
|
||||
|
||||
# qcustomplot
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcustomplot)
|
||||
|
||||
# qhexedit
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qhexedit)
|
||||
# opencv
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
# qtpropertybrowser
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qt)
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 链接库
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 自动添加include目录
|
||||
#-----------------------------------------------------------------------------
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 添加资源文件
|
||||
#-----------------------------------------------------------------------------
|
||||
set(_qrc "${CMAKE_CURRENT_SOURCE_DIR}/../qrc/qianfan.qrc")
|
||||
set(_lang "${CMAKE_CURRENT_SOURCE_DIR}/../qrc/translations.qrc")
|
||||
qt5_add_resources(_resource ${_qrc} ${_lang})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 源码扫描
|
||||
#-----------------------------------------------------------------------------
|
||||
file(GLOB_RECURSE _ui "*.ui")
|
||||
file(GLOB_RECURSE _header "*.h" )
|
||||
file(GLOB_RECURSE _source "*.cpp")
|
||||
qt5_wrap_ui(_interface ${_ui})
|
||||
qt5_wrap_cpp(MOC_SOURCES ${_header})
|
||||
|
||||
# 将生成的 MOC 文件添加到源文件列表中
|
||||
list(APPEND SOURCES ${MOC_SOURCES})
|
||||
#-----------------------------------------------------------------------------
|
||||
# 添加动态库目标
|
||||
#-----------------------------------------------------------------------------
|
||||
add_library(PluginRCSDBManager
|
||||
${_resource}
|
||||
${_interface}
|
||||
${_header}
|
||||
${_source}
|
||||
${SOURCES}
|
||||
RCSDBManagerClass.cpp
|
||||
RCSDBManagerClass.h
|
||||
)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 链接库
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#gdal
|
||||
find_package(GDAL REQUIRED)
|
||||
include_directories(${GDAL_INCLUDE_DIRS})
|
||||
link_directories(${GDAL_LIBRARIES})
|
||||
|
||||
# boost
|
||||
include_directories(D:/vcpkg/installed/x64-windows/include)
|
||||
|
||||
|
||||
include_directories(${PCL_INCLUDE_DIRS})
|
||||
link_directories(${PCL_LIBRARY_DIRS})
|
||||
add_definitions(${PCL_DEFINITIONS})
|
||||
|
||||
# qwt
|
||||
include_directories(${Qwt_INCLUDE_DIRS})
|
||||
link_directories(${Qwt_LIBRARY_DIRS})
|
||||
|
||||
# gdal
|
||||
include_directories(${GDAL_INCLUDE_DIRS})
|
||||
message("qwt dir ${Qwt_INCLUDE_DIRS}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 添加接口声明宏
|
||||
#-----------------------------------------------------------------------------
|
||||
target_compile_definitions(PluginRCSDBManager PRIVATE "NOMINMAX") # 禁用vc++ 中的min max 定义,避免与 pcl 的中 std::min,pcl::max 函数冲突
|
||||
target_compile_definitions(PluginRCSDBManager PRIVATE "PLUGINRCSDBMANAGER_API")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 安装Qt的依赖文件
|
||||
#-----------------------------------------------------------------------------
|
||||
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
|
||||
|
||||
|
||||
|
||||
|
||||
list(APPEND _depend_library
|
||||
PluginWBFZExchangePlugin qtpropertybrowser qcustomplot qhexedit qscintilla2 Common Settings PythonModule DataProperty MeshData Material Geometry BCBase ConfigOptions SelfDefObject ModelData ModuleBase PluginManager GeometryCommand GeometryWidgets IO MainWidgets MainWindow
|
||||
)
|
||||
|
||||
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
LAMPCAE::CGNS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml LAMPCAE::QWT LAMPCAE::QWTPOLAR
|
||||
)
|
||||
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
Qt5::Network Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus Qt5::Core Qt5::Xml Qt5::OpenGL Qt5::Gui Qt5::Svg Qt5::Widgets Qt5::Qml Qt5::DataVisualization Qt5::Charts Qt5::PrintSupport Qt5::Test Qt5::Sql
|
||||
)
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
OpenCASCADE::TKOpenGl OpenCASCADE::TKOffset OpenCASCADE::TKSTL OpenCASCADE::TKFillet OpenCASCADE::Freetype OpenCASCADE::TKBO OpenCASCADE::TKBRep OpenCASCADE::TKBool OpenCASCADE::TKCAF OpenCASCADE::TKCDF OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKHLR OpenCASCADE::TKIGES OpenCASCADE::TKLCAF OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKPrim OpenCASCADE::TKSTEP OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEPBase OpenCASCADE::TKService OpenCASCADE::TKShHealing OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d OpenCASCADE::TKVCAF OpenCASCADE::TKXCAF OpenCASCADE::TKXDEIGES OpenCASCADE::TKXSBase OpenCASCADE::TKernel Qt5::Widgets Qt5::Xml VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::FiltersCore VTK::FiltersExtraction VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersSources VTK::FiltersStatistics VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::IOXMLParser VTK::ImagingCore VTK::ImagingFourier VTK::ImagingMath VTK::InteractionStyle VTK::ParallelCore VTK::ParallelDIY VTK::RenderingCore VTK::RenderingFreeType VTK::RenderingOpenGL2 VTK::RenderingUI VTK::RenderingVolume VTK::RenderingVolumeOpenGL2 VTK::doubleconversion VTK::expat VTK::freetype VTK::glew VTK::lz4 VTK::lzma VTK::sys VTK::zlib VTK::IOGeometry
|
||||
)
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::DICOMParser VTK::FiltersCore VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersHybrid VTK::FiltersModeling VTK::FiltersSources VTK::IOCore VTK::IOChemistry VTK::IOGeometry VTK::IOImage VTK::IOLegacy VTK::ImagingCore VTK::ImagingSources VTK::RenderingCore VTK::RenderingLOD VTK::doubleconversion VTK::jpeg VTK::jsoncpp VTK::lz4 VTK::lzma VTK::metaio VTK::png VTK::pugixml VTK::sys VTK::tiff VTK::zlib
|
||||
)
|
||||
|
||||
message("OpenCV_LIBRARIES ${OpenCV_LIBRARIES}")
|
||||
|
||||
target_include_directories(PluginRCSDBManager PRIVATE ${Qwt_INCLUDE_DIRS})
|
||||
#-----------------------------------------------------------------------------
|
||||
# 链接依赖库
|
||||
#-----------------------------------------------------------------------------
|
||||
target_link_libraries(PluginRCSDBManager PRIVATE
|
||||
${_runtimes_libraries}
|
||||
${_depend_library}
|
||||
${PCL_LIBRARIES}
|
||||
${OpenCV_LIBRARIES}
|
||||
${OpenCV_LIBS}
|
||||
|
||||
unofficial::sqlite3::sqlite3
|
||||
GDAL::GDAL
|
||||
FFTW3::fftw3
|
||||
GSL::gsl GSL::gslcblas
|
||||
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 添加依赖关系
|
||||
#-----------------------------------------------------------------------------
|
||||
add_dependencies(PluginRCSDBManager ${_depend_library})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 添加运行时依赖关系
|
||||
#-----------------------------------------------------------------------------
|
||||
set(LAMPCAE_PluginRCSDBManager_Runtimes_Libraries ${_runtimes_libraries} PARENT_SCOPE)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 设置插件的输出目录
|
||||
#-----------------------------------------------------------------------------
|
||||
set_target_properties(PluginRCSDBManager
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
LIBRARY_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
ARCHIVE_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
LIBRARY_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef _PLUGINRCSDBMANAGERAPI_H_
|
||||
#define _PLUGINRCSDBMANAGERAPI_H_
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
|
||||
#if defined(PLUGINRCSDBMANAGER_API)
|
||||
#define PLUGINRCSDBMANAGERAPI Q_DECL_EXPORT
|
||||
#else
|
||||
#define PLUGINRCSDBMANAGERAPI Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,604 @@
|
|||
//
|
||||
// Created by 30453 on 25-6-25.
|
||||
//
|
||||
|
||||
#include "RCSDBManagerClass.h"
|
||||
#include "QDebug"
|
||||
#include "Settings/BusAPI.h"
|
||||
#include "QErrorMessage"
|
||||
#include "QFile"
|
||||
#include "QFileInfo"
|
||||
#include "QDir"
|
||||
#include "PluginWBFZExchangePlugin/FEKOBaseToolClass.h"
|
||||
|
||||
|
||||
|
||||
namespace RCSDBManagerTool {
|
||||
RCSDBManagerClass* RCSDBManagerClass::_ins = nullptr;
|
||||
|
||||
RCSDBManagerClass::RCSDBManagerClass(const std::string& dbPath) : _db(nullptr), _dbPath(dbPath) {
|
||||
this->initializeDatabase(dbPath);
|
||||
qDebug() <<u8"Create database file " << QString::fromStdString(dbPath) ;
|
||||
this->initialize();
|
||||
}
|
||||
|
||||
RCSDBManagerClass::~RCSDBManagerClass() {
|
||||
closeDatabase();
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::initialize() {
|
||||
if (!_db) {
|
||||
qDebug() <<u8"数据库未连接" ;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::createTables() {
|
||||
const char* sql1 = "CREATE TABLE IF NOT EXISTS RCSProjectFolderTable ("
|
||||
"ProjectID INTEGER PRIMARY KEY AUTOINCREMENT,"
|
||||
"projectname TEXT NOT NULL,"
|
||||
"projectFolder TEXT NOT NULL,"
|
||||
"desc TEXT)";
|
||||
|
||||
const char* sql2 = "CREATE TABLE IF NOT EXISTS RCSDataTable ("
|
||||
"ProjectID INTEGER,"
|
||||
"freq REAL,"
|
||||
"az REAL,"
|
||||
"inc REAL,"
|
||||
"Transpolar REAL,"
|
||||
"E_H_real REAL,"
|
||||
"E_H_imag REAL,"
|
||||
"E_V_real REAL,"
|
||||
"E_V_imag REAL,"
|
||||
"RCS_H REAL,"
|
||||
"RCS_V REAL,"
|
||||
"FOREIGN KEY(ProjectID) REFERENCES RCSProjectFolderTable(ProjectID))";
|
||||
|
||||
char* errMsg = nullptr;
|
||||
if (sqlite3_exec(_db, sql1, nullptr, nullptr, &errMsg) != SQLITE_OK) {
|
||||
qDebug() <<u8"创建RCSProjectFolderTable表失败: " << QString::fromStdString(errMsg) ;
|
||||
sqlite3_free(errMsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sqlite3_exec(_db, sql2, nullptr, nullptr, &errMsg) != SQLITE_OK) {
|
||||
qDebug() <<u8"创建RCSData表失败: " << QString::fromStdString(errMsg) ;
|
||||
sqlite3_free(errMsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::insertRCSDataRecord(int projectId, double freq, double az, double inc,
|
||||
double transpolar, double eHReal, double eHImag,
|
||||
double eVReal, double eVImag, double rcsH, double rcsV) {
|
||||
const char* sql = "INSERT INTO RCSDataTable (ProjectID, freq, az, inc, Transpolar, "
|
||||
"E_H_real, E_H_imag, E_V_real, E_V_imag, RCS_H, RCS_V) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_bind_int(stmt, 1, projectId);
|
||||
sqlite3_bind_double(stmt, 2, freq);
|
||||
sqlite3_bind_double(stmt, 3, az);
|
||||
sqlite3_bind_double(stmt, 4, inc);
|
||||
sqlite3_bind_double(stmt, 5, transpolar);
|
||||
sqlite3_bind_double(stmt, 6, eHReal);
|
||||
sqlite3_bind_double(stmt, 7, eHImag);
|
||||
sqlite3_bind_double(stmt, 8, eVReal);
|
||||
sqlite3_bind_double(stmt, 9, eVImag);
|
||||
sqlite3_bind_double(stmt, 10, rcsH);
|
||||
sqlite3_bind_double(stmt, 11, rcsV);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"插入记录失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_finalize(stmt);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::deleteRCSDataRecord(int projectId, double freq, double az,
|
||||
double inc, double transpolar) {
|
||||
const char* sql = "DELETE FROM RCSDataTable WHERE ProjectID = ? AND freq = ? AND az = ? AND inc = ? AND Transpolar = ?";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << QString::fromStdString(sqlite3_errmsg(_db) ) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_bind_int(stmt, 1, projectId);
|
||||
sqlite3_bind_double(stmt, 2, freq);
|
||||
sqlite3_bind_double(stmt, 3, az);
|
||||
sqlite3_bind_double(stmt, 4, inc);
|
||||
sqlite3_bind_double(stmt, 5, transpolar);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"删除记录失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_finalize(stmt);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::updateRCSDataRecord(int projectId, double freq, double az, double inc,
|
||||
double transpolar, double newEHReal, double newEHImag,
|
||||
double newEVReal, double newEVImag, double newRCSH, double newRCSV) {
|
||||
const char* sql = "UPDATE RCSDataTable SET "
|
||||
"E_H_real = ?, E_H_imag = ?, E_V_real = ?, E_V_imag = ?, "
|
||||
"RCS_H = ?, RCS_V = ? "
|
||||
"WHERE ProjectID = ? AND freq = ? AND az = ? AND inc = ? AND Transpolar = ?";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_bind_double(stmt, 1, newEHReal);
|
||||
sqlite3_bind_double(stmt, 2, newEHImag);
|
||||
sqlite3_bind_double(stmt, 3, newEVReal);
|
||||
sqlite3_bind_double(stmt, 4, newEVImag);
|
||||
sqlite3_bind_double(stmt, 5, newRCSH);
|
||||
sqlite3_bind_double(stmt, 6, newRCSV);
|
||||
sqlite3_bind_int(stmt, 7, projectId);
|
||||
sqlite3_bind_double(stmt, 8, freq);
|
||||
sqlite3_bind_double(stmt, 9, az);
|
||||
sqlite3_bind_double(stmt, 10, inc);
|
||||
sqlite3_bind_double(stmt, 11, transpolar);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"更新记录失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_finalize(stmt);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<RCSRecord> RCSDBManagerClass::queryRCSDataRecords(int projectId, double freq,
|
||||
double az, double inc, double transpolar) {
|
||||
std::vector<RCSRecord> results;
|
||||
|
||||
std::string sql = "SELECT * FROM RCSDataTable WHERE 1=1";
|
||||
if (projectId != -1) sql += " AND ProjectID = ?";
|
||||
if (freq != -1.0) sql += " AND freq = ?";
|
||||
if (az != -1.0) sql += " AND az = ?";
|
||||
if (inc != -1.0) sql += " AND inc = ?";
|
||||
if (transpolar != -1.0) sql += " AND Transpolar = ?";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql.c_str(), -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return results;
|
||||
}
|
||||
|
||||
int paramIndex = 1;
|
||||
if (projectId != -1) sqlite3_bind_int(stmt, paramIndex++, projectId);
|
||||
if (freq != -1.0) sqlite3_bind_double(stmt, paramIndex++, freq);
|
||||
if (az != -1.0) sqlite3_bind_double(stmt, paramIndex++, az);
|
||||
if (inc != -1.0) sqlite3_bind_double(stmt, paramIndex++, inc);
|
||||
if (transpolar != -1.0) sqlite3_bind_double(stmt, paramIndex++, transpolar);
|
||||
|
||||
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
RCSRecord record;
|
||||
int colCount = sqlite3_column_count(stmt);
|
||||
|
||||
for (int i = 0; i < colCount; i++) {
|
||||
const char* colName = sqlite3_column_name(stmt, i);
|
||||
const char* colValue = reinterpret_cast<const char*>(sqlite3_column_text(stmt, i));
|
||||
|
||||
if (colName && colValue) {
|
||||
if (strcmp(colName, "projectID") == 0) record.projectID = atoi(colValue);
|
||||
else if (strcmp(colName, "fileType") == 0) record.fileType = colValue;
|
||||
else if (strcmp(colName, "fileFormat") == 0) record.fileFormat = colValue;
|
||||
else if (strcmp(colName, "source") == 0) record.source = colValue;
|
||||
else if (strcmp(colName, "date") == 0) record.date = colValue;
|
||||
else if (strcmp(colName, "radiusStr") == 0) record.radiusStr = colValue;
|
||||
else if (strcmp(colName, "thetaStr") == 0) record.thetaStr = colValue;
|
||||
else if (strcmp(colName, "phiStr") == 0) record.phiStr = colValue;
|
||||
else if (strcmp(colName, "frequencyStr") == 0) record.frequencyStr = colValue;
|
||||
else if (strcmp(colName, "radius") == 0) record.radius = atof(colValue);
|
||||
else if (strcmp(colName, "theta") == 0) record.theta = atof(colValue);
|
||||
else if (strcmp(colName, "phi") == 0) record.phi = atof(colValue);
|
||||
else if (strcmp(colName, "reEr") == 0) record.reEr = atof(colValue);
|
||||
else if (strcmp(colName, "imEr") == 0) record.imEr = atof(colValue);
|
||||
else if (strcmp(colName, "reEtheta") == 0) record.reEtheta = atof(colValue);
|
||||
else if (strcmp(colName, "imEtheta") == 0) record.imEtheta = atof(colValue);
|
||||
else if (strcmp(colName, "reEphi") == 0) record.reEphi = atof(colValue);
|
||||
else if (strcmp(colName, "imEphi") == 0) record.imEphi = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Theta") == 0) record.RCS_Theta = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Phi") == 0) record.RCS_Phi = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Tatol") == 0) record.RCS_Tatol = atof(colValue);
|
||||
else if (strcmp(colName, "TransPolar") == 0) record.TransPolar = atof(colValue);
|
||||
else if (strcmp(colName, "configurationName") == 0) record.configurationName = colValue;
|
||||
else if (strcmp(colName, "requestName") == 0) record.requestName = colValue;
|
||||
else if (strcmp(colName, "frequency") == 0) record.frequency = atof(colValue);
|
||||
else if (strcmp(colName, "coordinateSystem") == 0) record.coordinateSystem = colValue;
|
||||
else if (strcmp(colName, "numRadiusSamples") == 0) record.numRadiusSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "numThetaSamples") == 0) record.numThetaSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "numPhiSamples") == 0) record.numPhiSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "resultType") == 0) record.resultType = colValue;
|
||||
else if (strcmp(colName, "numHeaderLines") == 0) record.numHeaderLines = atoi(colValue);
|
||||
}
|
||||
}
|
||||
results.push_back(record);
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
return results;
|
||||
}
|
||||
|
||||
void RCSDBManagerClass::closeDatabase() {
|
||||
if (_db) {
|
||||
sqlite3_close(_db);
|
||||
_db = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::initializeDatabase(const std::string& dbFilePath) {
|
||||
// 检查数据库文件是否存在
|
||||
FILE* file = fopen(dbFilePath.c_str(), "r");
|
||||
bool dbExists = (file != nullptr);
|
||||
if (file) fclose(file);
|
||||
|
||||
if (!dbExists) {
|
||||
qDebug() <<u8"数据库文件不存在,正在创建:" << QString::fromStdString(dbFilePath) ;
|
||||
|
||||
if (sqlite3_open(dbFilePath.c_str(), &_db) != SQLITE_OK) {
|
||||
qDebug() <<u8"无法打开或创建数据库:" << sqlite3_errmsg(_db) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!createTables()) {
|
||||
qDebug() <<u8"初始化数据库表失败" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
qDebug() <<u8"数据库文件已成功创建并初始化:" << QString::fromStdString(dbFilePath) ;
|
||||
return true;
|
||||
} else {
|
||||
qDebug() <<u8"数据库文件已存在:" << QString::fromStdString(dbFilePath) ;
|
||||
|
||||
if (sqlite3_open(dbFilePath.c_str(), &_db) != SQLITE_OK) {
|
||||
qDebug() <<u8"无法打开现有数据库:" << sqlite3_errmsg(_db) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!checkAndCreateTables()) {
|
||||
qDebug() <<u8"检查或创建表失败" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
qDebug() <<u8"数据库表已成功检查和更新:" << QString::fromStdString(dbFilePath) ;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::checkAndCreateTables() {
|
||||
const char* sql1 = "SELECT name FROM sqlite_master WHERE type='table' AND name='RCSProjectFolderTable'";
|
||||
const char* sql2 = "SELECT name FROM sqlite_master WHERE type='table' AND name='RCSDataTable'";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
bool table1Exists = false;
|
||||
bool table2Exists = false;
|
||||
|
||||
// 检查第一个表是否存在
|
||||
if (sqlite3_prepare_v2(_db, sql1, -1, &stmt, nullptr) == SQLITE_OK) {
|
||||
if (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
table1Exists = true;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
// 检查第二个表是否存在
|
||||
if (sqlite3_prepare_v2(_db, sql2, -1, &stmt, nullptr) == SQLITE_OK) {
|
||||
if (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
table2Exists = true;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
// 创建缺失的表
|
||||
if (!table1Exists || !table2Exists) {
|
||||
return createTables();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
RCSDBManagerClass* RCSDBManagerClass::instance() {
|
||||
if (_ins == nullptr) {
|
||||
// 这里需要替换为获取数据库路径的实际方法
|
||||
const char* datastr=Setting::BusAPI::instance()->getRcsdbFilePath().toUtf8().constData();
|
||||
std::string sqldbpath(datastr);
|
||||
_ins = new RCSDBManagerClass(sqldbpath);
|
||||
}
|
||||
return _ins;
|
||||
}
|
||||
|
||||
int RCSDBManagerClass::insertProject(const std::string& projectName, const std::string& projectFolder,
|
||||
const std::string& desc) {
|
||||
if (!_db) {
|
||||
qDebug() <<u8"数据库未连接" ;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* sql = "INSERT INTO RCSProjectFolderTable (projectname, projectFolder, desc) "
|
||||
"VALUES (?, ?, ?)";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return -1;
|
||||
}
|
||||
|
||||
sqlite3_bind_text(stmt, 1, projectName.c_str(), -1, SQLITE_TRANSIENT);
|
||||
sqlite3_bind_text(stmt, 2, projectFolder.c_str(), -1, SQLITE_TRANSIENT);
|
||||
sqlite3_bind_text(stmt, 3, desc.c_str(), -1, SQLITE_TRANSIENT);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"插入失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_finalize(stmt);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int id = static_cast<int>(sqlite3_last_insert_rowid(_db));
|
||||
sqlite3_finalize(stmt);
|
||||
return id;
|
||||
}
|
||||
|
||||
std::vector<RCSRecord> RCSDBManagerClass::queryProjects(int projectId,
|
||||
const std::string& projectName) {
|
||||
std::vector<RCSRecord> results;
|
||||
if (!_db) return results;
|
||||
|
||||
std::string sql = "SELECT * FROM RCSProjectFolderTable WHERE 1=1";
|
||||
if (projectId != -1) sql += " AND ProjectID = ?";
|
||||
if (!projectName.empty()) sql += " AND projectname LIKE ?";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql.c_str(), -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return results;
|
||||
}
|
||||
|
||||
int paramIndex = 1;
|
||||
if (projectId != -1) sqlite3_bind_int(stmt, paramIndex++, projectId);
|
||||
if (!projectName.empty()) {
|
||||
std::string likePattern = "%" + projectName + "%";
|
||||
sqlite3_bind_text(stmt, paramIndex++, likePattern.c_str(), -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
RCSRecord record;
|
||||
int colCount = sqlite3_column_count(stmt);
|
||||
|
||||
for (int i = 0; i < colCount; i++) {
|
||||
const char* colName = sqlite3_column_name(stmt, i);
|
||||
const char* colValue = reinterpret_cast<const char*>(sqlite3_column_text(stmt, i));
|
||||
|
||||
if (colName && colValue) {
|
||||
if (strcmp(colName, "projectID") == 0) record.projectID = atoi(colValue);
|
||||
else if (strcmp(colName, "fileType") == 0) record.fileType = colValue;
|
||||
else if (strcmp(colName, "fileFormat") == 0) record.fileFormat = colValue;
|
||||
else if (strcmp(colName, "source") == 0) record.source = colValue;
|
||||
else if (strcmp(colName, "date") == 0) record.date = colValue;
|
||||
else if (strcmp(colName, "radiusStr") == 0) record.radiusStr = colValue;
|
||||
else if (strcmp(colName, "thetaStr") == 0) record.thetaStr = colValue;
|
||||
else if (strcmp(colName, "phiStr") == 0) record.phiStr = colValue;
|
||||
else if (strcmp(colName, "frequencyStr") == 0) record.frequencyStr = colValue;
|
||||
else if (strcmp(colName, "radius") == 0) record.radius = atof(colValue);
|
||||
else if (strcmp(colName, "theta") == 0) record.theta = atof(colValue);
|
||||
else if (strcmp(colName, "phi") == 0) record.phi = atof(colValue);
|
||||
else if (strcmp(colName, "reEr") == 0) record.reEr = atof(colValue);
|
||||
else if (strcmp(colName, "imEr") == 0) record.imEr = atof(colValue);
|
||||
else if (strcmp(colName, "reEtheta") == 0) record.reEtheta = atof(colValue);
|
||||
else if (strcmp(colName, "imEtheta") == 0) record.imEtheta = atof(colValue);
|
||||
else if (strcmp(colName, "reEphi") == 0) record.reEphi = atof(colValue);
|
||||
else if (strcmp(colName, "imEphi") == 0) record.imEphi = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Theta") == 0) record.RCS_Theta = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Phi") == 0) record.RCS_Phi = atof(colValue);
|
||||
else if (strcmp(colName, "RCS_Tatol") == 0) record.RCS_Tatol = atof(colValue);
|
||||
else if (strcmp(colName, "TransPolar") == 0) record.TransPolar = atof(colValue);
|
||||
else if (strcmp(colName, "configurationName") == 0) record.configurationName = colValue;
|
||||
else if (strcmp(colName, "requestName") == 0) record.requestName = colValue;
|
||||
else if (strcmp(colName, "frequency") == 0) record.frequency = atof(colValue);
|
||||
else if (strcmp(colName, "coordinateSystem") == 0) record.coordinateSystem = colValue;
|
||||
else if (strcmp(colName, "numRadiusSamples") == 0) record.numRadiusSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "numThetaSamples") == 0) record.numThetaSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "numPhiSamples") == 0) record.numPhiSamples = atoi(colValue);
|
||||
else if (strcmp(colName, "resultType") == 0) record.resultType = colValue;
|
||||
else if (strcmp(colName, "numHeaderLines") == 0) record.numHeaderLines = atoi(colValue);
|
||||
}
|
||||
}
|
||||
results.push_back(record);
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
return results;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::deleteProject(int projectId) {
|
||||
if (!_db) return false;
|
||||
|
||||
const char* sql = "DELETE FROM RCSProjectFolderTable WHERE ProjectID = ?";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_bind_int(stmt, 1, projectId);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"删除失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_finalize(stmt);
|
||||
return false;
|
||||
}
|
||||
|
||||
int changes = sqlite3_changes(_db);
|
||||
sqlite3_finalize(stmt);
|
||||
return changes > 0;
|
||||
}
|
||||
|
||||
bool RCSDBManagerClass::insertRCSDataRecords(std::vector<RCSRecord>& records,
|
||||
int32_t projectID, double transpolarAngle) {
|
||||
if (records.empty()) {
|
||||
qDebug() <<u8"没有数据需要插入" ;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!_db) return false;
|
||||
|
||||
// 开始事务
|
||||
char* errMsg = nullptr;
|
||||
if (sqlite3_exec(_db, "BEGIN TRANSACTION", nullptr, nullptr, &errMsg) != SQLITE_OK) {
|
||||
qDebug() <<u8"开始事务失败: " << errMsg ;
|
||||
sqlite3_free(errMsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* sql = "INSERT INTO RCSDataTable "
|
||||
"(ProjectID, freq, az, inc, Transpolar, E_H_real, E_H_imag, E_V_real, E_V_imag, RCS_H, RCS_V) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
sqlite3_stmt* stmt;
|
||||
if (sqlite3_prepare_v2(_db, sql, -1, &stmt, nullptr) != SQLITE_OK) {
|
||||
qDebug() <<u8"准备SQL语句失败: " << sqlite3_errmsg(_db) ;
|
||||
sqlite3_exec(_db, "ROLLBACK", nullptr, nullptr, nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = true;
|
||||
for (const auto& data : records) {
|
||||
sqlite3_bind_int(stmt, 1, projectID);
|
||||
sqlite3_bind_double(stmt, 2, data.frequency);
|
||||
sqlite3_bind_double(stmt, 3, data.phi);
|
||||
sqlite3_bind_double(stmt, 4, data.theta);
|
||||
sqlite3_bind_double(stmt, 5, data.TransPolar);
|
||||
sqlite3_bind_double(stmt, 6, data.reEphi);
|
||||
sqlite3_bind_double(stmt, 7, data.imEphi);
|
||||
sqlite3_bind_double(stmt, 8, data.reEtheta);
|
||||
sqlite3_bind_double(stmt, 9, data.imEtheta);
|
||||
sqlite3_bind_double(stmt, 10, data.RCS_Phi);
|
||||
sqlite3_bind_double(stmt, 11, data.RCS_Theta);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
qDebug() <<u8"批量插入失败: " << sqlite3_errmsg(_db) ;
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
|
||||
sqlite3_reset(stmt);
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
if (success) {
|
||||
if (sqlite3_exec(_db, "COMMIT", nullptr, nullptr, &errMsg) != SQLITE_OK) {
|
||||
qDebug() <<u8"提交事务失败: " << errMsg ;
|
||||
sqlite3_free(errMsg);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
sqlite3_exec(_db, "ROLLBACK", nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
bool copyDirectory(const QString &sourcePath, const QString &targetPath, bool coverFileIfExist )
|
||||
{
|
||||
QDir sourceDir(sourcePath);
|
||||
if(!sourceDir.exists()) {
|
||||
qDebug() << u8"Source directory not exists:" << sourcePath;
|
||||
return false;
|
||||
}
|
||||
|
||||
QDir targetDir(targetPath);
|
||||
if(!targetDir.exists()) {
|
||||
if(!targetDir.mkpath(targetPath)) {
|
||||
qDebug() << u8"Failed to create target directory:" << targetPath;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QFileInfoList fileInfoList = sourceDir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
foreach(const QFileInfo &fileInfo, fileInfoList) {
|
||||
if(fileInfo.isDir()) {
|
||||
// 递归处理子目录
|
||||
if(!copyDirectory(fileInfo.filePath(),
|
||||
targetDir.filePath(fileInfo.fileName()),
|
||||
coverFileIfExist)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// 处理文件
|
||||
if(coverFileIfExist && targetDir.exists(fileInfo.fileName())) {
|
||||
targetDir.remove(fileInfo.fileName());
|
||||
}
|
||||
|
||||
if(!QFile::copy(fileInfo.filePath(),
|
||||
targetDir.filePath(fileInfo.fileName()))) {
|
||||
qDebug() << u8"Failed to copy file:" << fileInfo.filePath();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
QString writeUTF8StringFile(QString path,QString unicodeString) {
|
||||
QFile fileOut(path);
|
||||
if (!fileOut.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
return u8"";
|
||||
}
|
||||
|
||||
QTextStream streamFileOut(&fileOut);
|
||||
streamFileOut.setCodec("UTF-8");
|
||||
streamFileOut << unicodeString;
|
||||
streamFileOut.flush();
|
||||
fileOut.close();
|
||||
return path;
|
||||
}
|
||||
QFileInfoList findFilePath(const QString& strFilePath, const QString& strNameFilters, QDirIterator::IteratorFlag flag){
|
||||
QFileInfoList fileList;
|
||||
if (strFilePath.isEmpty() || strNameFilters.isEmpty())
|
||||
{
|
||||
return fileList;
|
||||
}
|
||||
|
||||
QDir dir;
|
||||
QStringList filters;
|
||||
filters << strNameFilters;
|
||||
dir.setPath(strFilePath);
|
||||
dir.setNameFilters(filters);
|
||||
QDirIterator iter(dir, flag);
|
||||
while (iter.hasNext())
|
||||
{
|
||||
iter.next();
|
||||
QFileInfo info = iter.fileInfo();
|
||||
if (info.isFile())
|
||||
{
|
||||
fileList.append(info);
|
||||
}
|
||||
}
|
||||
return fileList;
|
||||
}
|
||||
} // namespace RCSDBManagerTool
|
|
@ -0,0 +1,117 @@
|
|||
//
|
||||
// Created by 30453 on 25-6-25.
|
||||
// sql连接控制
|
||||
//
|
||||
|
||||
#ifndef LAMPCAE_RCSDBMANAGERCLASS_H
|
||||
#define LAMPCAE_RCSDBMANAGERCLASS_H
|
||||
#include "PluginRCSDBManagerAPI.h"
|
||||
#include "QtSql/QSqlDatabase"
|
||||
#include "QtSql/QSqlDatabase"
|
||||
#include "QtSql/QSqlQuery"
|
||||
#include "QtSql/QSqlError"
|
||||
#include "QtSql/QSqlTableModel"
|
||||
#include "QFileInfoList"
|
||||
#include "QDirIterator"
|
||||
#include <vector>
|
||||
#include <sqlite3.h>
|
||||
#include "PluginWBFZExchangePlugin/FEKOBaseToolClass.h"
|
||||
#include "QString"
|
||||
|
||||
namespace RCSDBManagerTool {
|
||||
|
||||
struct RCSRecord {
|
||||
int projectID;
|
||||
QString fileType;
|
||||
QString fileFormat;
|
||||
QString source;
|
||||
QString date;
|
||||
QString radiusStr;
|
||||
QString thetaStr;
|
||||
QString phiStr;
|
||||
QString frequencyStr;
|
||||
|
||||
double radius;
|
||||
double theta;
|
||||
double phi;
|
||||
|
||||
double reEr;
|
||||
double imEr;
|
||||
double reEtheta; // vertical 垂直 v
|
||||
double imEtheta;
|
||||
double reEphi; // horizontal 水平 H
|
||||
double imEphi;
|
||||
double RCS_Theta;
|
||||
double RCS_Phi;
|
||||
double RCS_Tatol;
|
||||
|
||||
double TransPolar;
|
||||
|
||||
QString configurationName;
|
||||
QString requestName;
|
||||
double frequency;
|
||||
QString coordinateSystem;
|
||||
Point_3d origin;
|
||||
int numRadiusSamples;
|
||||
int numThetaSamples;
|
||||
int numPhiSamples;
|
||||
QString resultType;
|
||||
int numHeaderLines;
|
||||
size_t prfidx = -1; // 脉冲计数,>0
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class PLUGINRCSDBMANAGERAPI RCSDBManagerClass {
|
||||
public:
|
||||
static RCSDBManagerClass* instance();
|
||||
|
||||
~RCSDBManagerClass();
|
||||
|
||||
bool initialize();
|
||||
bool createTables();
|
||||
bool insertRCSDataRecord(int projectId, double freq, double az, double inc,
|
||||
double transpolar, double eHReal, double eHImag,
|
||||
double eVReal, double eVImag, double rcsH, double rcsV);
|
||||
bool deleteRCSDataRecord(int projectId, double freq, double az,
|
||||
double inc, double transpolar);
|
||||
bool updateRCSDataRecord(int projectId, double freq, double az, double inc,
|
||||
double transpolar, double newEHReal, double newEHImag,
|
||||
double newEVReal, double newEVImag, double newRCSH, double newRCSV);
|
||||
|
||||
std::vector<RCSRecord> queryRCSDataRecords(int projectId, double freq,
|
||||
double az, double inc, double transpolar);
|
||||
|
||||
void closeDatabase();
|
||||
|
||||
int insertProject(const std::string& projectName, const std::string& projectFolder,
|
||||
const std::string& desc);
|
||||
std::vector<RCSRecord> queryProjects(int projectId,
|
||||
const std::string& projectName);
|
||||
bool deleteProject(int projectId);
|
||||
|
||||
bool insertRCSDataRecords(std::vector<RCSRecord>& records,
|
||||
int32_t projectID, double transpolarAngle);
|
||||
|
||||
private:
|
||||
RCSDBManagerClass(const std::string& dbPath);
|
||||
bool initializeDatabase(const std::string& dbFilePath);
|
||||
bool checkAndCreateTables();
|
||||
|
||||
static RCSDBManagerClass* _ins;
|
||||
sqlite3* _db;
|
||||
std::string _dbPath;
|
||||
|
||||
bool executeSQL(const std::string& sql);
|
||||
bool executeSQLWithParams(const std::string& sql,
|
||||
const std::vector<std::pair<int, std::string>>& params);
|
||||
};
|
||||
|
||||
QString writeUTF8StringFile(QString path,QString unicodeString);
|
||||
bool copyDirectory(const QString &sourcePath, const QString &targetPath, bool coverFileIfExist = false);
|
||||
QFileInfoList findFilePath(const QString& dirPath, const QString& pattern, QDirIterator::IteratorFlag flag= QDirIterator::IteratorFlag::Subdirectories);
|
||||
|
||||
} // namespace RCSDBManagerTool
|
||||
|
||||
#endif // LAMPCAE_RCSDBMANAGERCLASS_H
|
|
@ -0,0 +1,66 @@
|
|||
#include "RCSDBManagerPlugin.h"
|
||||
//#include "ll_qgis_base_lib.h"
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
#include <QMenuBar>
|
||||
#include <QMenu>
|
||||
#include "RCSImportDialog.h"
|
||||
|
||||
|
||||
GUI::MainWindow* RCSDBManagerTool::RCSDBManagerPlugin::_mainwindow = nullptr;
|
||||
|
||||
bool RCSDBManagerTool::RCSDBManagerPlugin::install()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool RCSDBManagerTool::RCSDBManagerPlugin::uninstall()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
GUI::MainWindow* RCSDBManagerTool::RCSDBManagerPlugin::getMWpt()
|
||||
{
|
||||
return _mainwindow;
|
||||
}
|
||||
|
||||
RCSDBManagerTool::RCSDBManagerPlugin::RCSDBManagerPlugin(GUI::MainWindow* m) {
|
||||
_describe = "RasterToolPlugin Installed Successfully";
|
||||
_mainwindow = m;
|
||||
connect(_mainwindow,SIGNAL(on_actionImportRCSDataSIGNAL()),this,SLOT(onImportRCSDBTableSlot()));
|
||||
connect(_mainwindow,SIGNAL(on_actionShowRCSTableSIGNAL()),this,SLOT(onShowRCSDBTableSlot()));
|
||||
connect(_mainwindow,SIGNAL(on_actionactionQueryRCSDataSIGNAL()),this,SLOT(onQueryRCSDBTableSlot()));
|
||||
|
||||
}
|
||||
void RCSDBManagerTool::RCSDBManagerPlugin::reTranslate(QString){}
|
||||
|
||||
|
||||
void RCSDBManagerTool::RCSDBManagerPlugin::onImportRCSDBTableSlot() {
|
||||
RCSImportDialog* dialog=new RCSImportDialog(_mainwindow);
|
||||
dialog->show();
|
||||
}
|
||||
void RCSDBManagerTool::RCSDBManagerPlugin::onShowRCSDBTableSlot() {
|
||||
|
||||
}
|
||||
void RCSDBManagerTool::RCSDBManagerPlugin::onQueryRCSDBTableSlot() {
|
||||
|
||||
}
|
||||
|
||||
namespace RCSDBManagerTool{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* ps)
|
||||
{
|
||||
qDebug()<<"RasterToolPlugin install RasterToolPlugin::install start Register";
|
||||
Plugins::PluginBase* p_meshdataExchangeplugin = new RCSDBManagerTool::RCSDBManagerPlugin(m);
|
||||
ps->append(p_meshdataExchangeplugin);
|
||||
qDebug()<<"RasterToolPlugin install RasterToolPlugin::install finish Register";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef _RASTERTOOLPLUGIN_H_
|
||||
#define _RASTERTOOLPLUGIN_H_
|
||||
|
||||
#include "PluginRCSDBManagerAPI.h"
|
||||
#include "PluginManager/pluginBase.h"
|
||||
#include "MainWindow/MainWindow.h"
|
||||
|
||||
namespace RCSDBManagerTool {
|
||||
|
||||
|
||||
class PLUGINRCSDBMANAGERAPI RCSDBManagerPlugin : public Plugins::PluginBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
RCSDBManagerPlugin(GUI::MainWindow* m);
|
||||
~RCSDBManagerPlugin() = default;
|
||||
|
||||
bool install();
|
||||
bool uninstall();
|
||||
void reTranslate(QString);
|
||||
static GUI::MainWindow* getMWpt();
|
||||
public slots:
|
||||
void onImportRCSDBTableSlot();
|
||||
void onShowRCSDBTableSlot();
|
||||
void onQueryRCSDBTableSlot();
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
};
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void PLUGINRCSDBMANAGERAPI Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* plugs);
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,364 @@
|
|||
//
|
||||
// Created by 30453 on 25-6-25.
|
||||
//
|
||||
|
||||
// You may need to build the project (run Qt uic code generator) to get "ui_RCSImportDialog.h"
|
||||
// resolved
|
||||
|
||||
#include "RCSImportDialog.h"
|
||||
#include "Settings/BusAPI.h"
|
||||
#include "Common/DebugLogger.h"
|
||||
#include "QFileInfo"
|
||||
#include "QDir"
|
||||
#include "QDebug"
|
||||
#include "QStandardItem"
|
||||
#include <QStandardItemModel>
|
||||
#include <QStringListModel>
|
||||
#include "QFileDialog"
|
||||
#include "PluginWBFZExchangePlugin/CMDExcuteApp.h"
|
||||
#include "PluginWBFZExchangePlugin/BaseTool.h"
|
||||
#include "PluginWBFZExchangePlugin/FileOperator.h"
|
||||
#include "RCSDBManagerClass.h"
|
||||
#include "PluginWBFZExchangePlugin/FEKOFarFieldFileClass.h"
|
||||
#include "PluginWBFZExchangePlugin/FEKOBaseToolClass.h"
|
||||
#include "ui_RCSImportDialog.h"
|
||||
|
||||
namespace RCSDBManagerTool {
|
||||
RCSImportDialog::RCSImportDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::RCSImportDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
this->CheckRCSDBFolder();
|
||||
// 事件绑定
|
||||
QObject::connect(ui->SelectFilepushButton,SIGNAL(clicked()),this,SLOT(onSelectPreFolderPushBtn()));
|
||||
QObject::connect(ui->AddPushBtn,SIGNAL(clicked()),this,SLOT(AddFekoResultClick()));
|
||||
QObject::connect(ui->deletePushBtn,SIGNAL(clicked()),this,SLOT(DeleteFekoResultClick()));
|
||||
QObject::connect(ui->ImportpushButton,SIGNAL(clicked()),this,SLOT(onImportpushButtonClicked()));
|
||||
QObject::connect(ui->CancelpushButton,SIGNAL(clicked()),this,SLOT(onCancelpushButtonClicked()));
|
||||
|
||||
|
||||
// 近场结果
|
||||
// this->ui->NearradioBtn->setEnabled(false);
|
||||
// this->ui->NearradioBtn->setHidden(true);
|
||||
// this->ui->NearradioBtn->setCheckable(false);
|
||||
// this->ui->NearradioBtn->setChecked(false);
|
||||
|
||||
// 初始化
|
||||
this->ListViewmodel = new QStandardItemModel(this);
|
||||
this->ui->listView->setModel(this->ListViewmodel);
|
||||
this->selectListViewmodel = new QStandardItemModel(this);
|
||||
this->selectListViewmodel->clear();
|
||||
this->ListViewmodel->clear();
|
||||
this->p = nullptr;
|
||||
|
||||
|
||||
}
|
||||
|
||||
RCSImportDialog::~RCSImportDialog()
|
||||
{
|
||||
|
||||
delete ui;
|
||||
}
|
||||
void RCSImportDialog::CheckRCSDBFolder() {
|
||||
QString RCSDbFilePath=Setting::BusAPI::instance()->getRcsdbFilePath();
|
||||
QString RCSDbRootPath=Setting::BusAPI::instance()->getRcsdbFoler();
|
||||
QString RCSProjectFolerPath=Setting::BusAPI::instance()->getRcsProjectPath();
|
||||
|
||||
this->CheckRCSDBFolder(RCSDbRootPath);
|
||||
this->CheckRCSDBFolder(RCSProjectFolerPath);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RCSImportDialog::CheckRCSDBFolder(const QString &rcsDbRootPath) {
|
||||
// 检查路径是否存在
|
||||
QDir dir(rcsDbRootPath);
|
||||
if (!dir.exists()) {
|
||||
// 如果路径不存在,则尝试创建
|
||||
if (dir.mkpath(u8".")) {
|
||||
qDebug() << u8"路径已成功创建:" << rcsDbRootPath;
|
||||
} else {
|
||||
qDebug() << u8"无法创建路径:" << rcsDbRootPath;
|
||||
}
|
||||
} else {
|
||||
qDebug() << u8"路径已存在:" << rcsDbRootPath;
|
||||
}
|
||||
}
|
||||
|
||||
void RCSImportDialog::onSelectPreFolderPushBtn() {
|
||||
//打开单个文件
|
||||
QString lastpath=Setting::BusAPI::instance()->getLastSelectPath();
|
||||
QString prefileNamePath = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
QString::fromUtf8(u8"选择.pre 文件"),
|
||||
lastpath,
|
||||
u8"pre文件 (*.pre)");//多组扩展名用双分号";;"隔开
|
||||
|
||||
Setting::BusAPI::instance()->setRcsdbFilePath(QFileInfo(prefileNamePath).absolutePath());
|
||||
|
||||
if (prefileNamePath.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->FEKOProjectFolderPath = getParantFromPath(prefileNamePath);
|
||||
this->FEKOPreFileName = getFileNameFromPath(prefileNamePath);
|
||||
this->farFieldNames = getFilelist(this->FEKOProjectFolderPath, ".ffe");
|
||||
this->nearFieldNames = getFilelist(this->FEKOProjectFolderPath, ".efe");
|
||||
qDebug()<<u8"RCSimportDialog debug: 84 "<<this->FEKOPreFileName;
|
||||
// 修改显示
|
||||
this->ListViewmodel->clear();
|
||||
qDebug()<<u8"RCSimportDialog debug: 95 "<<this->FEKOPreFileName;
|
||||
|
||||
this->ui->FolderPathtextEdit->setText(this->FEKOProjectFolderPath);
|
||||
this->ui->PreFileNametextEdit->setText(this->FEKOPreFileName);
|
||||
qDebug() << u8"RCSimportDialog debug: 98 add farfield in listview "<<this->FEKOPreFileName;
|
||||
|
||||
if (this->ui->FarradioBtn->isChecked()) {
|
||||
qDebug() << u8"RCSimportDialog debug: 99 add farfield in listview "<<this->FEKOPreFileName;
|
||||
for (int i = 0; i < this->farFieldNames.size(); i++) {
|
||||
QStandardItem* item = new QStandardItem(QString::QString(this->farFieldNames[i]));
|
||||
this->ListViewmodel->appendRow(item);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// this->ui->NearradioBtn->setChecked(true);
|
||||
// for (int i = 0; i < this->nearFieldNames.size(); i++) {
|
||||
// QStandardItem* item = new QStandardItem(QString::QString(this->nearFieldNames[i]));
|
||||
// this->ListViewmodel->appendRow(item);
|
||||
// }
|
||||
}
|
||||
|
||||
qDebug()<<u8"RCSimportDialog debug: 111 , ffe find over "<<this->FEKOPreFileName;
|
||||
|
||||
this->ui->listView->setModel(this->ListViewmodel);
|
||||
qDebug()<<(u8"farField Number:"+QString::number(this->farFieldNames.size()) + "\n" + u8"NearField Number:" + QString::number(this->nearFieldNames.size()) + "\n");
|
||||
|
||||
}
|
||||
|
||||
void RCSImportDialog::AddFekoResultClick() {
|
||||
QModelIndexList sourcelist=this->ui->listView->selectionModel()->selectedIndexes();
|
||||
std::vector<int> deleteRowids(0);
|
||||
for (int i = 0; i < sourcelist.count(); i++) {
|
||||
deleteRowids.push_back(sourcelist[i].row());
|
||||
// qDebug() << ("deletaRowids add :"+QString::number(sourcelist[i].row())+"\n");
|
||||
}
|
||||
std::sort(deleteRowids.begin(), deleteRowids.end());
|
||||
for (int i = deleteRowids.size() - 1; i >= 0; i--) {
|
||||
int select_Idx = deleteRowids[i];
|
||||
QList<QStandardItem*> listItem = this->ListViewmodel->takeRow(select_Idx);
|
||||
int nRightCount = this->selectListViewmodel->rowCount();
|
||||
this->selectListViewmodel->insertRow(nRightCount, listItem);
|
||||
// qDebug() << ("selectListViewmodel insertRow : "+ QString::number(select_Idx) +"-->" + QString::number(nRightCount) + "\n");
|
||||
}
|
||||
|
||||
this->ui->listView->setModel(this->ListViewmodel);
|
||||
this->ui->SelectlistView->setModel(this->selectListViewmodel);
|
||||
}
|
||||
|
||||
void RCSImportDialog::DeleteFekoResultClick() {
|
||||
QModelIndexList sourcelist = this->ui->SelectlistView->selectionModel()->selectedIndexes();
|
||||
std::vector<int> deleteRowids(0);
|
||||
for (int i = 0; i < sourcelist.count(); i++) {
|
||||
deleteRowids.push_back(sourcelist[i].row());
|
||||
}
|
||||
std::sort(deleteRowids.begin(), deleteRowids.end());
|
||||
for (int i = deleteRowids.size() - 1; i >= 0; i--) {
|
||||
int select_Idx = deleteRowids[i];
|
||||
QList<QStandardItem*> listItem = this->selectListViewmodel->takeRow(select_Idx);
|
||||
int nRightCount = this->ListViewmodel->rowCount();
|
||||
this->ListViewmodel->insertRow(nRightCount, listItem);
|
||||
// qDebug() << ("ListViewmodel insertRow : " + QString::number(select_Idx) + "-->" + QString::number(nRightCount) + "\n");
|
||||
}
|
||||
this->ui->listView->setModel(this->ListViewmodel);
|
||||
this->ui->SelectlistView->setModel(this->selectListViewmodel);
|
||||
}
|
||||
|
||||
void RCSImportDialog::onCancelpushButtonClicked() {
|
||||
this->close();
|
||||
}
|
||||
|
||||
void RCSImportDialog::FEKOResultImportButtonClick(QString outcsvPath) {
|
||||
this->FEKOResultCSVPath=outcsvPath;
|
||||
if (isExists(this->FEKOResultCSVPath)) {
|
||||
QFile file(this->FEKOResultCSVPath);
|
||||
if (!file.open(QIODevice::ReadWrite)) {
|
||||
QMessageBox::information(nullptr, u8"文件被占用", this->FEKOResultCSVPath);
|
||||
}
|
||||
else {
|
||||
file.close();
|
||||
removeFile(this->FEKOResultCSVPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QString csvpramarPath = this->FEKOResultCSVPath;
|
||||
csvpramarPath= csvpramarPath.replace(this->FEKOResultCSVPath.size() - 4, 4, ".params");
|
||||
// 获取选择文件
|
||||
std::vector<QString> selectfiles = this->getSelectFieldNames();
|
||||
QString parmas_text = this->FEKOResultCSVPath +"\n";// 输出路径
|
||||
for (int i = 0; i < selectfiles.size(); i++) {
|
||||
parmas_text = parmas_text + selectfiles[i] + "\n";
|
||||
}
|
||||
if (isExists(csvpramarPath)) {
|
||||
removeFile(csvpramarPath);
|
||||
}
|
||||
|
||||
|
||||
writeUTF8StringFile(csvpramarPath, (parmas_text));
|
||||
// 拼接命令行
|
||||
QString cmdtext = u8"";
|
||||
if (false) {
|
||||
cmdtext = cmdtext + u8"NearField2csvTool.exe";
|
||||
}
|
||||
else {
|
||||
cmdtext = cmdtext + u8"FarField2csvTool.exe";
|
||||
}
|
||||
if (nullptr != this->p) {
|
||||
this->p->close();
|
||||
delete this->p;
|
||||
this->p = nullptr;
|
||||
}
|
||||
this->p = new CMDExcuteApp();
|
||||
QObject::connect(this->p, SIGNAL(callbackExcuteResult()), this, SLOT(waitCMDExcute()));
|
||||
this->p->setAttribute(Qt::WA_DeleteOnClose);;
|
||||
this->p->show();
|
||||
this->p->excuteCmd(cmdtext, csvpramarPath);
|
||||
}
|
||||
|
||||
void RCSImportDialog::waitCMDExcute() {
|
||||
qDebug() << u8"转换程序执行结束";
|
||||
if (isExists(this->FEKOResultCSVPath)) {
|
||||
qDebug()<<u8"FEKOResult 保存成功\n路径:\t" + this->FEKOResultCSVPath;
|
||||
this->saveSucessfully = true;
|
||||
this->p->close();
|
||||
delete p;
|
||||
this->p = nullptr;
|
||||
}
|
||||
else {
|
||||
qDebug()<<u8"FEKOResult 保存失败\n路径:\t" + this->FEKOResultCSVPath;
|
||||
this->saveSucessfully = false;
|
||||
}
|
||||
|
||||
// 触发结果时间
|
||||
qDebug() << u8"准备执行转换结果编辑功能";
|
||||
this->RCSDataImport();
|
||||
}
|
||||
|
||||
// 数据入库
|
||||
void RCSImportDialog::RCSDataImport() {
|
||||
// csv数据文件
|
||||
|
||||
QString csvpath=this->FEKOResultCSVPath;
|
||||
QString fekoprename=this->FEKOPreFileName;
|
||||
QString fekofolderpath=this->inRCSDataProjectFolderPath;
|
||||
|
||||
RCSDBManagerClass* sqldb=RCSDBManagerClass::instance();
|
||||
QString descStr=this->ui->plainTextEditDesc->toPlainText();
|
||||
double transpolarangle=this->ui->doubleSpinBoxPolar->value();
|
||||
if (sqldb->initialize()) {
|
||||
int32_t projectID=sqldb->insertProject(this->FEKOPreFileName.toUtf8().constData(),
|
||||
this->FEKOProjectFolderPath.toUtf8().constData(),
|
||||
descStr.toUtf8().constData());
|
||||
|
||||
// 检查数据
|
||||
FEKOBase::RCSEchoDataComputer rsccomputer;
|
||||
rsccomputer.ComputerFromFile(csvpath);
|
||||
std::vector<FEKOBase::ElectricFieldData> datalist=rsccomputer.dataList;
|
||||
|
||||
std::vector<RCSRecord> records(datalist.size());
|
||||
|
||||
for (int32_t i=0;i<records.size();i++) {
|
||||
records[i].projectID=projectID;
|
||||
records[i].fileType=datalist[i].fileType;
|
||||
records[i].fileFormat=datalist[i].fileFormat;
|
||||
records[i].source=datalist[i].source;
|
||||
records[i].date=datalist[i].date;
|
||||
records[i].radiusStr=datalist[i].radiusStr;
|
||||
records[i].thetaStr=datalist[i].thetaStr;
|
||||
records[i].phiStr=datalist[i].phiStr;
|
||||
records[i].frequencyStr=datalist[i].frequencyStr;
|
||||
records[i].radius=datalist[i].radius;
|
||||
records[i].theta=datalist[i].theta;
|
||||
records[i].phi=datalist[i].phi;
|
||||
|
||||
records[i].reEr=datalist[i].reEr;
|
||||
records[i].imEr=datalist[i].imEr;
|
||||
records[i].reEtheta=datalist[i].reEtheta;
|
||||
records[i].imEtheta=datalist[i].imEtheta;
|
||||
records[i].reEphi=datalist[i].reEphi;
|
||||
records[i].imEphi=datalist[i].imEphi;
|
||||
records[i].RCS_Theta=datalist[i].RCS_Theta;
|
||||
records[i].RCS_Phi=datalist[i].RCS_Phi;
|
||||
records[i].RCS_Tatol=datalist[i].RCS_Tatol;
|
||||
|
||||
records[i].TransPolar=transpolarangle;
|
||||
|
||||
records[i].configurationName=datalist[i].configurationName;
|
||||
records[i].requestName=datalist[i].requestName;
|
||||
records[i].frequency=datalist[i].frequency;
|
||||
records[i].coordinateSystem=datalist[i].coordinateSystem;
|
||||
records[i].origin=datalist[i].origin;
|
||||
records[i].numRadiusSamples=datalist[i].numRadiusSamples;
|
||||
records[i].numThetaSamples=datalist[i].numThetaSamples;
|
||||
records[i].numPhiSamples=datalist[i].numPhiSamples;
|
||||
records[i].resultType=datalist[i].resultType;
|
||||
records[i].numHeaderLines=datalist[i].numHeaderLines;
|
||||
records[i].prfidx=datalist[i].prfidx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 插入数据
|
||||
if (sqldb->insertRCSDataRecords(records,projectID,transpolarangle)) {
|
||||
QMessageBox::information(nullptr,u8"提示",u8"数据入库成功");
|
||||
}else {
|
||||
QMessageBox::warning(nullptr,u8"警告",u8"数据插入失败");
|
||||
}
|
||||
|
||||
}else {
|
||||
QMessageBox::warning(nullptr,u8"警告",u8"数据库连接错误");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RCSImportDialog::onImportpushButtonClicked() {
|
||||
// 执行解析并处理逻辑
|
||||
QString fekoprename=QFileInfo(this->FEKOPreFileName).completeBaseName();
|
||||
qDebug()<<u8"fekoPreFileName : "<< fekoprename;
|
||||
|
||||
QString RCSDb_PreSaveFolder=Setting::BusAPI::instance()->getRcsProjectPath();
|
||||
QString RCSDb_rootFolder=Setting::BusAPI::instance()->getRcsdbFoler();
|
||||
|
||||
QString prefoldername=QString(u8"%1_%2").arg(fekoprename).arg(QString::fromStdString( Common::getCurrentTimeInHex()));
|
||||
QString fekofolderpath=JoinPath(RCSDb_PreSaveFolder,prefoldername);
|
||||
QDir dir;
|
||||
dir.mkpath(fekofolderpath);
|
||||
|
||||
// 工程文件复制
|
||||
copyDirectory(this->FEKOProjectFolderPath,fekofolderpath);
|
||||
this->inRCSDataProjectFolderPath=fekofolderpath;
|
||||
|
||||
QString outcsvpath=JoinPath(fekofolderpath,QString(u8"%1.csv").arg(prefoldername));
|
||||
|
||||
// 开始处理解析并生成结果文档
|
||||
this->FEKOResultImportButtonClick(outcsvpath);
|
||||
}
|
||||
|
||||
std::vector<QString> RCSImportDialog::getSelectFieldNames() {
|
||||
std::vector<QString> result(0);
|
||||
this->selectListViewmodel = (QStandardItemModel*)(this->ui->SelectlistView->model());
|
||||
int selectCount = this->ui->SelectlistView->model()->rowCount();
|
||||
for (int i = 0; i < selectCount; i++) {
|
||||
QStandardItem* listItem = this->selectListViewmodel->item(i);
|
||||
result.push_back(listItem->text());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace RCSDBManagerTool
|
|
@ -0,0 +1,73 @@
|
|||
//
|
||||
// Created by 30453 on 25-6-25.
|
||||
//
|
||||
|
||||
#ifndef LAMPCAE_RCSIMPORTDIALOG_H
|
||||
#define LAMPCAE_RCSIMPORTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <vector>
|
||||
#include <QStandardItemModel>
|
||||
#include <QString>
|
||||
|
||||
class QStandardItemModel;
|
||||
class CMDExcuteApp;
|
||||
|
||||
|
||||
namespace RCSDBManagerTool {
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class RCSImportDialog;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class RCSImportDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RCSImportDialog(QWidget* parent = nullptr);
|
||||
~RCSImportDialog() override;
|
||||
|
||||
public:
|
||||
void CheckRCSDBFolder();
|
||||
void CheckRCSDBFolder(const QString &rcsDbRootPath);
|
||||
|
||||
std::vector<QString> getSelectFieldNames();
|
||||
|
||||
public slots:
|
||||
void onSelectPreFolderPushBtn();
|
||||
|
||||
void AddFekoResultClick();
|
||||
void DeleteFekoResultClick();
|
||||
|
||||
void onImportpushButtonClicked();
|
||||
void onCancelpushButtonClicked();
|
||||
void waitCMDExcute();
|
||||
|
||||
void RCSDataImport();
|
||||
|
||||
public:
|
||||
QString FEKOProjectFolderPath;
|
||||
QString FEKOPreFileName;
|
||||
std::vector<QString> nearFieldNames;
|
||||
std::vector<QString> farFieldNames;
|
||||
QString FEKOResultCSVPath;
|
||||
|
||||
QString inRCSDataProjectFolderPath;
|
||||
|
||||
|
||||
private :
|
||||
QStandardItemModel* ListViewmodel;
|
||||
QStandardItemModel* selectListViewmodel;
|
||||
bool saveSucessfully;
|
||||
CMDExcuteApp* p;
|
||||
|
||||
public:
|
||||
void FEKOResultImportButtonClick(QString outcsvPath);
|
||||
|
||||
private:
|
||||
Ui::RCSImportDialog* ui;
|
||||
};
|
||||
} // namespace RCSDBManagerTool
|
||||
|
||||
#endif // LAMPCAE_RCSIMPORTDIALOG_H
|
|
@ -0,0 +1,341 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RCSDBManagerTool::RCSImportDialog</class>
|
||||
<widget class="QDialog" name="RCSDBManagerTool::RCSImportDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>690</width>
|
||||
<height>492</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>RCSImportDialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10" stretch="0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>pre工程路径:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="FolderPathtextEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string> </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="SelectFilepushButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>打开</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.pre文件名 </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="PreFileNametextEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string> </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="FarradioBtn">
|
||||
<property name="text">
|
||||
<string>FarField</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>发射极化角</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxPolar">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>水平极化 H:极化发射角值 0 <br/>垂直极化 V: 极化发射角值 180</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-361.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>361.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AddPushBtn">
|
||||
<property name="text">
|
||||
<string>>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deletePushBtn">
|
||||
<property name="text">
|
||||
<string><<</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="SelectlistView">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>工程描述</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEditDesc">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ImportpushButton">
|
||||
<property name="text">
|
||||
<string>导入FEKO结果</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="CancelpushButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -21,7 +21,7 @@ public:
|
|||
namespace Ui{
|
||||
class cmdExcuteWindows;
|
||||
}
|
||||
class CMDExcuteApp : public QMainWindow
|
||||
class WBFZAPI CMDExcuteApp : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -196,9 +196,9 @@ namespace FEKOBase {
|
|||
|
||||
double reEr;
|
||||
double imEr;
|
||||
double reEtheta;
|
||||
double reEtheta; // vertical 垂直 v
|
||||
double imEtheta;
|
||||
double reEphi;
|
||||
double reEphi; // horizontal 水平 H
|
||||
double imEphi;
|
||||
double RCS_Theta;
|
||||
double RCS_Phi;
|
||||
|
@ -230,11 +230,11 @@ namespace FEKOBase {
|
|||
std::vector<ElectricFieldData> electricFieldDataList; // 单频点信息
|
||||
};
|
||||
|
||||
bool compareElectricFieldDataInFreq(const ElectricFieldData& a, const ElectricFieldData& b);
|
||||
bool comparePRFPluseDataInPRFIdx(const PRFPluseData& a, const PRFPluseData& b);
|
||||
ElectricFieldData NearField2FarField(ElectricFieldData indata); // 近场转远场
|
||||
std::complex<double> NearElectricField2FarElectricField(std::complex<double> inEcho,double Radius,double freq);
|
||||
double RCSFromEField(std::complex<double> EFile);
|
||||
bool WBFZAPI compareElectricFieldDataInFreq(const ElectricFieldData& a, const ElectricFieldData& b);
|
||||
bool WBFZAPI comparePRFPluseDataInPRFIdx(const PRFPluseData& a, const PRFPluseData& b);
|
||||
ElectricFieldData WBFZAPI NearField2FarField(ElectricFieldData indata); // 近场转远场
|
||||
std::complex<double> WBFZAPI NearElectricField2FarElectricField(std::complex<double> inEcho,double Radius,double freq);
|
||||
double WBFZAPI RCSFromEField(std::complex<double> EFile);
|
||||
|
||||
|
||||
|
||||
|
@ -242,7 +242,7 @@ namespace FEKOBase {
|
|||
|
||||
|
||||
// 近场
|
||||
class NearFieldEchoCSVParser {
|
||||
class WBFZAPI NearFieldEchoCSVParser {
|
||||
public:
|
||||
NearFieldEchoCSVParser();
|
||||
~NearFieldEchoCSVParser();
|
||||
|
@ -272,7 +272,7 @@ namespace FEKOBase {
|
|||
|
||||
|
||||
// 远场
|
||||
class FarFieldEchoCSVParser {
|
||||
class WBFZAPI FarFieldEchoCSVParser {
|
||||
public:
|
||||
FarFieldEchoCSVParser();
|
||||
~FarFieldEchoCSVParser();
|
||||
|
@ -301,7 +301,7 @@ namespace FEKOBase {
|
|||
};
|
||||
|
||||
|
||||
class RCSEchoDataComputer{
|
||||
class WBFZAPI RCSEchoDataComputer{
|
||||
public:
|
||||
RCSEchoDataComputer();
|
||||
~RCSEchoDataComputer();
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#include <QtCore>
|
||||
#include <QtXml>
|
||||
#include <QDomDocument>
|
||||
|
||||
|
||||
|
||||
|
||||
#include "ui_FEKOResultImport.h"
|
||||
FEKOResultImport::FEKOResultImport(QWidget* parent)
|
||||
{
|
||||
|
@ -277,7 +281,6 @@ int FEKOResultImport::OpenPrejectFolderPath() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
void FEKOResultImport::waitCMDExcute()
|
||||
{
|
||||
qDebug() << u8"转换程序执行结束";
|
||||
|
@ -334,7 +337,6 @@ int FEKOResultImport::FEKOResultImportButtonClick()
|
|||
file.close();
|
||||
removeFile(this->FEKOResultCSVPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QString csvpramarPath = this->FEKOResultCSVPath;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <QObject>
|
||||
|
||||
class QObject;
|
||||
class QMainWindow;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define FILEOPERATOR_H
|
||||
|
||||
#include "referenceHeader.h"
|
||||
#include "WBFZExchangePluginAPI.h"
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <memory>
|
||||
|
@ -19,32 +20,32 @@
|
|||
#include <QDebug>
|
||||
|
||||
|
||||
bool isDirectory(const QString& path);
|
||||
bool isExists(const QString& path);
|
||||
bool isFile(const QString& path);
|
||||
void removeFile(const QString& filePath);
|
||||
unsigned long convertToULong(const QString& input);
|
||||
bool WBFZAPI isDirectory(const QString& path);
|
||||
bool WBFZAPI isExists(const QString& path);
|
||||
bool WBFZAPI isFile(const QString& path);
|
||||
void WBFZAPI removeFile(const QString& filePath);
|
||||
unsigned long WBFZAPI convertToULong(const QString& input);
|
||||
/// <summary>
|
||||
/// 获取文件(绝对路径)
|
||||
/// </summary>
|
||||
/// <param name="folderpath"></param>
|
||||
/// <param name="FilenameExtension"></param>
|
||||
/// <returns></returns>
|
||||
std::vector<QString> getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*",int (*logfun)(QString logtext,int value)=nullptr);
|
||||
std::vector<QString> WBFZAPI getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*",int (*logfun)(QString logtext,int value)=nullptr);
|
||||
|
||||
QString getParantFolderNameFromPath(const QString& path);
|
||||
QString WBFZAPI getParantFolderNameFromPath(const QString& path);
|
||||
|
||||
QString getFileNameFromPath(const QString& path);
|
||||
QString WBFZAPI getFileNameFromPath(const QString& path);
|
||||
|
||||
int write_binfile(char* filepath, char* data, size_t data_len);
|
||||
int WBFZAPI write_binfile(char* filepath, char* data, size_t data_len);
|
||||
|
||||
char* read_textfile(char* text_path, int* length);
|
||||
WBFZAPI char* read_textfile(char* text_path, int* length);
|
||||
|
||||
bool exists_test(const QString& name);
|
||||
bool WBFZAPI exists_test(const QString& name);
|
||||
|
||||
size_t fsize(FILE* fp);
|
||||
size_t WBFZAPI fsize(FILE* fp);
|
||||
|
||||
QString getParantFromPath(const QString& path);
|
||||
void copyFile(const QString& sourcePath, const QString& destinationPath);
|
||||
QString WBFZAPI getParantFromPath(const QString& path);
|
||||
void WBFZAPI copyFile(const QString& sourcePath, const QString& destinationPath);
|
||||
// QT FileOperator
|
||||
#endif
|
|
@ -81,7 +81,6 @@ namespace Setting
|
|||
|
||||
QSettings settingwriter(path + "/LAMPCAE.ini", QSettings::IniFormat);
|
||||
_mainSetting->writeINI(&settingwriter);
|
||||
// _solveOption->writeINI(&settingwriter);
|
||||
_graphOption->writeINI(&settingwriter);
|
||||
_messageSetting->writeINI(&settingwriter);
|
||||
}
|
||||
|
@ -300,4 +299,34 @@ namespace Setting
|
|||
void BusAPI::removeTask(TaskDesc* task) {
|
||||
_taskDescManager->removeTask(task);
|
||||
}
|
||||
void BusAPI::setRcsdbFoler(const QString& rcsdbFoler) {
|
||||
return _mainSetting->setRcsdbFoler(rcsdbFoler);
|
||||
|
||||
}
|
||||
void BusAPI::setRcsdbFilePath(const QString& rcsdbFilePath) {
|
||||
return _mainSetting->setRcsdbFilePath(rcsdbFilePath);
|
||||
}
|
||||
void BusAPI::setRcsProjectPath(const QString& rcsProjectPath) {
|
||||
return _mainSetting->setRcsProjectPath(rcsProjectPath);
|
||||
}
|
||||
const QString& BusAPI::getRcsdbFoler() const
|
||||
{
|
||||
return _mainSetting->getRcsdbFoler();
|
||||
}
|
||||
const QString& BusAPI::getRcsdbFilePath() const
|
||||
{
|
||||
return _mainSetting->getRcsdbFilePath();
|
||||
}
|
||||
const QString& BusAPI::getRcsProjectPath() const
|
||||
{
|
||||
return _mainSetting->getRcsProjectPath();
|
||||
}
|
||||
const QString & BusAPI::getLastSelectPath() const {
|
||||
return _mainSetting->getLastSelectPath();
|
||||
}
|
||||
|
||||
void BusAPI::setLastSelectPath(const QString &LastSelectPath) {
|
||||
_mainSetting->setLastSelectPath(LastSelectPath);
|
||||
}
|
||||
|
||||
}
|
|
@ -210,6 +210,7 @@ namespace Setting
|
|||
|
||||
void setMessageBkColor(const QColor &bkColor);
|
||||
|
||||
// FEKO
|
||||
const QString& getFekoInstallPath() const;
|
||||
void setFekoInstallPath(const QString& fekoInstallPath);
|
||||
const QString& getFekocadPath() const;
|
||||
|
@ -219,6 +220,18 @@ namespace Setting
|
|||
const QString& getPreFekoPath() const;
|
||||
void setPreFekoPath(const QString& preFekoPath);
|
||||
|
||||
//RCSDB
|
||||
void setRcsdbFoler(const QString& rcsdbFoler);
|
||||
void setRcsdbFilePath(const QString& rcsdbFilePath);
|
||||
void setRcsProjectPath(const QString& rcsProjectPath);
|
||||
const QString& getRcsdbFoler() const;
|
||||
const QString& getRcsdbFilePath() const;
|
||||
const QString& getRcsProjectPath() const;
|
||||
|
||||
// 上个选择的文件地址
|
||||
const QString &getLastSelectPath() const;
|
||||
void setLastSelectPath(const QString &_LastSelectPath);
|
||||
|
||||
// 任务描述管理
|
||||
TaskDescManager* getTaskDescManager();
|
||||
TaskDesc* getNewTask();
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace Setting
|
|||
_ui->setupUi(this);
|
||||
connect(this, SIGNAL(updateGraph()), mainwindow, SIGNAL(updateGraphOptionsSig()));
|
||||
connect(_ui->pushButtonSelectFekoInstallPath, SIGNAL(clicked()), this, SLOT(on_PushButtonSelectPath()));
|
||||
connect(_ui->RCSDbFileSelectBtn, SIGNAL(clicked()), this, SLOT(on_PushButtonRCSDataBaseSelectFilePath()));
|
||||
init();
|
||||
}
|
||||
GraphOptionDialog::~GraphOptionDialog()
|
||||
|
@ -150,11 +151,48 @@ namespace Setting
|
|||
int trans = _graphOption->getTransparency();
|
||||
_ui->TranspSlider->setValue(trans);
|
||||
|
||||
// 处理FEKO部分功能
|
||||
QString fekobingInstallerPath=BusAPI::instance()->getFekoInstallPath();
|
||||
if(fekobingInstallerPath.isEmpty()||!QFileInfo(fekobingInstallerPath).exists()){
|
||||
QString applicationexeDirpath=QFileInfo(BusAPI::instance()->getApplicationExePath()).absoluteFilePath(); // 目录
|
||||
QString fekorootdirpath=QDir(applicationexeDirpath).filePath("FEKO2020");
|
||||
fekorootdirpath=QDir(fekorootdirpath).filePath(u8"feko");
|
||||
fekobingInstallerPath=QDir(fekorootdirpath).filePath(u8"bin");
|
||||
qDebug()<<u8"find feko bin "<<fekobingInstallerPath;
|
||||
this->FindFEKOSetttingParams(fekobingInstallerPath);
|
||||
}else{
|
||||
_ui->lineEditFEKOPath->setText(BusAPI::instance()->getFekoInstallPath());
|
||||
_ui->lineEdit_CADFeko->setText(BusAPI::instance()->getFekocadPath());
|
||||
_ui->lineEditPreFEKO->setText(BusAPI::instance()->getPreFekoPath());
|
||||
_ui->lineEdit_RunFeko->setText(BusAPI::instance()->getRunFekoPath());
|
||||
}
|
||||
// 处理RCSDB功能文件部分
|
||||
QString RCSDBFolderPath=BusAPI::instance()->getRcsdbFoler();
|
||||
if(RCSDBFolderPath.isEmpty()||!QFileInfo(RCSDBFolderPath).exists()){
|
||||
QString applicationexeDirpath=QFileInfo(BusAPI::instance()->getApplicationExePath()).absoluteFilePath(); // 目录
|
||||
QString RCSDBrootdirpath=QDir(applicationexeDirpath).filePath(u8"RCSDbFoler");
|
||||
QString RCSDBFilePath=QDir(RCSDBrootdirpath).filePath(u8"rcsdq.sqlite3");
|
||||
QString RCSProjectFolder=QDir(RCSDBrootdirpath).filePath(u8"ProjectSetFolder");
|
||||
// 检查并创建对应的文件是否存在
|
||||
if(!QFileInfo(RCSDBrootdirpath).exists()){
|
||||
QDir dir;
|
||||
dir.mkpath(RCSDBrootdirpath);
|
||||
}
|
||||
if(!QFileInfo(RCSProjectFolder).exists()){
|
||||
QDir dir;
|
||||
dir.mkpath(RCSProjectFolder);
|
||||
}
|
||||
// 设置参数
|
||||
BusAPI::instance()->setRcsProjectPath(RCSProjectFolder);
|
||||
BusAPI::instance()->setRcsdbFoler(RCSDBrootdirpath);
|
||||
BusAPI::instance()->setRcsdbFilePath(RCSDBFilePath);
|
||||
}else{
|
||||
|
||||
}
|
||||
_ui->lineEditRCSDbFolderPath->setText(BusAPI::instance()->getRcsdbFoler());
|
||||
_ui->lineEditRCSDBFilePath->setText(BusAPI::instance()->getRcsdbFilePath());
|
||||
_ui->lineEditProjectFolder->setText(BusAPI::instance()->getRcsProjectPath());
|
||||
}
|
||||
void GraphOptionDialog::accept()
|
||||
{
|
||||
_graphOption->setBackgroundTopColor(_ui->bgTopComboBox->currentColor());
|
||||
|
@ -191,6 +229,28 @@ namespace Setting
|
|||
void GraphOptionDialog::on_PushButtonSelectPath() {
|
||||
QString FEKOBinPath = QFileDialog::getExistingDirectory(
|
||||
this, tr("Select FEKO Install Path"), BusAPI::instance()->getApplicationExePath());
|
||||
this->FindFEKOSetttingParams(FEKOBinPath);
|
||||
}
|
||||
|
||||
QMap<QString, QString> GraphOptionDialog::checkFEKOExecutablesAndReturnPaths(const QString& directoryPath) {
|
||||
QStringList fekoExecutables = {"cadfeko.exe", "prefeko.exe", "runfeko.exe"};
|
||||
QMap<QString, QString> executablePaths;
|
||||
qDebug()<<directoryPath;
|
||||
for (const QString& executable : fekoExecutables) {
|
||||
QString filePath = QDir(directoryPath).absoluteFilePath(executable);
|
||||
qDebug()<<filePath;
|
||||
if (QFile::exists(filePath)) {
|
||||
executablePaths[executable] = filePath; // Executable exists, store its path
|
||||
} else {
|
||||
executablePaths[executable] = ""; // Executable does not exist, store an empty string
|
||||
}
|
||||
}
|
||||
|
||||
return executablePaths; // Return the map containing executable names and their paths
|
||||
}
|
||||
void GraphOptionDialog::FindFEKOSetttingParams(QString FEKOBinPath) {
|
||||
|
||||
|
||||
if(QDir(FEKOBinPath).exists()) {
|
||||
_ui->lineEditFEKOPath->setText(FEKOBinPath);
|
||||
BusAPI::instance()->setFekoInstallPath(FEKOBinPath);
|
||||
|
@ -237,22 +297,10 @@ namespace Setting
|
|||
QMessageBox::warning(this, u8"警告", "检查Feko安装,runfeko");
|
||||
}
|
||||
}
|
||||
void GraphOptionDialog::on_PushButtonRCSDataBaseSelectFilePath() {
|
||||
// 获取sqllite的dB数据库文件
|
||||
QString RCSDbFolerPath = QFileDialog::getExistingDirectory(
|
||||
this, tr("Select RCS Database Foler Path"), BusAPI::instance()->getApplicationExePath());
|
||||
|
||||
QMap<QString, QString> GraphOptionDialog::checkFEKOExecutablesAndReturnPaths(const QString& directoryPath) {
|
||||
QStringList fekoExecutables = {"cadfeko.exe", "prefeko.exe", "runfeko.exe"};
|
||||
QMap<QString, QString> executablePaths;
|
||||
qDebug()<<directoryPath;
|
||||
for (const QString& executable : fekoExecutables) {
|
||||
QString filePath = QDir(directoryPath).absoluteFilePath(executable);
|
||||
qDebug()<<filePath;
|
||||
if (QFile::exists(filePath)) {
|
||||
executablePaths[executable] = filePath; // Executable exists, store its path
|
||||
} else {
|
||||
executablePaths[executable] = ""; // Executable does not exist, store an empty string
|
||||
}
|
||||
}
|
||||
|
||||
return executablePaths; // Return the map containing executable names and their paths
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ namespace Setting
|
|||
void on_out_CancelButton_clicked();
|
||||
|
||||
void on_PushButtonSelectPath();
|
||||
void FindFEKOSetttingParams(QString fekobinPath);
|
||||
void on_PushButtonRCSDataBaseSelectFilePath();
|
||||
private:
|
||||
/**
|
||||
* @brief 将绘图选项框的信息赋予_graphOption并触发updateGraph()信号
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="colorTab">
|
||||
<attribute name="title">
|
||||
|
@ -498,6 +498,130 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>RCS数据库管理</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>实体文件夹: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditProjectFolder">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RCS数据文件: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditRCSDBFilePath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RCS数据文件夹:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditRCSDbFolderPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="RCSDbFileSelectBtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -74,6 +74,8 @@ namespace Setting
|
|||
_showMeshNode = settings->value("/MeshDisplay/ShowNode").toBool();
|
||||
_showMeshEdge = settings->value("/MeshDisplay/ShowEdge").toBool();
|
||||
_showMeshFace = settings->value("/MeshDisplay/ShowFace").toBool();
|
||||
|
||||
|
||||
}
|
||||
void GraphOption::setBackgroundTopColor(QColor c)
|
||||
{
|
||||
|
|
|
@ -40,9 +40,20 @@ namespace Setting
|
|||
setting->setValue("/Feko/FekocadPath", _FEKOCADPath);
|
||||
setting->setValue("/Feko/RunFekoPath", _RunFEKOPath);
|
||||
setting->setValue("/Feko/preFekoPath", _preFEKOPath);
|
||||
setting->setValue("/RCSDataBase/RCSDBFolder", _RCSDBFoler);
|
||||
setting->setValue("/RCSDataBase/RCSDBFile", _RCSDBFilePath);
|
||||
setting->setValue("/RCSDataBase/RCSProjectFolder", _RCSProjectPath);
|
||||
setting->setValue("/Path/LastSelectPath", _LastSelectPath);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
void MainSetting::readINI(QSettings *setting)
|
||||
{
|
||||
_LastSelectPath=setting->value("/Path/LastSelectPath").toString();
|
||||
|
||||
_workingDir = setting->value("/Path/WorkingDir").toString();
|
||||
_language = setting->value("/Language/Language").toString();
|
||||
_recentFiles = setting->value("/Recent/RecentFile").toStringList();
|
||||
|
@ -54,7 +65,9 @@ namespace Setting
|
|||
_FEKOCADPath=setting->value("/Feko/FekocadPath" ).toString();
|
||||
_RunFEKOPath=setting->value("/Feko/RunFekoPath" ).toString();
|
||||
_preFEKOPath=setting->value("/Feko/preFekoPath" ).toString();
|
||||
|
||||
_RCSDBFoler=setting->value("/RCSDataBase/RCSDBFolder").toString();
|
||||
_RCSDBFilePath=setting->value("/RCSDataBase/RCSDBFile" ).toString();
|
||||
_RCSProjectPath=setting->value("/RCSDataBase/RCSProjectFolder").toString();
|
||||
|
||||
QDir dir(_workingDir);
|
||||
|
||||
|
@ -157,6 +170,15 @@ namespace Setting
|
|||
{
|
||||
return _plugins;
|
||||
}
|
||||
|
||||
const QString & MainSetting::getLastSelectPath() const {
|
||||
return _LastSelectPath;
|
||||
}
|
||||
|
||||
void MainSetting::setLastSelectPath(const QString &LastSelectPath) {
|
||||
this->_LastSelectPath = LastSelectPath;
|
||||
}
|
||||
|
||||
const QString& MainSetting::getFekoInstallPath() const
|
||||
{
|
||||
return _FEKOInstallPath;
|
||||
|
@ -189,5 +211,29 @@ namespace Setting
|
|||
{
|
||||
_preFEKOPath = preFekoPath;
|
||||
}
|
||||
const QString& MainSetting::getRcsdbFoler() const
|
||||
{
|
||||
return _RCSDBFoler;
|
||||
}
|
||||
const QString& MainSetting::getRcsdbFilePath() const
|
||||
{
|
||||
return _RCSDBFilePath;
|
||||
}
|
||||
const QString& MainSetting::getRcsProjectPath() const
|
||||
{
|
||||
return _RCSProjectPath;
|
||||
}
|
||||
void MainSetting::setRcsdbFoler(const QString& rcsdbFoler)
|
||||
{
|
||||
_RCSDBFoler = rcsdbFoler;
|
||||
}
|
||||
void MainSetting::setRcsdbFilePath(const QString& rcsdbFilePath)
|
||||
{
|
||||
_RCSDBFilePath = rcsdbFilePath;
|
||||
}
|
||||
void MainSetting::setRcsProjectPath(const QString& rcsProjectPath)
|
||||
{
|
||||
_RCSProjectPath = rcsProjectPath;
|
||||
}
|
||||
|
||||
}
|
|
@ -70,6 +70,12 @@ namespace Setting
|
|||
QString _licensePath;
|
||||
QStringList _plugins{};
|
||||
QString _FEKOInstallPath;
|
||||
QString _LastSelectPath;
|
||||
|
||||
public:
|
||||
const QString &getLastSelectPath() const;
|
||||
void setLastSelectPath(const QString &_LastSelectPath);
|
||||
|
||||
|
||||
public:
|
||||
const QString& getFekoInstallPath() const;
|
||||
|
@ -82,13 +88,26 @@ namespace Setting
|
|||
private:
|
||||
QString _FEKOCADPath;
|
||||
QString _RunFEKOPath;
|
||||
QString _preFEKOPath;
|
||||
|
||||
private: // RCSDB
|
||||
QString _RCSDBFoler;
|
||||
QString _RCSDBFilePath;
|
||||
QString _RCSProjectPath;
|
||||
public:
|
||||
void setRcsdbFoler(const QString& rcsdbFoler);
|
||||
void setRcsdbFilePath(const QString& rcsdbFilePath);
|
||||
void setRcsProjectPath(const QString& rcsProjectPath);
|
||||
const QString& getRcsdbFoler() const;
|
||||
const QString& getRcsdbFilePath() const;
|
||||
const QString& getRcsProjectPath() const;
|
||||
|
||||
public:
|
||||
const QString& getPreFekoPath() const;
|
||||
void setPreFekoPath(const QString& preFekoPath);
|
||||
|
||||
private:
|
||||
QString _preFEKOPath;
|
||||
|
||||
bool _showUserGuidance{true};
|
||||
bool _useRibbon{true};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue