整理项目生成规则到logPlusAll.pro, 项目依赖等,不需要一个一个编译

Python算法二次开发模块封装pythonhandler
py源码文件生成pyd
This commit is contained in:
DESKTOP-450PEFP\mainc 2026-03-17 15:27:56 +08:00
parent 72c2ceb5cb
commit ae0c8f0c11
41 changed files with 1951 additions and 8166 deletions

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -68,7 +68,7 @@ INCLUDEPATH += ../../Slfio/include
INCLUDEPATH += ../include
INCLUDEPATH += ../../common
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lslfio
}

View File

@ -22,16 +22,16 @@ INCLUDEPATH += ../include/ \
# Default rules for deployment.
CONFIG(debug, debug|release){
TARGET = CallPlugind
DESTDIR = ../Bin
DESTDIR = $$PWD/../Bin
MOC_DIR = ../tmp/CallPlugind
UI_DIR = ../tmp/CallPlugind
OBJECTS_DIR = ../tmp/CallPlugind
LIBS += -L../Bin/ -lHPluginManaged
LIBS += -L$$PWD/../Bin/ -lHPluginManaged
} else {
TARGET = CallPlugin
DESTDIR = ../Bin
DESTDIR = $$PWD/../BinR
MOC_DIR = ../tmp/CallPlugin
UI_DIR = ../tmp/CallPlugin
OBJECTS_DIR = ../tmp/CallPlugin
LIBS += -L../Bin/ -lHPluginManage
LIBS += -L$$PWD/../BinR/ -lHPluginManage
}

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -79,13 +79,13 @@ INCLUDEPATH += ../../WellLogUI/include
INCLUDEPATH += ../../BaseFun/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lWellLogUId
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lWellLogUId
} else {
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lWellLogUI
LIBS += -L$$PWD/../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lWellLogUI
}

View File

@ -38,10 +38,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -92,7 +92,8 @@ HEADERS += \
cdialog.h \
dataslothelper.h \
deptlineedit.h \
view.h
view.h \
../include/DataManagger.h
SOURCES += \
../../common/geometryutils.cpp \
@ -141,9 +142,9 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lslfio
}

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -84,11 +84,11 @@ INCLUDEPATH += ../../OSGFramework/include
INCLUDEPATH += ../../common
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lConvertorManagerd
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lConvertorManagerd
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lConvertorManager
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lConvertorManager
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lslfio
}

View File

