From 663890c02b2f39537855c2d174ca4902ad14f05b Mon Sep 17 00:00:00 2001 From: zhaolei <353719554@qq.com> Date: Wed, 11 Mar 2026 10:20:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E4=BA=95=E6=AC=A1]=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=B7=BB=E5=8A=A0[=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=B5=8B=E4=BA=95=E4=BF=A1=E6=81=AF]=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EditPlotHeader/include/BaseDialog.h | 29 + EditPlotHeader/include/EditPlotHeader.h | 10 + EditPlotHeader/include/wellloginformation.h | 73 + EditPlotHeader/src/EditPlotHeader.pro | 90 + EditPlotHeader/src/customlistwidget.cpp | 21 + EditPlotHeader/src/customlistwidget.h | 21 + EditPlotHeader/src/image/1.png | Bin 0 -> 121 bytes EditPlotHeader/src/image/2.png | Bin 0 -> 151 bytes EditPlotHeader/src/image/3.png | Bin 0 -> 140 bytes EditPlotHeader/src/image/4.png | Bin 0 -> 140 bytes EditPlotHeader/src/image/5.png | Bin 0 -> 142 bytes EditPlotHeader/src/image/6.png | Bin 0 -> 145 bytes EditPlotHeader/src/image/7.png | Bin 0 -> 133 bytes EditPlotHeader/src/image/8.png | Bin 0 -> 141 bytes EditPlotHeader/src/image/9.png | Bin 0 -> 145 bytes EditPlotHeader/src/wellloginformation.cpp | 1895 ++++++++++ EditPlotHeader/src/wellloginformation.ui | 3769 +++++++++++++++++++ OSGDataModel/include/BaseObject.h | 4 +- OSGDataModel/include/ObjWelllogRound.h | 4 +- OSGDataModel/src/ObjWelllogRound.cpp | 24 +- Slfio/src/slf.cpp | 4 +- WellLogUI/src/griddataadapter.cpp | 4 +- logPlus/logPlus.pro | 3 + logPlus/mainwindow.cpp | 84 +- 编译说明.txt | 3 +- 25 files changed, 5954 insertions(+), 84 deletions(-) create mode 100644 EditPlotHeader/include/BaseDialog.h create mode 100644 EditPlotHeader/include/EditPlotHeader.h create mode 100644 EditPlotHeader/include/wellloginformation.h create mode 100644 EditPlotHeader/src/EditPlotHeader.pro create mode 100644 EditPlotHeader/src/customlistwidget.cpp create mode 100644 EditPlotHeader/src/customlistwidget.h create mode 100644 EditPlotHeader/src/image/1.png create mode 100644 EditPlotHeader/src/image/2.png create mode 100644 EditPlotHeader/src/image/3.png create mode 100644 EditPlotHeader/src/image/4.png create mode 100644 EditPlotHeader/src/image/5.png create mode 100644 EditPlotHeader/src/image/6.png create mode 100644 EditPlotHeader/src/image/7.png create mode 100644 EditPlotHeader/src/image/8.png create mode 100644 EditPlotHeader/src/image/9.png create mode 100644 EditPlotHeader/src/wellloginformation.cpp create mode 100644 EditPlotHeader/src/wellloginformation.ui diff --git a/EditPlotHeader/include/BaseDialog.h b/EditPlotHeader/include/BaseDialog.h new file mode 100644 index 0000000..b11f88b --- /dev/null +++ b/EditPlotHeader/include/BaseDialog.h @@ -0,0 +1,29 @@ +/** + * @file CBaseDialog.h + * @date July 2, 2014 + * @auto zhangjie + */ +#ifndef CBaseDialog_H +#define CBaseDialog_H +#include +#include "OSGFramework.h" +#pragma warning( push ,0) + +#pragma warning( pop ) +class OSGFRAMEWORK_EXPORT CBaseDialog : public QDialog +{ + Q_OBJECT +public: + CBaseDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0) + :QDialog(parent, flags) + { + }; + + ~CBaseDialog(void) + { + }; + virtual void ReFreshWindow(int type=0) + { + } +}; +#endif /* PAITABLEWIDGET_H_ */ diff --git a/EditPlotHeader/include/EditPlotHeader.h b/EditPlotHeader/include/EditPlotHeader.h new file mode 100644 index 0000000..66f2c5c --- /dev/null +++ b/EditPlotHeader/include/EditPlotHeader.h @@ -0,0 +1,10 @@ +#ifdef _WIN32 + #ifdef OSGWELLLOGUI_LIB + #define EDITPLOTHEADER_EXPORT __declspec(dllexport) + #else + #define EDITPLOTHEADER_EXPORT __declspec(dllimport) + #endif +#else + #define EDITPLOTHEADER_EXPORT +#endif + diff --git a/EditPlotHeader/include/wellloginformation.h b/EditPlotHeader/include/wellloginformation.h new file mode 100644 index 0000000..4deec01 --- /dev/null +++ b/EditPlotHeader/include/wellloginformation.h @@ -0,0 +1,73 @@ +#ifndef WELLLOGINFORMATION_H +#define WELLLOGINFORMATION_H + +//using namespace Ui; +#include +#include "BaseDialog.h" +#include "EditPlotHeader.h" +#include +#include "ObjWelllogRound.h" +#pragma execution_character_set("utf-8") +using namespace pai; +using namespace pai::datamodel; +namespace Ui +{ + class WellLogInformationClass; +} +namespace pai +{ + namespace gui + { +//class CustomLineEdit; + +class EDITPLOTHEADER_EXPORT WellLogInformation : public /*CBaseDialog*/ QDialog +{ + Q_OBJECT +public: + WellLogInformation(QWidget *parent = 0, Qt::WindowFlags flags = 0); + ~WellLogInformation(); + void SetWelllogRound(CObjWelllogRound*); + CObjWelllogRound* GetWelllogRound(); + int CreateTable(CLogIO *); + +protected: + //bool eventFilter(QObject * pObject, QEvent * pEvent) override; +private slots: + void OnSave(); + + void OnCAddCurve(); + void OnSAddCurve(); + void OnCDeleteCurve(); + void OnSDeleteCurve(); + void OnCalcTemp(); + +private: + void ReadWellP(QString szText,QLineEdit* pStart,QLineEdit* pEnd); + + void ReadCustomWell(const Slf_FILE_MESSAGE& rMessage); + + void ReadCementationWell(const Slf_FILE_MESSAGE& rMessage); + + void ReadProduceWell(const Slf_FILE_MESSAGE& rMessage); + + void ReadTable(QString tablename); + + void WriteTable(CLogIO *,int); + + void GetValueTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn ,char*); + QString + GetStringtValueInTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn,char*); + + void SetItemValue(CLogIO * pLogio,int nTableFlag,const QString& szKey,const QString& szValue,int nRow,int nCol,char*); + void SetItemValue(CLogIO * pLogio,int nTableFlag,const QString& szKey, + const QString& szValue1,const QString& szValue2,int nRow,int nCol,char*); +private: + Ui::WellLogInformationClass* m_pUi; + CObjWelllogRound* m_pObjWelllogRound; +}; + + +} +} + +#endif // WELLLOGINFORMATION_H diff --git a/EditPlotHeader/src/EditPlotHeader.pro b/EditPlotHeader/src/EditPlotHeader.pro new file mode 100644 index 0000000..55c45ae --- /dev/null +++ b/EditPlotHeader/src/EditPlotHeader.pro @@ -0,0 +1,90 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2024-07-11T18:44:51 +# +#------------------------------------------------- + +QT += core gui widgets + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = EditPlotHeader +TEMPLATE = lib + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS +#DEFINES += _WINDOWS +DEFINES += OSGWELLLOGUI_LIB +DEFINES += _TIMESPEC_DEFINED + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +CONFIG += console \ + # static \ + c++11 \ + shared\ + dll + + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +CONFIG(debug, debug|release){ + DESTDIR = ../../Bin + TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀 +} else { + DESTDIR = ../../Bin + TARGET = $$join(TARGET,,,) +} + + +FORMS += \ + wellloginformation.ui + +SOURCES += ../src/customlistwidget.cpp \ + ../../common/geometryutils.cpp \ + wellloginformation.cpp +HEADERS += \ + ../../common/geometryutils.h \ + ../include/BaseObject.h \ + ../include/ObjWelllog.h \ + ../include/ObjWelllogTABLE.h \ + ../include/wellloginformation.h \ + customlistwidget.h + + +INCLUDEPATH += ../include +INCLUDEPATH += ../CallManage +INCLUDEPATH += ../../Slfio/include +INCLUDEPATH += ../../common +INCLUDEPATH += ../../BaseFun/include +INCLUDEPATH += ../../OSGDataModel/include +INCLUDEPATH += ../../DataMgr/include +INCLUDEPATH += ../../OSGFramework/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 + +CONFIG(debug, debug|release){ + LIBS += -L../../Bin -lslfiod + LIBS += -L../../Bin -lOSGDataModeld +} else { + LIBS += -L../../Bin -lslfio + LIBS += -L../../Bin -lOSGDataModel +} diff --git a/EditPlotHeader/src/customlistwidget.cpp b/EditPlotHeader/src/customlistwidget.cpp new file mode 100644 index 0000000..e6c440c --- /dev/null +++ b/EditPlotHeader/src/customlistwidget.cpp @@ -0,0 +1,21 @@ +#include "customlistwidget.h" +#include +CustomListWidget::CustomListWidget(QWidget *parent) + : QListWidget(parent) +{ + +} + +CustomListWidget::~CustomListWidget() +{ + +} + +void CustomListWidget::keyPressEvent(QKeyEvent * pEvent) +{ + QListWidget::keyPressEvent(pEvent); + if(pEvent->key()==Qt::Key_Delete) + { + emit SignalDelete(); + } +} diff --git a/EditPlotHeader/src/customlistwidget.h b/EditPlotHeader/src/customlistwidget.h new file mode 100644 index 0000000..919b004 --- /dev/null +++ b/EditPlotHeader/src/customlistwidget.h @@ -0,0 +1,21 @@ +#ifndef CUSTOMLISTWIDGET_H +#define CUSTOMLISTWIDGET_H + +#include + +class CustomListWidget : public QListWidget +{ + Q_OBJECT + +public: + CustomListWidget(QWidget *parent=NULL); + ~CustomListWidget(); +signals: + void SignalDelete(); +protected: + virtual void keyPressEvent(QKeyEvent *); +private: + +}; + +#endif // CUSTOMLISTWIDGET_H diff --git a/EditPlotHeader/src/image/1.png b/EditPlotHeader/src/image/1.png new file mode 100644 index 0000000000000000000000000000000000000000..8085edcc94c46f4c23d634379fc38d573f347547 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgR< zhHL4LP^+JFbvQlR8X7piOH6PPnjsO#BhvJj@3+wmi)+WrGP$otRlnH9|8Khbn^%0x U7k*NF0yK-k)78&qol`;+0OZRkjQ{`u literal 0 HcmV?d00001 diff --git a/EditPlotHeader/src/image/2.png b/EditPlotHeader/src/image/2.png new file mode 100644 index 0000000000000000000000000000000000000000..e20596869143d95de6c042658c56cfab1992029f GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJg>$j+1|*LJgj_1!cLpz#czu6{1-oD!M<(mpQ( literal 0 HcmV?d00001 diff --git a/EditPlotHeader/src/image/4.png b/EditPlotHeader/src/image/4.png new file mode 100644 index 0000000000000000000000000000000000000000..0c7298693b8c059238fddc755ce849769715b14d GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgA)m(;H0MmSI~q878QkuG6&8(awSe$b~4ZS>Div6{I*=%tTUW;UYl#+Bwg~--}1qc oxaA7Y?aaXzXFk5a{%M7N>T4d0HFJL&0F7txboFyt=akR{0Nf)l#Q*>R literal 0 HcmV?d00001 diff --git a/EditPlotHeader/src/image/5.png b/EditPlotHeader/src/image/5.png new file mode 100644 index 0000000000000000000000000000000000000000..723a5e9ed8291eaba71d853308f961eecfddd4ca GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJg|AsjQ46B-zp+1T2c18f+z zjvZiH%DSM0nVI=8dx>$j+1|*LJg}aW^kxCg$2TD60CXn>+rFJcIG`28`>81`dJ)W+vZzxbn1hS`VEhLDi;1fH!s3q oxuw(h%xN~g7v;Uuo>%Q)bpI|?B^m$R6=(;8r>mdKI;Vst04Rqt{r~^~ literal 0 HcmV?d00001 diff --git a/EditPlotHeader/src/image/7.png b/EditPlotHeader/src/image/7.png new file mode 100644 index 0000000000000000000000000000000000000000..4a1912bf736b8630f4416dc6bc11f82a9158a65d GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgIe_>FP-ww{238#)JL7>$j+1|*LJgAoo5c&JUjmxX;OXk;vd$@?2>=ycFT4N% literal 0 HcmV?d00001 diff --git a/EditPlotHeader/src/image/9.png b/EditPlotHeader/src/image/9.png new file mode 100644 index 0000000000000000000000000000000000000000..996c9ba1ff3c886c768115fb95cd317eaba67579 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJg +#include +#include +#include +#include +#include +#include "ObjWellLogTABLE.h" +#pragma execution_character_set("utf-8") +#define CE_JIN_XIN_XI_TABLE QString("测井信息表").toLocal8Bit() +using namespace std; +//测井信息表 +QString changenyr(QString vst) +{ + if(vst.indexOf(".")>-1||vst.indexOf("-")>-1||vst.indexOf("/")>-1) + { + QStringList vsts; + if(vst.indexOf(".")>-1)vsts=vst.split('.'); + else if(vst.indexOf("-")>-1)vsts=vst.split('-'); + else if(vst.indexOf("/")>-1)vsts=vst.split('/'); + vst=""; + for(int i=0;isetupUi(this); + QTextCodec* pCode = QTextCodec::codecForLocale(); + if(pCode) + m_pUi->label_197->setText(pCode->toUnicode("um")); + + + connect(m_pUi->saveBtn,SIGNAL(clicked()),this,SLOT(OnSave())); + + QString oilfield=GetOilFieldName(""); + QStringList rTeamList=GetSimilarCurves("teams"+oilfield); + + m_pUi->well_cementation_team->addItems(rTeamList); + m_pUi->well_cementation_team_2->addItems(rTeamList); + m_pUi->well_cementation_team_2->insertItem(0,""); + m_pUi->produce_well_team->addItems(rTeamList); + m_pUi->produce_well_team_2->addItems(rTeamList); + m_pUi->produce_well_team_2->insertItem(0,""); + m_pUi->custom_team->addItems(rTeamList); + m_pUi->custom_team_2->addItems(rTeamList); + m_pUi->custom_team_2->insertItem(0,""); + + m_pUi->custom_well_type->clear(); + QStringList well_type=GetSimilarCurves("welltype"); + m_pUi->custom_well_type->addItems(well_type); + + QStringList rApparatusList=GetSimilarCurves("tools"); + /*rApparatusList<<"ECLIPS-5700"<<"SL-6000" + <<"LOGIQ"<<"SL-3000"<<"EXCELL-2000" + <<"CLS-3700K"<<"LWF"<<"XTREAM"<<"SEMLS-1000" + <<"LWFSEMLS" + <<"LWFXTREAM" + <<"LWFSLWY" + <<"LWFGILEE" + <<"LWFMCET"; + */ + m_pUi->well_cementation_apparatus->addItems(rApparatusList); + + m_pUi->well_cementation_apparatus_2->addItems(rApparatusList); + m_pUi->well_cementation_apparatus_2->insertItem(0,""); + m_pUi->produce_well_apparatus->addItems(rApparatusList); + m_pUi->produce_well_apparatus_2->addItems(rApparatusList); + m_pUi->produce_well_apparatus_2->insertItem(0,""); + m_pUi->custom_apparatus->addItems(rApparatusList); + m_pUi->custom_apparatus_2->addItems(rApparatusList); + m_pUi->custom_apparatus_2->insertItem(0,""); + + QStringList rApparatusList1=GetSimilarCurves("CementType"); + + m_pUi->well_pingjia->clear(); + m_pUi->well_pingjia->addItems(rApparatusList1); + m_pUi->well_pingjia->insertItem(0,""); + + QStringList comboBox_custom_rList=GetSimilarCurves("holes"); + m_pUi->comboBox_custom_r->clear(); + m_pUi->comboBox_custom_r->addItems(comboBox_custom_rList); + QStringList comboBox_prom_customList=GetSimilarCurves("proms"); + m_pUi->comboBox_prom_custom->clear(); + m_pUi->comboBox_prom_custom->addItems(comboBox_prom_customList); + + QStringList custom_well_xingzhiList=GetSimilarCurves("muds"); + m_pUi->custom_well_xingzhi->clear(); + m_pUi->custom_well_xingzhi->addItems(custom_well_xingzhiList); + + + //常规 + connect(m_pUi->pushButton_add_custom,SIGNAL(clicked()),this,SLOT(OnCAddCurve())); + //固井 + connect(m_pUi->pushButton_add_s,SIGNAL(clicked()),this,SLOT(OnSAddCurve())); + + + //常规 + connect(m_pUi->pushButton_delete_custom,SIGNAL(clicked()),this,SLOT(OnCDeleteCurve())); + //固井 + connect(m_pUi->pushButton_delete_s,SIGNAL(clicked()),this,SLOT(OnSDeleteCurve())); + //常规 + connect(m_pUi->listWidget_custom,SIGNAL(SignalDelete()),this,SLOT(OnCDeleteCurve())); + //固井 + connect(m_pUi->listWidget_s,SIGNAL(SignalDelete()),this,SLOT(OnSDeleteCurve())); + //解释参数 + connect(m_pUi->comboBox_prom_custom,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); +/* + connect(m_pUi->comboBox,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_2,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_3,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_4,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_5,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_6,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_7,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_8,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_9,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_10,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_11,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_12,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_13,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); + connect(m_pUi->comboBox_14,SIGNAL( editTextChanged(const QString&)),this, + SLOT(OnUpdateTable(const QString&))); +*/ + // + connect(m_pUi->custom_temp,SIGNAL(editingFinished()),this,SLOT(OnCalcTemp())); + connect(m_pUi->custom_mud_resistance,SIGNAL(editingFinished()),this,SLOT(OnCalcTemp())); + + m_pUi->listWidget_custom->setSelectionMode(QAbstractItemView::ExtendedSelection); + m_pUi->listWidget_s->setSelectionMode(QAbstractItemView::ExtendedSelection); + + + m_pUi->custom_test_date->installEventFilter(this); + m_pUi->custom_test_date->setMouseTracking(true); +} + +WellLogInformation::~WellLogInformation() +{ + delete m_pUi; +} + +void WellLogInformation::OnSave() +{ + if(m_pObjWelllogRound==nullptr) + return; + + + //MyWelllogRound wellLR; + QString szWellName=m_pObjWelllogRound->GetWell()->GetWellMessageFileName(); + CMemRdWt * pMessageLogio=new CMemRdWt(); + Slf_FILE_MESSAGE rMessage; + pMessageLogio->Open(szWellName.toStdString().c_str(),CSlfIO::modeReadWrite); + pMessageLogio->GetFileMessage(rMessage); + + //存储共有数据 + if(m_pUi->tabWidget->currentIndex()==0) + { + QString text=m_pUi->custom_well_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + strcpy(rMessage.JB,m_pUi->custom_well_type->currentText().toLocal8Bit().data()); + strcpy(rMessage.AreaName,m_pUi->custom_area->text().toLocal8Bit().data()); + rMessage.LoggingDepth=m_pUi->custom_well_deep->text().toFloat(); + //补心海拔 + QString Kelly=m_pUi->custom_bushing_high->text(); + rMessage.Kelly = ConvertDataByString(m_pUi->custom_bushing_high->text()); + QString v=m_pUi->custom_mud_resistance->text(); + rMessage.Mud_Resistivity[1]=v.toFloat(); + v=m_pUi->custom_18_resistance->text(); + rMessage.Mud_Resistivity[0]=v.toFloat(); + v=m_pUi->custom_mud_viscosity->text(); + rMessage.Mud_Viscosity[0]=v.toFloat(); + v=m_pUi->custom_mud_density->text(); + rMessage.Mud_Density[0]=v.toFloat(); + v=m_pUi->custom_well_temp->text(); + rMessage.Well_Bottom_Temperature=v.toFloat(); + //钻头 + rMessage.Bit_Diameter[0] = ConvertDataByString(m_pUi->custom_broach_mm_1->text()); + rMessage.Bit_Depth[0] =ConvertDataByString(m_pUi->custom_broach_m_1->text()); + + rMessage.Bit_Diameter[1] =ConvertDataByString(m_pUi->custom_broach_mm_2->text()); + rMessage.Bit_Depth[1] =ConvertDataByString(m_pUi->custom_broach_m_2->text()); + + rMessage.Bit_Diameter[2] =ConvertDataByString(m_pUi->custom_broach_mm_3->text()); + rMessage.Bit_Depth[2] =ConvertDataByString(m_pUi->custom_broach_m_3->text()); + + rMessage.Bit_Diameter[3] =ConvertDataByString(m_pUi->custom_broach_mm_4->text()); + rMessage.Bit_Depth[3] =ConvertDataByString(m_pUi->custom_broach_m_4->text()); + + + //套管 + rMessage.Bushing_Inside_Diameter[0] = ConvertDataByString(m_pUi->custom_drivepipe_mm_1->text()); + rMessage.Bushing_Detpth[0] =ConvertDataByString(m_pUi->custom_drivepipe_m_1->text()); + + rMessage.Bushing_Inside_Diameter[1] = ConvertDataByString(m_pUi->custom_drivepipe_mm_2->text()); + rMessage.Bushing_Detpth[1] =ConvertDataByString(m_pUi->custom_drivepipe_m_2->text()); + + rMessage.Bushing_Inside_Diameter[2] = ConvertDataByString(m_pUi->custom_drivepipe_mm_3->text()); + rMessage.Bushing_Detpth[2] =ConvertDataByString(m_pUi->custom_drivepipe_m_3->text()); + } + else if(m_pUi->tabWidget->currentIndex()==1) + { + QString text=m_pUi->well_cementation_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + strcpy(rMessage.AreaName,m_pUi->well_cementation_area->text().toLocal8Bit().data()); + + rMessage.Bit_Diameter[0] = ConvertDataByString(m_pUi->well_cementation_broach_mm_1->text()); + rMessage.Bit_Depth[0] =ConvertDataByString(m_pUi->well_cementation_broach_m_1->text()); + + rMessage.Bit_Diameter[1] =ConvertDataByString(m_pUi->well_cementation_broach_mm_2->text()); + rMessage.Bit_Depth[1] =ConvertDataByString(m_pUi->well_cementation_broach_m_2->text()); + + rMessage.Bit_Diameter[2] =ConvertDataByString(m_pUi->well_cementation_broach_mm_3->text()); + rMessage.Bit_Depth[2] =ConvertDataByString(m_pUi->well_cementation_broach_m_3->text()); + + rMessage.Bit_Diameter[3] =ConvertDataByString(m_pUi->well_cementation_broach_mm_4->text()); + rMessage.Bit_Depth[3] =ConvertDataByString(m_pUi->well_cementation_broach_m_4->text()); + } + else if(m_pUi->tabWidget->currentIndex()==2) + { + QString text=m_pUi->produce_well_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + strcpy(rMessage.AreaName,m_pUi->produce_well_area->text().toLocal8Bit().data()); + + //套管 + rMessage.Bushing_Inside_Diameter[0] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_4->text()); + rMessage.Bushing_Detpth[0] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_1->text()); + + rMessage.Bushing_Inside_Diameter[1] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_5->text()); + rMessage.Bushing_Detpth[1] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_2->text()); + + rMessage.Bushing_Inside_Diameter[2] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_6->text()); + rMessage.Bushing_Detpth[2] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_3->text()); + + rMessage.Bushing_Outside_Diameter[0] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_1->text()); + rMessage.Bushing_Outside_Diameter[1] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_2->text()); + rMessage.Bushing_Outside_Diameter[2] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_3->text()); + } + + pMessageLogio->SetFileMessage(rMessage); + delete pMessageLogio; + + szWellName=m_pObjWelllogRound->GetSlfFileName(); + CLogIO * pLogio=new CLogIO(); + if(!pLogio->Open(szWellName.toStdString().c_str(),CSlfIO::modeReadWrite)) + { + QMessageBox::information(nullptr,QString::fromLocal8Bit("提示"),QString::fromLocal8Bit("存储失败!")); + delete pLogio; + return; + } + pLogio->GetFileMessage(rMessage); + + //存储共有数据 + if(m_pUi->tabWidget->currentIndex()==0) + { + QString text=m_pUi->custom_well_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + strcpy(rMessage.JB,m_pUi->custom_well_type->currentText().toLocal8Bit().data()); + strcpy(rMessage.AreaName,m_pUi->custom_area->text().toLocal8Bit().data()); + rMessage.LoggingDepth=m_pUi->custom_well_deep->text().toFloat(); + //补心海拔 + rMessage.Kelly = ConvertDataByString(m_pUi->custom_bushing_high->text()); + QString v=m_pUi->custom_mud_resistance->text(); + rMessage.Mud_Resistivity[1]=v.toFloat(); + v=m_pUi->custom_18_resistance->text(); + rMessage.Mud_Resistivity[0]=v.toFloat(); + v=m_pUi->custom_mud_viscosity->text(); + rMessage.Mud_Viscosity[0]=v.toFloat(); + v=m_pUi->custom_mud_density->text(); + rMessage.Mud_Density[0]=v.toFloat(); + v=m_pUi->custom_well_temp->text(); + rMessage.Well_Bottom_Temperature=v.toFloat(); + //钻头 + rMessage.Bit_Diameter[0] = ConvertDataByString(m_pUi->custom_broach_mm_1->text()); + rMessage.Bit_Depth[0] =ConvertDataByString(m_pUi->custom_broach_m_1->text()); + + rMessage.Bit_Diameter[1] =ConvertDataByString(m_pUi->custom_broach_mm_2->text()); + rMessage.Bit_Depth[1] =ConvertDataByString(m_pUi->custom_broach_m_2->text()); + + rMessage.Bit_Diameter[2] =ConvertDataByString(m_pUi->custom_broach_mm_3->text()); + rMessage.Bit_Depth[2] =ConvertDataByString(m_pUi->custom_broach_m_3->text()); + + rMessage.Bit_Diameter[3] =ConvertDataByString(m_pUi->custom_broach_mm_4->text()); + rMessage.Bit_Depth[3] =ConvertDataByString(m_pUi->custom_broach_m_4->text()); + + + //套管 + rMessage.Bushing_Inside_Diameter[0] = ConvertDataByString(m_pUi->custom_drivepipe_mm_1->text()); + rMessage.Bushing_Detpth[0] =ConvertDataByString(m_pUi->custom_drivepipe_m_1->text()); + + rMessage.Bushing_Inside_Diameter[1] = ConvertDataByString(m_pUi->custom_drivepipe_mm_2->text()); + rMessage.Bushing_Detpth[1] =ConvertDataByString(m_pUi->custom_drivepipe_m_2->text()); + + rMessage.Bushing_Inside_Diameter[2] = ConvertDataByString(m_pUi->custom_drivepipe_mm_3->text()); + rMessage.Bushing_Detpth[2] =ConvertDataByString(m_pUi->custom_drivepipe_m_3->text()); + } + else if(m_pUi->tabWidget->currentIndex()==1) + { + QString text=m_pUi->well_cementation_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + + strcpy(rMessage.AreaName,m_pUi->well_cementation_area->text().toLocal8Bit().data()); + + rMessage.Bit_Diameter[0] = ConvertDataByString(m_pUi->well_cementation_broach_mm_1->text()); + rMessage.Bit_Depth[0] =ConvertDataByString(m_pUi->well_cementation_broach_m_1->text()); + + rMessage.Bit_Diameter[1] =ConvertDataByString(m_pUi->well_cementation_broach_mm_2->text()); + rMessage.Bit_Depth[1] =ConvertDataByString(m_pUi->well_cementation_broach_m_2->text()); + + rMessage.Bit_Diameter[2] =ConvertDataByString(m_pUi->well_cementation_broach_mm_3->text()); + rMessage.Bit_Depth[2] =ConvertDataByString(m_pUi->well_cementation_broach_m_3->text()); + + rMessage.Bit_Diameter[3] =ConvertDataByString(m_pUi->well_cementation_broach_mm_4->text()); + rMessage.Bit_Depth[3] =ConvertDataByString(m_pUi->well_cementation_broach_m_4->text()); + } + else if(m_pUi->tabWidget->currentIndex()==2) + { + QString text=m_pUi->produce_well_name->text(); + int len=text.length(); + if(len&&text.right(1)!=("井")) + { + text+="井"; + } + strcpy(rMessage.WellAliasName,text.toLocal8Bit().data()); + strcpy(rMessage.AreaName,m_pUi->produce_well_area->text().toLocal8Bit().data()); + + //套管 + rMessage.Bushing_Inside_Diameter[0] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_4->text()); + rMessage.Bushing_Detpth[0] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_1->text()); + + rMessage.Bushing_Inside_Diameter[1] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_5->text()); + rMessage.Bushing_Detpth[1] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_2->text()); + + rMessage.Bushing_Inside_Diameter[2] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_6->text()); + rMessage.Bushing_Detpth[2] =ConvertDataByString(m_pUi->produce_well_drivepipe_m_3->text()); + + rMessage.Bushing_Outside_Diameter[0] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_1->text()); + rMessage.Bushing_Outside_Diameter[1] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_2->text()); + rMessage.Bushing_Outside_Diameter[2] = ConvertDataByString(m_pUi->produce_well_drivepipe_mm_3->text()); + + } + pLogio->SetFileMessage(rMessage); + + int nTableFlag =pLogio->OpenTable(CE_JIN_XIN_XI_TABLE.toStdString().c_str()); + //创建表 + if(nTableFlag==-1) + { + nTableFlag = CreateTable(pLogio); + CObjWelllogRound *pWelllogRound=m_pObjWelllogRound; + // if(pWelllogRound) { + // PaiObject*pBase=pWelllogRound->GetObjectByName(CE_JIN_XIN_XI_TABLE,GetClassID_WellLogTABLE()); + // if(!dynamic_cast(pBase)){ + // CObjWellLog * acurve=new CObjWellLogTABLE(); + // if(acurve) { + // acurve->m_ObjectType=TABLEE_OBJECT; + // acurve->SetName(CE_JIN_XIN_XI_TABLE); + // acurve->SetAliasName(CE_JIN_XIN_XI_TABLE); + // acurve->SetSlfFileName(pWelllogRound->GetSlfFileName()); + // acurve->SetWell(pWelllogRound->GetWell()); + // pWelllogRound->AddChild(acurve); + // } + // } + // } + } + + WriteTable(pLogio,nTableFlag); + + delete pLogio; + // GetObjectEvent().OnRefreshMessage(szWellName,"Message",this); + QMessageBox::information(nullptr,("提示"),("存储成功!")); +} + + +int WellLogInformation::CreateTable(CLogIO * pLogIO) +{ + + QString szColumnName; + + //1 + szColumnName+=("第1列");szColumnName+=","; + szColumnName+=("第1列值");szColumnName+=","; + + //2 + szColumnName+=("第2列");szColumnName+=","; + szColumnName+=("第2列值");szColumnName+=","; + //3 + szColumnName+=("第3列");szColumnName+=","; + szColumnName+=("第3列值");szColumnName+=","; + //4 + szColumnName+=("第4列");szColumnName+=","; + szColumnName+=("第4列值");szColumnName+=","; + //5 + szColumnName+=("第5列");szColumnName+=","; + szColumnName+=("第5列值");szColumnName+=","; + //6 + szColumnName+=("第6列");szColumnName+=","; + szColumnName+=("第6列值");szColumnName+=","; + + //7 + szColumnName+=("第7列");szColumnName+=","; + szColumnName+=("第7列值");szColumnName+=","; + + + QString szDataType; + szDataType+="6,6,6,6,"; + szDataType+="6,6,6,6,"; + szDataType+="6,6,6,6,"; + szDataType+="6,6"; + + QString szSize; + szSize+="20,40,20,40,"; + szSize+="20,40,20,40,"; + szSize+="20,40,20,40,"; + szSize+="20,500"; + + QString szRemark; + szRemark+="0,0,0,0,"; + szRemark+="0,0,0,0,"; + szRemark+="0,0,0,0,"; + szRemark+="0,0"; + + return pLogIO->Open_Set_Table(CE_JIN_XIN_XI_TABLE.toStdString().c_str(), + TABLEE_OBJECT, + 14, + szColumnName.toLocal8Bit().data(), + szSize.toLocal8Bit().data(), + szDataType.toLocal8Bit().data(), + szRemark.toLocal8Bit().data()); +} + +// int WellLogInformation::CreateTable(CLogIO * pLogIO) +// { + +// QString szColumnName; + +// //1 +// szColumnName+=QString::fromLocal8Bit("第1列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第1列值");szColumnName+=","; + +// //2 +// szColumnName+=QString::fromLocal8Bit("第2列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第2列值");szColumnName+=","; +// //3 +// szColumnName+=QString::fromLocal8Bit("第3列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第3列值");szColumnName+=","; +// //4 +// szColumnName+=QString::fromLocal8Bit("第4列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第4列值");szColumnName+=","; +// //5 +// szColumnName+=QString::fromLocal8Bit("第5列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第5列值");szColumnName+=","; +// //6 +// szColumnName+=QString::fromLocal8Bit("第6列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第6列值");szColumnName+=","; + +// //7 +// szColumnName+=QString::fromLocal8Bit("第7列");szColumnName+=","; +// szColumnName+=QString::fromLocal8Bit("第7列值");szColumnName+=","; + + +// QString szDataType; +// szDataType+="6,6,6,6,"; +// szDataType+="6,6,6,6,"; +// szDataType+="6,6,6,6,"; +// szDataType+="6,6"; + +// QString szSize; +// szSize+="20,40,20,40,"; +// szSize+="20,40,20,40,"; +// szSize+="20,40,20,40,"; +// szSize+="20,500"; + +// QString szRemark; +// szRemark+="0,0,0,0,"; +// szRemark+="0,0,0,0,"; +// szRemark+="0,0,0,0,"; +// szRemark+="0,0"; + +// return pLogIO->Open_Set_Table(CE_JIN_XIN_XI_TABLE.toLocal8Bit().toStdString().c_str(), +// TABLEE_OBJECT, +// 14, +// szColumnName.toLocal8Bit().data(), +// szSize.toLocal8Bit().data(), +// szDataType.toLocal8Bit().data(), +// szRemark.toLocal8Bit().data()); +// } + +void WellLogInformation::SetWelllogRound(CObjWelllogRound* pObjWelllogRound) +{ + m_pObjWelllogRound = pObjWelllogRound; + if(m_pObjWelllogRound==nullptr) return; + //MyWelllogRound wellLR; + QString szWellName=m_pObjWelllogRound->GetWell()->GetWellMessageFileName(); + + CMemRdWt * logio=new CMemRdWt(); + Slf_FILE_MESSAGE rMessage1; + logio->Open(szWellName.toStdString().c_str(),CSlfIO::modeReadWrite); + logio->GetFileMessage(rMessage1);//读取井基本信息(包括excel中红色部分) + delete logio; + szWellName=m_pObjWelllogRound->GetSlfFileName(); + logio=new CMemRdWt(); + Slf_FILE_MESSAGE rMessage; + logio->Open(szWellName.toStdString().c_str(),CSlfIO::modeReadWrite); + logio->GetFileMessage(rMessage);//读取井基本信息(包括excel中红色部分) + delete logio; + if(strlen(rMessage.AreaName)==0&&strlen(rMessage1.AreaName)!=0) strncpy(rMessage.AreaName,rMessage1.AreaName,64); + if(strlen(rMessage.OilCompanyName)==0&&strlen(rMessage1.OilCompanyName)!=0) strncpy(rMessage.OilCompanyName,rMessage1.OilCompanyName,64); + if(strlen(rMessage.WellName)==0&&strlen(rMessage1.WellName)!=0) strncpy(rMessage.WellName,rMessage1.WellName,64); + if(strlen(rMessage.WellType)==0&&strlen(rMessage1.WellType)!=0) strncpy(rMessage.WellType,rMessage1.WellType,20); + if(strlen(rMessage.LogCompanyName)==0&&strlen(rMessage1.LogCompanyName)!=0) + strncpy(rMessage.LogCompanyName,rMessage1.LogCompanyName,64); + + if(rMessage.Xcoor==0&&rMessage1.Xcoor!=0) rMessage.Xcoor=rMessage1.Xcoor; + if(rMessage.Ycoor==0&&rMessage1.Ycoor!=0) rMessage.Ycoor=rMessage1.Ycoor; + if(rMessage.Altitude==0&&rMessage1.Altitude!=0) rMessage.Altitude=rMessage1.Altitude; + if(rMessage.Kelly==0&&rMessage1.Kelly!=0&&rMessage1.Kelly!=-9999) rMessage.Kelly=rMessage1.Kelly; + if(rMessage.StartDrillDate==0&&rMessage1.StartDrillDate!=0) + rMessage.StartDrillDate=rMessage1.StartDrillDate; + if(rMessage.EndDrillDate==0&&rMessage1.EndDrillDate!=0) + rMessage.EndDrillDate=rMessage1.EndDrillDate; + if(rMessage.StartDepth==0&&rMessage1.StartDepth!=0) + rMessage.StartDepth=rMessage1.StartDepth; + if(rMessage.EndDepth==0&&rMessage1.EndDepth!=0) + rMessage.EndDepth=rMessage1.EndDepth; + + if(rMessage.Well_Bottom_Temperature==0&&rMessage1.Well_Bottom_Temperature!=0) + rMessage.Well_Bottom_Temperature=rMessage1.Well_Bottom_Temperature; + if(rMessage.LoggingDepth==0&&rMessage1.LoggingDepth!=0) + rMessage.LoggingDepth=rMessage1.LoggingDepth; + + for(int i=0;i<10;i++) + { + if(rMessage.Mud_Density[i]==0&&rMessage1.Mud_Density[i]!=0) + rMessage.Mud_Density[i]=rMessage1.Mud_Density[i]; + if(rMessage.Mud_Viscosity[i]==0&&rMessage1.Mud_Viscosity[i]!=0) + rMessage.Mud_Viscosity[i]=rMessage1.Mud_Viscosity[i]; + if(rMessage.Mud_Resistivity[i]==0&&rMessage1.Mud_Resistivity[i]!=0) + rMessage.Mud_Resistivity[i]=rMessage1.Mud_Resistivity[i]; + if(rMessage.Bit_Diameter[i]==0&&rMessage1.Bit_Diameter[i]!=0) + rMessage.Bit_Diameter[i]=rMessage1.Bit_Diameter[i]; + if(rMessage.Bushing_Detpth[i]==0&&rMessage1.Bushing_Detpth[i]!=0) + rMessage.Bushing_Detpth[i]=rMessage1.Bushing_Detpth[i]; + if(rMessage.Bushing_Inside_Diameter[i]==0&&rMessage1.Bushing_Inside_Diameter[i]!=0) + rMessage.Bushing_Inside_Diameter[i]=rMessage1.Bushing_Inside_Diameter[i]; + if(rMessage.Bushing_Outside_Diameter[i]==0&&rMessage1.Bushing_Outside_Diameter[i]!=0) + rMessage.Bushing_Outside_Diameter[i]=rMessage1.Bushing_Outside_Diameter[i]; + if(rMessage.Bit_Depth[i]==0&&rMessage1.Bit_Depth[i]!=0) + rMessage.Bit_Depth[i]=rMessage1.Bit_Depth[i]; + } + + if(strlen(rMessage.Mud_Property)==0&&strlen(rMessage1.Mud_Property)!=0) + strncpy(rMessage.Mud_Property,rMessage1.Mud_Property,32); + if(strlen(rMessage.JB)==0&&strlen(rMessage1.JB)!=0) + strncpy(rMessage.JB,rMessage1.JB,32); + + if(rMessage.X0==0&&rMessage1.X0!=0) rMessage.X0=rMessage1.X0; + if(rMessage.Y0==0&&rMessage1.Y0!=0) rMessage.Y0=rMessage1.Y0; + if(rMessage.Z0==0&&rMessage1.Z0!=0) rMessage.Z0=rMessage1.Z0; + if(rMessage.TVD==0&&rMessage1.TVD!=0) rMessage.TVD=rMessage1.TVD; + if(rMessage.azca==0&&rMessage1.azca!=0) rMessage.azca=rMessage1.azca; + if(rMessage.Mud_Temp==0&&rMessage1.Mud_Temp!=0) rMessage.Mud_Temp=rMessage1.Mud_Temp; + if(rMessage.WaterLoss==0&&rMessage1.WaterLoss!=0) rMessage.WaterLoss=rMessage1.WaterLoss; + + if(strlen(rMessage.audit)==0&&strlen(rMessage1.audit)!=0) + strncpy(rMessage.audit,rMessage1.audit,32); + if(strlen(rMessage.Prog)==0&&strlen(rMessage1.Prog)!=0) + strncpy(rMessage.Prog,rMessage1.Prog,32); + + if(strlen(rMessage.Intor)==0&&strlen(rMessage1.Intor)!=0) + strncpy(rMessage.Intor,rMessage1.Intor,12); + if(strlen(rMessage.IntDepths)==0&&strlen(rMessage1.IntDepths)!=0) + strncpy(rMessage.IntDepths,rMessage1.IntDepths,12); + + if(strlen(rMessage.Reserved)==0&&strlen(rMessage1.Reserved)!=0) + strncpy(rMessage.Reserved,rMessage1.Reserved,10); + + ReadCustomWell(rMessage); + ReadCementationWell(rMessage); + ReadProduceWell(rMessage); + + ReadTable(CE_JIN_XIN_XI_TABLE); +} + +void WellLogInformation::OnCAddCurve() +{ + QString szName = m_pUi->lineEdit_allCurver_custom->text(); + if(szName.isEmpty()) + return; + auto rSelectList = m_pUi->listWidget_custom->selectedItems(); + + if(rSelectList.isEmpty()) + { + m_pUi->listWidget_custom->addItem(szName); + } + else + { + for(int nIndex =0;nIndexlistWidget_custom->count();++nIndex) + { + if(m_pUi->listWidget_custom->item(nIndex)==rSelectList[0]) + { + m_pUi->listWidget_custom->insertItem(nIndex,szName); + break; + } + } + + } + m_pUi->lineEdit_allCurver_custom->clear(); +} + +void WellLogInformation::OnSAddCurve() +{ + QString szName = m_pUi->lineEdit_allCurver_s->text(); + if(szName.isEmpty()) + return; + + + auto rSelectList = m_pUi->listWidget_s->selectedItems(); + + if(rSelectList.isEmpty()) + { + m_pUi->listWidget_s->addItem(szName); + } + else + { + for(int nIndex =0;nIndexlistWidget_s->count();++nIndex) + { + if(m_pUi->listWidget_s->item(nIndex)==rSelectList[0]) + { + m_pUi->listWidget_s->insertItem(nIndex,szName); + break; + } + } + + } + + + m_pUi->lineEdit_allCurver_s->clear(); +} + + +void WellLogInformation::OnCDeleteCurve() +{ + auto rList = m_pUi->listWidget_custom->selectedItems(); + + for(int nIndex=0;nIndexlistWidget_custom->row(rList[nIndex]); + m_pUi->listWidget_custom->takeItem(nRow); + } + +} +void WellLogInformation::OnSDeleteCurve() +{ + auto rList = m_pUi->listWidget_s->selectedItems(); + + for(int nIndex=0;nIndexlistWidget_s->row(rList[nIndex]); + m_pUi->listWidget_s->takeItem(nRow); + } + +} +CObjWelllogRound* +WellLogInformation::GetWelllogRound() +{ + return m_pObjWelllogRound; +} + + + +void WellLogInformation::ReadCustomWell(const Slf_FILE_MESSAGE& rMessage) +{ + QString wellname=QString::fromLocal8Bit(rMessage.WellAliasName); + int len=wellname.lastIndexOf("井"); + if(len==-1||len!=wellname.length()-1) wellname+="井"; + m_pUi->custom_well_name->setText(wellname); + + //井别 + QString szJB(QString::fromLocal8Bit(rMessage.JB)); + for(int nIndex =0;nIndexcustom_well_type->count();++nIndex) + { + if(szJB==m_pUi->custom_well_type->itemText(nIndex)) + { + m_pUi->custom_well_type->setCurrentIndex(nIndex); + break; + } + } + m_pUi->custom_area->setText(QString::fromLocal8Bit(rMessage.AreaName)); + //补心高度 + m_pUi->custom_bushing_high->setText(ConvertDataByFloat(rMessage.Kelly)); + + + //钻头 + m_pUi->custom_broach_mm_1->setText(ConvertDataByFloat(rMessage.Bit_Diameter[0] )); + m_pUi->custom_broach_m_1->setText(ConvertDataByFloat(rMessage.Bit_Depth[0] )); + + m_pUi->custom_broach_mm_2->setText(ConvertDataByFloat(rMessage.Bit_Diameter[1] )); + m_pUi->custom_broach_m_2->setText(ConvertDataByFloat(rMessage.Bit_Depth[1] )); + + m_pUi->custom_broach_mm_3->setText(ConvertDataByFloat(rMessage.Bit_Diameter[2] )); + m_pUi->custom_broach_m_3->setText(ConvertDataByFloat(rMessage.Bit_Depth[2] )); + + m_pUi->custom_broach_mm_4->setText(ConvertDataByFloat(rMessage.Bit_Diameter[3] )); + m_pUi->custom_broach_m_4->setText(ConvertDataByFloat(rMessage.Bit_Depth[3] )); + + + //套管 + + m_pUi->custom_drivepipe_mm_1->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[0] )); + m_pUi->custom_drivepipe_m_1->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[0] )); + + m_pUi->custom_drivepipe_mm_2->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[1] )); + m_pUi->custom_drivepipe_m_2->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[1] )); + + m_pUi->custom_drivepipe_mm_3->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[2] )); + m_pUi->custom_drivepipe_m_3->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[2] )); + + +} + +void WellLogInformation::ReadCementationWell(const Slf_FILE_MESSAGE& rMessage) +{ + QString wellname=QString::fromLocal8Bit(rMessage.WellAliasName); + int len=wellname.lastIndexOf("井"); + if(len==-1||len!=wellname.length()-1) wellname+="井"; + m_pUi->well_cementation_name->setText(wellname); + m_pUi->well_cementation_area->setText(QString::fromLocal8Bit(rMessage.AreaName)); + + //钻头 + m_pUi->well_cementation_broach_mm_1->setText(ConvertDataByFloat(rMessage.Bit_Diameter[0])); + m_pUi->well_cementation_broach_m_1->setText(ConvertDataByFloat(rMessage.Bit_Depth[0])); + + m_pUi->well_cementation_broach_mm_2->setText(ConvertDataByFloat(rMessage.Bit_Diameter[1])); + m_pUi->well_cementation_broach_m_2->setText(ConvertDataByFloat(rMessage.Bit_Depth[1])); + + m_pUi->well_cementation_broach_mm_3->setText(ConvertDataByFloat(rMessage.Bit_Diameter[2])); + m_pUi->well_cementation_broach_m_3->setText(ConvertDataByFloat(rMessage.Bit_Depth[2])); + + m_pUi->well_cementation_broach_mm_4->setText(ConvertDataByFloat(rMessage.Bit_Diameter[3])); + m_pUi->well_cementation_broach_m_4->setText(ConvertDataByFloat(rMessage.Bit_Depth[3])); + + +} + +void WellLogInformation::ReadProduceWell(const Slf_FILE_MESSAGE& rMessage) +{ + QString wellname=QString::fromLocal8Bit(rMessage.WellAliasName); + int len=wellname.lastIndexOf("井"); + if(len==-1||len!=wellname.length()-1) wellname+="井"; + m_pUi->produce_well_name->setText(wellname); + m_pUi->produce_well_area->setText(QString::fromLocal8Bit(rMessage.AreaName)); + + m_pUi->produce_well_drivepipe_mm_4->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[0] )); + m_pUi->produce_well_drivepipe_m_1->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[0] )); + + m_pUi->produce_well_drivepipe_mm_5->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[1] )); + m_pUi->produce_well_drivepipe_m_2->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[1] )); + + m_pUi->produce_well_drivepipe_mm_6->setText(ConvertDataByFloat(rMessage.Bushing_Inside_Diameter[2] )); + m_pUi->produce_well_drivepipe_m_3->setText(ConvertDataByFloat(rMessage.Bushing_Detpth[2] )); + + + m_pUi->produce_well_drivepipe_mm_1->setText(ConvertDataByFloat(rMessage.Bushing_Outside_Diameter[0] )); + m_pUi->produce_well_drivepipe_mm_2->setText(ConvertDataByFloat(rMessage.Bushing_Outside_Diameter[1] )); + m_pUi->produce_well_drivepipe_mm_3->setText(ConvertDataByFloat(rMessage.Bushing_Outside_Diameter[2] )); + + +} + +void WellLogInformation::ReadWellP(QString szText,QLineEdit* pStart,QLineEdit* pEnd) +{ + auto rList = szText.split("-"); + if(rList.size()==2) + { + pStart->setText(rList[0]); + pEnd->setText(rList[1]); + } +} +void setCombo(QComboBox *comboBox,QString szWellEasy) +{ + for(int nIndex =0;nIndexcount();++nIndex) + { + if(szWellEasy==comboBox->itemText(nIndex)) + { + comboBox->setCurrentIndex(nIndex); + break; + } + } +} +void WellLogInformation::ReadTable(QString tablename) +{ + if(m_pObjWelllogRound==NULL) return; + + QString szWellName=m_pObjWelllogRound->GetSlfFileName(); + + CLogIO * pLogio=new CLogIO(); + if(!pLogio->Open(szWellName.toStdString().c_str(),CSlfIO::modeRead)) + { + delete pLogio; + return; + } + + int nTableFlag =pLogio->OpenTable(CE_JIN_XIN_XI_TABLE); + //无表 + if(nTableFlag==-1) + { + delete pLogio; + return; + } + + int nTableColumn=pLogio->GetTableFieldCount(nTableFlag); + Slf_TABLE_FIELD *pFieldInfo=new Slf_TABLE_FIELD[nTableColumn+1]; + pLogio->GetTableFieldInfo(nTableFlag,pFieldInfo); + + char pCustom[500]; + + //共有 + { + //测井日期 + m_pUi->custom_test_date->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,1,pCustom)); + m_pUi->well_cementation_test->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,1,pCustom)); + m_pUi->produce_well_test->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,1,pCustom)); + + //解释员 + m_pUi->custom_interpreter->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,3,pCustom)); + m_pUi->well_cementation_interpreter->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,3,pCustom)); + m_pUi->well_produce_interpreter->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,3,pCustom)); + + + //审核 + m_pUi->custom_check->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,5,pCustom)); + m_pUi->well_cementation_check->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,5,pCustom)); + m_pUi->produce_well_check->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,5,pCustom)); + + + //复审 + m_pUi->custom_recheck->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,7,pCustom)); + m_pUi->well_recheck->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,7,pCustom)); + m_pUi->produce_well_recheck->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,7,pCustom)); + + + //计算机型 + m_pUi->custom_computer->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,9,pCustom)); + m_pUi->well_computer->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,9,pCustom)); + m_pUi->produce_well_type->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,9,pCustom)); + + //井眼信息 + { + QString szWellEasy= GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,1,11,pCustom); + + for(int nIndex =0;nIndexcomboBox_custom_r->count();++nIndex) + { + if(szWellEasy==m_pUi->comboBox_custom_r->itemText(nIndex)) + { + m_pUi->comboBox_custom_r->setCurrentIndex(nIndex); + break; + } + } + for(int nIndex =0;nIndexcomboBox_well_r->count();++nIndex) + { + if(szWellEasy==m_pUi->comboBox_well_r->itemText(nIndex)) + { + m_pUi->comboBox_well_r->setCurrentIndex(nIndex); + break; + } + } + } + + //测井队别1 + { + QString szWellType= GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,1,pCustom); + + for(int nIndex =0;nIndexcustom_team->count();++nIndex) + { + if(szWellType==m_pUi->custom_team->itemText(nIndex)) + { + m_pUi->custom_team->setCurrentIndex(nIndex); + m_pUi->well_cementation_team->setCurrentIndex(nIndex); + m_pUi->produce_well_team->setCurrentIndex(nIndex); + + break; + } + } + } + //测井队别2 + { + QString szWellType= GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,3,pCustom); + + for(int nIndex =0;nIndexcustom_team_2->count();++nIndex) + { + if(szWellType==m_pUi->custom_team_2->itemText(nIndex)) + { + m_pUi->custom_team_2->setCurrentIndex(nIndex); + m_pUi->well_cementation_team_2->setCurrentIndex(nIndex); + m_pUi->produce_well_team_2->setCurrentIndex(nIndex); + + break; + } + } + } + //仪器型号1 + { + QString szType= GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,5,pCustom); + + for(int nIndex =0;nIndexcustom_apparatus->count();++nIndex) + { + if(szType==m_pUi->custom_apparatus->itemText(nIndex)) + { + m_pUi->custom_apparatus->setCurrentIndex(nIndex); + m_pUi->well_cementation_apparatus->setCurrentIndex(nIndex); + m_pUi->produce_well_apparatus->setCurrentIndex(nIndex); + break; + } + } + } + //仪器型号2 + { + QString szType= GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,7,pCustom); + + for(int nIndex =0;nIndexcustom_apparatus_2->count();++nIndex) + { + if(szType==m_pUi->custom_apparatus_2->itemText(nIndex)) + { + m_pUi->custom_apparatus_2->setCurrentIndex(nIndex); + m_pUi->well_cementation_apparatus_2->setCurrentIndex(nIndex); + m_pUi->produce_well_apparatus_2->setCurrentIndex(nIndex); + break; + } + } + } + + //解释程序 + { + QString szEx = GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,9,pCustom); + m_pUi->comboBox_prom_custom->setEditText(szEx); + + for(int nIndex=0;nIndexcomboBox_prom->count();nIndex++) + { + if(m_pUi->comboBox_prom->itemText(nIndex) == szEx) + { + m_pUi->comboBox_prom->setCurrentIndex(nIndex); + break; + } + } + } + } + + //井段 + { + //标准井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,1,pCustom), + m_pUi->custom_well_normal_a, + m_pUi->custom_well_normal_b); + //组合井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,3,pCustom), + m_pUi->custom_well_group_a, + m_pUi->custom_well_group_b); + + + //处理井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,5,pCustom), + m_pUi->custom_well_dispose_a, + m_pUi->custom_well_dispose_b); + + + //垂直标准井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,7,pCustom), + m_pUi->custom_ver_well_normal_a, + m_pUi->custom_ver_well_normal_b); + + //垂直曲线井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,9,pCustom), + m_pUi->custom_ver_well_curve_a, + m_pUi->custom_ver_well_curve_b); + + //垂直处理井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,11,pCustom), + m_pUi->custom_ver_well_dispose_a, + m_pUi->custom_ver_well_dispose_b); + //放大井段1 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,1,pCustom), + m_pUi->custom_well_magnify_a, + m_pUi->custom_well_magnify_b); + //放大井段2 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,3,pCustom), + m_pUi->custom_well_magnify_a_2, + m_pUi->custom_well_magnify_b_2); + //放大井段3 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,5,pCustom), + m_pUi->custom_well_magnify_a_3, + m_pUi->custom_well_magnify_b_3); + + //测量井段 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,5,pCustom), + m_pUi->well_cementation_measure_a, + m_pUi->well_cementation_measure_b); + + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,5,pCustom), + m_pUi->produce_well_test_section_a, + m_pUi->produce_well_test_section_b); + } + + //所用曲线 + { + char rCurve[500]; + QString szAdd = GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,4,13,rCurve); + auto rList = szAdd.split(" "); + + if(!rList.empty()) + { + //m_pUi->listWidget_s->clear(); + //m_pUi->listWidget_s->addItems(rList); + m_pUi->listWidget_custom->clear(); + m_pUi->listWidget_custom->addItems(rList); + } + + rList.clear(); + szAdd = GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,13,rCurve); + rList = szAdd.split(" "); + if(!rList.empty()) + { + m_pUi->listWidget_s->clear(); + m_pUi->listWidget_s->addItems(rList); + } + } + + //0 + //轴向剖面水平 + m_pUi->custom_paomian_h->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,7,pCustom)==""?"1:500":GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,7,pCustom)); + //轴向剖面垂直 + m_pUi->custom_paomian_v->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,9,pCustom)==""?"1:500":GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,9,pCustom)); + //水深 + m_pUi->custom_water_deep->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,11,pCustom)); + //备注 + m_pUi->textEdit_remark->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,5,13,pCustom)); + // --- + //补心海拔 + m_pUi->custom_bushing_elevation->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,1,pCustom)); + //钻井液粘度 + m_pUi->custom_mud_viscosity->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,3,pCustom)); + //钻井液密度 + m_pUi->custom_mud_density->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,5,pCustom)); + + //钻井液电阻率 + m_pUi->custom_mud_resistance->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,7,pCustom)); + //井底温度 + m_pUi->custom_well_temp->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,9,pCustom)); + //温度 + if(!GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,11,pCustom).isEmpty()) + m_pUi->custom_temp->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,6,11,pCustom)); + //-- + // + { + auto szTmp=GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,7,1,pCustom); + + QString szEx = GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,2,9,pCustom); + for(int nIndex =0;nIndexcustom_well_xingzhi->count();++nIndex) + { + if(szTmp==m_pUi->custom_well_xingzhi->itemText(nIndex)) + { + m_pUi->custom_well_xingzhi->setCurrentIndex(nIndex); + break; + } + } + } + //18度钻井液电阻率 + m_pUi->custom_18_resistance->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,7,3,pCustom)); + //测时井深 + m_pUi->custom_well_deep->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,7,5,pCustom)); + + //1 + + //固井时间 + m_pUi->well_cementation_date->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,1,pCustom)); + + //出图时间 + m_pUi->well_graph_time->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,3,pCustom)); + + //人工井底 + m_pUi->well_cementation_bottom->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,7,pCustom)); + + //水泥上返高度 + m_pUi->well_cementation_mud_heigh->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,9,pCustom)); + + //凡尔位置 + m_pUi->well_cementation_pos->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,9,11,pCustom)); + + // -- + + //套管外径 + m_pUi->well_cementation_diameter->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,1,pCustom)); + + //钻井液密度1 + m_pUi->well_cementation_density_1->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,3,pCustom)); + + //钻井液密度2 + m_pUi->well_cementation_density_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,5,pCustom)); + + //水泥浆密度 + m_pUi->well_mud_density->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,7,pCustom)); + + //固井质量评估 + { + auto szTmp=GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,9,pCustom); + for(int nIndex =0;nIndexwell_pingjia->count();++nIndex) + { + if(szTmp==m_pUi->well_pingjia->itemText(nIndex)) + { + m_pUi->well_pingjia->setCurrentIndex(nIndex); + break; + } + } + } + + //技术说明 + m_pUi->well_cementation_description->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,10,13,pCustom)); + + + + //2 + + //完井日期 + m_pUi->produce_well_finish->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,1,pCustom)); + + //投注时间 + m_pUi->produce_well_bet_date->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,3,pCustom)); + + + //人工井底 + m_pUi->produce_well_bottom->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,7,pCustom)); + + //绘图 + m_pUi->produce_well_graph->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,9,pCustom)); + + //同位素日注入量 + m_pUi->produce_well_injection->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,12,11,pCustom)); + + //-- + + //同位素施工方式 + m_pUi->produce_well_work_type->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,1,pCustom)); + + //同位素名称 + m_pUi->produce_well_isotope->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,3,pCustom)); + + //同位素活度 + m_pUi->produce_well_isotope_h->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,5,pCustom)); + + //微球用量 + m_pUi->produce_well_microsphere->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,7,pCustom)); + + //微球粒径 + m_pUi->produce_well_vqlj->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,9,pCustom)); + + //基线井液 + m_pUi->produce_well_jjy->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,13,11,pCustom)); + + //-- + //曲线井液 + m_pUi->produce_well_qxjy->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,1,pCustom)); + + //注蹦压力 + m_pUi->produce_well_jpyl->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,3,pCustom)); + + //注蹦量 + m_pUi->produce_well_zbl->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,5,pCustom)); + + //注磞浓度 + m_pUi->produce_well_zbnd->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,7,pCustom)); + + //日产液量 + m_pUi->produce_well_cyl->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,9,pCustom)); + + //日产水量 + m_pUi->produce_well_csl->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,14,11,pCustom)); + //-- + + //套管规范 + m_pUi->produce_well_tggf->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,1,pCustom)); + + //压力 + m_pUi->produce_well_yali->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,3,pCustom)); + + //综合含水 + m_pUi->produce_well_zhs->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,5,pCustom)); + + //日产油量 + m_pUi->produce_well_cyl_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,7,pCustom)); + + //日注入量 + m_pUi->produce_well_injection_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,9,pCustom)); + + //同位素名称 + m_pUi->produce_well_isotope_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,15,11,pCustom)); + //-- + + //同位素用量 + m_pUi->produce_well_twsyl->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,16,1,pCustom)); + + //同位素强度 + m_pUi->produce_well_isotope_h_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,16,3,pCustom)); + + //短节位置 + ReadWellP(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,16,5,pCustom), + m_pUi->produce_well_tg_mm_2,m_pUi->produce_well_tg_m_2); + + //备注 + m_pUi->produce_remark->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,16,13,pCustom)); + + m_pUi->lineEdit->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,1,pCustom)); +// setCombo(m_pUi->comboBox,pCustom); + m_pUi->lineEdit_2->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,3,pCustom)); +// setCombo(m_pUi->comboBox_2,pCustom); + m_pUi->lineEdit_3->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,5,pCustom)); +// setCombo(m_pUi->comboBox_3,pCustom); + m_pUi->lineEdit_4->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,7,pCustom)); +// setCombo(m_pUi->comboBox_4,pCustom); + m_pUi->lineEdit_5->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,9,pCustom)); +// setCombo(m_pUi->comboBox_5,pCustom); + m_pUi->lineEdit_6->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,11,pCustom)); +// setCombo(m_pUi->comboBox_6,pCustom); + m_pUi->lineEdit_7->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,13,pCustom)); +// setCombo(m_pUi->comboBox_7,pCustom); + m_pUi->lineEdit_8->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,18,1,pCustom)); +// setCombo(m_pUi->comboBox_8,pCustom); + m_pUi->lineEdit_9->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,18,3,pCustom)); +// setCombo(m_pUi->comboBox_9,pCustom); + m_pUi->lineEdit_10->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,18,5,pCustom)); +// setCombo(m_pUi->comboBox_10,pCustom); + m_pUi->lineEdit_11->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,18,7,pCustom)); +// setCombo(m_pUi->comboBox_11,pCustom); + m_pUi->lineEdit_12->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,18,9,pCustom)); +// setCombo(m_pUi->comboBox_12,pCustom); + m_pUi->lineEdit_13->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,11,pCustom)); +// setCombo(m_pUi->comboBox_13,pCustom); + m_pUi->lineEdit_14->setText(GetStringtValueInTable(pLogio,pFieldInfo,nTableFlag,17,13,pCustom)); +// setCombo(m_pUi->comboBox_14,pCustom); + + delete[] pFieldInfo; + + delete pLogio; +} + +void WellLogInformation::GetValueTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn,char* pArr) +{ + pLogio->GetTableFieldData(nTableFlag,nColumn,nRow,pArr); +} + +QString WellLogInformation::GetStringtValueInTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn,char* pArr ) +{ + GetValueTable( pLogio, pFieldInfo, nTableFlag, nRow, nColumn,pArr); + QString szStr = QString::fromLocal8Bit(pArr); + if(szStr==".00-.00") szStr="-"; + if(szStr==".00") szStr=""; + return szStr; +} + + +void WellLogInformation::SetItemValue(CLogIO * pLogio,int nTableFlag, + const QString& szKey,const QString& szValue, + int nRow,int nCol,char* pArr) +{ + // strcpy(pArr,szKey.toStdString().c_str()); + strcpy(pArr,szKey.toLocal8Bit().data()); + pLogio->SetTableFieldData(nTableFlag,nCol,pArr,nRow); + + // strcpy(pArr,szValue.toStdString().c_str()); + strcpy(pArr,szValue.toLocal8Bit().data()); + pLogio->SetTableFieldData(nTableFlag,nCol+1,pArr,nRow); +} +void WellLogInformation::SetItemValue(CLogIO * pLogio,int nTableFlag,const QString& szKey, + const QString& szValue1, + const QString& szValue2, + int nRow,int nCol,char* pArr) +{ + + strcpy(pArr,szKey.toStdString().c_str()); + pLogio->SetTableFieldData(nTableFlag,nCol,pArr,nRow); + + strcpy(pArr,szValue1.toStdString().c_str()); + pLogio->SetTableFieldData(nTableFlag,nCol+1,pArr,nRow); + + strcpy(pArr,szValue2.toStdString().c_str()); + pLogio->SetTableFieldData(nTableFlag,nCol+2,pArr,nRow); +} + +void WellLogInformation::WriteTable(CLogIO * pLogio,int nTableFlag) +{ + + int nTableColumn=pLogio->GetTableFieldCount(nTableFlag); + Slf_TABLE_FIELD *pFieldInfo=new Slf_TABLE_FIELD[nTableColumn+1]; + pLogio->GetTableFieldInfo(nTableFlag,pFieldInfo); + + char pArr[100]; + //共有数据 + if(m_pUi->tabWidget->currentIndex()==0) + { + //测井日期 + QString vst=m_pUi->custom_test_date->text(); + vst=changenyr(vst); + SetItemValue(pLogio,nTableFlag,("测井日期"),vst,1,0,pArr); + + //解释员 + SetItemValue(pLogio,nTableFlag,("解释员"),m_pUi->custom_interpreter->text(),1,2,pArr); + + //审核 + SetItemValue(pLogio,nTableFlag,("审核"),m_pUi->custom_check->text(),1,4,pArr); + + //复审 + SetItemValue(pLogio,nTableFlag,("复审"),m_pUi->custom_recheck->text(),1,6,pArr); + + //计算机型 + SetItemValue(pLogio,nTableFlag,("计算机型"),m_pUi->custom_computer->text(),1,8,pArr); + + //井眼信息 + SetItemValue(pLogio,nTableFlag,("井眼"),m_pUi->comboBox_custom_r->currentText(),1,10,pArr); + + + //测井队别1 + SetItemValue(pLogio,nTableFlag,("测井队别1"),m_pUi->custom_team->currentText(),2,0,pArr); + //测井队别2 + SetItemValue(pLogio,nTableFlag,("测井队别2"),m_pUi->custom_team_2->currentText(),2,2,pArr); + + //仪器型号1 + SetItemValue(pLogio,nTableFlag,("仪器型号1"),m_pUi->custom_apparatus->currentText(),2,4,pArr); + //仪器型号2 + SetItemValue(pLogio,nTableFlag,("仪器型号2"),m_pUi->custom_apparatus_2->currentText(),2,6,pArr); + //解释程序 + SetItemValue(pLogio,nTableFlag,("解释程序"),m_pUi->comboBox_prom_custom->currentText(),2,8,pArr); + } + else if(m_pUi->tabWidget->currentIndex()==1) + { + //测井日期 + QString vst=m_pUi->well_cementation_test->text(); + vst=changenyr(vst); + SetItemValue(pLogio,nTableFlag,("测井日期"),vst,1,0,pArr); + + //解释员 + SetItemValue(pLogio,nTableFlag,("解释员"),m_pUi->well_cementation_interpreter->text(),1,2,pArr); + + //审核 + SetItemValue(pLogio,nTableFlag,("审核"),m_pUi->well_cementation_check->text(),1,4,pArr); + + //复审 + SetItemValue(pLogio,nTableFlag,("复审"),m_pUi->well_recheck->text(),1,6,pArr); + + //计算机型 + SetItemValue(pLogio,nTableFlag,("计算机型"),m_pUi->well_computer->text(),1,8,pArr); + + //井眼信息 + SetItemValue(pLogio,nTableFlag,("井眼"),m_pUi->comboBox_well_r->currentText(),1,10,pArr); + + + //测井队别1 + SetItemValue(pLogio,nTableFlag,("测井队别1"),m_pUi->well_cementation_team->currentText(),2,0,pArr); + //测井队别2 + SetItemValue(pLogio,nTableFlag,("测井队别2"),m_pUi->well_cementation_team_2->currentText(),2,2,pArr); + + //仪器型号1 + SetItemValue(pLogio,nTableFlag,("仪器型号1"),m_pUi->well_cementation_apparatus->currentText(),2,4,pArr); + //仪器型号2 + SetItemValue(pLogio,nTableFlag,("仪器型号2"),m_pUi->well_cementation_apparatus_2->currentText(),2,6,pArr); + //解释程序 + SetItemValue(pLogio,nTableFlag,("解释程序"),m_pUi->comboBox_prom->currentText(),2,8,pArr); + } + else if(m_pUi->tabWidget->currentIndex()==2) + { + //测井日期 + QString vst=m_pUi->produce_well_test->text(); + vst=changenyr(vst); + + SetItemValue(pLogio,nTableFlag,("测井日期"),vst,1,0,pArr); + + //解释员 + SetItemValue(pLogio,nTableFlag,("解释员"),m_pUi->well_produce_interpreter->text(),1,2,pArr); + + //审核 + SetItemValue(pLogio,nTableFlag,("审核"),m_pUi->produce_well_check->text(),1,4,pArr); + + //复审 + SetItemValue(pLogio,nTableFlag,("复审"),m_pUi->produce_well_recheck->text(),1,6,pArr); + + //计算机型 + SetItemValue(pLogio,nTableFlag,("计算机型"),m_pUi->produce_well_type->text(),1,8,pArr); + + //井眼信息 + SetItemValue(pLogio,nTableFlag,("井眼"),"",1,10,pArr); + + + //测井队别1 + SetItemValue(pLogio,nTableFlag,("测井队别1"),m_pUi->produce_well_team->currentText(),2,0,pArr); + //测井队别2 + SetItemValue(pLogio,nTableFlag,("测井队别2"),m_pUi->produce_well_team_2->currentText(),2,2,pArr); + + //仪器型号1 + SetItemValue(pLogio,nTableFlag,("仪器型号1"),m_pUi->produce_well_apparatus->currentText(),2,4,pArr); + //仪器型号2 + SetItemValue(pLogio,nTableFlag,("仪器型号2"),m_pUi->produce_well_apparatus_2->currentText(),2,6,pArr); + //解释程序 + SetItemValue(pLogio,nTableFlag,("解释程序"),"",2,8,pArr); + } + + //0 + { + + //标准井段 + SetItemValue(pLogio,nTableFlag,("标准井段"),setdec(m_pUi->custom_well_normal_a->text())+"-"+setdec(m_pUi->custom_well_normal_b->text()), + 4,0,pArr); + + //组合井段 + SetItemValue(pLogio,nTableFlag,("组合井段"),setdec(m_pUi->custom_well_group_a->text())+"-"+ + setdec(m_pUi->custom_well_group_b->text()), + 4,2,pArr); + + + //处理井段 + SetItemValue(pLogio,nTableFlag,("处理井段"),setdec(m_pUi->custom_well_dispose_a->text())+"-"+ + setdec(m_pUi->custom_well_dispose_b->text()), + 4,4,pArr); + + //垂直标准井段 + SetItemValue(pLogio,nTableFlag,("垂直标准井段"),setdec(m_pUi->custom_ver_well_normal_a->text())+"-"+ + setdec(m_pUi->custom_ver_well_normal_b->text()), + 4,6,pArr); + + //垂直曲线井段 + SetItemValue(pLogio,nTableFlag,("垂直曲线井段"),setdec(m_pUi->custom_ver_well_curve_a->text())+"-"+ + setdec(m_pUi->custom_ver_well_curve_b->text()), + 4,8,pArr); + + //垂直处理井段 + SetItemValue(pLogio,nTableFlag,("垂直处理井段"),setdec(m_pUi->custom_ver_well_dispose_a->text())+"-"+ + setdec(m_pUi->custom_ver_well_dispose_b->text()), + 4,10,pArr); + + //放大井段 + SetItemValue(pLogio,nTableFlag,("放大井段1"),setdec(m_pUi->custom_well_magnify_a->text())+"-"+ + setdec(m_pUi->custom_well_magnify_b->text()), + 5,0,pArr); + + SetItemValue(pLogio,nTableFlag,("放大井段2"),setdec(m_pUi->custom_well_magnify_a_2->text())+"-"+ + setdec(m_pUi->custom_well_magnify_b_2->text()), + 5,2,pArr); + + SetItemValue(pLogio,nTableFlag,("放大井段3"),setdec(m_pUi->custom_well_magnify_a_3->text())+"-"+ + setdec(m_pUi->custom_well_magnify_b_3->text()), + 5,4,pArr); + + //轴向剖面水平 + SetItemValue(pLogio,nTableFlag,("轴向剖面水平"),m_pUi->custom_paomian_h->text(), + 5,6,pArr); + //轴向剖面垂直 + SetItemValue(pLogio,nTableFlag,("轴向剖面垂直"),m_pUi->custom_paomian_v->text(), + 5,8,pArr); + //水深 + SetItemValue(pLogio,nTableFlag,("水深"),m_pUi->custom_water_deep->text(), + 5,10,pArr); + + //备注 + SetItemValue(pLogio,nTableFlag,("备注"),m_pUi->textEdit_remark->toPlainText(), + 5,12,pArr); + + + //补心海拔 + SetItemValue(pLogio,nTableFlag,("补心海拔"),m_pUi->custom_bushing_elevation->text(), + 6,0,pArr); + + //钻井液粘度 + SetItemValue(pLogio,nTableFlag,("钻井液粘度"),m_pUi->custom_mud_viscosity->text(), + 6,2,pArr); + + //钻井液密度 + SetItemValue(pLogio,nTableFlag,("钻井液密度"),m_pUi->custom_mud_density->text(), + 6,4,pArr); + + //钻井液电阻率 + SetItemValue(pLogio,nTableFlag,("钻井液电阻率"),m_pUi->custom_mud_resistance->text(), + 6,6,pArr); + + //井底温度 + SetItemValue(pLogio,nTableFlag,("井底温度"),m_pUi->custom_well_temp->text(), + 6,8,pArr); + + //温度 + SetItemValue(pLogio,nTableFlag,("温度"),m_pUi->custom_temp->text(), + 6,10,pArr); + + //钻井液性质 + SetItemValue(pLogio,nTableFlag,("钻井液性质"),m_pUi->custom_well_xingzhi->currentText(), + 7,0,pArr); + //18度钻井液电阻率 + SetItemValue(pLogio,nTableFlag,("18度钻井液电阻率"),m_pUi->custom_18_resistance->text(), + 7,2,pArr); + //测时井深 + SetItemValue(pLogio,nTableFlag,("测时井深"),m_pUi->custom_well_deep->text(), + 7,4,pArr); + + + //所用曲线1 + { + char rCurve[500]; + QString szList; + for(int nIndex=0;nIndexlistWidget_custom->count();++nIndex) + { + szList+=m_pUi->listWidget_custom->item(nIndex)->text(); + if(nIndexlistWidget_custom->count()-1) + szList+=" "; + } + SetItemValue(pLogio,nTableFlag,("所用曲线"),szList,4,12,rCurve); + } + } + + //1 + { + QString vst=m_pUi->well_cementation_date->text(); + vst=changenyr(vst); + //固井时间 + SetItemValue(pLogio,nTableFlag,("固井时间"),vst, + 9,0,pArr); + + vst=m_pUi->well_graph_time->text(); + vst=changenyr(vst); + //出图时间 + SetItemValue(pLogio,nTableFlag,("出图时间"),vst, + 9,2,pArr); + + //测量井段 + SetItemValue(pLogio,nTableFlag,("测量井段"), + setdec(m_pUi->well_cementation_measure_a->text())+"-"+ + setdec(m_pUi->well_cementation_measure_b->text()), + 9,4,pArr); + + //人工井底 + SetItemValue(pLogio,nTableFlag,("人工井底"),m_pUi->well_cementation_bottom->text(), + 9,6,pArr); + + //水泥上返高度 + SetItemValue(pLogio,nTableFlag,("水泥上返高度"),m_pUi->well_cementation_mud_heigh->text(), + 9,8,pArr); + + //凡尔位置 + SetItemValue(pLogio,nTableFlag,("凡尔位置"),m_pUi->well_cementation_pos->text(), + 9,10,pArr); + + ////所用曲线2 + { + char rCurve[500]; + + QString szList; + for(int nIndex=0;nIndexlistWidget_s->count();++nIndex) + { + szList+=m_pUi->listWidget_s->item(nIndex)->text(); + + if(nIndexlistWidget_s->count()-1) + szList+=" "; + } + + SetItemValue(pLogio,nTableFlag,("所用曲线"),szList,9,12,rCurve); + } + + //套管外径 + SetItemValue(pLogio,nTableFlag,("套管外径"),m_pUi->well_cementation_diameter->text(), + 10,0,pArr); + + //钻井液密度1 + SetItemValue(pLogio,nTableFlag,("钻井液密度1"),m_pUi->well_cementation_density_1->text(), + 10,2,pArr); + + //钻井液密度2 + SetItemValue(pLogio,nTableFlag,("钻井液密度2"),m_pUi->well_cementation_density_2->text(), + 10,4,pArr); + + //水泥浆密度 + SetItemValue(pLogio,nTableFlag,("水泥浆密度"),m_pUi->well_mud_density->text(), + 10,6,pArr); + + //固井质量评估 + SetItemValue(pLogio,nTableFlag,("固井质量评估"),m_pUi->well_pingjia->currentText(), + 10,8,pArr); + + //技术说明 + { + char rCurve[500]; + QString szList=m_pUi->well_cementation_description->toPlainText(); + SetItemValue(pLogio,nTableFlag,("技术说明"),szList,10,12,rCurve); + } + } + + //2 + { + QString vst=m_pUi->produce_well_finish->text(); + vst=changenyr(vst); + //完井日期 + SetItemValue(pLogio,nTableFlag,("完井日期"),vst, + 12,0,pArr); + + vst=m_pUi->produce_well_bet_date->text(); + vst=changenyr(vst); + //投注时间 + SetItemValue(pLogio,nTableFlag,("投注时间"),vst, + 12,2,pArr); + + //测量井段 + SetItemValue(pLogio,nTableFlag,("测量井段"),setdec(m_pUi->produce_well_test_section_a->text())+"-"+ + setdec(m_pUi->produce_well_test_section_b->text()), + 12,4,pArr); + + //人工井底 + SetItemValue(pLogio,nTableFlag,("人工井底"),m_pUi->produce_well_bottom->text(), + 12,6,pArr); + + //绘图 + SetItemValue(pLogio,nTableFlag,("绘图"),m_pUi->produce_well_graph->text(), + 12,8,pArr); + + //同位素日注入量 + SetItemValue(pLogio,nTableFlag,("同位素日注入量"),m_pUi->produce_well_injection->text(), + 12,10,pArr); + //------------ + //同位素施工方式 + SetItemValue(pLogio,nTableFlag,("同位素施工方式"),m_pUi->produce_well_work_type->text(), + 13,0,pArr); + //同位素名称 + SetItemValue(pLogio,nTableFlag,("同位素名称"),m_pUi->produce_well_isotope->text(), + 13,2,pArr); + //同位素活度 + SetItemValue(pLogio,nTableFlag,("同位素活度"),m_pUi->produce_well_isotope_h->text(), + 13,4,pArr); + //微球用量 + SetItemValue(pLogio,nTableFlag,("微球用量"),m_pUi->produce_well_microsphere->text(), + 13,6,pArr); + + + //微球粒径 + SetItemValue(pLogio,nTableFlag,("微球粒径"),m_pUi->produce_well_vqlj->text(), + 13,8,pArr); + + + //基线井液 + SetItemValue(pLogio,nTableFlag,("基线井液"),m_pUi->produce_well_jjy->text(), + 13,10,pArr); + + //-- + //曲线井液 + SetItemValue(pLogio,nTableFlag,("曲线井液"),m_pUi->produce_well_qxjy->text(), + 14,0,pArr); + + //注蹦压力 + SetItemValue(pLogio,nTableFlag,("注蹦压力"),m_pUi->produce_well_jpyl->text(), + 14,2,pArr); + + //注蹦量 + SetItemValue(pLogio,nTableFlag,("注蹦量"),m_pUi->produce_well_zbl->text(), + 14,4,pArr); + + + //注磞浓度 + SetItemValue(pLogio,nTableFlag,("注磞浓度"),m_pUi->produce_well_zbnd->text(), + 14,6,pArr); + + //日产液量 + SetItemValue(pLogio,nTableFlag,("日产液量"),m_pUi->produce_well_cyl->text(), + 14,8,pArr); + + //日产水量 + SetItemValue(pLogio,nTableFlag,("日产水量"),m_pUi->produce_well_csl->text(), + 14,10,pArr); + + //-------------------- + + //套管规范 + SetItemValue(pLogio,nTableFlag,("套管规范"),m_pUi->produce_well_tggf->text(), + 15,0,pArr); + + //压力 + SetItemValue(pLogio,nTableFlag,("压力"),m_pUi->produce_well_yali->text(), + 15,2,pArr); + + //综合含水 + SetItemValue(pLogio,nTableFlag,("综合含水"),m_pUi->produce_well_zhs->text(), + 15,4,pArr); + + //日产油量 + SetItemValue(pLogio,nTableFlag,("日产油量"),m_pUi->produce_well_cyl_2->text(), + 15,6,pArr); + + //日注入量 + SetItemValue(pLogio,nTableFlag,("日注入量"),m_pUi->produce_well_injection_2->text(), + 15,8,pArr); + + //同位素名称 + SetItemValue(pLogio,nTableFlag,("同位素名称"),m_pUi->produce_well_isotope_2->text(), + 15,10,pArr); + + + //------------- + //同位素用量 + SetItemValue(pLogio,nTableFlag,("同位素用量"),m_pUi->produce_well_twsyl->text(), + 16,0,pArr); + //同位素强度 + SetItemValue(pLogio,nTableFlag,("同位素强度"),m_pUi->produce_well_isotope_h_2->text(), + 16,2,pArr); + //短节位置 + SetItemValue(pLogio,nTableFlag,("短节位置"), + setdec(m_pUi->produce_well_tg_mm_2->text())+"-"+ + setdec(m_pUi->produce_well_tg_m_2->text()), + 16,4,pArr); + + //备注 + SetItemValue(pLogio,nTableFlag,("备注"), + m_pUi->produce_remark->toPlainText(), + 16,12,pArr); + //备注 + SetItemValue(pLogio,nTableFlag,("表1名称"), + m_pUi->lineEdit->text(), + 17,0,pArr); + SetItemValue(pLogio,nTableFlag,("表2名称"), + m_pUi->lineEdit_2->text(), + 17,2,pArr); + SetItemValue(pLogio,nTableFlag,("表3名称"), + m_pUi->lineEdit_3->text(), + 17,4,pArr); + SetItemValue(pLogio,nTableFlag,("表4名称"), + m_pUi->lineEdit_4->text(), + 17,6,pArr); + SetItemValue(pLogio,nTableFlag,("表5名称"), + m_pUi->lineEdit_5->text(), + 17,8,pArr); + SetItemValue(pLogio,nTableFlag,("表6名称"), + m_pUi->lineEdit_6->text(), + 17,10,pArr); + SetItemValue(pLogio,nTableFlag,("表7名称"), + m_pUi->lineEdit_7->text(), + 17,12,pArr); + SetItemValue(pLogio,nTableFlag,("表8名称"), + m_pUi->lineEdit_8->text(), + 18,0,pArr); + SetItemValue(pLogio,nTableFlag,("表9名称"), + m_pUi->lineEdit_9->text(), + 18,2,pArr); + SetItemValue(pLogio,nTableFlag,("表10名称"), + m_pUi->lineEdit_10->text(), + 18,4,pArr); + SetItemValue(pLogio,nTableFlag,("表11名称"), + m_pUi->lineEdit_11->text(), + 18,6,pArr); + SetItemValue(pLogio,nTableFlag,("表12名称"), + m_pUi->lineEdit_12->text(), + 18,8,pArr); + SetItemValue(pLogio,nTableFlag,("表13名称"), + m_pUi->lineEdit_13->text(), + 18,10,pArr); + SetItemValue(pLogio,nTableFlag,("表14名称"), + m_pUi->lineEdit_14->text(), + 18,12,pArr); + } + + // + SetItemValue(pLogio,nTableFlag,"","", + 1,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 2,10,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 2,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 6,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 7,6,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 7,8,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 7,10,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 7,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 10,10,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 12,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 13,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 14,12,pArr); + SetItemValue(pLogio,nTableFlag,"","", + 15,12,pArr); + + SetItemValue(pLogio,nTableFlag,"","", + 16,6,pArr); + SetItemValue(pLogio,nTableFlag,"","", + 16,8,pArr); + SetItemValue(pLogio,nTableFlag,"","", + 16,10,pArr); + //SetItemValue(pLogio,nTableFlag,"","", + //16,12,pArr); + + delete[] pFieldInfo; +} + +void WellLogInformation::OnCalcTemp() +{ + float fValue =(1.0+0.02*(m_pUi->custom_temp->text().toFloat()-18))*m_pUi->custom_mud_resistance->text().toFloat(); + m_pUi->custom_18_resistance->setText(QString::number(fValue+0.00001,'f',2)); +} +/* +bool WellLogInformation::eventFilter(QObject * pObject, QEvent * pEvent) +{ + if(pEvent->type()==QEvent::MouseButtonPress) + { + if(m_pUi->custom_test_date ==pObject &&m_pUi->custom_test_date->text().isEmpty() ) + { + QDate rDate =QDate::currentDate(); + QString szText = QString::number(rDate.year())+QString::fromLocal8Bit("年") + +QString::number(rDate.month())+QString::fromLocal8Bit("月") + +QString::number(rDate.day())+QString::fromLocal8Bit("日"); + + m_pUi->custom_test_date->setText(szText); + } + } + + return false; +}*/ + +}} diff --git a/EditPlotHeader/src/wellloginformation.ui b/EditPlotHeader/src/wellloginformation.ui new file mode 100644 index 0000000..0230323 --- /dev/null +++ b/EditPlotHeader/src/wellloginformation.ui @@ -0,0 +1,3769 @@ + + + WellLogInformationClass + + + + 0 + 0 + 1558 + 1387 + + + + WellLogInformation + + + QGroupBox +{ +font:18px; +} +QLabel +{ +font:14px; +} + + + + + + + + QLineEdit +{ + height:23px; +} +QComboBox +{ + background: white; + height:23px; +} + + + 0 + + + + 常规测井信息 + + + + + + + + 基础 + + + + + + 10 + + + + + + + 井名 + + + + + + + + + + 地区 + + + + + + + + + + 井别 + + + + + + + + 0 + 0 + + + + true + + + + + + + + + 10 + + + + + 测井日期 + + + + + + + 计算机型 + + + + + + + + + + 测井队别1 + + + + + + + 仪器型号1 + + + + + + + true + + + + + + + 测井队别2 + + + + + + + 仪器型号2 + + + + + + + true + + + + + + + true + + + + + + + true + + + + + + + 2020年01月01日 + + + + + + + + + + + 解释员 + + + + + + + + + + 审核 + + + + + + + + + + 复审 + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + 井段 + + + + + + 3 + + + 3 + + + 20 + + + 6 + + + + + 垂直标准井段 + + + + + + + 垂直曲线井段 + + + + + + + 垂直处理井段 + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + 井眼信息 + + + + + + + 放大井段1 + + + + + + + + 0 + 0 + + + + + 180 + 0 + + + + true + + + + + + + 测时井深 + + + + + + + 标准井段 + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + 组合井段 + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + 处理井段 + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + 轴向剖面(水平) + + + + + + + 轴向剖面(垂直) + + + + + + + 放大井段2 + + + + + + + 放大井段3 + + + + + + + 1:500 + + + + + + + 1:500 + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + 1:200 + + + + + + + 比例尺 + + + + + + + + + + + + + + + + 套管 + + + + + + + + 套管3 + + + + + + + 套管2 + + + + + + + + 0 + 0 + + + + 套管1 + + + + + + + + 0 + 0 + + + + 毫米 + + + + + + + 毫米 + + + + + + + 毫米 + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 钻头 + + + + + + + + + 0 + 0 + + + + 钻头1 + + + + + + + 钻头2 + + + + + + + 钻头3 + + + + + + + 钻头4 + + + + + + + + 0 + 0 + + + + 毫米 + + + + + + + 毫米 + + + + + + + 毫米 + + + + + + + 毫米 + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 钻井参数 + + + + + + 20 + + + + + + 0 + 0 + + + + 补心海拔 + + + + + + + + 0 + 0 + + + + 水深 + + + + + + + 补心高 + + + + + + + 钻井液密度 + + + + + + + 钻井液粘度 + + + + + + + 钻井液电阻率 + + + + + + + 井底温度 + + + + + + + 钻井液性质 + + + + + + + true + + + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + m + + + + + + + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + s + + + + + + + + + + + + + + + 0 + 0 + + + + g/cm² + + + + + + + + + 6 + + + + + + + + + + + 0 + 0 + + + + Ω·m + + + + + + + + + + + 18℃钻井液电阻率 + + + + + + + 温度 + + + + + + + + + + + + + 0 + 0 + + + + Ω·m + + + + + + + + + + + 18 + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + m + + + + + + + + + + + + + + + + + + 所用曲线 + + + + + + + + + 深侧向电阻率 + + + + + 浅侧向电阻率 + + + + + 深感应电阻率 + + + + + 中感应电阻率 + + + + + 高分辨率深感应电阻率 + + + + + 高分辨率中感应电阻率 + + + + + 30、60英寸阵列感应电阻率 + + + + + 30、90英寸阵列感应电阻率 + + + + + 八侧向电阻率 + + + + + 数字聚焦电阻率 + + + + + 密度 + + + + + 中子 + + + + + 声波 + + + + + 自然伽马 + + + + + 自然电位 + + + + + 井径 + + + + + + + + + + 手工添加 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 添加 + + + + + + + 删除 + + + + + + + + + + + + + + 25 + + + 25 + + + + + + + + 0 + 0 + + + + 解释程序 + + + + + + + + 0 + 0 + + + + + 180 + 0 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 备注 + + + + + + + + + + + + + + + + + + + + 固井测井信息 + + + + + + 15 + + + + + 15 + + + + + + + 基础 + + + + + + 10 + + + + + 20 + + + 15 + + + + + 井名 + + + + + + + + + + 地区 + + + + + + + + + + 固井时间 + + + + + + + 2020年01月01日00时 + + + + + + + 测井日期 + + + + + + + 2020年01月01日00时 + + + + + + + 测井队别1 + + + + + + + true + + + + + + + 仪器型号1 + + + + + + + true + + + + + + + 测井队别2 + + + + + + + true + + + + + + + 仪器型号2 + + + + + + + true + + + + + + + 出图时间 + + + + + + + 计算机型 + + + + + + + + + + 2020年01月01日 + + + + + + + + + + + 解释员 + + + + + + + + + + 审核 + + + + + + + + + + 复审 + + + + + + + + + + + + + + + + + 其他参数 + + + + + + 20 + + + 15 + + + + + 测量井段 + + + + + + + 人工井底 + + + + + + + 凡尔位置 + + + + + + + 套管外径 + + + + + + + 水泥上返高度 + + + + + + + + + 0 + + + + + + + + g/cm² + + + + + + + + + + + + + + + + + 0 + 0 + + + + -- + + + + + + + + + + m + + + + + + + + + 井眼信息 + + + + + + + + 0 + 0 + + + + + 180 + 0 + + + + true + + + + + + + + + 第一井眼 + + + + + 第二井眼 + + + + + + + + 钻井液密度1 + + + + + + + 钻井液密度2 + + + + + + + true + + + + 优质井 + + + + + 合格井 + + + + + 一合二不合井 + + + + + 不合格井 + + + + + 不评价井 + + + + + + + + 固井质量评价 + + + + + + + 水泥浆密度 + + + + + + + + + + + + m + + + + + + + + + + + + + + m + + + + + + + + + + + + + + mm + + + + + + + + + + + + 0 + + + + + + + + g/cm² + + + + + + + + + 0 + + + + + + + + g/cm² + + + + + + + + + + + + + + + + 钻头 + + + + 18 + + + + + + + + 0 + 0 + + + + 钻头1 + + + + + + + + + + + 0 + 0 + + + + 毫米 + + + + + + + + + + + 0 + 0 + + + + + + + + + + + 钻头3 + + + + + + + + + + 毫米 + + + + + + + + + + + + + + + + + + + + + 钻头2 + + + + + + + + + + 毫米 + + + + + + + + + + + + + + + + + 钻头4 + + + + + + + + + + 毫米 + + + + + + + + + + + + + + + + + + + + + + + + 所用曲线 + + + + + + + + + + + CCL + + + + + CBL + + + + + VDL + + + + + GR + + + + + CAL + + + + + AC + + + + + SBT + + + + + + + + + + 手工添加 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 添加 + + + + + + + 删除 + + + + + + + + + + + + + + + + 0 + 0 + + + + 解释程序 + + + + + + + + 0 + 0 + + + + + 180 + 0 + + + + true + + + + GUJING + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 10 + + + 25 + + + + + 技术说明 + + + + + + + + + + + + + + + + + + + + + + 生产测井信息 + + + + + + + + 基础 + + + + + + + + + + 20 + + + + + 井名 + + + + + + + + + + 测量井段 + + + + + + + 测井队别1 + + + + + + + 人工井底 + + + + + + + true + + + + + + + + + + + + + 0 + 0 + + + + - + + + + + + + + + + m + + + + + + + + + + + + 地区 + + + + + + + + + + 计算机型 + + + + + + + + + + 绘图 + + + + + + + + + + 仪器型号1 + + + + + + + true + + + + + + + 测井队别2 + + + + + + + 仪器型号2 + + + + + + + true + + + + + + + true + + + + + + + 完井日期 + + + + + + + 2020年01月01日 + + + + + + + 测井日期 + + + + + + + 2020年01月01日 + + + + + + + + + + + 套管 + + + + + + 20 + + + + + 套管3 + + + + + + + 套管2 + + + + + + + + 0 + 0 + + + + 套管1 + + + + + + + + 0 + 0 + + + + 毫米 + + + + + + + 毫米 + + + + + + + 毫米 + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 套管内径 + + + + + + 20 + + + + + 套管3 + + + + + + + 套管2 + + + + + + + + 0 + 0 + + + + 套管1 + + + + + + + + 0 + 0 + + + + 毫米 + + + + + + + 毫米 + + + + + + + 毫米 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 解释员 + + + + + + + + + + 审核 + + + + + + + + + + 复审 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + 产液剖面 + + + + + + 20 + + + + + 日产液量 + + + + + + + 日产水量 + + + + + + + 日产油量 + + + + + + + 综合含水 + + + + + + + 套管规范 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + % + + + + + + + + + + + + + + Mpa + + + + + + + + + 压力 + + + + + + + + + + + + 同位素验窜/吸水剖面 + + + + + + 20 + + + + + 投注日期 + + + + + + + 日注入量 + + + + + + + 微球用量 + + + + + + + 微球粒径 + + + + + + + + + + + + μm + + + + + + + + + 2020年01月01日 + + + + + + + + + + + + g + + + + + + + + + 同位素活度 + + + + + + + + + + + + Bq + + + + + + + + + 同位素名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + 施工方式 + + + + + + + + + + + + + + + + 硼中子寿命 + + + + + + 20 + + + + + 基线井液 + + + + + + + 曲线井液 + + + + + + + 注磞量 + + + + + + + 注磞压力 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mpa + + + + + + + + + 注磞浓度 + + + + + + + + + + + + % + + + + + + + + + + + + + + 相关流量 + + + + 20 + + + + + 20 + + + + + 日注入量 + + + + + + + 同位素用量 + + + + + + + + + + + + ml + + + + + + + + + 同位素强度 + + + + + + + + + + + + Bq + + + + + + + + + 同位素名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 工程测井 + + + + + + 3 + + + + + + 0 + 0 + + + + 短节位置 + + + + + + + + + + + + + + 0 + 0 + + + + - + + + + + + + + + + + + + + 备注 + + + + + + + + + + + + + + + + + 表名称设置 + + + + + 10 + 90 + 99 + 21 + + + + 表1名称 + + + + + + 10 + 140 + 99 + 21 + + + + 表2名称 + + + + + + 10 + 190 + 99 + 21 + + + + 表3名称 + + + + + + 10 + 240 + 99 + 21 + + + + 表4名称 + + + + + + 10 + 290 + 99 + 21 + + + + 表5名称 + + + + + + 10 + 340 + 99 + 21 + + + + 表6名称 + + + + + + 10 + 390 + 99 + 21 + + + + 表7名称 + + + + + + 10 + 440 + 99 + 21 + + + + 表8名称 + + + + + + 10 + 490 + 99 + 21 + + + + 表9名称 + + + + + + 10 + 540 + 99 + 21 + + + + 表10名称 + + + + + + 10 + 590 + 99 + 21 + + + + 表11名称 + + + + + + 10 + 640 + 99 + 21 + + + + 表12名称 + + + + + + 10 + 700 + 99 + 21 + + + + 表13名称 + + + + + + 10 + 750 + 99 + 21 + + + + 表14名称 + + + + + + 50 + 30 + 99 + 21 + + + + 输入表名称 + + + + + + 100 + 90 + 991 + 28 + + + + 组合测井成果表 + + + + + + 100 + 140 + 991 + 28 + + + + 组合测井成果表(垂直) + + + + + + 100 + 190 + 991 + 28 + + + + 组合测井成果表(侧钻) + + + + + + 100 + 240 + 991 + 28 + + + + 固井质量评价表 + + + + + + 100 + 290 + 991 + 28 + + + + 测井解释成果表统计表 + + + + + + 100 + 340 + 991 + 28 + + + + + + + 100 + 390 + 991 + 28 + + + + + + + 100 + 440 + 991 + 28 + + + + + + + 100 + 490 + 991 + 28 + + + + + + + 100 + 540 + 991 + 28 + + + + + + + 100 + 590 + 991 + 28 + + + + + + + 100 + 640 + 991 + 28 + + + + + + + 100 + 690 + 991 + 28 + + + + + + + 100 + 740 + 991 + 28 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QPushButton{ + border-radius: 1px; + border: none; + width: 120px; + height: 28px; +} +QPushButton:enabled { + background: rgb(120, 170, 220); + color: white; +} +QPushButton:!enabled { + background: rgb(180, 180, 180); + color: white; +} +QPushButton:enabled:hover{ + background: rgb(100, 160, 220); +} +QPushButton:enabled:pressed{ + background: rgb(0, 78, 161); +} + + + 存储 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + CustomListWidget + QListWidget +
customlistwidget.h
+
+
+ + +
diff --git a/OSGDataModel/include/BaseObject.h b/OSGDataModel/include/BaseObject.h index 41108e3..4d28b5e 100644 --- a/OSGDataModel/include/BaseObject.h +++ b/OSGDataModel/include/BaseObject.h @@ -81,7 +81,7 @@ public: */ // virtual bool Serialize( CObjectArchive &ar ) = 0; - virtual void Delete() = 0; + // virtual void Delete() = 0; /** * @brief Add a child object in general way. @@ -107,7 +107,7 @@ public: /** * @brief 删除所有的孩子 */ - virtual void DeleteAllChild() = 0; + // virtual void DeleteAllChild() = 0; PaiObject *GetPaiObject() { diff --git a/OSGDataModel/include/ObjWelllogRound.h b/OSGDataModel/include/ObjWelllogRound.h index 0bc55c0..815bc73 100644 --- a/OSGDataModel/include/ObjWelllogRound.h +++ b/OSGDataModel/include/ObjWelllogRound.h @@ -20,7 +20,7 @@ class OSGDATAMODEL_EXPORT CObjWelllogRound : public CBaseObject/*CBaseObjectImp { // Q_OBJECT public: - // CObjWelllogRound(); + CObjWelllogRound(); ~CObjWelllogRound(); @@ -50,7 +50,7 @@ public: virtual void CopyFrom( CBaseObject *pOSGObjectOther ); QString GetSlfFileName() const { return m_strAttachedSlfFile; } - // void SetSlfFileName(QString val); + void SetSlfFileName(QString val); CObjWell *GetWell(); void SetWell(CObjWell *pWell); // QString GetWellRoundPath(); diff --git a/OSGDataModel/src/ObjWelllogRound.cpp b/OSGDataModel/src/ObjWelllogRound.cpp index 847038e..6660436 100644 --- a/OSGDataModel/src/ObjWelllogRound.cpp +++ b/OSGDataModel/src/ObjWelllogRound.cpp @@ -144,17 +144,17 @@ void CObjWelllogRound::SetWell(CObjWell *pWell) m_pWell=pWell; } -// CObjWelllogRound::CObjWelllogRound() -// { -// SetIconName( "icon/WellRound.png"); -// m_pObject = NULL; -// m_pWell=NULL; -// isFLAG=false; -// } -// void CObjWelllogRound::SetSlfFileName(QString val) -// { -// QString oldf=m_strAttachedSlfFile; -// m_strAttachedSlfFile=val; +CObjWelllogRound::CObjWelllogRound() +{ + // SetIconName( "icon/WellRound.png"); + // m_pObject = NULL; + m_pWell=NULL; + isFLAG=false; +} +void CObjWelllogRound::SetSlfFileName(QString val) +{ + QString oldf=m_strAttachedSlfFile; + m_strAttachedSlfFile=val; // std::vector PaiObjects; // CPaiObjectHelper::RecursionGetAllChildren(this,PaiObjects ); // for(int j=0;j WellLo return ; } char name[100]; - strcpy(name,m_pWellLogs[0]->GetName().toStdString().c_str()); + strcpy(name,m_pWellLogs[0]->GetName().toLocal8Bit().toStdString().c_str()); int iIndex=logio->OpenTable(name); if (iIndex >=0) { @@ -2746,7 +2746,7 @@ void GridDataAdapter::updatetTableWellLogData() return ; } char name[100]; - strcpy(name,m_pWellLogs[0]->GetName().toStdString().c_str()); + strcpy(name,m_pWellLogs[0]->GetName().toLocal8Bit().toStdString().c_str()); int iIndex=logio->OpenTable(name); if (iIndex >=0) { diff --git a/logPlus/logPlus.pro b/logPlus/logPlus.pro index 710e9d3..026ee56 100644 --- a/logPlus/logPlus.pro +++ b/logPlus/logPlus.pro @@ -219,6 +219,7 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include INCLUDEPATH += ../../Workflow/WFEngine/WorkflowEngine/include INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include INCLUDEPATH += ../../Workflow/WFWidget/include +INCLUDEPATH += ../../EditPlotHeader/include CONFIG(debug, debug|release){ LIBS += -L../../Bin -lBaseFund @@ -233,6 +234,7 @@ CONFIG(debug, debug|release){ LIBS += -L../../Bin/ -lDrawBased LIBS += -L../../Bin/ -lLogModuleConsoled LIBS += -L../../Bin/ -lWFEngined + LIBS += -L../../Bin/ -lEditPlotHeaderd #-lCallManaged } else { LIBS += -L../../Bin -lBaseFun @@ -247,5 +249,6 @@ CONFIG(debug, debug|release){ LIBS += -L../../Bin/ -lDrawBase LIBS += -L../../Bin/ -lLogModuleConsole LIBS += -L../../Bin/ -lWFEngine + LIBS += -L../../Bin/ -lEditPlotHeader #-lCallManage } diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index 883ba97..df15287 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -22,7 +22,9 @@ #include "fileopenthread.h" #include "ObjWellLogINP.h" #include "TxtEditorDlg.h" - +#include "ObjWell.h" +#include "wellloginformation.h" +using namespace pai::gui; //以下参数从配置文件读取 int g_iIndex = 0; int g_iNum = 0; @@ -571,72 +573,30 @@ void MainWindow::s_WelllogInformation(QString strSlfName) { if(m_centerWidgets) { - // pai::gui::WellLogInformation* pWellLogInformation=new pai::gui::WellLogInformation; - // pWellLogInformation->exec(); - // pWellLogInformation->SetWelllogRound(pWelllogRound); - CLogIO * pLogio=new CLogIO(); - if(!pLogio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeReadWrite)) - { - QMessageBox::information(nullptr,QString::fromLocal8Bit("提示"),QString::fromLocal8Bit("存储失败!")); - delete pLogio; - return; - } - // pWellLogInformation->CreateTable(pLogio); + WellLogInformation* pWellLogInformation=new WellLogInformation; + CObjWelllogRound* pWelllogRound = new CObjWelllogRound; + CObjWell* pWell = new CObjWell; QString wellname;QString path; GetWellNameAndPath(strSlfName, wellname, path); - // m_centerWidgets->addTab(pWellLogInformation, wellname + ":测井信息" ); - // int iCount = m_centerWidgets->count(); - // m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1); + QDir dir(path); + QStringList filters; + filters << "*.well"; // 查找扩展名为.well的文件 + dir.setNameFilters(filters); + QStringList fileNames = dir.entryList(QDir::Files); + foreach (const QString &fileName, fileNames) { + pWell->SetWellFileName(path + "/" + fileName); + } + pWelllogRound->SetWell(pWell); - int nTableFlag =pLogio->OpenTable("wellloginformation"); - if(nTableFlag!=-1) - { - s_ShowTable(strSlfName, "wellloginformation"); - return; - } + pWelllogRound->SetSlfFileName(strSlfName); - QString szColumnName; - - szColumnName+=("缩写");szColumnName+=","; - szColumnName+=("值");szColumnName+=","; - - szColumnName+=("单位");szColumnName+=","; - szColumnName+=("中文名");szColumnName+=","; - - QString szDataType; - szDataType+="6,6,6,6"; - - QString szSize; - szSize+="64,128,64,128"; - - QString szRemark; - szRemark+="0,0,0,0"; - - nTableFlag =pLogio->Open_Set_Table("wellloginformation", - TABLEE_OBJECT, - 4, - szColumnName.toLocal8Bit().data(), - // szColumnName.toStdString().c_str(), - szSize.toLocal8Bit().data(), - szDataType.toLocal8Bit().data(), - szRemark.toLocal8Bit().data()); - - int nTableColumn=pLogio->GetTableFieldCount(nTableFlag); - Slf_TABLE_FIELD *pFieldInfo=new Slf_TABLE_FIELD[nTableColumn+1]; - pLogio->GetTableFieldInfo(nTableFlag,pFieldInfo); - - char pArr[100]; - - strcpy(pArr, "WN"); - pLogio->SetTableFieldData(nTableFlag,0,pArr,1);//缩写 - strcpy(pArr, wellname.toStdString().c_str()); - pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位 - strcpy(pArr, "NONE"); - pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名 - strcpy(pArr, QString("井名").toLocal8Bit()); - pLogio->SetTableFieldData(nTableFlag,3,pArr,1); - s_ShowTable(strSlfName, "wellloginformation"); + pWellLogInformation->SetWelllogRound(pWelllogRound); + // pWellLogInformation->exec(); + m_centerWidgets->addTab(pWellLogInformation, wellname + ":" + "WellLogInformation"); + int iCount = m_centerWidgets->count(); + m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1); + return; } } diff --git a/编译说明.txt b/编译说明.txt index 20bb342..fd13b9b 100644 --- a/编译说明.txt +++ b/编译说明.txt @@ -20,7 +20,8 @@ https://www.cnblogs.com/ys0103/p/4562493.html 17.DataOutput--内存分配问题,windows兼容 18.tran\SLFAscIIConvertor 19.DrawBase -20.logPlus +20.EditPlotHeader +21.logPlus powershell统计代码行数 From f1e6f3e19f8a6b86bac69d428b174266f93a1bfe Mon Sep 17 00:00:00 2001 From: jiayulong Date: Wed, 11 Mar 2026 14:23:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E5=BD=95=E4=BA=95=E5=89=96=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=90=AB=E6=B2=B9=E6=80=A7=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=E5=B1=9E=E6=80=A7=E3=80=822.=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=EF=BC=8C=E5=9E=82=E7=9B=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=82=203.=E8=AE=B0=E5=BD=95=E5=B1=9E=E6=80=A7=E5=88=B0json?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/PropertyWidget.cpp | 40 ++++++ logPlus/TransparentDraggableGeoLith.cpp | 157 +++++++++++++++--------- logPlus/TransparentDraggableGeoLith.h | 7 +- logPlus/formdraw.cpp | 155 ++++++++++++++++++++++- logPlus/forminfo.cpp | 36 ++++-- logPlus/forminfo.h | 1 + logPlus/formtrack.cpp | 58 ++++++++- logPlus/qmycustomplot.cpp | 4 + logPlus/qmycustomplot.h | 1 + 9 files changed, 383 insertions(+), 76 deletions(-) diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index 50f6051..7bb06c8 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -114,6 +114,16 @@ void PropertyWidget::CommonPropertyChanged( QtProperty *pProperty, const QVarian m_formInfo->m_lineColor = newColor; m_formInfo->update(); } + else if ("垂向绘制" == m_propertyData[pProperty]) + { + m_formInfo->m_bVerticaDrawing = variant.toBool(); + m_formInfo->update(); + } + else if ("旋转角度(°)" == m_propertyData[pProperty]) + { + m_formInfo->m_nRotationAngle = variant.toInt(); + m_formInfo->update(); + } } void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant &variant ) @@ -309,6 +319,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant { m_formInfo->m_bShowOil = bShow; } + else if(m_propertyData[pProperty] == "含油性居中") + { + m_formInfo->m_bCenterOil = bShow; + } else if(m_propertyData[pProperty] == "显示颜色") { m_formInfo->m_bShowColor = bShow; @@ -726,6 +740,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant { m_formInfo->m_bShowOil = bShow; } + else if(m_propertyData[pProperty] == "含油性居中") + { + m_formInfo->m_bCenterOil = bShow; + } else if(m_propertyData[pProperty] == "显示颜色") { m_formInfo->m_bShowColor = bShow; @@ -2060,6 +2078,8 @@ void PropertyWidget::initSwallCoreProperty(FormInfo *formInfo) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -2086,6 +2106,8 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); } @@ -2108,6 +2130,8 @@ void PropertyWidget::initTextProperty(FormInfo *formInfo) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -2135,6 +2159,8 @@ void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, doub _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); } @@ -2162,6 +2188,8 @@ void PropertyWidget::initLayerProperty(FormInfo *formInfo) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -2188,6 +2216,8 @@ void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, d _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); } @@ -2216,6 +2246,8 @@ void PropertyWidget::initGujingProperty(FormInfo *formInfo) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -2242,6 +2274,8 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); } @@ -2261,6 +2295,8 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -2268,6 +2304,7 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo) _CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool); + _CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool); _CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8); @@ -2296,12 +2333,15 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); //显示 _CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool); + _CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool); _CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8); diff --git a/logPlus/TransparentDraggableGeoLith.cpp b/logPlus/TransparentDraggableGeoLith.cpp index 318b6bc..fd24d81 100644 --- a/logPlus/TransparentDraggableGeoLith.cpp +++ b/logPlus/TransparentDraggableGeoLith.cpp @@ -116,21 +116,37 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight, { if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 { - y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan); + if(mPlot->m_bCenterOil)//含油性居中 + { + y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); + } + else + { + y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan); + } } else { - y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); + if(mPlot->m_bCenterOil)//含油性居中 + { + y1 = mPlot->yAxis->coordToPixel(lY1); + } + else + { + y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); + } } } else { if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 { + //不绘制含油性 y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); } else { + //不绘制含油性,左侧颜色 y1 = mPlot->yAxis->coordToPixel(lY1); } } @@ -225,7 +241,60 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight, } mPixmap_Lith->topLeft->setCoords(mPlot->xAxis->pixelToCoord(x2+1), mPlot->yAxis->pixelToCoord(y1+1));//right_Hight mPixmap_Lith->bottomRight->setCoords(mPlot->xAxis->pixelToCoord(x1-1), mPlot->yAxis->pixelToCoord(y2-1));//left_Low +} +void TransparentDraggableGeoLith::drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2) +{ + //不显示 + if(m_Color=="" || !mPlot->m_bShowColor) + { + mPixmap_Color->topLeft->setCoords(0, 0);//right_Hight + mPixmap_Color->bottomRight->setCoords(0, 0);//left_Low + return; + } + + QString path,filename; + GetWellNameAndPath(m_Color, filename, path); + QString basename = filename; + + double x1 = mPlot->xAxis->coordToPixel(left_Low); + double x2 = mPlot->xAxis->coordToPixel(right_Hight); + double y1 = mPlot->yAxis->coordToPixel(lY1); + double y2 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); + double newWidth = y2-y1; + double newHeight = x1-x2; + + QString val=""; + QImage image(newWidth, newHeight, QImage::Format_RGB32); + QPainter painter(&image); + QRectF fillRect(0,0,newWidth, newHeight); + painter.fillRect(fillRect,Qt::white); + + // + if(mPlot->m_bShowColor) + { + //颜色 + QString strLastColor = m_Color.right(4); + if(strLastColor.toLower()==".svg") + { + //拉伸 + DrawSVGSteched(&painter,m_Color,fillRect,0); + } + } + // + val=GetImagePath()+"TempNew"; + QDir ss; + if(!ss.exists(val)) { + ss.mkdir(val); + } + val+=QDir::separator(); + val+=basename+".png"; + image.save(val); + // + mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片 + + mPixmap_Color->topLeft->setCoords(right_Hight, lY1);//right_Hight + mPixmap_Color->bottomRight->setCoords(left_Low, lY1+(lY2-lY1)/mPlot->m_dOilZhan);//left_Low } //设置m_Oil @@ -238,6 +307,8 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d { if(m_Oil=="" || !mPlot->m_bShowOil) { + mPixmap_Oil->topLeft->setCoords(0, 0); //right_Hight, lY1 + mPixmap_Oil->bottomRight->setCoords(0, 0); //left_Low return; } @@ -311,56 +382,20 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d mPixmap_Oil->setPixmap(QPixmap(filePath)); // 设置图片 } - mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1 - mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low + if(mPlot->m_bCenterOil)//含油性居中 + { + mPixmap_Oil->topLeft->setCoords(xNewRight, lY1+ (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //right_Hight, lY1 + mPixmap_Oil->bottomRight->setCoords(xNewLeft, lY2- (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //left_Low + } + else + { + mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1 + mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low + } //mPlot->replot(); } -////设置Color -//void TransparentDraggableGeoLith::setColor(QString filePath) -//{ -// m_Color = filePath; -// // -// QString strLast = filePath.right(4); -// if(strLast.toLower()==".svg") -// { -// QString path,filename; -// GetWellNameAndPath(filePath, filename, path); -// QString basename = filename; - -// QString val=filePath; -// QImage image(320,160,QImage::Format_RGB32); -// QPainter painter(&image); -// QRectF fillRect(0,0,320,160); -// painter.fillRect(fillRect,Qt::white); -// //拉伸 -// DrawSVGSteched(&painter,filePath,fillRect,0); -// //平铺 -// //DrawSVGTiled(&painter,filePath,fillRect,0); -// //正常 -// //DrawSVGNormal(&painter,filePath,fillRect,0); - -// val=GetImagePath()+"TempNew"; -// QDir ss; -// if(!ss.exists(val)) { -// ss.mkdir(val); -// } -// val+=QDir::separator(); -// val+=basename+".png"; -// image.save(val); - -// // -// mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片 -// } -// else -// { -// mPixmap_Color->setPixmap(QPixmap(filePath)); // 设置图片 -// } - -// //mPlot->replot(); -//} - // 设置矩形范围 void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, bool bRefresh) { @@ -378,17 +413,20 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 { // 设置父锚点,定位点 - mItemTitle->setText(mstrTitle); + if(mPlot->m_bShowColorNum) + { + mItemTitle->setText(mstrTitle); + } + else{ + mItemTitle->setText(""); + } float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15; mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos), lY1+(lY2-lY1)/mPlot->m_dOilZhan/2); - - mPixmap_Color->topLeft->setCoords(right_Hight, lY1+2*(lY2-lY1)/mPlot->m_dOilZhan); } else { mItemTitle->setText(""); - mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan); } } else @@ -396,26 +434,31 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 { // 设置父锚点,定位点 - mItemTitle->setText(mstrTitle); + if(mPlot->m_bShowColorNum) + { + mItemTitle->setText(mstrTitle); + } + else{ + mItemTitle->setText(""); + } float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15; mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos), lY1+(lY2-lY1)/mPlot->m_dOilZhan/2); - - mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan); } else { mItemTitle->setText(""); - mPixmap_Color->topLeft->setCoords(right_Hight, lY1); } } - mPixmap_Color->bottomRight->setCoords(left_Low, lY2); // drawLith(left_Low, right_Hight, lY1, lY2); //位置与rect不一样,否则图像反转 drawOil(left_Low, right_Hight, lY1, lY2); + //左侧颜色 + drawColorLeft(left_Low, right_Hight, lY1, lY2); + updateHandles(); if(bRefresh) diff --git a/logPlus/TransparentDraggableGeoLith.h b/logPlus/TransparentDraggableGeoLith.h index 339ccbe..1e713e5 100644 --- a/logPlus/TransparentDraggableGeoLith.h +++ b/logPlus/TransparentDraggableGeoLith.h @@ -30,11 +30,12 @@ public: //设置标题 void setTitle(QString strTitle); - //设置解释结论 + //设置岩性 void setLith(QString filePath, QString colorPath); void drawLith(double left_Low, double right_Hight, double lY1, double lY2); - -// void setColor(QString filePath); + + // void setColor(QString filePath); + void drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2); //设置m_Oil void setOil(QString filePath); diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 357096c..bcb5a03 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -380,6 +380,56 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo) lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); } + bool bLithColor = true; // 岩性配色显示 + bool bLithOne = true; // 单岩性显示 + bool bShowOil = true; // 显示含油性 + bool bCenterOil = false; // 含油性居中 + bool bShowColor = false; // 显示颜色 + bool bShowColorNum = false; // 绘制颜色号 + // + if (lineObjInfo.contains("LithColor")) + { + QJsonValue value = lineObjInfo.value("LithColor"); + if (value.isBool()) { + bLithColor = value.toBool(); + } + } + if (lineObjInfo.contains("LithOne")) + { + QJsonValue value = lineObjInfo.value("LithOne"); + if (value.isBool()) { + bLithOne = value.toBool(); + } + } + if (lineObjInfo.contains("ShowOil")) + { + QJsonValue value = lineObjInfo.value("ShowOil"); + if (value.isBool()) { + bShowOil = value.toBool(); + } + } + if (lineObjInfo.contains("CenterOil")) + { + QJsonValue value = lineObjInfo.value("CenterOil"); + if (value.isBool()) { + bCenterOil = value.toBool(); + } + } + if (lineObjInfo.contains("ShowColor")) + { + QJsonValue value = lineObjInfo.value("ShowColor"); + if (value.isBool()) { + bShowColor = value.toBool(); + } + } + if (lineObjInfo.contains("ShowColorNum")) + { + QJsonValue value = lineObjInfo.value("ShowColorNum"); + if (value.isBool()) { + bShowColorNum = value.toBool(); + } + } + QString folderPath = GetLogdataPath(); folderPath = folderPath + g_prjname; strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; @@ -395,7 +445,53 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo) { listOtherProperty.append(QString::number(lineObjInfo.value("OilZhan").toInt())); } - + if(bLithColor) + { + listOtherProperty.append("LithColor"); + } + else{ + listOtherProperty.append("0"); + } + // + if(bLithOne) + { + listOtherProperty.append("LithOne"); + } + else{ + listOtherProperty.append("0"); + } + // + if(bShowOil) + { + listOtherProperty.append("ShowOil"); + } + else{ + listOtherProperty.append("0"); + } + // + if(bCenterOil) + { + listOtherProperty.append("CenterOil"); + } + else{ + listOtherProperty.append("0"); + } + // + if(bShowColor) + { + listOtherProperty.append("ShowColor"); + } + else{ + listOtherProperty.append("0"); + } + // + if(bShowColorNum) + { + listOtherProperty.append("ShowColorNum"); + } + else{ + listOtherProperty.append("0"); + } //结论 this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty); } @@ -3973,9 +4069,64 @@ void FormDraw::initGeoLith(QMyCustomPlot *widget, QString strSlfName, QString st widget->yAxis2->setTicks(false); //含油占比 - if(listOtherProperty.size()>=4) + if(listOtherProperty.size()>=10) { widget->m_dOilZhan = listOtherProperty[3].toDouble(); + + // + if(listOtherProperty[4]=="LithColor") + { + widget->m_bLithColor = true; + } + else + { + widget->m_bLithColor = false; + } + // + if(listOtherProperty[5]=="LithOne") + { + widget->m_bLithOne = true; + } + else + { + widget->m_bLithOne = false; + } + // + if(listOtherProperty[6]=="ShowOil") + { + widget->m_bShowOil = true; + } + else + { + widget->m_bShowOil = false; + } + // + if(listOtherProperty[7]=="CenterOil") + { + widget->m_bCenterOil = true; + } + else + { + widget->m_bCenterOil = false; + } + // + if(listOtherProperty[8]=="ShowColor") + { + widget->m_bShowColor = true; + } + else + { + widget->m_bShowColor = false; + } + // + if(listOtherProperty[9]=="ShowColorNum") + { + widget->m_bShowColorNum = true; + } + else + { + widget->m_bShowColorNum = false; + } } //加载 widget->LoadFromSLF_GeoLith(strSlfName, strLineName); diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index 11b9390..379ad4f 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -157,7 +157,13 @@ QJsonObject FormInfo::makeJson() rootObj["curveNameFont"] = m_curveNameFont.toString(); rootObj["lineColor"] = m_lineColor.name(); - rootObj["OilZhan"] = m_dOilZhan;//含油占比 + rootObj["OilZhan"] = m_dOilZhan;//含油占比 + rootObj["LithColor"] = m_bLithColor; + rootObj["LithOne"] = m_bLithOne; + rootObj["ShowOil"] = m_bShowOil; + rootObj["CenterOil"] = m_bCenterOil; + rootObj["ShowColor"] = m_bShowColor; + rootObj["ShowColorNum"] = m_bShowColorNum; //item属性写入slf文件,不需要此次记录 return rootObj; } @@ -286,6 +292,7 @@ void FormInfo::paintEvent(QPaintEvent* event) //painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框 painter.drawRect(rectRound); + QString strShowTxt = ""; painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡 painter.setFont(m_curveNameFont); painter.setPen(m_lineColor); // fontColor QColor(220, 220, 220) @@ -365,7 +372,8 @@ void FormInfo::paintEvent(QPaintEvent* event) strAliasNameTmp = strAliasNameTmp + "-从校"; } } - painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp); + strShowTxt = strAliasNameTmp; + //painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp); } if(m_strType=="waveObject") @@ -426,12 +434,7 @@ void FormInfo::paintEvent(QPaintEvent* event) } } - painter.setFont(m_curveUnitFont); - painter.setPen(m_lineColor); - //painter.drawText(rect.left() + 20, 55, m_strUnit); - //painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax)); - QString strShowTxt = ""; if(m_strLineName=="RESULT") { //解释结论,不绘制左右范围 @@ -447,12 +450,6 @@ void FormInfo::paintEvent(QPaintEvent* event) //蝌蚪图,不绘制左右范围 strShowTxt = "蝌蚪图"; } - else if(m_strLineName=="井眼垮塌矢量图" - || m_strLineName=="井斜方位图") - { - painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit); - painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax)); - } if (strShowTxt.length()>0) { @@ -501,6 +498,12 @@ void FormInfo::paintEvent(QPaintEvent* event) } } + //单位------------------------------ + painter.setFont(m_curveUnitFont); + painter.setPen(m_lineColor); + //painter.drawText(rect.left() + 20, 55, m_strUnit); + //painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax)); + // if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT" || m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE" @@ -528,6 +531,13 @@ void FormInfo::paintEvent(QPaintEvent* event) } } + if(m_strLineName=="井眼垮塌矢量图" + || m_strLineName=="井斜方位图") + { + painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit); + painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax)); + } + QWidget::paintEvent(event); } diff --git a/logPlus/forminfo.h b/logPlus/forminfo.h index 3d9394d..66d0dc2 100644 --- a/logPlus/forminfo.h +++ b/logPlus/forminfo.h @@ -149,6 +149,7 @@ public: bool m_bLithColor = true; // 岩性配色显示 bool m_bLithOne = true; // 单岩性显示 bool m_bShowOil = true; // 显示含油性 + bool m_bCenterOil = false; // 含油性居中 bool m_bShowColor = false; // 显示颜色 bool m_bShowColorNum = false; // 绘制颜色号 double m_dOilZhan = 8; //含油占比 diff --git a/logPlus/formtrack.cpp b/logPlus/formtrack.cpp index c26cc73..3b11547 100644 --- a/logPlus/formtrack.cpp +++ b/logPlus/formtrack.cpp @@ -585,10 +585,66 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString //录井剖面 if(strLineName == "GEO_LITH") { - if(listOtherProperty.size()>=4) + if(listOtherProperty.size()>=10) { formInfo->m_dOilZhan = listOtherProperty[3].toDouble(); + + // + if(listOtherProperty[4]=="LithColor") + { + formInfo->m_bLithColor = true; + } + else + { + formInfo->m_bLithColor = false; + } + // + if(listOtherProperty[5]=="LithOne") + { + formInfo->m_bLithOne = true; + } + else + { + formInfo->m_bLithOne = false; + } + // + if(listOtherProperty[6]=="ShowOil") + { + formInfo->m_bShowOil = true; + } + else + { + formInfo->m_bShowOil = false; + } + // + if(listOtherProperty[7]=="CenterOil") + { + formInfo->m_bCenterOil = true; + } + else + { + formInfo->m_bCenterOil = false; + } + // + if(listOtherProperty[8]=="ShowColor") + { + formInfo->m_bShowColor = true; + } + else + { + formInfo->m_bShowColor = false; + } + // + if(listOtherProperty[9]=="ShowColorNum") + { + formInfo->m_bShowColorNum = true; + } + else + { + formInfo->m_bShowColorNum = false; + } } + } } //设置高度 diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index a9742b5..6d8233b 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -5415,6 +5415,10 @@ void QMyCustomPlot::s_changeGeoLithShow(QString strUuid, QString strSlfName, QSt { m_bShowOil = bShow; } + else if(propertyData == "含油性居中") + { + m_bCenterOil = bShow; + } else if(propertyData == "显示颜色") { m_bShowColor = bShow; diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index 4972eb4..7050ce1 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -187,6 +187,7 @@ public: bool m_bLithColor = true; // 岩性配色显示 bool m_bLithOne = true; // 单岩性显示 bool m_bShowOil = true; // 显示含油性 + bool m_bCenterOil = false; // 含油性居中 bool m_bShowColor = false; // 显示颜色 bool m_bShowColorNum = false; // 绘制颜色号 double m_dOilZhan = 8; //含油占比