@ -28,7 +28,7 @@ INCLUDEPATH += ../../common \
../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include\
../../Workflow/WFWidget/include
HEADERS += ../include/*.h
# HEADERS += ../include/*.h
SOURCES += *.cpp
@ -36,10 +36,10 @@ SOURCES += *.cpp
OBJECTS_DIR = ../obj
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
CONFIG += qt warn_off \
@ -53,7 +53,7 @@ DEFINES += QT_DLL
# 目标文件夹
#CATEGORY = OSGDataModel
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lslfio
}

View File

@ -38,10 +38,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -54,9 +54,6 @@ SOURCES += ../src/customlistwidget.cpp \
wellloginformation.cpp
HEADERS += \
../../common/geometryutils.h \
../include/BaseObject.h \
../include/ObjWelllog.h \
../include/ObjWelllogTABLE.h \
../include/wellloginformation.h \
customlistwidget.h
@ -82,9 +79,9 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFWidget/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lOSGDataModel
}

View File

@ -21,13 +21,13 @@ INCLUDEPATH += ../include/
# Default rules for deployment.
CONFIG(debug, debug|release){
TARGET = HPluginManaged
DESTDIR = ../Bin
DESTDIR = $$PWD/../Bin
MOC_DIR = ../tmp/HPluginManaged
UI_DIR = ../tmp/HPluginManaged
OBJECTS_DIR = ../tmp/HPluginManaged
} else {
TARGET = HPluginManage
DESTDIR = ../Bin
DESTDIR = $$PWD/../BinR
MOC_DIR = ../tmp/HPluginManage
UI_DIR = ../tmp/HPluginManage
OBJECTS_DIR = ../tmp/HPluginManage

View File

@ -39,10 +39,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -113,25 +113,25 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += ../../Workflow/WFWidget/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lDataMgrd
LIBS += -L../../Bin -lOSGFrameworkd
LIBS += -L../../Bin -lWellLogUId
LIBS += -L../../Bin -lWellLogModuled
LIBS += -L../../Bin -lWFWidgetd
LIBS += -L../../Bin -lWFCrystald
LIBS += -L../../Bin -lWFEngined
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lDataMgrd
LIBS += -L$$PWD/../../Bin -lOSGFrameworkd
LIBS += -L$$PWD/../../Bin -lWellLogUId
LIBS += -L$$PWD/../../Bin -lWellLogModuled
LIBS += -L$$PWD/../../Bin -lWFWidgetd
LIBS += -L$$PWD/../../Bin -lWFCrystald
LIBS += -L$$PWD/../../Bin -lWFEngined
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lDataMgr
LIBS += -L../../Bin -lOSGFramework
LIBS += -L../../Bin -lWellLogUI
LIBS += -L../../Bin -lWellLogModule
LIBS += -L../../Bin -lWFWidget
LIBS += -L../../Bin -lWFCrystal
LIBS += -L../../Bin -lWFEngine
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lDataMgr
LIBS += -L$$PWD/../../BinR -lOSGFramework
LIBS += -L$$PWD/../../BinR -lWellLogUI
LIBS += -L$$PWD/../../BinR -lWellLogModule
LIBS += -L$$PWD/../../BinR -lWFWidget
LIBS += -L$$PWD/../../BinR -lWFCrystal
LIBS += -L$$PWD/../../BinR -lWFEngine
}

View File

@ -20,10 +20,10 @@ INCLUDEPATH += ../../common \
OBJECTS_DIR = ../obj
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
CONFIG += qt warn_off \
@ -51,9 +51,9 @@ HEADERS += \
# 目标文件夹
#CATEGORY = OSGDataModel
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lWFEngined
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lWFEngined
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lWFEngine
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lWFEngine
}

File diff suppressed because it is too large Load Diff

View File

@ -1,300 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="BaseLineFillProperty.cpp" />
<ClCompile Include="BaseObject.cpp" />
<ClCompile Include="ColorInterpolate.cpp" />
<ClCompile Include="CurveLineLog.cpp" />
<ClCompile Include="CustomPropertyRegister.cpp" />
<ClCompile Include="DialogFactory.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjCoreImage.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjGeostratums.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjGraphicsHeadCell.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjPixmapItem.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjRegressionFormula.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ItemGroupPropertyies.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWellGraphicsHead.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjCoreImage.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjGeostratums.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjGraphicsHeadCell.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjPixmapItem.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ItemGroupPropertyies.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjRegressionFormula.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjWellGraphicsHead.cpp" />
<ClCompile Include="GeoStratificationProperty.cpp" />
<ClCompile Include="Interpolate.cpp" />
<ClCompile Include="ItemGroupPropertyies.cpp" />
<ClCompile Include="MacroInterpreter.cpp" />
<ClCompile Include="ObjCurve.cpp" />
<ClCompile Include="ObjGraphicsHeadCell.cpp" />
<ClCompile Include="ObjGeostratums.cpp" />
<ClCompile Include="ObjRegressionFormula.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_BaseObject.cpp" />
<ClCompile Include="DocumentTemplate.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjContourImpl.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjCrossplot.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjDiscreteWellLog.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjectEvent.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjEllipse.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjPolygon.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjRect.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWell.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWordsResult.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_BaseObject.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjContourImpl.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjCrossplot.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjDiscreteWellLog.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjectEvent.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjEllipse.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjPolygon.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjRect.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjWell.cpp" />
<ClCompile Include="GeneratedFiles\Release\moc_ObjWordsResult.cpp" />
<ClCompile Include="GeologicalStratificationRoot.cpp" />
<ClCompile Include="GeologicalStratificatonObject.cpp" />
<ClCompile Include="LineProperty.cpp" />
<ClCompile Include="ObjBitmap.cpp" />
<ClCompile Include="ObjContourImpl.cpp" />
<ClCompile Include="ObjCoreImage.cpp" />
<ClCompile Include="ObjCrossplot.cpp" />
<ClCompile Include="ObjDiscreteWellLog.cpp" />
<ClCompile Include="ObjectEvent.cpp" />
<ClCompile Include="ObjectEventEnum.cpp" />
<ClCompile Include="ObjectFolder.cpp" />
<ClCompile Include="ObjectGenralFactory.cpp" />
<ClCompile Include="ObjectIDDescription.cpp" />
<ClCompile Include="ObjectViewInfo.cpp" />
<ClCompile Include="ObjEllipse.cpp" />
<ClCompile Include="ObjNodeUserData.cpp" />
<ClCompile Include="ObjPixmapItem.cpp" />
<ClCompile Include="ObjPolygon.cpp" />
<ClCompile Include="ObjProject.cpp" />
<ClCompile Include="ObjRect.cpp" />
<ClCompile Include="ObjRegression.cpp" />
<ClCompile Include="ObjGeoLayerData.cpp" />
<ClCompile Include="ObjSeismic.cpp" />
<ClCompile Include="ObjWell.cpp" />
<ClCompile Include="ObjWellGraphicsHead.cpp" />
<ClCompile Include="ObjWellLog.cpp" />
<ClCompile Include="ObjWellLogBIN.cpp" />
<ClCompile Include="ObjWellLogFMT.cpp" />
<ClCompile Include="ObjWellLogINP.cpp" />
<ClCompile Include="ObjWelllogRound.cpp" />
<ClCompile Include="ObjWellLogTABLE.cpp" />
<ClCompile Include="ObjWellLogTDT.cpp" />
<ClCompile Include="ObjWellLogTrack.cpp" />
<ClCompile Include="ObjWellLogWavefile.cpp" />
<ClCompile Include="ObjWellRulerTrack.cpp" />
<ClCompile Include="ObjWellTrack.cpp" />
<ClCompile Include="ObjWellTrajectory.cpp" />
<ClCompile Include="ObjWordsResult.cpp" />
<ClCompile Include="PointProperty.cpp" />
<ClCompile Include="Project.cpp" />
<ClCompile Include="TextProperty.cpp" />
<ClCompile Include="ViewInfoMetaProperty.cpp" />
<ClCompile Include="Well.cpp" />
<ClCompile Include="WelllogRound.cpp" />
<ClCompile Include="WellLogWorkflowDataModel.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllog.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllog.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWellTrajectory.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWellTrajectory.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWellRulerTrack.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWellRulerTrack.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogTDT.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogTDT.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogTABLE.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogTABLE.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogRound.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogRound.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogINP.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogINP.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogFMT.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogFMT.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogBIN.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogBIN.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWelllogWavefile.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWelllogWavefile.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjWellLogTrack.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjWellLogTrack.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_ObjectEvent.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_ObjectEvent.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="CurveFillProperty.cpp">
<Filter>Header Files</Filter>
</ClCompile>
<ClCompile Include="MyWelllogRound.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\BaseLineFillProperty.h" />
<ClInclude Include="..\include\ColorInterpolate.h" />
<ClInclude Include="..\include\CurveLineLog.h" />
<ClInclude Include="..\include\CustomPropertyRegister.h" />
<ClInclude Include="..\include\DialogFactory.h" />
<ClInclude Include="..\include\GeoStratificationProperty.h" />
<ClInclude Include="..\include\Interpolate.h" />
<ClInclude Include="..\include\MacroInterpreter.h" />
<ClInclude Include="..\include\ObjBaseObject.h" />
<ClInclude Include="..\include\ObjCurve.h" />
<ClInclude Include="..\include\ObjRegression.h" />
<ClInclude Include="..\include\ObjGeoLayerData.h" />
<ClInclude Include="..\include\Project.h" />
<ClInclude Include="..\include\Well.h" />
<ClInclude Include="..\include\CurveFillProperty.h" />
<ClInclude Include="..\include\DocumentTemplate.h" />
<ClInclude Include="..\include\GeologicalStratificationRoot.h" />
<ClInclude Include="..\include\GeologicalStratificatonObject.h" />
<ClInclude Include="..\include\LineProperty.h" />
<ClInclude Include="..\include\ObjBitmap.h" />
<ClInclude Include="..\include\ObjectEventEnum.h" />
<ClInclude Include="..\include\ObjectFolder.h" />
<ClInclude Include="..\include\ObjectIDDescription.h" />
<ClInclude Include="..\include\ObjNodeUserData.h" />
<ClInclude Include="..\include\OSGDataModel.h" />
<ClInclude Include="..\include\PointProperty.h" />
<ClInclude Include="..\include\TextProperty.h" />
<ClInclude Include="..\include\ViewInfoMetaProperty.h" />
<ClInclude Include="..\include\MyWelllogRound.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjWellTrack.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjectID.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjectViewInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\WellLogWorkflowDataModel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjectGenralFactory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjSeismic.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ObjProject.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\include\ItemGroupPropertyies.h" />
<CustomBuild Include="..\include\ObjRegressionFormula.h" />
<CustomBuild Include="..\include\ObjGraphicsHeadCell.h" />
<CustomBuild Include="..\include\ObjContourImpl.h" />
<CustomBuild Include="..\include\ObjCoreImage.h" />
<CustomBuild Include="..\include\ObjDiscreteWellLog.h" />
<CustomBuild Include="..\include\ObjPixmapItem.h" />
<CustomBuild Include="..\include\ObjWordsResult.h" />
<CustomBuild Include="..\include\ObjRect.h" />
<CustomBuild Include="..\include\ObjPolygon.h" />
<CustomBuild Include="..\include\ObjEllipse.h" />
<CustomBuild Include="..\include\ObjCrossplot.h" />
<CustomBuild Include="..\include\ObjGeostratums.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="..\include\BaseObject.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="..\include\ObjWell.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="..\include\ObjWellGraphicsHead.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="..\include\ObjWelllog.h" />
<CustomBuild Include="..\include\WelllogRound.h" />
<CustomBuild Include="..\include\ObjWellTrajectory.h" />
<CustomBuild Include="..\include\ObjWellRulerTrack.h" />
<CustomBuild Include="..\include\ObjWelllogTDT.h" />
<CustomBuild Include="..\include\ObjWelllogTABLE.h" />
<CustomBuild Include="..\include\ObjWelllogRound.h" />
<CustomBuild Include="..\include\ObjWelllogINP.h" />
<CustomBuild Include="..\include\ObjWelllogFMT.h" />
<CustomBuild Include="..\include\ObjWelllogBIN.h" />
<CustomBuild Include="..\include\ObjWelllogWavefile.h" />
<CustomBuild Include="..\include\ObjWellLogTrack.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="..\include\ObjectEvent.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="..\paiobjectmodel.libinfo" />
<None Include="OSGDataModel.pro" />
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h</Extensions>
<ParseFiles>true</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>moc;h;cpp</Extensions>
<ParseFiles>true</ParseFiles>
</Filter>
<Filter Include="Generated Files\Debug">
<UniqueIdentifier>{da09c0db-14b6-45b4-8ac6-c92eb7b93451}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Generated Files\Release">
<UniqueIdentifier>{925a2982-4521-4736-babb-dbe6c3755133}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
</Project>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\Qt4.7.1</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
<LocalDebuggerCommand>D:\LogPlus\bin\LogPlus.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\Qt4.7.1</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -68,13 +68,13 @@ INCLUDEPATH += ../../Workflow/include \
../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lDataMgrd
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lDataMgrd
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lDataMgr
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lDataMgr
}

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}

View File

@ -37,10 +37,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -70,15 +70,15 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFCrystal/SysUtility/utils/include
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lDataMgrd
LIBS += -L../../Bin -lWFEngined
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lDataMgrd
LIBS += -L$$PWD/../../Bin -lWFEngined
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lDataMgr
LIBS += -L../../Bin -lWFEngine
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lDataMgr
LIBS += -L$$PWD/../../BinR -lWFEngine
}

View File

@ -38,10 +38,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -114,13 +114,13 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFWidget/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lDataMgrd
LIBS += -L$$PWD/../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lBaseFund
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../Bin -lDataMgrd
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lDataMgr
LIBS += -L$$PWD/../../BinR -lslfio
LIBS += -L$$PWD/../../BinR -lBaseFun
LIBS += -L$$PWD/../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../BinR -lDataMgr
}

View File

@ -42,10 +42,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -78,7 +78,7 @@ INCLUDEPATH += ./SysUtility/utils/include
INCLUDEPATH += ./SysUtility/configuration/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lslfio
}

View File

@ -43,10 +43,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
@ -98,7 +98,7 @@ INCLUDEPATH += ../WFCrystal/Crystal/include
INCLUDEPATH += ../WFCrystal/SysUtility/utils/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lWFCrystald
LIBS += -L$$PWD/../../Bin -lWFCrystald
} else {
LIBS += -L../../Bin -lWFCrystal
LIBS += -L$$PWD/../../BinR -lWFCrystal
}

View File

@ -38,10 +38,10 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../../Bin
DESTDIR = $$PWD/../../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../../Bin
DESTDIR = $$PWD/../../../BinR
TARGET = $$join(TARGET,,,)
}
@ -109,7 +109,7 @@ INCLUDEPATH += ../../WFCrystal/SysUtility/configuration/include
INCLUDEPATH += ../../WFCrystal/SysUtility/utils/include
CONFIG(debug, debug|release){
LIBS += -L../../../Bin -lWFCrystald
LIBS += -L$$PWD/../../../Bin -lWFCrystald
} else {
LIBS += -L../../../Bin -lWFCrystal
LIBS += -L$$PWD/../../../BinR -lWFCrystal
}

View File

@ -0,0 +1,326 @@
#include "CStringType.h"
#include <QLabel>
char *m_temp=NULL;
CString::CString(const char *str)
{
m_temp=NULL;
if(str==NULL)
m_data ="";
else
m_data=QString::fromLocal8Bit(str);
}
CString::CString(const QString str)
{
m_temp=NULL;
if(str==NULL)
m_data ="";
else
m_data=str;
}
CString::~CString()
{
if(m_temp) delete m_temp;
m_temp=NULL;
};
void CString::Empty()
{
m_data ="";
}
CString::CString(const CString &other)
{
m_temp=NULL;
m_data=other.m_data;
}
int CString::GetLength()const
{
return m_data.length();
}
int CString::Find(char *str)
{
std::string dataStr=m_data.toStdString();
return dataStr.find(str);
}
int CString::Find(CString &another)
{
return m_data.toStdString().find(another.m_data.toStdString());
}
int CString::Find(char str)
{
std::string dataStr=m_data.toStdString();
return dataStr.find(str);
}
/*
*/
int CString::Find(char str[],int start)
{
std::string dataStr=m_data.toStdString();
int npos=dataStr.find(str);
if(npos==-1)
return -1;
if(npos<start)
return -1;
return dataStr.find(str);
}
int CString::ReverseFind(char ch)
{
int index=m_data.lastIndexOf(ch);
return index;
}
int CString::Insert(int pos ,const CString Sctr)
{
m_data.insert(pos,Sctr.m_data);
return m_data.length();
}
int CString::Replace(const char *Src,const char *Dest)
{
int length=((std::string)Src).length();
QString srcStr=QString::fromLocal8Bit(Src);
QString destStr=QString::fromLocal8Bit(Dest);
m_data.replace(srcStr,destStr);
return length;
}
void CString::Delete(int fromIndex,int length)
{
m_data=m_data.remove(fromIndex,length);
}
CString & CString::TrimLeft()
{
std::string findStr=" ";
std::string tempstr=m_data.toStdString();
QString temp=m_data;
vector<char>StrVector;
int left=0;
for (int i=0;i<tempstr.length();i++)
{
if(tempstr.at(i)==findStr.at(0)) {
left++;
continue;
}
else break;
}
m_data=temp.mid(left);
return *this;
}
CString & CString::MakeUpper()
{
m_data=m_data.toUpper();
return *this;
}
CString& CString::MakeLower()
{
m_data=m_data.toLower();
return *this;
}
CString & CString::TrimRight()
{
std::string findStr=" ";
std::string tempstr=m_data.toStdString();
QString temp=m_data;
int flag=0;
for (int i=tempstr.length()-1;i>-1;i--)
{
if(tempstr[i]==findStr.at(0)) {
continue;
}
else {
flag=i;
break;
}
}
m_data=temp.left(flag+1);
return *this;
}
bool CString::operator==(const char* other )
{
QString srcStr=QString::fromLocal8Bit(other);
if(this->m_data==srcStr)
return true;
return false;
}
bool CString::operator!=(const char* other )
{
QString srcStr=QString::fromLocal8Bit(other);
if(this->m_data!=srcStr)
return true;
return false;
}
char CString::operator[](int i)
{
char ch=GetChar(i);
return ch;
}
CString CString::Right(int count)const
{
if (count<0)
{
count=0;
}
if (count>m_data.length())
{
return *this;
}
int length=m_data.length();
QString temp=m_data;
QString lastdata=temp.remove(0,length-count);
CString RightStr(lastdata);
return RightStr;
}
CString CString::Mid(int pos,int count)const
{
if (count<0)
{
count=0;
}
QString temp=m_data.mid(pos,count);
CString mstr(temp);
return mstr;
}
CString CString::Mid(int pos)const
{
QString temp=m_data.mid(pos);
CString mstr(temp);
return mstr;
}
CString CString::Left(int count)const
{
if (count<0)
{
count=0;
}
if (count>m_data.length())
{
return *this;
}
int length=m_data.length();
QString temp=m_data;
QString lastdata=temp.remove(count,length-count);
CString leftStr(lastdata);
return leftStr;
}
CString CString::operator + (const CString& SrcStr)
{
CString str;
str.m_data=m_data+SrcStr.m_data;
return str;
}
/*
CString CString::operator = (const QString& SrcStr)
{
CString str;
str.m_data=SrcStr;
return str;
}
*/
CString CString::operator += (CString& SrcStr)
{
m_data = m_data+SrcStr.m_data ;
return *this;
}
CString CString::operator += (const CString& SrcStr)
{
m_data = m_data+SrcStr.m_data ;
return *this;
}
bool CString::operator!=(const CString& other )
{
return m_data!=other.m_data;
}
bool CString::operator==(const CString& other )
{
return m_data==other.m_data;
}
void CString::Alloc(int len)
{
}
char* CString::GetString() const
{
int length=((string)(m_data.toLocal8Bit().data())).length();
if(m_temp) delete m_temp;
m_temp=new char[length+1];
// Alloc(length);
strcpy(m_temp,m_data.toLocal8Bit().data());
return m_temp;
}
char CString::GetChar(int n)
{
return GetString()[n];
}
char CString::GetAt(int n)
{
return GetChar(n);
}
void CString::Format(const char *format,...)
{
//char *str=GetString();
va_list args;
va_start(args,format);
m_data.vsprintf(format,args);
char *buf=new char[2*strlen(m_data.toStdString().c_str())+1];
vsprintf(buf,format,args);
m_data=buf;
delete buf;
va_end(args);
}
void ShowMessage(QString mess)
{
QDialog dialog(NULL);
dialog.setModal(false);
Qt::WindowFlags flags = dialog.windowFlags();
flags |= Qt::WindowStaysOnTopHint;
flags &= ~Qt::WindowContextHelpButtonHint;
dialog.setWindowFlags(flags);
dialog.setWindowTitle("提示");
QFormLayout form(&dialog);
QLabel edit(&dialog);
form.addRow(&edit);
edit.setText(mess);
// QDialogButtonBox buttonBox(QDialogButtonBox::Yes,Qt::Horizontal, &dialog);
// form.addRow(&buttonBox);
// if(buttonBox.button(QDialogButtonBox::Yes)) buttonBox.button(QDialogButtonBox::Yes)->setText("退出");
// QObject::connect(buttonBox.button(QDialogButtonBox::Yes), SIGNAL(clicked()), NULL, SLOT(reject()));
dialog.show();
dialog.exec();
}
int AfxMessageBox(CString str)
{
QDialog dialog(NULL);
dialog.setModal(false);
Qt::WindowFlags flags = dialog.windowFlags();
flags |= Qt::WindowStaysOnTopHint;
flags &= ~Qt::WindowContextHelpButtonHint;
dialog.setWindowFlags(flags);
dialog.setWindowTitle("提示");
QFormLayout form(&dialog);
form.addWidget(new QLabel(str.GetString()));
// dialog.show();
if (dialog.exec() == QDialog::Accepted) {
// Do something here
}
// return MessageBox(NULL,"提示",str.GetString(),NULL );
// QString cstr=str.GetString();
// QMessageBox msgBox;
// msgBox.setText(cstr);
// return msgBox.exec();
return 1;
}
int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType)
{
if (!parent)
{
char *tempName=lpCaption;
QString addStr=QString::fromLocal8Bit(tempName);
return QMessageBox::information(NULL,lpText,addStr,QMessageBox::Ok);
}
return 0;
}

View File

@ -0,0 +1,168 @@
/**
* @file CStringTyle.h
* @brief CString数据自定义
* @date 2014-10-10
* @author: ZhouWenfei
*/
#ifndef PAI_FRAME_CSTRING_H__
#define PAI_FRAME_CSTRING_H__
#pragma once
#include <iostream>
#include <QString>
#include <QMessageBox>
#include <QDialogButtonBox>
#include <QDialog>
#include <QFormLayout>
#include <QTextEdit>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QPushButton>
#include <stdio.h>
#include <limits.h>
#pragma warning( push ,0)
//#include "BaseFunExport.h"
#pragma warning( pop )
//#ifdef MessageBox
//#define MessageBox MessageBox
//#endif
#define MAX_PATH 1024
//#define _MAX_PATH 1024
#define MaxCurve 1024
#define curve_name_len 256
#define curve_unit_len 256
#define MIN_RANK rank_char
#define MAX_RANK rank_longlong
#define INTMAX_RANK rank_longlong
#define SIZE_T_RANK rank_long
#define PTRDIFF_T_RANK rank_long
#define MB_OK QMessageBox::Ok
typedef unsigned short WORD;
#ifdef WIN32
typedef unsigned long DWORD;
typedef DWORD *LPDWORD;
typedef void *HANDLE;
#else
typedef unsigned int DWORD;
typedef DWORD *LPDWORD;
typedef void *HANDLE;
typedef unsigned char byte;
typedef bool BOOL;
#endif
typedef unsigned char BYTE;
typedef char* LPSTR;
typedef void* LPVOID;
class CString;
typedef QList<CString> CStringList;
using namespace std;
//#define REPR_INT 1
//#define REPR_SHORT 2
//#define REPR_LONG 3
//#define REPR_FLOAT 4
//#define REPR_DOUBLE 5
//#define REPR_STRING 6
//#define REPR_CHAR 7
//#define REPR_UCHAR 8
//#define REPR_USHORT 9
//#define REPR_UINT 10
//#define REPR_ULONG 11
//class BASEFUN_EXPORT CString;
//构建CString
class CString
{
public:
CString(const char *str = nullptr);
CString(const QString str);
CString(const CString &other);
~CString();
int GetLength()const;
int Find(char *str);
int Find(char str);
int Find(CString &another);
int Find(char str[],int start);
int ReverseFind(char ch);
int Insert(int pos ,const CString Sctr);
int Replace(const char *Src,const char *Dest);
CString & TrimLeft();
CString & MakeUpper();
CString& MakeLower();
CString & TrimRight();
bool operator==(const char* other );
bool operator!=(const char* other );
bool operator==(const CString& other );
bool operator!=(const CString& other );
char operator[](int i);
CString Right(int count)const;
CString Left(int count)const;
// CString operator = (const QString& SrcStr) ;
CString operator + (const CString& SrcStr) ;
CString operator += (CString& SrcStr) ;
CString operator += (const CString& SrcStr) ;
char* GetString()const;
char GetChar(int n);
char GetAt(int n);
CString Mid(int pos,int count)const;
CString Mid(int pos)const;
void Format(const char *format,...);
void Delete(int fromIndex,int length);
// const char *m_temp;
void Alloc(int len);
void Empty();
private:
QString m_data;
};
enum flags {
FL_SPLAT0 = 0x00,/* Drop the value, do not assign */
FL_SPLAT = 0x01,/* Drop the value, do not assign */
FL_INV = 0x02,/* Character-set with inverse */
FL_WIDTH = 0x04,/* Field width specified */
FL_MINUS = 0x08,/* Negative number */
};
enum ranks {
rank_char = -2,
rank_short = -1,
rank_int = 0,
rank_long = 1,
rank_longlong = 2,
rank_ptr = INT_MAX/* Special value used for pointers */
};
enum bail {
bail_none = 0,/* No error condition */
bail_eof,/* Hit EOF */
bail_err/* Conversion mismatch */
};
int AfxMessageBox(CString str);
int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
void ShowMessage(QString mess);
//构建AfxMessageBox()函数
//extern int BASEFUN_EXPORT AfxMessageBox(CString str);
//extern int BASEFUN_EXPORT MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
// using namespace pai::graphics;
#endif

View File

@ -0,0 +1,207 @@
#include "cloudalgorithmaccess.h"
#include <QDebug>
#include <QEventLoop>
#include <QTimer>
#include <QApplication>
#include <QDir>
#include <QtNetwork/QTcpSocket>
#include <QtNetwork/QNetworkProxy>
CloudAlgorithmAccess::CloudAlgorithmAccess(QObject *parent) : QObject(parent)
{
m_tcpSocket = new QTcpSocket(this);
m_responseResult.clear();
}
QByteArray CloudAlgorithmAccess::sendHttpPost(const QString &host, int port, const QString &path, const QByteArray &data)
{
// 连接服务器
m_tcpSocket->connectToHost(host, port);
if (!m_tcpSocket->waitForConnected(5000)) {
qDebug() << "Connection failed!";
return QByteArray(); // 连接失败
}
// 构建HTTP请求
QByteArray request =
"POST " + path.toUtf8() + " HTTP/1.1\r\n" +
"Host: " + host.toUtf8() + "\r\n" +
"Content-Type: application/json\r\n" +
"Content-Length: " + QByteArray::number(data.length()) + "\r\n" +
"Connection: close\r\n" +
"\r\n" +
data;
// 发送请求
m_tcpSocket->write(request); // 将request数据写入套接字的写缓冲区并尝试发送。
m_tcpSocket->waitForBytesWritten(5000); // 等待直到数据被实际发送即写入网络或超时5秒。
// 等待响应
QByteArray response;
while ( m_tcpSocket->waitForReadyRead(5000)) {
response.append(m_tcpSocket->readAll());
if (m_tcpSocket->bytesAvailable() == 0 && ! m_tcpSocket->isValid()) {
break;
}
}
m_tcpSocket->close();
// 提取响应体跳过HTTP头尝试标准分隔符 \r\n\r\n
int headerEnd = response.indexOf("\r\n\r\n");
if (headerEnd != -1) {
return response.mid(headerEnd + 4);
}
// 尝试 \n\n某些服务器可能使用
headerEnd = response.indexOf("\n\n");
if (headerEnd != -1) {
return response.mid(headerEnd + 2);
}
// 如果找不到标准分隔符,返回原始内容
qDebug() << "警告:无法解析HTTP响应格式,返回原始内容";
return response;
}
///计算孔隙度的json拼接样例
QString CloudAlgorithmAccess::buildJson(const QVector<double>& depths, const QVector<double>& values)
{
QString json = "{";
json += QString::fromUtf8("\"methodName\":\"根据声波时差计算(默认)\",");
json += "\"coefficient\":{\"DTpm\":\"49\",\"DTpf\":\"188.9\"},";
json += "\"curvesInfo\":{\"curveSource\":\"\",\"mdList\":[";
// 添加深度数据
for (int i = 0; i < depths.size(); i++) {
if (i > 0) json += ",";
json += QString::number(depths[i]);
}
json += QString::fromUtf8("],\"curveList\":[{\"curveName\":\"纵波时差\",\"minValue\":0,\"maxValue\":0,\"valueList\":[");
// 添加声波时差数据
for (int i = 0; i < values.size(); i++) {
if (i > 0) json += ",";
json += QString::number(values[i]);
}
json += "]}]}}";
qDebug() << "json:" << json;
return json;
}
// 解析JSON数据的函数
int CloudAlgorithmAccess::parseResponseData(QString jsonData) {
//QString jsonData = QString::fromUtf8(data);
m_responseResult.clear();
int result = ParseSuccess;
// 检查响应码
int codePos = jsonData.indexOf("\"code\":");
if (codePos == -1) {
result = ParseNoCode;
return result;
}
int codeStart = jsonData.indexOf(":", codePos) + 1;
int codeEnd = jsonData.indexOf(",", codeStart);
QString codeStr = jsonData.mid(codeStart, codeEnd - codeStart).trimmed();
int code = codeStr.toInt();
if (code != 200) {
result = ParseCodeError;
return result;
}
// 查找data数组开始位置
int dataStartPos = jsonData.indexOf("\"data\":[");
if (dataStartPos == -1) {
result = ParseDataError;
return result;
}
dataStartPos = jsonData.indexOf("[", dataStartPos) + 1;
// 解析每个数据项
int pos = dataStartPos;
while (pos < jsonData.length()) {
// 查找对象开始
int objStart = jsonData.indexOf("{", pos);
if (objStart == -1) break;
// 查找对象结束
int objEnd = jsonData.indexOf("}", objStart);
if (objEnd == -1) break;
QString objStr = jsonData.mid(objStart, objEnd - objStart + 1);
ResponseData data;
// 解析depth字段
int depthPos = objStr.indexOf("\"depth\":");
if (depthPos != -1) {
int depthStart = objStr.indexOf(":", depthPos) + 1;
int depthEnd = objStr.indexOf(",", depthStart);
if (depthEnd == -1) depthEnd = objStr.indexOf("}", depthStart);
QString depthStr = objStr.mid(depthStart, depthEnd - depthStart).trimmed();
data.depth = depthStr.toDouble();
}
// 解析value字段
int valuePos = objStr.indexOf("\"value\":");
if (valuePos != -1) {
int valueStart = objStr.indexOf(":", valuePos) + 1;
int valueEnd = objStr.indexOf(",", valueStart);
if (valueEnd == -1) valueEnd = objStr.indexOf("}", valueStart);
QString valueStr = objStr.mid(valueStart, valueEnd - valueStart).trimmed();
data.value = valueStr.toDouble();
}
// 解析overlying_Pressure字段
int pressurePos = objStr.indexOf("\"overlying_Pressure\":");
if (pressurePos != -1) {
int pressureStart = objStr.indexOf(":", pressurePos) + 1;
int pressureEnd = objStr.indexOf(",", pressureStart);
if (pressureEnd == -1) pressureEnd = objStr.indexOf("}", pressureStart);
QString pressureStr = objStr.mid(pressureStart, pressureEnd - pressureStart).trimmed();
data.overlying_Pressure = pressureStr.toDouble();
}
// 解析dp字段
int dpPos = objStr.indexOf("\"dp\":");
if (dpPos != -1) {
int dpStart = objStr.indexOf(":", dpPos) + 1;
int dpEnd = objStr.indexOf(",", dpStart);
if (dpEnd == -1) dpEnd = objStr.indexOf("}", dpStart);
QString dpStr = objStr.mid(dpStart, dpEnd - dpStart).trimmed();
data.dp = dpStr.toDouble();
}
// 解析dpTrend字段
int dpTrendPos = objStr.indexOf("\"dpTrend\":");
if (dpTrendPos != -1) {
int dpTrendStart = objStr.indexOf(":", dpTrendPos) + 1;
int dpTrendEnd = objStr.indexOf(",", dpTrendStart);
if (dpTrendEnd == -1) dpTrendEnd = objStr.indexOf("}", dpTrendStart);
QString dpTrendStr = objStr.mid(dpTrendStart, dpTrendEnd - dpTrendStart).trimmed();
data.dpTrend = dpTrendStr.toDouble();
}
m_responseResult.append(data);
pos = objEnd + 1;
// 检查是否还有下一个对象
if (jsonData.indexOf("{", pos) == -1) break;
}
return result;
}
const QList<ResponseData> &CloudAlgorithmAccess::getResponseResult() const
{
return m_responseResult;
}

View File

@ -0,0 +1,43 @@
#ifndef CLOUDALGORITHMACCESS_H
#define CLOUDALGORITHMACCESS_H
#include <QObject>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QVector>
class QTcpSocket;
// 定义数据结构体
struct ResponseData {
int depth;
double value;
double overlying_Pressure;
double dp;
double dpTrend;
};
enum ParseResult{
ParseSuccess,
ParseNoCode,
ParseCodeError,
ParseDataError
};
class CloudAlgorithmAccess : public QObject
{
Q_OBJECT
public:
explicit CloudAlgorithmAccess(QObject *parent = 0);
QByteArray sendHttpPost(const QString &host, int port, const QString &path, const QByteArray &data);
int parseResponseData(QString jsonData);
QString buildJson(const QVector<double>& depths, const QVector<double>& values);
const QList<ResponseData> &getResponseResult() const ;
private:
QTcpSocket *m_tcpSocket;
///响应数据解析完成后放入该容器中
QList<ResponseData> m_responseResult;
};
#endif // CLOUDALGORITHMACCESS_H

View File

@ -0,0 +1,61 @@
TEMPLATE = lib
TARGET = fdsa4_test
DEFINES += _TIMESPEC_DEFINED
QT += core \
gui \
network \
opengl
INCLUDEPATH += ../../common \
../../include \
# ../../../OSGParts/include \
../../Slfio/include \
../../BaseFun/include \
D:/Python312/include\
D:/Python312/Lib/site-packages/numpy/_core/include\
$(QTDIR)/include \
# d:/OSG3.0.1/include \
OBJECTS_DIR = ../obj
CONFIG(debug, debug|release){
DESTDIR = ../../../Bin/app
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../../BinR/app
TARGET = $$join(TARGET,,,)
}
CONFIG += qt warn_off \
debug_and_release
#CONFIG += uitools
DEFINES += QT_DLL
HeadS += ../include/*.h
SOURCES += *.cpp
HEADERS += \
./cloudalgorithmaccess.h \
./pythonhandler.h
#CPATH = $$system(pwd)
# 目标文件夹
#CATEGORY = OSGDataModel
CONFIG(debug, debug|release){
LIBS += -L../../../Bin -lslfiod
LIBS += -L../../../Bin -lBaseFund
LIBS += -LD:/Python312/libs -lpython312_d
# LIBS += -L$(QTDIR)/lib -lQtNetworkd4
# LIBS += -LD:/Qt4.7.1/lib -lQtNetworkd4
} else {
LIBS += -L../../../BinR -lslfio
LIBS += -L../../../BinR -lBaseFun
LIBS += -LD:/Python312/libs -lpython312
# LIBS += -LD:/Qt4.7.1/lib -lQtNetworkd4
# LIBS += -LD:/Qt4.7.1/lib -lQtNetworkd4
}
DISTFILES += \
fdsa4_test.py

View File

@ -0,0 +1,12 @@
# This Python file uses the following encoding: utf-8
# if __name__ == "__main__":
# pass
import os
import sys
import numpy as np
def process_arrays(a, b, c, d, e):
result = [x + y for x, y in zip(a, b)]
return np.array(result), c+d+e

View File

@ -0,0 +1,344 @@
#include "pythonhandler.h"
#include <QCoreApplication>
#include <QFile>
#include <QProcessEnvironment>
PythonHandler::PythonHandler(QObject *parent)
: QObject(parent)
, m_initialized(false)
{
// 初始化Python
if (!this->initialize()) {
qDebug() << "Python初始化失败";
}
}
PythonHandler::~PythonHandler()
{
finalize();
}
PythonHandler *PythonHandler::getInstance()
{
static PythonHandler ref;
return &ref;
}
bool PythonHandler::initialize()
{
if (m_initialized) {
return true;
}
setupEnvironment();
// 初始化Python解释器
Py_Initialize();
if (!Py_IsInitialized()) {
qDebug() << "Python初始化失败";
return false;
}
// 添加Python脚本路径 - 使用绝对路径会更可靠
QString currentPath = QCoreApplication::applicationDirPath();
QString scriptPath = currentPath + "/python_scripts";
QString strPy= currentPath + "/" + PYTHON_VER;
QString scriptPython2 = strPy + "/DLLs";
QString scriptPython3 = strPy + "/Lib";
QString scriptPython4 = strPy + "/lib/site-packages";
// emit addLog(scriptPath);
QString pythonCode = QString(
"import sys\n"
"import os\n"
"print('Python_:', sys.path)\n"
"sys.path.append('%1')\n"
"sys.path.append('%2')\n"
"sys.path.append('%3')\n"
"sys.path.append('%4')\n"
"sys.path.append('%5')\n"
"sys.path.append('%6')\n"
"print('end_:', sys.path)\n"
"print('========== Python 调试信息 ==========')\n"
"print('当前工作目录:', os.getcwd())\n"
"print('exepath:', sys.executable)\n"
"print('Python 搜索路径:')\n"
"for p in sys.path:\n"
" print(' -', p)\n"
"print('======================================')\n"
).arg(currentPath).arg(scriptPath)
.arg(strPy).arg(scriptPython2).arg(scriptPython3).arg(scriptPython4);
// emit addLog(pythonCode);
PyRun_SimpleString(pythonCode.toStdString().c_str());
m_initialized = true;
return true;
}
void PythonHandler::setupEnvironment()
{
// 获取程序所在目录
QString appDir = QCoreApplication::applicationDirPath();
// 使用 Qt 的方式设置环境变量
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
// 设置 PYTHONHOME
qputenv("PYTHONHOME", appDir.toLocal8Bit());
QString strPy= appDir + "/" + PYTHON_VER;
// 设置 PYTHONPATH
QString pythonPath = strPy + "/Lib;" + strPy + "/DLLs;" + strPy + "/python_scripts";
qputenv("PYTHONPATH", pythonPath.toLocal8Bit());
// 修改 PATH添加程序目录
QString currentPath = QString::fromLocal8Bit(qgetenv("PATH"));
QString newPath = appDir + ";" + strPy + "/DLLs;" + currentPath;
qputenv("PATH", newPath.toLocal8Bit());
qDebug() << "环境变量已设置:";
qDebug() << "PYTHONHOME:" << qgetenv("PYTHONHOME");
qDebug() << "PYTHONPATH:" << qgetenv("PYTHONPATH");
}
void PythonHandler::finalize()
{
if (m_initialized) {
Py_Finalize();
m_initialized = false;
}
}
PyObject* PythonHandler::qVariantToPythonObject(const QVariant &value)
{
switch (value.type()) {
case QVariant::Int:
return PyLong_FromLong(value.toInt());
case QVariant::Double:
return PyFloat_FromDouble(value.toDouble());
case QVariant::String:
return PyUnicode_FromString(value.toString().toStdString().c_str());
case QVariant::List: {
QVariantList list = value.toList();
PyObject* pyList = PyList_New(list.size());
for (int i = 0; i < list.size(); ++i) {
PyList_SetItem(pyList, i, qVariantToPythonObject(list[i]));
}
return pyList;
}
case QVariant::Bool:
return PyBool_FromLong(value.toBool() ? 1 : 0);
default:
return Py_None;
}
}
QVariant PythonHandler::pythonObjectToQVariant(PyObject *obj)
{
if (!obj) {
qDebug() << "pythonObjectToQVariant: 输入对象为NULL";
return QVariant();
}
qDebug() << "pythonObjectToQVariant: 转换类型" << Py_TYPE(obj)->tp_name;
if (PyLong_Check(obj)) {
long long value = PyLong_AsLongLong(obj);
if (PyErr_Occurred()) {
PyErr_Clear();
return QVariant();
}
qDebug() << "转换为整数:" << value;
return QVariant(value);
}
else if (PyFloat_Check(obj)) {
double value = PyFloat_AsDouble(obj);
qDebug() << "转换为浮点数:" << value;
return QVariant(value);
}
else if (PyBool_Check(obj)) {
bool value = (obj == Py_True);
qDebug() << "转换为布尔值:" << value;
return QVariant(value);
}
else if (PyUnicode_Check(obj)) {
QString value = QString::fromUtf8(PyUnicode_AsUTF8(obj));
qDebug() << "转换为字符串:" << value;
return QVariant(value);
}
else if (PyList_Check(obj)) {
QVariantList list;
Py_ssize_t size = PyList_Size(obj);
qDebug() << "转换为列表,大小:" << size;
for (Py_ssize_t i = 0; i < size; ++i) {
PyObject* item = PyList_GetItem(obj, i);
if (item) {
list.append(pythonObjectToQVariant(item));
} else {
list.append(QVariant());
}
}
return list;
}
else if (PyTuple_Check(obj)) {
QVariantList list;
Py_ssize_t size = PyTuple_Size(obj);
qDebug() << "转换为元组,大小:" << size;
for (Py_ssize_t i = 0; i < size; ++i) {
PyObject* item = PyTuple_GetItem(obj, i);
if (item) {
list.append(pythonObjectToQVariant(item));
} else {
list.append(QVariant());
}
}
return list;
}
else if (PyDict_Check(obj)) {
QVariantMap map;
PyObject* pKeys = PyDict_Keys(obj);
Py_ssize_t size = PyList_Size(pKeys);
qDebug() << "转换为字典,大小:" << size;
for (Py_ssize_t i = 0; i < size; ++i) {
PyObject* pKey = PyList_GetItem(pKeys, i);
PyObject* pValue = PyDict_GetItem(obj, pKey);
if (pKey && pValue && PyUnicode_Check(pKey)) {
QString key = QString::fromUtf8(PyUnicode_AsUTF8(pKey));
map[key] = pythonObjectToQVariant(pValue);
}
}
Py_DECREF(pKeys);
return map;
}
else if (obj == Py_None) {
qDebug() << "转换为None";
return QVariant();
}
else {
qDebug() << "未知类型返回空QVariant";
return QVariant();
}
}
QVariant PythonHandler::executeScript(const QString &scriptPath,
const QString &functionName,
const QVariantList &args,
float* outAtt0all,
int nlen)
{
if (!m_initialized && !initialize()) {
return QVariant();
}
// 获取全局字典
PyObject* pModule = nullptr;
PyObject* pFunc = nullptr;
PyObject* pArgs = nullptr;
PyObject* pResult = nullptr;
QVariant result;
// 导入模块
QString moduleName = scriptPath;
if (moduleName.endsWith(".py")) {
moduleName.chop(3);
}
pModule = PyImport_ImportModule(moduleName.toStdString().c_str());
if (!pModule) {
PyErr_Print();
emit addLog("无法导入Python模块:" + moduleName);
return QVariant();
}
// 获取函数
pFunc = PyObject_GetAttrString(pModule, functionName.toStdString().c_str());
if (!pFunc || !PyCallable_Check(pFunc)) {
if (PyErr_Occurred()) {
PyErr_Print();
}
emit addLog("无法找到函数:" + functionName);
Py_XDECREF(pFunc);
Py_DECREF(pModule);
return QVariant();
}
// 构建参数
pArgs = PyTuple_New(args.size());
for (int i = 0; i < args.size(); ++i) {
PyTuple_SetItem(pArgs, i, qVariantToPythonObject(args[i]));
}
// 调用函数
pResult = PyObject_CallObject(pFunc, pArgs);
if (pResult) {
if(outAtt0all)
{
PyObject* array1 = PyTuple_GetItem(pResult, 0);
double dR = PyFloat_AsDouble(PyTuple_GetItem(pResult, 1)); // 获取double
// // 将numpy数组转换为C++数组例如使用numpy的API
// PyArrayObject* arr1 = (PyArrayObject*)PyArray_FromAny(array1, NULL, 0, 0, NPY_ARRAY_CARRAY, NULL);
PyArrayObject* arr1 = (PyArrayObject*)array1;
double* data1 = (double*)PyArray_DATA(arr1);
int len = PyArray_DIM(arr1, 0); // 获取数组长度
if (len>nlen)
len = nlen;
for (int i = 0; i < len; i++) {
outAtt0all[i] = data1[i];
}
#ifdef _RELEASE
Py_DECREF(arr1);
#endif
}
else
{
result = pythonObjectToQVariant(pResult);
QMap<QString, QVariant> imgResult = result.toMap();
emit addLog("1#executeScript" + QString::number(imgResult.size()));
}
} else {
PyErr_Print();
emit addLog("函数调用失败");
}
#ifdef _RELEASE
// 清理
Py_XDECREF(pResult);
Py_XDECREF(pArgs);
Py_XDECREF(pFunc);
Py_XDECREF(pModule);
#endif
return result;
}
QVariant PythonHandler::executeCode(const QString &code)
{
if (!m_initialized && !initialize()) {
return QVariant();
}
PyObject* pMain = PyImport_AddModule("__main__");
PyObject* pDict = PyModule_GetDict(pMain);
PyObject* pResult = PyRun_String(code.toStdString().c_str(),
Py_eval_input,
pDict,
pDict);
if (pResult) {
QVariant result = pythonObjectToQVariant(pResult);
Py_DECREF(pResult);
return result;
} else {
PyErr_Print();
return QVariant();
}
}

View File

@ -0,0 +1,57 @@
#ifndef PYTHONHANDLER_H
#define PYTHONHANDLER_H
#include <QObject>
#include <QString>
#include <QVariant>
#include <QDebug>
// 在包含 Python.h 之前,保存并取消 Qt 的 slots 宏
#pragma push_macro("slots")
#undef slots
#include <Python.h>
#include <numpy/arrayobject.h>
// 包含之后恢复 slots 宏(如果需要继续使用 Qt 的 slots
#pragma pop_macro("slots")
#define PYTHON_VER "Python312"
class PythonHandler : public QObject
{
Q_OBJECT
public:
explicit PythonHandler(QObject *parent = nullptr);
~PythonHandler();
static PythonHandler* getInstance();
// 初始化Python解释器
bool initialize();
void setupEnvironment();
// 执行Python脚本
QVariant executeScript(const QString &scriptPath,
const QString &functionName,
const QVariantList &args = QVariantList() ,
float* outAtt0all = NULL, int nlen = 0);
// 直接执行Python代码
QVariant executeCode(const QString &code);
// 关闭Python解释器
void finalize();
signals:
void addLog(QString msg);
private:
bool m_initialized;
QVariant pythonObjectToQVariant(PyObject *obj);
PyObject* qVariantToPythonObject(const QVariant &value);
};
#endif // PYTHONHANDLER_H

424
app/fdsa4_test/test0531.cpp Normal file
View File

@ -0,0 +1,424 @@
#include "memrdwt.h"
#include "math.h"
#include "basefun.h"
#include "DepthProgress.h"
#include <qvector.h>
#include"cloudalgorithmaccess.h"
#include <QTextCodec>
#include <QCoreApplication>
#include <QtNetwork/QNetworkProxyFactory>
#include <QLibrary>
#include <QtNetwork/QTcpSocket>
#include "pythonhandler.h"
// #undef slots
// #if defined(_DEBUG)
// #define IS_DEBUG
// #undef _DEBUG//防止加载python312_d.lib 先取消掉_DEBUG
// #endif
// #include <Python.h>
// #include <numpy/arrayobject.h>
// #if defined(IS_DEBUG)
// #define _DEBUG
// #endif
// #define slots
#include <QDebug>
/****************************************************数据定义****************************************************************
******************************begin****************************/
extern "C"{
_declspec (dllexport) struct INC_STRU INC={6,
"FWGN_W:波名1,raw;;\
NWGN_W:2,raw;;\
RWGN_W:3,raw;;\
GR:,API;;\
NWGN_C:线2,raw;;\
RWGN_C:线3,raw;;\
"
};//输入曲线定义 6:输入6条数据, "数据英文:数据中文,数据单位;;"
_declspec (dllexport) struct INP_STRU INP; ///使用GetINValue(RGN_C, 6, 1);函数需要定义该变量
_declspec (dllexport) struct OUTC_STRU OUTC={2,
"ATT:波名1,raw;;\
THCAV:线1,raw;;\
"
};//输出曲线定义 2:输出2条数据, "数据英文:数据中文,数据单位;;"(注:先写波形数据,再写曲线数据)
//_declspec (dllexport) struct OUTP_STRU OUTP;
_declspec (dllexport) struct HD_STRU HD={0.0,9999.0,0.0,0.0,0.0,0.0,0.0,"test0531.INP","test0531.TLP"};//改成自己的工程名
__declspec (dllexport) struct CONC_STRU CONC={4,
"CTH:参数名1,mm;;;;10.5;\
CT:2,%;;;;1;\
IT:3,mm;;;;9.7;\
MT:4,%;;;;1;"
};//常量参数定义 4:4个参数, "数据英文:数据中文,单位;;;;参数默认值;"
_declspec (dllexport) struct CON_STRU CON={10.5, 1, 9.7, 1};//再次设置默认值(需要与前面相同)
_declspec (dllexport) struct ErrorInf errorinf;
//定义输出数据类型(注:需要与前面输出定义一一对应)
__declspec (dllexport) struct LogType LogType={WAVE_OBJECT, CURVE_OBJECT};//{WAVE_OBJECT, CURVE_OBJECT}
__declspec( dllexport ) CMemRdWt MemRdWt;
_declspec (dllexport) int test0531();//改成自己的工程名
}
/****************************************************end****************************************************************/
struct Process_Struct{
int Process();
};
//DLL入口函数
int test0531()//改成自己的工程名
{
Process_Struct Process;
return Process.Process();
}
//固井结构体(注:此处为表格输出示例)
typedef struct ss_struct
{
int GNO;
float GSDEP,GEDEP;
int GRESULT;
} GUJING;
//结论结构体
typedef struct s2_struct
{
int NO;
float SDEP,EDEP;
QString R;
} JIELUN;
void callPython(float FGN_C, float NGN_C, float RGN_C, float* FGN_W, float* NGN_W, float* Att0all, int nlen)
{
QVariantList args;
QVariantList arg1;
QVariantList arg2;
// 填充列表
for (int i = 0; i < nlen; ++i) {
arg1 << (double)FGN_W[i];
arg2 << (double)NGN_W[i];
}
args.append(QVariant::fromValue(arg1)); // 直接将 innerList1 作为元素添加
args.append(QVariant::fromValue(arg2)); // 使用 << 操作符
args << (double)FGN_C << (double)NGN_C << (double)RGN_C;
PythonHandler::getInstance()->executeScript("fdsa4_test", "process_arrays", args, Att0all, nlen);
// static PyObject * pmodule = NULL;
// static PyObject * pmodule2 = NULL;
// if (!pmodule) // 防止重复加载报错cannot load module more than once per process
// {
// Py_Initialize();
// if(!Py_IsInitialized())
// {
// qDebug() << "init err";
// }
// PyRun_SimpleString("import os");
// PyRun_SimpleString("import sys");
// // PyRun_SimpleString("sys.path.append('./app/fdsa4_test')");// 设置运行路径
// PyRun_SimpleString("sys.path.append('D:/jiayl0909/logPlus/build/Bin/app/fdsa4_test')");// 设置运行路径
// PyRun_SimpleString("sys.path.append(os.path.dirname(os.path.dirname(os.getcwd())))");
// PyRun_SimpleString("print(os.getcwd())");
// PyRun_SimpleString("print(os.path.dirname(os.path.dirname(os.getcwd())))");
// PyRun_SimpleString("print(sys.path)");
// // pmodule2 = PyImport_ImportModule("math_algorithm");
// pmodule = PyImport_ImportModule("math_algorithm");
// }
// if(PyErr_Occurred()){
// PyObject*pType,*pValue,*pTraceback;
// PyErr_Fetch(&pType,&pValue,&pTraceback);PyErr_NormalizeException(&pType,&pValue,&pTraceback);
// PyObject* pstr=PyObject_Str(pValue);
// const char* pstrErrorMessage =PyUnicode_AsUTF8(pstr);
// printf("Error message:%s\n",pstrErrorMessage);
// }
// if(!pmodule)
// {
// qDebug() << "can not open the file";
// return;
// }
// // return;
// PyObject* pFunc2 = PyObject_GetAttrString(pmodule, "process_arrays");
// // 创建两个Python列表数组
// PyObject* pArgs = PyTuple_New(5);//五个参数
// PyObject* pList1 = PyList_New(0);
// PyObject* pList2 = PyList_New(0);
// // 填充列表
// for (int i = 0; i < nlen; ++i) {
// PyList_Append(pList1, PyFloat_FromDouble(FGN_W[i])); // 可以调用GetINValue(AC,1,1);添加曲线数据
// PyList_Append(pList2, PyFloat_FromDouble(NGN_W[i]));
// }
// // 将列表放入参数元组中
// PyTuple_SetItem(pArgs, 0, pList1);
// PyTuple_SetItem(pArgs, 1, pList2);
// PyTuple_SetItem(pArgs, 2, PyFloat_FromDouble(FGN_C));
// PyTuple_SetItem(pArgs, 3, PyFloat_FromDouble(NGN_C));
// PyTuple_SetItem(pArgs, 4, PyFloat_FromDouble(RGN_C));
// // 调用函数
// PyObject* pValue = PyObject_CallObject(pFunc2, pArgs);
// if (pValue != NULL) {
// // // 处理结果或打印结果例如转换为C++数据类型)
// // for (Py_ssize_t i = 0; i < PyList_Size(pValue); ++i) {
// // PyObject* item = PyList_GetItem(pValue, i);
// // printf("%ld ", PyLong_AsLong(item)); // 对于Python 3使用 PyLong_AsLong
// // }
// // printf("\n");
// // 处理返回的元组,这里有两个数组元素
// PyObject* array1 = PyTuple_GetItem(pValue, 0);
// double dR = PyFloat_AsDouble(PyTuple_GetItem(pValue, 1)); // 获取double
// // // 将numpy数组转换为C++数组例如使用numpy的API
// // PyArrayObject* arr1 = (PyArrayObject*)PyArray_FromAny(array1, NULL, 0, 0, NPY_ARRAY_CARRAY, NULL);
// PyArrayObject* arr1 = (PyArrayObject*)array1;
// double* data1 = (double*)PyArray_DATA(arr1);
// int len = PyArray_DIM(arr1, 0); // 获取数组长度
// if (len>nlen)
// len = nlen;
// for (int i = 0; i < len; i++) {
// Att0all[i] = data1[i];
// }
// Py_DECREF(arr1);
// } else {
// PyErr_Print();
// }
// // 清理资源
// Py_DECREF(pValue);
// Py_DECREF(pArgs);
// // while(Py_REFCNT(pmodule)>0)
// // Py_DECREF(pmodule);
// // Py_Finalize();
}
//核心处理逻辑
int Process_Struct::Process()
{
if(HD.Sdep >= HD.EndDep)
{
// AfxMessageBox("当前处理井段深度有误!\n已停止计算");
AfxMessageBox("The current depth of the processing interval is incorrect!\n Calculation has been stopped");
return 0;
}
/*******************************************************写数据前的准备操作*******************************************************
******************************begin****************************/
//1初始化参数、输入
MemRdWt.Const();
MemRdWt.In();
//2波形类型的输出数据初始化检查
char outname[2][16];
int OUTindex = 0, WaveIndex = 0;
MemRdWt.GetOutCurveName(OUTindex, outname[OUTindex]);//获取输出数据名称参数1是序列值从0开始波形/曲线均使用GetOutCurveName函数
int index1 = MemRdWt.OpenWave(outname[OUTindex]);//检查是否存在outname[OUTindex]波形
if(index1 < 0) //返回索引小于0说明没有该波形需要创建
{
//创建方式:
Slf_WAVE myWave;
strcpy(myWave.Name, outname[OUTindex]);
strcpy(myWave.AliasName, outname[OUTindex]);
strcpy(myWave.DepthUnit, "m");
myWave.CodeLen = 4;
myWave.RepCode = 4;
myWave.DefVal = 0;
myWave.StartDepth = HD.Sdep;
myWave.EndDepth = HD.Edep;
myWave.DepLevel = HD.Rlev;
strcpy(myWave.DepthUnit, "m");
myWave.StartTime = 0; //起始记录时间
myWave.TimeLevel = 5; //时间采样间隔
myWave.ArrayNum = 1; //阵列数
myWave.TimeSamples = 36; //时间采样总数
strcpy(myWave.TimeUnit, "ns"); //时间单位
index1 = MemRdWt.OpenWave((Slf_WAVE *)&myWave); //创建波形(注:此时返回索引应>1代表创建成功
}
if(index1 < 0)
{
// AfxMessageBox("阵列数据创建失败!\n已停止计算");
AfxMessageBox("Array data creation failed!\nCalculation stopped");
return 0;
}else{
WaveIndex = index1;
}
//3曲线类型的输出数据初始化检查
OUTindex = 1;//按extern "C"中定义的输出数据顺序设置
MemRdWt.GetOutCurveName(OUTindex, outname[OUTindex]);//获取输出数据名称参数1是序列值从0开始
index1 = MemRdWt.OpenCurve(outname[1]);//index1 = MemRdWt.OpenCurve("EEE");//检查数据是否存在//outname[OUTindex]
if(index1 < 0) //返回索引小于0说明没有这条曲线需要创建
{
//创建方式:
Slf_CURVE myCurve; //定义曲线对象
strcpy(myCurve.Name, outname[1]); //设置名称
strcpy(myCurve.AliasName, outname[1]); //设置别名
strcpy(myCurve.Unit, "m"); //设置数据单位
myCurve.CodeLen = 4; //设置字节长度4float
myCurve.RepCode = 4; //设置数据类型4float
myCurve.DefVal = 0; //设置默认值
myCurve.StartDepth = HD.Sdep; //设置起始深度
myCurve.EndDepth = HD.Edep; //设置结束深度
myCurve.DepLevel = HD.Rlev; //设置采样间隔
strcpy(myCurve.DepthUnit, "m"); //设置深度单位
index1 = MemRdWt.OpenCurve((Slf_CURVE *)&myCurve); //创建曲线(注:此时返回索引应>1代表创建成功
}
if(index1 < 0)
{
// AfxMessageBox("波形数据创建失败!\n已停止计算");
AfxMessageBox("Array data creation failed!\nCalculation stopped");
return 0;
}
/*********************************************************end************************************************************/
//4平台进度条设置
DepthProgress mmProgress;
mmProgress.CreatProgress(HD.Stdep, HD.EndDep, "程序处理中...");
//5深度循环
while(HD.Dep <= HD.EndDep)//逐深度处理
{
mmProgress.SetDepth(HD.Dep);//设置平台进度条
/********************************************************获取常量参数示例***************************************************
******************************begin****************************/
//GetPosValue函数的参数3为序列值要和extern "C"的CONC内容对应上从1开始
float CTH, CT, IT, MT;
GetPosValue(CTH, CON, 1, 1);
GetPosValue(CT, CON, 2, 1);
GetPosValue(IT, CON, 3, 1);
GetPosValue(MT, CON, 4, 1);
/***************************************************************end*************************************************************/
/********************************************************读数据示例***************************************************************
*****************************begin****************************/
//1读wave数据
char inname[3][36];
int index[4] = {-1};
//获取输入数据对应的波列名称参数1是序列值从0开始
MemRdWt.GetInCurveName(0, inname[0]);
MemRdWt.GetInCurveName(1, inname[1]);
MemRdWt.GetInCurveName(2, inname[2]);
//获取波列数据对应的index,再读数据
index[0] = MemRdWt.OpenWave(inname[0]);
index[1] = MemRdWt.OpenWave(inname[1]);
index[2] = MemRdWt.OpenWave(inname[2]);
if(index[0] < 0 || index[1] < 0 || index[2] < 0){
// AfxMessageBox("波列数据获取失败\n已停止计算");
AfxMessageBox("Waveform data acquisition failed\nCalculation stopped");
return 0;
}
float FGN_W[60], NGN_W[60], RGN_W[60]; //必须根据wave数据的大小声明
int a = 0;
int b = 0; int c = 0;
c = MemRdWt.ReadWaveToFloatBuf(index[2], HD.Dep, 1, RGN_W);
b = MemRdWt.ReadWaveToFloatBuf(index[1], HD.Dep, 1, NGN_W);
a = MemRdWt.ReadWaveToFloatBuf(index[0], HD.Dep, 1, FGN_W);//读取wave数据从HD.Dep深度开始读1个深度位置的wave数据至FGN_W中
//2读曲线数据
//GetINValue函数的参数2为序列值要和extern "C"的INC内容的顺序对应上
float FGN_C, NGN_C, RGN_C;
GetINValue(FGN_C, 4, 1);
GetINValue(NGN_C, 5, 1);
GetINValue(RGN_C, 6, 1);
/********************************************************end*************************************************************/
/*******************************************处理程序示例(注:改成自己的算法)******************************************
*****************************begin****************************/
float Att0all[36];
float THCAV = 0.0;
bool bPython = true;
if (bPython)
{
callPython(FGN_C, NGN_C, RGN_C, FGN_W, NGN_W, Att0all, 36);
}
else
{
for(int i = 0; i < 36; i++)
Att0all[i] = FGN_W[i] + NGN_W[i];
THCAV = FGN_C + NGN_C + RGN_C;
}
/********************************************************end********************************************************/
/*******************************************************向平台写数据示例**********************************************
*****************************begin****************************/
//1写wave数据
MemRdWt.WriteWave(WaveIndex, HD.Dep, 1, &Att0all);
//2写curve数据
int THCAV_index = MemRdWt.OpenCurve(outname[1]);//outname[1]
if(THCAV_index > 0)
MemRdWt.WriteCurve(THCAV_index, HD.Dep, 1, &THCAV);
/*******************************************************end**********************************************************/
MemRdWt.In(); //继续深度循环
}
/*************************************************向平台写表格示例*************************************************************
*****************************begin****************************/
//1固井结论表格
int itable1 = MemRdWt.OpenOG_RESULT("固井质量");//例如表格取名为“固井质量”
MemRdWt.SetTableRecordCount(itable1, 0); //清空原有表格数据
GUJING *CCNN2 = new GUJING[5];
for(int i = 0; i < 5; i++)
{
CCNN2[i].GNO = i + 1;
CCNN2[i].GSDEP = 2000 + i * 10;
CCNN2[i].GEDEP = 2000 + (i + 1) * 10;
CCNN2[i].GRESULT = 1;
int temp = MemRdWt.WriteTable(itable1, i + 1, &CCNN2[i]);
}
//2其他表格
struct Slf_RST{
int Order;
float Depth;
float CorrDepth;
};
struct Slf_RST m_Result;
itable1 = MemRdWt.OpenTable("ABCD");
if (itable1 < 0)
{
itable1 = MemRdWt.Open_Set_Table("ABCD",0,3,
"NO,DEPTH,DDEP",
"4,4,4",//字段长度
"1,4,4",//字段类型
"0,0,0");//字段备注,1-枚举
}
MemRdWt.SetTableRecordCount(itable1,3); //设置表格有3行数据
for(int j = 0; j < 3; j++)
{
memset(&m_Result, 0, sizeof(Slf_RST));
m_Result.Order = j + 1;
m_Result.Depth = 10;
m_Result.CorrDepth = 20 + j;
MemRdWt.WriteTable(itable1, j + 1, &m_Result);
}
MemRdWt.CloseTable(itable1);
/******************************************************end*************************************************************/
return 1;
}

View File

@ -19,10 +19,10 @@ INCLUDEPATH += ../../common \
OBJECTS_DIR = ../obj
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../../BinR
TARGET = $$join(TARGET,,,)
}
CONFIG += qt warn_off \
@ -34,14 +34,10 @@ DEFINES += QT_DLL
HeadS += ../include/*.h
# HeadS += ../include/*.h
SOURCES += *.cpp
HEADERS += \
../include/BaseObject.h \
../include/ObjWelllog.h \
../include/ObjWelllogINP.h \
../include/ObjWelllogTABLE.h \
../include/appDllTest.h \
../include/appDllTestDialog.h
@ -49,9 +45,9 @@ HEADERS += \
# 目标文件夹
#CATEGORY = OSGDataModel
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L$$PWD/../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L$$PWD/../../BinR -lslfio
}
FORMS += \

View File

@ -1,217 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QOUTLINEMAPPER_P_H
#define QOUTLINEMAPPER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/private/qtguiglobal_p.h>
#include <QtCore/qrect.h>
#include <QtGui/qtransform.h>
#include <QtGui/qpainterpath.h>
#define QT_FT_BEGIN_HEADER
#define QT_FT_END_HEADER
#include <private/qrasterdefs_p.h>
#include <private/qdatabuffer_p.h>
#include "qpaintengineex_p.h"
QT_BEGIN_NAMESPACE
// This limitations comes from qgrayraster.c. Any higher and
// rasterization of shapes will produce incorrect results.
//jyl
//const int QT_RASTER_COORD_LIMIT = 32767;
constexpr int QT_RASTER_COORD_LIMIT = ((1<<23) - 1);
//#define QT_DEBUG_CONVERT
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
/********************************************************************************
* class QOutlineMapper
*
* Used to map between QPainterPath and the QT_FT_Outline structure used by the
* freetype scanconvertor.
*
* The outline mapper uses a path iterator to get points from the path,
* so that it is possible to transform the points as they are converted. The
* callback can be a noop, translate or full-fledged xform. (Tests indicated
* that using a C callback was low cost).
*/
class QOutlineMapper
{
public:
QOutlineMapper() :
m_element_types(0),
m_elements(0),
m_points(0),
m_tags(0),
m_contours(0),
m_in_clip_elements(false)
{
}
/*!
Sets up the matrix to be used for conversion. This also
sets up the qt_path_iterator function that is used as a callback
to get points.
*/
void setMatrix(const QTransform &m)
{
m_transform = m;
qreal scale;
qt_scaleForTransform(m, &scale);
m_curve_threshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
}
void beginOutline(Qt::FillRule fillRule)
{
#ifdef QT_DEBUG_CONVERT
printf("QOutlineMapper::beginOutline rule=%d\n", fillRule);
#endif
m_valid = true;
m_elements.reset();
m_element_types.reset();
m_points.reset();
m_tags.reset();
m_contours.reset();
m_outline.flags = fillRule == Qt::WindingFill
? QT_FT_OUTLINE_NONE
: QT_FT_OUTLINE_EVEN_ODD_FILL;
m_subpath_start = 0;
}
void endOutline();
void clipElements(const QPointF *points, const QPainterPath::ElementType *types, int count);
void convertElements(const QPointF *points, const QPainterPath::ElementType *types, int count);
inline void moveTo(const QPointF &pt) {
#ifdef QT_DEBUG_CONVERT
printf("QOutlineMapper::moveTo() (%f, %f)\n", pt.x(), pt.y());
#endif
closeSubpath();
m_subpath_start = m_elements.size();
m_elements << pt;
m_element_types << QPainterPath::MoveToElement;
}
inline void lineTo(const QPointF &pt) {
#ifdef QT_DEBUG_CONVERT
printf("QOutlineMapper::lineTo() (%f, %f)\n", pt.x(), pt.y());
#endif
m_elements.add(pt);
m_element_types << QPainterPath::LineToElement;
}
void curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep);
inline void closeSubpath() {
int element_count = m_elements.size();
if (element_count > 0) {
if (m_elements.at(element_count-1) != m_elements.at(m_subpath_start)) {
#ifdef QT_DEBUG_CONVERT
printf(" - implicitly closing\n");
#endif
// Put the object on the stack to avoid the odd case where
// lineTo reallocs the databuffer and the QPointF & will
// be invalidated.
QPointF pt = m_elements.at(m_subpath_start);
// only do lineTo if we have element_type array...
if (m_element_types.size())
lineTo(pt);
else
m_elements << pt;
}
}
}
QT_FT_Outline *outline() {
if (m_valid)
return &m_outline;
return 0;
}
QT_FT_Outline *convertPath(const QPainterPath &path);
QT_FT_Outline *convertPath(const QVectorPath &path);
inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? 0 : m_element_types.data(); }
public:
QDataBuffer<QPainterPath::ElementType> m_element_types;
QDataBuffer<QPointF> m_elements;
QDataBuffer<QT_FT_Vector> m_points;
QDataBuffer<char> m_tags;
QDataBuffer<int> m_contours;
QRect m_clip_rect;
QRectF controlPointRect; // only valid after endOutline()
QT_FT_Outline m_outline;
int m_subpath_start;
QTransform m_transform;
qreal m_curve_threshold;
bool m_valid;
bool m_in_clip_elements;
};
QT_END_NAMESPACE
#endif // QOUTLINEMAPPER_P_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -189,67 +189,67 @@ RESOURCES += \
RC_FILE = $$PWD/qrc/logplus.rc
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DESTDIR = $$PWD/../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DESTDIR = $$PWD/../BinR
TARGET = $$join(TARGET,,,)
}
INCLUDEPATH += ../../Slfio/include
INCLUDEPATH += ../../common
INCLUDEPATH += ../../WellLogUI/include
INCLUDEPATH += ../../qtpropertybrowser
INCLUDEPATH += ../../BaseFun/include
INCLUDEPATH += ../../ConvertorManager/include
INCLUDEPATH += ../../OSGDataModel/include
INCLUDEPATH += ../../OSGFramework/include
INCLUDEPATH += ../../DataOutput/include
INCLUDEPATH += ../../DataMgr/include
INCLUDEPATH += ../../DrawBase/include
INCLUDEPATH += ../../ModuleConsole/include
INCLUDEPATH += ../../WellLogModule/include
INCLUDEPATH += ../../Workflow/include
INCLUDEPATH += ../../Workflow/WFCrystal/Crystal/include
INCLUDEPATH += ../../Workflow/WFCrystal/Plugin/include
INCLUDEPATH += ../../Workflow/WFCrystal/SysUtility/utils/include
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
INCLUDEPATH += ../../Workflow/WFEngine/Module/include
INCLUDEPATH += ../../Workflow/WFEngine/Component/WorkflowWidget/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += ../../Workflow/WFEngine/WorkflowEngine/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFWidget/include
INCLUDEPATH += ../../EditPlotHeader/include
INCLUDEPATH += $$PWD/../Slfio/include
INCLUDEPATH += $$PWD/../common
INCLUDEPATH += $$PWD/../WellLogUI/include
INCLUDEPATH += $$PWD/../qtpropertybrowser
INCLUDEPATH += $$PWD/../BaseFun/include
INCLUDEPATH += $$PWD/../ConvertorManager/include
INCLUDEPATH += $$PWD/../OSGDataModel/include
INCLUDEPATH += $$PWD/../OSGFramework/include
INCLUDEPATH += $$PWD/../DataOutput/include
INCLUDEPATH += $$PWD/../DataMgr/include
INCLUDEPATH += $$PWD/../DrawBase/include
INCLUDEPATH += $$PWD/../ModuleConsole/include
INCLUDEPATH += $$PWD/../WellLogModule/include
INCLUDEPATH += $$PWD/../Workflow/include
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/Crystal/include
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/Plugin/include
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/SysUtility/utils/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/IOService/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/Module/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/Component/WorkflowWidget/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/WorkflowEngine/include
INCLUDEPATH += $$PWD/../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += $$PWD/../Workflow/WFWidget/include
INCLUDEPATH += $$PWD/../EditPlotHeader/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lWellLogUId
LIBS += -L../../Bin -lqtpropertybrowserd
LIBS += -L../../Bin -lConvertorManagerd
LIBS += -L../../Bin -lOSGDataModeld
LIBS += -L../../Bin -lDataOutputd
LIBS += -L../../Bin/ -lCallPlugind -lHPluginManaged
LIBS += -L../../Bin/ -lDataMgrd
LIBS += -L../../Bin/ -lDrawBased
LIBS += -L../../Bin/ -lLogModuleConsoled
LIBS += -L../../Bin/ -lWFEngined
LIBS += -L../../Bin/ -lEditPlotHeaderd
LIBS += -L$$PWD/../Bin -lBaseFund
LIBS += -L$$PWD/../Bin -lslfiod
LIBS += -L$$PWD/../Bin -lWellLogUId
LIBS += -L$$PWD/../Bin -lqtpropertybrowserd
LIBS += -L$$PWD/../Bin -lConvertorManagerd
LIBS += -L$$PWD/../Bin -lOSGDataModeld
LIBS += -L$$PWD/../Bin -lDataOutputd
LIBS += -L$$PWD/../Bin/ -lCallPlugind -lHPluginManaged
LIBS += -L$$PWD/../Bin/ -lDataMgrd
LIBS += -L$$PWD/../Bin/ -lDrawBased
LIBS += -L$$PWD/../Bin/ -lLogModuleConsoled
LIBS += -L$$PWD/../Bin/ -lWFEngined
LIBS += -L$$PWD/../Bin/ -lEditPlotHeaderd
#-lCallManaged
} else {
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lWellLogUI
LIBS += -L../../Bin -lqtpropertybrowser
LIBS += -L../../Bin -lConvertorManager
LIBS += -L../../Bin -lOSGDataModel
LIBS += -L../../Bin -lDataOutput
LIBS += -L../../Bin/ -lCallPlugin -lHPluginManage
LIBS += -L../../Bin/ -lDataMgr
LIBS += -L../../Bin/ -lDrawBase
LIBS += -L../../Bin/ -lLogModuleConsole
LIBS += -L../../Bin/ -lWFEngine
LIBS += -L../../Bin/ -lEditPlotHeader
LIBS += -L$$PWD/../BinR -lBaseFun
LIBS += -L$$PWD/../BinR -lslfio
LIBS += -L$$PWD/../BinR -lWellLogUI
LIBS += -L$$PWD/../BinR -lqtpropertybrowser
LIBS += -L$$PWD/../BinR -lConvertorManager
LIBS += -L$$PWD/../BinR -lOSGDataModel
LIBS += -L$$PWD/../BinR -lDataOutput
LIBS += -L$$PWD/../BinR/ -lCallPlugin -lHPluginManage
LIBS += -L$$PWD/../BinR/ -lDataMgr
LIBS += -L$$PWD/../BinR/ -lDrawBase
LIBS += -L$$PWD/../BinR/ -lLogModuleConsole
LIBS += -L$$PWD/../BinR/ -lWFEngine
LIBS += -L$$PWD/../BinR/ -lEditPlotHeader
#-lCallManage
}

78
logPlusAll.pro Normal file
View File

@ -0,0 +1,78 @@
# 主项目配置文件
TEMPLATE = subdirs
# 定义子项目(按编译顺序排列)
SUBDIRS = \
Slfio \
BaseFun \
HPluginManage \
CallPlugin \
qtpropertybrowser \
WFCrystal \
WFEngine \
WFWidget \
OSGDataModel \
DataMgr \
OSGFramework \
WellLogModule \
WellLogUI \
ModuleConsole \
appDllTest \
ConvertorManager \
DataOutput \
SLFAscIIConvertor \
DrawBase \
EditPlotHeader \
logPlus
# 指定编译顺序依赖关系
Slfio.file = Slfio/src/Slfio.pro
BaseFun.file = BaseFun/src/BaseFun.pro
HPluginManage.file = HPluginManage/HPluginManage.pro
CallPlugin.file = CallPlugin/CallPlugin.pro
qtpropertybrowser.file = qtpropertybrowser/qtpropertybrowser.pro
WFCrystal.file = Workflow/WFCrystal/WFCrystal.pro
WFEngine.file = Workflow/WFEngine/WFEngine.pro
WFWidget.file = Workflow/WFWidget/src/WFWidget.pro
OSGDataModel.file = OSGDataModel/src/OSGDataModel.pro
DataMgr.file = DataMgr/src/DataMgr.pro
OSGFramework.file = OSGFramework/src/OSGFramework.pro
WellLogModule.file = WellLogModule/src/WellLogModule.pro
WellLogUI.file = WellLogUI/src/WellLogUI.pro
ModuleConsole.file = ModuleConsole/src/ModuleConsole.pro
appDllTest.file = appDllTest/src/appDllTest.pro
ConvertorManager.file = ConvertorManager/src/ConvertorManager.pro
DataOutput.file = DataOutput/src/DataOutput.pro
SLFAscIIConvertor.file = tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro
DrawBase.file = DrawBase/src/DrawBase.pro
EditPlotHeader.file = EditPlotHeader/src/EditPlotHeader.pro
logPlus.file = logPlus/logPlus.pro
# 设置依赖关系(确保按顺序编译)
BaseFun.depends = Slfio
CallPlugin.depends = HPluginManage
WFCrystal.depends = Slfio
WFEngine.depends = WFCrystal
WFWidget.depends = WFCrystal
OSGDataModel.depends = Slfio WFCrystal
DataMgr.depends = Slfio BaseFun
OSGFramework.depends = Slfio BaseFun OSGDataModel DataMgr
WellLogModule.depends = Slfio BaseFun OSGDataModel DataMgr WFEngine
WellLogUI.depends = Slfio BaseFun OSGDataModel DataMgr
ModuleConsole.depends = Slfio BaseFun OSGDataModel DataMgr OSGFramework WellLogUI WellLogModule WFCrystal WFEngine WFWidget
appDllTest.depends = Slfio
ConvertorManager.depends = Slfio BaseFun OSGDataModel WellLogUI
DataOutput.depends = Slfio BaseFun ConvertorManager
SLFAscIIConvertor.depends = Slfio BaseFun OSGDataModel WellLogUI ConvertorManager
DrawBase.depends = Slfio
EditPlotHeader.depends = Slfio OSGDataModel
logPlus.depends = Slfio BaseFun WellLogUI qtpropertybrowser ConvertorManager OSGDataModel DataOutput HPluginManage CallPlugin DataMgr DrawBase ModuleConsole WFEngine EditPlotHeader
# 可选:指定构建目录
# DESTDIR = $$PWD/bin
# 可选:添加编译配置
# CONFIG += ordered
# 可选:设置默认编译目标
# default.all: release

14
py_to_pyd/fdsa4_test.py Normal file
View File

@ -0,0 +1,14 @@
# This Python file uses the following encoding: utf-8
# if __name__ == "__main__":
# pass
import os
import sys
import numpy as np
def process_arrays(a, b, c, d, e):
result = [x + y for x, y in zip(a, b)]
return np.array(result), c+d+e
print(process_arrays([1,2],[2,3],3,4,5))

15
py_to_pyd/setup.py Normal file
View File

@ -0,0 +1,15 @@
from setuptools import setup
from Cython.Build import cythonize
import numpy as np
setup(
ext_modules=cythonize(
"fdsa4_test.py", # 要编译的Python文件
compiler_directives={
'language_level': 3, # Python 3
'boundscheck': False, # 关闭边界检查提升性能
'wraparound': False,
}
),
include_dirs=[np.get_include()], # 包含NumPy头文件
)

1
py_to_pyd/命令.txt Normal file
View File

@ -0,0 +1 @@
python setup.py build_ext --inplace

View File

@ -66,11 +66,11 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
DLLDESTDIR = ../../Bin
DESTDIR = $$PWD/../Bin
DLLDESTDIR = $$PWD/../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
DLLDESTDIR = ../../Bin
DESTDIR = $$PWD/../BinR
DLLDESTDIR = $$PWD/../BinR
TARGET = $$join(TARGET,,,)
}

View File

@ -20,8 +20,7 @@ INCLUDEPATH += $(OSGHOME)/include \
#include(../../OSGDataModel/paiobjectmodel.libinfo)
HEADERS += ../include/*.h \
../../../OSGDataModel/include/ObjectIDDescription.h \
HEADERS += ../../../OSGDataModel/include/ObjectIDDescription.h \
../../../common/geometryutils.h
SOURCES += *.cpp \
@ -36,17 +35,17 @@ CONFIG += qt \
DEFINES += QT_DLL
CONFIG(debug, debug|release){
LIBS += -L../../../Bin -lOSGDataModeld
LIBS += -L../../../Bin -lBaseFund
LIBS += -L../../../Bin -lslfiod
LIBS += -L../../../Bin -lWellLogUId
LIBS += -L../../../Bin -lConvertorManagerd
LIBS += -L$$PWD/../../../Bin -lOSGDataModeld
LIBS += -L$$PWD/../../../Bin -lBaseFund
LIBS += -L$$PWD/../../../Bin -lslfiod
LIBS += -L$$PWD/../../../Bin -lWellLogUId
LIBS += -L$$PWD/../../../Bin -lConvertorManagerd
} else {
LIBS += -L../../../Bin -lOSGDataModel
LIBS += -L../../../Bin -lBaseFun
LIBS += -L../../../Bin -lslfio
LIBS += -L../../../Bin -lWellLogUI
LIBS += -L../../../Bin -lConvertorManager
LIBS += -L$$PWD/../../../BinR -lOSGDataModel
LIBS += -L$$PWD/../../../BinR -lBaseFun
LIBS += -L$$PWD/../../../BinR -lslfio
LIBS += -L$$PWD/../../../BinR -lWellLogUI
LIBS += -L$$PWD/../../../BinR -lConvertorManager
}
#include(../../OSGParts/src/osg.LibInfo)
@ -70,10 +69,10 @@ CONFIG(debug, debug|release){
#QMAKE_POST_LINK = cp ../bin/*.so $(PAI_HOME)/lib/
CONFIG(debug, debug|release){
DESTDIR = ../../../Bin/convertor
DESTDIR = $$PWD/../../../Bin/convertor
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../../Bin/convertor
DESTDIR = $$PWD/../../../BinR/convertor
TARGET = $$join(TARGET,,,)
}

View File

@ -1,3 +1,8 @@
QT 打开logplus/logPlusAll.pro 项目
设置构建路径这个层级logplus\build\logPlus_xxxxxxxxx
Debug:生成路径logplus/Bin
Release:生成路径logplus/BinR
1.Slfio
共享内存
https://www.cnblogs.com/ys0103/p/4562493.html