Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
84d20b9997
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#include "ConvertorExport.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
//#include "ObjWell.h"
|
||||
//#include "ObjWelllog.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include "MyWelllogRound.h"
|
||||
#include "DepthProgress.h"
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public:
|
|||
virtual bool OnlyForTest(){return false;};
|
||||
virtual bool Init()
|
||||
{
|
||||
// m_WellInfo->Init();
|
||||
m_WellInfo->Init();
|
||||
m_WellLogRoundInfo->Init();
|
||||
// memset(&m_WellInfo,0,sizeof(m_WellInfo));
|
||||
// memset(&m_WellLogRoundInfo,0,sizeof(m_WellLogRoundInfo));
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
* @return well
|
||||
*/
|
||||
|
||||
//pai::ios::welllog::Well *GetWellInfo();
|
||||
pai::ios::welllog::Well *GetWellInfo();
|
||||
|
||||
/**
|
||||
* @brief 获取井次
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
// pai::ios::welllog::Well* m_WellInfo;
|
||||
pai::ios::welllog::Well* m_WellInfo;
|
||||
DiDepthProgress *m_pDepthProgress;
|
||||
QStringList m_FileHead;
|
||||
MyWelllogRound* m_WellLogRoundInfo;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public:
|
|||
* @return QVector<CObjWellLog*> file contains all welllog curve
|
||||
*/
|
||||
|
||||
// virtual QList<CObjWellLog*> GetWellLogList(const QString &filename);
|
||||
virtual QList<CObjWellLog*> GetWellLogList(const QString &filename);
|
||||
|
||||
/**
|
||||
* @brief 指定文件的解编出来的文件头内容
|
||||
|
|
@ -173,7 +173,7 @@ protected:
|
|||
|
||||
int m_DepthLength;
|
||||
|
||||
// QList<CObjWellLog*>m_vWellLogCurve;
|
||||
QList<CObjWellLog*>m_vWellLogCurve;
|
||||
|
||||
//多维曲线
|
||||
QList<QString>m_DimCurvesList;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ bool sConvertorKey::operator< ( const sConvertorKey& s ) const
|
|||
IConvertor::IConvertor():m_ConvertorTypeName("")
|
||||
{
|
||||
m_WellLogRoundInfo=new MyWelllogRound();
|
||||
// m_WellInfo=new Well();
|
||||
m_WellInfo=new Well();
|
||||
m_pDepthProgress=NULL;
|
||||
m_ColumnCount=0;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ IConvertor::IConvertor():m_ConvertorTypeName("")
|
|||
IConvertor::~IConvertor()
|
||||
{
|
||||
delete m_WellLogRoundInfo;
|
||||
// delete m_WellInfo;
|
||||
delete m_WellInfo;
|
||||
}
|
||||
void IConvertor::InitFormatSuffixName()
|
||||
{
|
||||
|
|
@ -47,11 +47,11 @@ MyWelllogRound * IConvertor::GetWellLogRoundInfo()
|
|||
|
||||
}
|
||||
|
||||
// pai::ios::welllog::Well *IConvertor::GetWellInfo()
|
||||
// {
|
||||
// return m_WellInfo;
|
||||
pai::ios::welllog::Well *IConvertor::GetWellInfo()
|
||||
{
|
||||
return m_WellInfo;
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor>& IConvertor::GetFatory()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -149,36 +149,36 @@ bool InterIConvertor::IsSupport( const QString &filename )
|
|||
return Value;
|
||||
}
|
||||
|
||||
// QList<CObjWellLog*> pai::graphics::InterIConvertor::GetWellLogList( const QString &filename )
|
||||
// {
|
||||
// m_vWellLogCurve.clear();
|
||||
// if(m_CurveData.Curve_Num<=0) return m_vWellLogCurve;
|
||||
// // GetWellLogMetas( m_vWellLogCurve, filename );
|
||||
// InitWelllogRoundInfo(filename);
|
||||
// if(WellStaticInfo.XCoor)FILE_MESSAGE.Xcoor=WellStaticInfo.XCoor;
|
||||
// if(WellStaticInfo.YCoor)FILE_MESSAGE.Ycoor=WellStaticInfo.YCoor;
|
||||
// memmove(FILE_MESSAGE.Item,WellStaticInfo.MethodCWell,sizeof(FILE_MESSAGE.Item));
|
||||
// if(*WellStaticInfo.WellName&&*WellStaticInfo.WellName!=' ')memmove(FILE_MESSAGE.WellName,WellStaticInfo.WellName,sizeof(FILE_MESSAGE.WellName));
|
||||
// if(*WellStaticInfo.AreaName&&*WellStaticInfo.AreaName!=' ')memmove(FILE_MESSAGE.AreaName,WellStaticInfo.AreaName,sizeof(FILE_MESSAGE.AreaName));
|
||||
// if(*WellStaticInfo.OilCompanyName&&*WellStaticInfo.OilCompanyName!=' ')memmove(FILE_MESSAGE.OilCompanyName,WellStaticInfo.OilCompanyName,sizeof(FILE_MESSAGE.OilCompanyName));
|
||||
// if(WellStaticInfo.As1)FILE_MESSAGE.Altitude=WellStaticInfo.As1;
|
||||
// if(WellStaticInfo.Bs1)FILE_MESSAGE.Kelly=WellStaticInfo.Bs1;
|
||||
// if(strlen(WellStaticInfo.EndDrillDate))FILE_MESSAGE.EndDrillDate=StringToTime(WellStaticInfo.EndDrillDate);
|
||||
// if(strlen(WellStaticInfo.StartDrillDate))FILE_MESSAGE.StartDrillDate=StringToTime(WellStaticInfo.StartDrillDate);
|
||||
// if(WellStaticInfo.Sc1Edep)FILE_MESSAGE.StartDepth=WellStaticInfo.Sc1Edep;
|
||||
// if(WellStaticInfo.Sc2sdep)FILE_MESSAGE.EndDepth=WellStaticInfo.Sc2sdep;
|
||||
// if(*(float*)&WellStaticInfo.Remark[0])memmove(&FILE_MESSAGE.X0,&WellStaticInfo.Remark[0],4);
|
||||
// if(*(float*)&WellStaticInfo.Remark[4])memmove(&FILE_MESSAGE.Y0,&WellStaticInfo.Remark[4],4);
|
||||
// if(*(float*)&WellStaticInfo.Remark[8])memmove(&FILE_MESSAGE.TVD,&WellStaticInfo.Remark[8],4);//whp 2019.7.30 该语句会把解编模块扫描得到的TVD数据清空
|
||||
// //已在ASCII模块中做了相应的处理,不知道别的模块中还有没有
|
||||
// if(strlen(WellDynamicInfo.LogCompanyName))memmove(FILE_MESSAGE.LogCompanyName,WellDynamicInfo.LogCompanyName,sizeof(FILE_MESSAGE.LogCompanyName));
|
||||
// if(strlen(WellDynamicInfo.Operator))memmove(FILE_MESSAGE.Operator,WellDynamicInfo.Operator,sizeof(FILE_MESSAGE.Operator));
|
||||
// if(strlen(WellDynamicInfo.Item))memmove(FILE_MESSAGE.LoggingTeam,WellDynamicInfo.Item,sizeof(FILE_MESSAGE.LoggingTeam));
|
||||
// if(strlen(WellDynamicInfo.Date))FILE_MESSAGE.LoggingDate=StringToTime(WellDynamicInfo.Date);
|
||||
// //add end
|
||||
// InitWellInfo(filename);
|
||||
// return m_vWellLogCurve;
|
||||
// }
|
||||
QList<CObjWellLog*> pai::graphics::InterIConvertor::GetWellLogList( const QString &filename )
|
||||
{
|
||||
m_vWellLogCurve.clear();
|
||||
if(m_CurveData.Curve_Num<=0) return m_vWellLogCurve;
|
||||
// GetWellLogMetas( m_vWellLogCurve, filename );
|
||||
InitWelllogRoundInfo(filename);
|
||||
if(WellStaticInfo.XCoor)FILE_MESSAGE.Xcoor=WellStaticInfo.XCoor;
|
||||
if(WellStaticInfo.YCoor)FILE_MESSAGE.Ycoor=WellStaticInfo.YCoor;
|
||||
memmove(FILE_MESSAGE.Item,WellStaticInfo.MethodCWell,sizeof(FILE_MESSAGE.Item));
|
||||
if(*WellStaticInfo.WellName&&*WellStaticInfo.WellName!=' ')memmove(FILE_MESSAGE.WellName,WellStaticInfo.WellName,sizeof(FILE_MESSAGE.WellName));
|
||||
if(*WellStaticInfo.AreaName&&*WellStaticInfo.AreaName!=' ')memmove(FILE_MESSAGE.AreaName,WellStaticInfo.AreaName,sizeof(FILE_MESSAGE.AreaName));
|
||||
if(*WellStaticInfo.OilCompanyName&&*WellStaticInfo.OilCompanyName!=' ')memmove(FILE_MESSAGE.OilCompanyName,WellStaticInfo.OilCompanyName,sizeof(FILE_MESSAGE.OilCompanyName));
|
||||
if(WellStaticInfo.As1)FILE_MESSAGE.Altitude=WellStaticInfo.As1;
|
||||
if(WellStaticInfo.Bs1)FILE_MESSAGE.Kelly=WellStaticInfo.Bs1;
|
||||
if(strlen(WellStaticInfo.EndDrillDate))FILE_MESSAGE.EndDrillDate=StringToTime(WellStaticInfo.EndDrillDate);
|
||||
if(strlen(WellStaticInfo.StartDrillDate))FILE_MESSAGE.StartDrillDate=StringToTime(WellStaticInfo.StartDrillDate);
|
||||
if(WellStaticInfo.Sc1Edep)FILE_MESSAGE.StartDepth=WellStaticInfo.Sc1Edep;
|
||||
if(WellStaticInfo.Sc2sdep)FILE_MESSAGE.EndDepth=WellStaticInfo.Sc2sdep;
|
||||
if(*(float*)&WellStaticInfo.Remark[0])memmove(&FILE_MESSAGE.X0,&WellStaticInfo.Remark[0],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[4])memmove(&FILE_MESSAGE.Y0,&WellStaticInfo.Remark[4],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[8])memmove(&FILE_MESSAGE.TVD,&WellStaticInfo.Remark[8],4);//whp 2019.7.30 该语句会把解编模块扫描得到的TVD数据清空
|
||||
//已在ASCII模块中做了相应的处理,不知道别的模块中还有没有
|
||||
if(strlen(WellDynamicInfo.LogCompanyName))memmove(FILE_MESSAGE.LogCompanyName,WellDynamicInfo.LogCompanyName,sizeof(FILE_MESSAGE.LogCompanyName));
|
||||
if(strlen(WellDynamicInfo.Operator))memmove(FILE_MESSAGE.Operator,WellDynamicInfo.Operator,sizeof(FILE_MESSAGE.Operator));
|
||||
if(strlen(WellDynamicInfo.Item))memmove(FILE_MESSAGE.LoggingTeam,WellDynamicInfo.Item,sizeof(FILE_MESSAGE.LoggingTeam));
|
||||
if(strlen(WellDynamicInfo.Date))FILE_MESSAGE.LoggingDate=StringToTime(WellDynamicInfo.Date);
|
||||
//add end
|
||||
InitWellInfo(filename);
|
||||
return m_vWellLogCurve;
|
||||
}
|
||||
|
||||
|
||||
QString InterIConvertor::GetfilePath(const char *FileName)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class CObjWellLog;
|
|||
OSGDATAMODEL_EXPORT CObjWell *GetCurrentObjWell();
|
||||
OSGDATAMODEL_EXPORT void SetCurrentObjWell( CObjWell *pObjWell );
|
||||
|
||||
class OSGDATAMODEL_EXPORT CObjWell/* : public CObjBaseObject*/
|
||||
class OSGDATAMODEL_EXPORT CObjWell : public pai::objectmodel::PaiObject
|
||||
{
|
||||
// Q_OBJECT;
|
||||
public:
|
||||
|
|
@ -163,6 +163,15 @@ public:
|
|||
/************************************************************************/
|
||||
// pai::datamodel::CObjWellLog* GetWellLogByTemplate(QString wellroundPath,const QVariant& templateKey);
|
||||
static int ComputeTrajectory(CObjWell *pWell,QString Slffilename);
|
||||
QString GetPrjname()
|
||||
{
|
||||
return m_strPrjname;
|
||||
}
|
||||
void SetPrjname(QString strPrjname)
|
||||
{
|
||||
m_strPrjname = strPrjname;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
|
@ -189,6 +198,7 @@ private:
|
|||
CObjWelllogRound*m_pCurrentWelllogRound;
|
||||
bool isFLAG;
|
||||
double m_XYZStartDep,m_XYZEndDep,m_XYZRlev;
|
||||
QString m_strPrjname;
|
||||
public slots:
|
||||
// void slotWellMessage(QString slffile);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -728,58 +728,67 @@ void CObjWell::ClearXYZ()
|
|||
// }
|
||||
void CObjWell::SetDepth(CObjWell *pWell)
|
||||
{
|
||||
// if(pWell)
|
||||
// {
|
||||
// int roc=pWell->GetWellRoundCount();
|
||||
// if(roc)
|
||||
// {
|
||||
// QList<PaiObject*>childs;
|
||||
// pWell->GetAllWellRound(childs);
|
||||
// double stardep=99999,enddep=-99999;
|
||||
// float rlev=100;
|
||||
// for(int i=0;i<roc;i++)
|
||||
// {
|
||||
// CObjWelllogRound* pWelllogRound=dynamic_cast<CObjWelllogRound*>(childs[i]);
|
||||
// if(!pWelllogRound) continue;
|
||||
// CLogIO * logio=new CLogIO();
|
||||
if(pWell)
|
||||
{
|
||||
// int roc=pWell->GetWellRoundCount();
|
||||
QString path=GetLogdataPath();
|
||||
path+=pWell->GetPrjname();
|
||||
path+="/#";
|
||||
path+=pWell->GetName();
|
||||
|
||||
// if(!logio->Open(pWelllogRound->GetSlfFileName().toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
// {
|
||||
// delete logio;
|
||||
// break;
|
||||
// }
|
||||
// int curveCount=logio->GetObjectCount();
|
||||
// for(int k1=0;k1<curveCount;k1++)
|
||||
// {
|
||||
// char buf[64];
|
||||
// logio->GetObjectName(k1,buf);
|
||||
// int a=logio->OpenCurve(buf);
|
||||
// if(a>-1)
|
||||
// {
|
||||
// Slf_CURVE acurveinfo;
|
||||
// logio->GetCurveInfo(a,&acurveinfo);
|
||||
// if(acurveinfo.StartDepth<stardep) stardep=acurveinfo.StartDepth;
|
||||
// if(acurveinfo.EndDepth>enddep) enddep=acurveinfo.EndDepth;
|
||||
// if(rlev>acurveinfo.DepLevel) rlev=acurveinfo.DepLevel;
|
||||
// }
|
||||
// else {
|
||||
// int a=logio->OpenWave(buf);
|
||||
// if(a>-1)
|
||||
// {
|
||||
// Slf_WAVE acurveinfo;
|
||||
// logio->GetWaveInfo(a,&acurveinfo);
|
||||
// if(acurveinfo.StartDepth<stardep) stardep=acurveinfo.StartDepth;
|
||||
// if(acurveinfo.EndDepth>enddep) enddep=acurveinfo.EndDepth;
|
||||
// if(rlev>acurveinfo.DepLevel) rlev=acurveinfo.DepLevel;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(rlev<=0) rlev=0.125;
|
||||
// delete logio;
|
||||
// }
|
||||
// pWell->SetDepth(stardep,enddep,rlev);
|
||||
// }
|
||||
// }
|
||||
QStringList slffiles;
|
||||
chakan(path, slffiles, "*.slf");
|
||||
|
||||
int roc=slffiles.size();
|
||||
if(roc)
|
||||
{
|
||||
// QList<PaiObject*>childs;
|
||||
// pWell->GetAllWellRound(childs);
|
||||
double stardep=99999,enddep=-99999;
|
||||
float rlev=100;
|
||||
for(int i=0;i<roc;i++)
|
||||
{
|
||||
// CObjWelllogRound* pWelllogRound=dynamic_cast<CObjWelllogRound*>(childs[i]);
|
||||
// if(!pWelllogRound) continue;
|
||||
CLogIO * logio=new CLogIO();
|
||||
|
||||
if(!logio->Open(/*pWelllogRound->GetSlfFileName()*/slffiles.at(i).toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
{
|
||||
delete logio;
|
||||
break;
|
||||
}
|
||||
int curveCount=logio->GetObjectCount();
|
||||
for(int k1=0;k1<curveCount;k1++)
|
||||
{
|
||||
char buf[64];
|
||||
logio->GetObjectName(k1,buf);
|
||||
int a=logio->OpenCurve(buf);
|
||||
if(a>-1)
|
||||
{
|
||||
Slf_CURVE acurveinfo;
|
||||
logio->GetCurveInfo(a,&acurveinfo);
|
||||
if(acurveinfo.StartDepth<stardep) stardep=acurveinfo.StartDepth;
|
||||
if(acurveinfo.EndDepth>enddep) enddep=acurveinfo.EndDepth;
|
||||
if(rlev>acurveinfo.DepLevel) rlev=acurveinfo.DepLevel;
|
||||
}
|
||||
else {
|
||||
int a=logio->OpenWave(buf);
|
||||
if(a>-1)
|
||||
{
|
||||
Slf_WAVE acurveinfo;
|
||||
logio->GetWaveInfo(a,&acurveinfo);
|
||||
if(acurveinfo.StartDepth<stardep) stardep=acurveinfo.StartDepth;
|
||||
if(acurveinfo.EndDepth>enddep) enddep=acurveinfo.EndDepth;
|
||||
if(rlev>acurveinfo.DepLevel) rlev=acurveinfo.DepLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(rlev<=0) rlev=0.125;
|
||||
delete logio;
|
||||
}
|
||||
pWell->SetDepth(stardep,enddep,rlev);
|
||||
}
|
||||
}
|
||||
}
|
||||
int CObjWell::ComputeTrajectory(CObjWell *pWell,QString slffilename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#pragma warning( push ,0)
|
||||
#include "WellLogUI.h"
|
||||
#include "MyWelllogRound.h"
|
||||
#include "ObjWell.h"
|
||||
#pragma warning( pop )
|
||||
|
||||
/**
|
||||
|
|
@ -30,12 +31,12 @@ public:
|
|||
virtual void ViewToData();
|
||||
virtual int Validate();
|
||||
virtual void GetOKAndCancel(QPushButton* &okBtn,QPushButton* &cancelBtn);
|
||||
void Init();
|
||||
void Init(CObjWell* pObject);
|
||||
private slots:
|
||||
virtual void slotSave();
|
||||
virtual void slotCancel();
|
||||
protected:
|
||||
|
||||
CObjWell* m_pObject;
|
||||
public:
|
||||
MyWelllogRound wellLR;
|
||||
int m_DialogType;
|
||||
|
|
|
|||
|
|
@ -57,92 +57,15 @@ void CWellDialog::GetOKAndCancel(QPushButton* &okBtn,QPushButton* &cancelBtn)
|
|||
void CWellDialog::DataToView()
|
||||
{
|
||||
// pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(pObject);
|
||||
// if(pWell != NULL)
|
||||
// {
|
||||
// wellLR.LoadMeesge(pWell->GetWellMessageFileName());
|
||||
// if(pWell->GetWellHead().x!=0&&wellLR.GetXCode()!=pWell->GetWellHead().x) wellLR.SetXCode(pWell->GetWellHead().x);
|
||||
// if(pWell->GetWellHead().y!=0&&wellLR.GetYCode()!=pWell->GetWellHead().y) wellLR.SetYCode(pWell->GetWellHead().y);
|
||||
// wellLR.SetTopDepth(pWell->GetWellHead().startDepth);
|
||||
// wellLR.SetBottomDepth(pWell->GetWellHead().endDepth);
|
||||
// QString title = pWell->GetName() == "" ? "新建井基本信息":"编辑井基本信息";
|
||||
// this->setWindowTitle(title);
|
||||
// m_pUI->wellName->setText(wellLR.GetWellName().c_str());
|
||||
// m_pUI->companyName->setText(QString::fromStdString(wellLR.GetOilCompanyName()));
|
||||
// m_pUI->wellCode->setText(QString::fromStdString(""));
|
||||
// m_pUI->areaName->setText(QString::fromStdString(wellLR.GetAreaName()));
|
||||
// int decimal = -1;
|
||||
// m_pUI->xCode->setText(DoubleToString(wellLR.GetXCode(),decimal,NULL));
|
||||
// m_pUI->xOffset->setText(DoubleToString(wellLR.GetXOffset(),decimal,NULL));
|
||||
// m_pUI->yOffset->setText(DoubleToString(wellLR.GetYOffset(),decimal,NULL));
|
||||
// m_pUI->TVD->setText(DoubleToString(pWell->GetWellHead().tvd==0?wellLR.GetTVD0():pWell->GetWellHead().tvd,3,NULL));
|
||||
// m_pUI->lineEdit->setText(DoubleToString(wellLR.GetTopDepth(),3,NULL));
|
||||
// m_pUI->yCode->setText(DoubleToString(wellLR.GetYCode(),decimal,NULL));
|
||||
// m_pUI->asl->setText(DoubleToString(wellLR.GetAsl(),decimal,NULL));
|
||||
// m_pUI->bsl->setText(DoubleToString(wellLR.GetBsl(),decimal,NULL));
|
||||
// m_pUI->endMethod->setText(QString::fromStdString(wellLR.GetCWMethod()));
|
||||
|
||||
// m_pUI->bit1->setText(QString::fromStdString(wellLR.GetBit1Prog()));
|
||||
// m_pUI->bit2->setText(QString::fromStdString(wellLR.GetBit2Prog()));
|
||||
// m_pUI->bit3->setText(QString::fromStdString(wellLR.GetBit3Prog()));
|
||||
// m_pUI->bit4->setText(QString::fromStdString(wellLR.GetBit4Prog()));
|
||||
// m_pUI->bit5->setText(QString::fromStdString(wellLR.GetBit5Prog()));
|
||||
|
||||
// m_pUI->cas1->setText(QString::fromStdString(wellLR.GetCas1Prog()));
|
||||
// m_pUI->cas2->setText(QString::fromStdString(wellLR.GetCas2Prog()));
|
||||
// m_pUI->cas3->setText(QString::fromStdString(wellLR.GetCas3Prog()));
|
||||
// m_pUI->cas4->setText(QString::fromStdString(wellLR.GetCas4Prog()));
|
||||
// m_pUI->cas5->setText(QString::fromStdString(wellLR.GetCas5Prog()));
|
||||
|
||||
// m_pUI->caseOneLength->setText(DoubleToString(wellLR.GetCas1Shot(),decimal,NULL));
|
||||
// m_pUI->caseOneSD->setText(DoubleToString(wellLR.GetSC1SDep(),decimal,NULL));
|
||||
// m_pUI->caseOneED->setText(DoubleToString(wellLR.GetSC1EDep(),decimal,NULL));
|
||||
|
||||
// m_pUI->caseTwoLength->setText(DoubleToString(wellLR.GetCas2Shot(),decimal,NULL));
|
||||
// m_pUI->caseTwoSD->setText(DoubleToString(wellLR.GetSC2SDep(),decimal,NULL));
|
||||
// m_pUI->caseTwoED->setText(DoubleToString(wellLR.GetSC2EDep(),decimal,NULL));
|
||||
|
||||
// //
|
||||
// //
|
||||
// //
|
||||
// ComboxFromConfigFile(m_pUI->wellType,"wellType");
|
||||
// if(wellLR.GetWellType() < m_pUI->wellType->count())
|
||||
// {
|
||||
// m_pUI->wellType->setCurrentIndex(wellLR.GetWellType());
|
||||
// }
|
||||
|
||||
// QString format = "yyyy年-MM月-dd日";
|
||||
// m_pUI->startDrillDate->setCalendarPopup(true);
|
||||
// m_pUI->startDrillDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->startDrillDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetSDrillDate() != "")
|
||||
// m_pUI->startDrillDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetSDrillDate()),format));
|
||||
// else
|
||||
// m_pUI->startDrillDate->setDate(QDate::currentDate());
|
||||
|
||||
// //
|
||||
// m_pUI->endDrillDate->setCalendarPopup(true);
|
||||
// m_pUI->endDrillDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->endDrillDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetEDrillDate() != "")
|
||||
// m_pUI->endDrillDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetEDrillDate()),format));
|
||||
// else
|
||||
// m_pUI->endDrillDate->setDate(QDate::currentDate());
|
||||
// //
|
||||
// m_pUI->endWellDate->setCalendarPopup(true);
|
||||
// m_pUI->endWellDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->endWellDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetCompleteDate() != "")
|
||||
// m_pUI->endWellDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetCompleteDate()),format));
|
||||
// else
|
||||
// m_pUI->endWellDate->setDate(QDate::currentDate());
|
||||
|
||||
// }
|
||||
// //if(pWell->GetWellFileName()=="")
|
||||
// // DataToViewOld(pObject);//目前MyWellRound不好使,先覆盖掉
|
||||
|
||||
|
||||
//QString title = pWell->GetName() == "" ? "新建井基本信息":"编辑井基本信息";
|
||||
QString title = "编辑井基本信息";
|
||||
CObjWell* pWell = m_pObject;
|
||||
if(pWell != NULL)
|
||||
{
|
||||
wellLR.LoadMeesge(pWell->GetWellMessageFileName());
|
||||
if(pWell->GetWellHead().x!=0&&wellLR.GetXCode()!=pWell->GetWellHead().x) wellLR.SetXCode(pWell->GetWellHead().x);
|
||||
if(pWell->GetWellHead().y!=0&&wellLR.GetYCode()!=pWell->GetWellHead().y) wellLR.SetYCode(pWell->GetWellHead().y);
|
||||
wellLR.SetTopDepth(pWell->GetWellHead().startDepth);
|
||||
wellLR.SetBottomDepth(pWell->GetWellHead().endDepth);
|
||||
QString title = pWell->GetName() == "" ? "新建井基本信息":"编辑井基本信息";
|
||||
this->setWindowTitle(title);
|
||||
m_pUI->wellName->setText(wellLR.GetWellName().c_str());
|
||||
m_pUI->companyName->setText(QString::fromStdString(wellLR.GetOilCompanyName()));
|
||||
|
|
@ -152,34 +75,33 @@ void CWellDialog::DataToView()
|
|||
m_pUI->xCode->setText(DoubleToString(wellLR.GetXCode(),decimal,NULL));
|
||||
m_pUI->xOffset->setText(DoubleToString(wellLR.GetXOffset(),decimal,NULL));
|
||||
m_pUI->yOffset->setText(DoubleToString(wellLR.GetYOffset(),decimal,NULL));
|
||||
//m_pUI->TVD->setText(DoubleToString(pWell->GetWellHead().tvd==0?wellLR.GetTVD0():pWell->GetWellHead().tvd,3,NULL));
|
||||
//m_pUI->TVD->setText(DoubleToString(wellLR.GetTVD0(),3,NULL));
|
||||
m_pUI->TVD->setText(DoubleToString(pWell->GetWellHead().tvd==0?wellLR.GetTVD0():pWell->GetWellHead().tvd,3,NULL));
|
||||
m_pUI->lineEdit->setText(DoubleToString(wellLR.GetTopDepth(),3,NULL));
|
||||
m_pUI->yCode->setText(DoubleToString(wellLR.GetYCode(),decimal,NULL));
|
||||
m_pUI->asl->setText(DoubleToString(wellLR.GetAsl(),decimal,NULL));
|
||||
m_pUI->bsl->setText(DoubleToString(wellLR.GetBsl(),decimal,NULL));
|
||||
m_pUI->endMethod->setText(QString::fromStdString(wellLR.GetCWMethod()));
|
||||
|
||||
|
||||
m_pUI->bit1->setText(QString::fromStdString(wellLR.GetBit1Prog()));
|
||||
m_pUI->bit2->setText(QString::fromStdString(wellLR.GetBit2Prog()));
|
||||
m_pUI->bit3->setText(QString::fromStdString(wellLR.GetBit3Prog()));
|
||||
m_pUI->bit4->setText(QString::fromStdString(wellLR.GetBit4Prog()));
|
||||
m_pUI->bit5->setText(QString::fromStdString(wellLR.GetBit5Prog()));
|
||||
|
||||
|
||||
m_pUI->cas1->setText(QString::fromStdString(wellLR.GetCas1Prog()));
|
||||
m_pUI->cas2->setText(QString::fromStdString(wellLR.GetCas2Prog()));
|
||||
m_pUI->cas3->setText(QString::fromStdString(wellLR.GetCas3Prog()));
|
||||
m_pUI->cas4->setText(QString::fromStdString(wellLR.GetCas4Prog()));
|
||||
m_pUI->cas5->setText(QString::fromStdString(wellLR.GetCas5Prog()));
|
||||
|
||||
|
||||
m_pUI->caseOneLength->setText(DoubleToString(wellLR.GetCas1Shot(),decimal,NULL));
|
||||
m_pUI->caseOneSD->setText(DoubleToString(wellLR.GetSC1SDep(),decimal,NULL));
|
||||
m_pUI->caseOneED->setText(DoubleToString(wellLR.GetSC1EDep(),decimal,NULL));
|
||||
|
||||
|
||||
m_pUI->caseTwoLength->setText(DoubleToString(wellLR.GetCas2Shot(),decimal,NULL));
|
||||
m_pUI->caseTwoSD->setText(DoubleToString(wellLR.GetSC2SDep(),decimal,NULL));
|
||||
m_pUI->caseTwoED->setText(DoubleToString(wellLR.GetSC2EDep(),decimal,NULL));
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
@ -197,7 +119,7 @@ void CWellDialog::DataToView()
|
|||
m_pUI->startDrillDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetSDrillDate()),format));
|
||||
else
|
||||
m_pUI->startDrillDate->setDate(QDate::currentDate());
|
||||
|
||||
|
||||
//
|
||||
m_pUI->endDrillDate->setCalendarPopup(true);
|
||||
m_pUI->endDrillDate->setCalendarWidget(new QCalendarWidget());
|
||||
|
|
@ -214,6 +136,87 @@ void CWellDialog::DataToView()
|
|||
m_pUI->endWellDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetCompleteDate()),format));
|
||||
else
|
||||
m_pUI->endWellDate->setDate(QDate::currentDate());
|
||||
|
||||
}
|
||||
|
||||
|
||||
// // //if(pWell->GetWellFileName()=="")
|
||||
// // // DataToViewOld(pObject);//目前MyWellRound不好使,先覆盖掉
|
||||
|
||||
|
||||
// //QString title = pWell->GetName() == "" ? "新建井基本信息":"编辑井基本信息";
|
||||
// QString title = "编辑井基本信息";
|
||||
// this->setWindowTitle(title);
|
||||
// m_pUI->wellName->setText(wellLR.GetWellName().c_str());
|
||||
// m_pUI->companyName->setText(QString::fromStdString(wellLR.GetOilCompanyName()));
|
||||
// m_pUI->wellCode->setText(QString::fromStdString(""));
|
||||
// m_pUI->areaName->setText(QString::fromStdString(wellLR.GetAreaName()));
|
||||
// int decimal = -1;
|
||||
// m_pUI->xCode->setText(DoubleToString(wellLR.GetXCode(),decimal,NULL));
|
||||
// m_pUI->xOffset->setText(DoubleToString(wellLR.GetXOffset(),decimal,NULL));
|
||||
// m_pUI->yOffset->setText(DoubleToString(wellLR.GetYOffset(),decimal,NULL));
|
||||
// m_pUI->TVD->setText(DoubleToString(pWell->GetWellHead().tvd==0?wellLR.GetTVD0():pWell->GetWellHead().tvd,3,NULL));
|
||||
// m_pUI->TVD->setText(DoubleToString(wellLR.GetTVD0(),3,NULL));
|
||||
// m_pUI->lineEdit->setText(DoubleToString(wellLR.GetTopDepth(),3,NULL));
|
||||
// m_pUI->yCode->setText(DoubleToString(wellLR.GetYCode(),decimal,NULL));
|
||||
// m_pUI->asl->setText(DoubleToString(wellLR.GetAsl(),decimal,NULL));
|
||||
// m_pUI->bsl->setText(DoubleToString(wellLR.GetBsl(),decimal,NULL));
|
||||
// m_pUI->endMethod->setText(QString::fromStdString(wellLR.GetCWMethod()));
|
||||
|
||||
// m_pUI->bit1->setText(QString::fromStdString(wellLR.GetBit1Prog()));
|
||||
// m_pUI->bit2->setText(QString::fromStdString(wellLR.GetBit2Prog()));
|
||||
// m_pUI->bit3->setText(QString::fromStdString(wellLR.GetBit3Prog()));
|
||||
// m_pUI->bit4->setText(QString::fromStdString(wellLR.GetBit4Prog()));
|
||||
// m_pUI->bit5->setText(QString::fromStdString(wellLR.GetBit5Prog()));
|
||||
|
||||
// m_pUI->cas1->setText(QString::fromStdString(wellLR.GetCas1Prog()));
|
||||
// m_pUI->cas2->setText(QString::fromStdString(wellLR.GetCas2Prog()));
|
||||
// m_pUI->cas3->setText(QString::fromStdString(wellLR.GetCas3Prog()));
|
||||
// m_pUI->cas4->setText(QString::fromStdString(wellLR.GetCas4Prog()));
|
||||
// m_pUI->cas5->setText(QString::fromStdString(wellLR.GetCas5Prog()));
|
||||
|
||||
// m_pUI->caseOneLength->setText(DoubleToString(wellLR.GetCas1Shot(),decimal,NULL));
|
||||
// m_pUI->caseOneSD->setText(DoubleToString(wellLR.GetSC1SDep(),decimal,NULL));
|
||||
// m_pUI->caseOneED->setText(DoubleToString(wellLR.GetSC1EDep(),decimal,NULL));
|
||||
|
||||
// m_pUI->caseTwoLength->setText(DoubleToString(wellLR.GetCas2Shot(),decimal,NULL));
|
||||
// m_pUI->caseTwoSD->setText(DoubleToString(wellLR.GetSC2SDep(),decimal,NULL));
|
||||
// m_pUI->caseTwoED->setText(DoubleToString(wellLR.GetSC2EDep(),decimal,NULL));
|
||||
|
||||
// //
|
||||
// //
|
||||
// //
|
||||
// ComboxFromConfigFile(m_pUI->wellType,"wellType");
|
||||
// if(wellLR.GetWellType() < m_pUI->wellType->count())
|
||||
// {
|
||||
// m_pUI->wellType->setCurrentIndex(wellLR.GetWellType());
|
||||
// }
|
||||
|
||||
// QString format = "yyyy年-MM月-dd日";
|
||||
// m_pUI->startDrillDate->setCalendarPopup(true);
|
||||
// m_pUI->startDrillDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->startDrillDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetSDrillDate() != "")
|
||||
// m_pUI->startDrillDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetSDrillDate()),format));
|
||||
// else
|
||||
// m_pUI->startDrillDate->setDate(QDate::currentDate());
|
||||
|
||||
// //
|
||||
// m_pUI->endDrillDate->setCalendarPopup(true);
|
||||
// m_pUI->endDrillDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->endDrillDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetEDrillDate() != "")
|
||||
// m_pUI->endDrillDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetEDrillDate()),format));
|
||||
// else
|
||||
// m_pUI->endDrillDate->setDate(QDate::currentDate());
|
||||
// //
|
||||
// m_pUI->endWellDate->setCalendarPopup(true);
|
||||
// m_pUI->endWellDate->setCalendarWidget(new QCalendarWidget());
|
||||
// m_pUI->endWellDate->setDisplayFormat(format);
|
||||
// if(wellLR.GetCompleteDate() != "")
|
||||
// m_pUI->endWellDate->setDate(QDate::fromString(QString::fromStdString(wellLR.GetCompleteDate()),format));
|
||||
// else
|
||||
// m_pUI->endWellDate->setDate(QDate::currentDate());
|
||||
}
|
||||
|
||||
int CWellDialog::Validate()
|
||||
|
|
@ -222,15 +225,31 @@ int CWellDialog::Validate()
|
|||
QString errInfo;
|
||||
if(m_pUI->wellName->text() != NULL)
|
||||
{
|
||||
// if(!IsValidWellName(m_pUI->wellName->text()))
|
||||
// {
|
||||
// errInfo = "井名称由中文(英文字母)、数字字符串构成,且首字符不可以为数字!";
|
||||
// m_pUI->wellName->setFocus();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(m_pObject);
|
||||
// if(!(pWell->isExistsName(m_pUI->wellName->text())))
|
||||
if(!IsValidWellName(m_pUI->wellName->text()))
|
||||
{
|
||||
errInfo = "井名称由中文(英文字母)、数字字符串构成,且首字符不可以为数字!";
|
||||
m_pUI->wellName->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(m_pObject);
|
||||
QString oldname=pWell->GetName();
|
||||
QString welln = m_pUI->wellName->text();
|
||||
QString path=GetLogdataPath();
|
||||
path+=pWell->GetPrjname();
|
||||
path+="/#";
|
||||
path+=welln;
|
||||
QDir dir(path);
|
||||
if (dir.exists() && oldname !=welln) {
|
||||
errInfo ="井名已经存在,无法创建新井,请用其它名字!";
|
||||
QMessageBox::information(NULL,"提示",QString(errInfo),QMessageBox::Ok);
|
||||
flag=false;
|
||||
return flag;
|
||||
}
|
||||
else
|
||||
flag = true;
|
||||
// pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(m_pObject);
|
||||
// if(!(pWell->isExistsName(m_pUI->wellName->text())))
|
||||
// {
|
||||
// flag = true;
|
||||
// }
|
||||
|
|
@ -252,7 +271,7 @@ int CWellDialog::Validate()
|
|||
// m_pUI->wellName->setFocus();
|
||||
// return flag;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -310,168 +329,254 @@ int CWellDialog::Validate()
|
|||
|
||||
void CWellDialog::ViewToData()
|
||||
{
|
||||
// pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(pObject);
|
||||
// QString oldname=pWell->GetName();
|
||||
// WellHead &hd=pWell->GetWellHead();
|
||||
// QString welln=m_pUI->wellName->text();
|
||||
// welln=welln.toUpper();
|
||||
// hd.wellName=welln;
|
||||
// CObjWell *pOldWell=dynamic_cast<CObjWell *>(::GetProject()->GetObjectByName(welln));
|
||||
// pWell->SetName(welln);
|
||||
// wellLR.SetWellName(welln.toStdString());
|
||||
// wellLR.SetAreaName(m_pUI->areaName->text().toStdString());
|
||||
// wellLR.SetOilCompanyName(m_pUI->companyName->text().toStdString());
|
||||
// QString xcode=m_pUI->xCode->text();
|
||||
// char buf[100];
|
||||
// strcpy(buf,xcode.toStdString().c_str());
|
||||
// wellLR.SetXCode(_atof_l(buf,0));
|
||||
// hd.x=_atof_l(buf,0);
|
||||
// wellLR.SetYCode(m_pUI->yCode->text().toFloat());
|
||||
// hd.y=m_pUI->yCode->text().toFloat();
|
||||
// wellLR.SetXOffset(m_pUI->xOffset->text().toFloat());
|
||||
// wellLR.SetYOffset(m_pUI->yOffset->text().toFloat());
|
||||
// wellLR.SetTVD0(m_pUI->TVD->text().toFloat());
|
||||
// wellLR.SetTopDepth(m_pUI->lineEdit->text().toFloat());
|
||||
// hd.dxe=m_pUI->xOffset->text().toFloat();
|
||||
// hd.dyn=m_pUI->yOffset->text().toFloat();
|
||||
// hd.tvd=m_pUI->TVD->text().toFloat();
|
||||
// pai::datamodel::CObjWell* pWell = dynamic_cast<pai::datamodel::CObjWell*>(pObject);
|
||||
CObjWell* pWell = m_pObject;
|
||||
QString oldname=pWell->GetName();
|
||||
WellHead &hd=pWell->GetWellHead();
|
||||
QString welln=m_pUI->wellName->text();
|
||||
|
||||
// wellLR.SetWellType(m_pUI->wellType->currentIndex ());
|
||||
QString path=GetLogdataPath();
|
||||
path+=pWell->GetPrjname();
|
||||
path+="/#";
|
||||
path+=pWell->GetName();
|
||||
// QDir dir(path);
|
||||
// if (dir.exists() && oldname !=welln) {
|
||||
// QString strMessage = welln + "井名已存在修改失败!";
|
||||
// AfxMessageBox(strMessage);
|
||||
// return;
|
||||
// }
|
||||
welln=welln.toUpper();
|
||||
hd.wellName=welln;
|
||||
// CObjWell *pOldWell=dynamic_cast<CObjWell *>(::GetProject()->GetObjectByName(welln));
|
||||
pWell->SetName(welln);
|
||||
wellLR.SetWellName(welln.toStdString());
|
||||
wellLR.SetAreaName(m_pUI->areaName->text().toStdString());
|
||||
wellLR.SetOilCompanyName(m_pUI->companyName->text().toStdString());
|
||||
QString xcode=m_pUI->xCode->text();
|
||||
char buf[100];
|
||||
strcpy(buf,xcode.toStdString().c_str());
|
||||
wellLR.SetXCode(_atof_l(buf,0));
|
||||
hd.x=_atof_l(buf,0);
|
||||
wellLR.SetYCode(m_pUI->yCode->text().toFloat());
|
||||
hd.y=m_pUI->yCode->text().toFloat();
|
||||
wellLR.SetXOffset(m_pUI->xOffset->text().toFloat());
|
||||
wellLR.SetYOffset(m_pUI->yOffset->text().toFloat());
|
||||
wellLR.SetTVD0(m_pUI->TVD->text().toFloat());
|
||||
wellLR.SetTopDepth(m_pUI->lineEdit->text().toFloat());
|
||||
hd.dxe=m_pUI->xOffset->text().toFloat();
|
||||
hd.dyn=m_pUI->yOffset->text().toFloat();
|
||||
hd.tvd=m_pUI->TVD->text().toFloat();
|
||||
|
||||
// wellLR.SetAsl(m_pUI->asl->text().toFloat());
|
||||
// wellLR.SetBsl(m_pUI->bsl->text().toFloat());
|
||||
// hd.earthEle=m_pUI->asl->text().toFloat();
|
||||
// hd.dEle=m_pUI->bsl->text().toFloat();
|
||||
wellLR.SetWellType(m_pUI->wellType->currentIndex ());
|
||||
|
||||
// wellLR.SetCWMethod(m_pUI->endMethod->text().toStdString());
|
||||
wellLR.SetAsl(m_pUI->asl->text().toFloat());
|
||||
wellLR.SetBsl(m_pUI->bsl->text().toFloat());
|
||||
hd.earthEle=m_pUI->asl->text().toFloat();
|
||||
hd.dEle=m_pUI->bsl->text().toFloat();
|
||||
|
||||
// wellLR.SetBit1Prog(m_pUI->bit1->text().toStdString());
|
||||
// wellLR.SetBit2Prog(m_pUI->bit2->text().toStdString());
|
||||
// wellLR.SetBit3Prog(m_pUI->bit3->text().toStdString());
|
||||
// wellLR.SetBit4Prog(m_pUI->bit4->text().toStdString());
|
||||
// wellLR.SetBit5Prog(m_pUI->bit5->text().toStdString());
|
||||
wellLR.SetCWMethod(m_pUI->endMethod->text().toStdString());
|
||||
|
||||
// wellLR.SetCas1Prog(m_pUI->cas1->text().toStdString());
|
||||
// wellLR.SetCas2Prog(m_pUI->cas2->text().toStdString());
|
||||
// wellLR.SetCas3Prog(m_pUI->cas3->text().toStdString());
|
||||
// wellLR.SetCas4Prog(m_pUI->cas4->text().toStdString());
|
||||
// wellLR.SetCas5Prog(m_pUI->cas5->text().toStdString());
|
||||
wellLR.SetBit1Prog(m_pUI->bit1->text().toStdString());
|
||||
wellLR.SetBit2Prog(m_pUI->bit2->text().toStdString());
|
||||
wellLR.SetBit3Prog(m_pUI->bit3->text().toStdString());
|
||||
wellLR.SetBit4Prog(m_pUI->bit4->text().toStdString());
|
||||
wellLR.SetBit5Prog(m_pUI->bit5->text().toStdString());
|
||||
|
||||
// wellLR.SetCas1Shot(m_pUI->caseOneLength->text().toFloat());
|
||||
// wellLR.SetSC1SDep(m_pUI->caseOneSD->text().toFloat());
|
||||
// wellLR.SetSC1EDep(m_pUI->caseOneED->text().toFloat());
|
||||
wellLR.SetCas1Prog(m_pUI->cas1->text().toStdString());
|
||||
wellLR.SetCas2Prog(m_pUI->cas2->text().toStdString());
|
||||
wellLR.SetCas3Prog(m_pUI->cas3->text().toStdString());
|
||||
wellLR.SetCas4Prog(m_pUI->cas4->text().toStdString());
|
||||
wellLR.SetCas5Prog(m_pUI->cas5->text().toStdString());
|
||||
|
||||
// wellLR.SetCas2Shot(m_pUI->caseTwoLength->text().toFloat());
|
||||
// wellLR.SetSC2SDep(m_pUI->caseTwoSD->text().toFloat());
|
||||
// wellLR.SetSC2SDep(m_pUI->caseTwoED->text().toFloat());
|
||||
wellLR.SetCas1Shot(m_pUI->caseOneLength->text().toFloat());
|
||||
wellLR.SetSC1SDep(m_pUI->caseOneSD->text().toFloat());
|
||||
wellLR.SetSC1EDep(m_pUI->caseOneED->text().toFloat());
|
||||
|
||||
// wellLR.SetSDrillDate(m_pUI->startDrillDate->text().toStdString());
|
||||
// wellLR.SetEDrillDate(m_pUI->endDrillDate->text().toStdString());
|
||||
// wellLR.SetCompleteDate(m_pUI->endWellDate->text().toStdString());
|
||||
wellLR.SetCas2Shot(m_pUI->caseTwoLength->text().toFloat());
|
||||
wellLR.SetSC2SDep(m_pUI->caseTwoSD->text().toFloat());
|
||||
wellLR.SetSC2SDep(m_pUI->caseTwoED->text().toFloat());
|
||||
|
||||
wellLR.SetSDrillDate(m_pUI->startDrillDate->text().toStdString());
|
||||
wellLR.SetEDrillDate(m_pUI->endDrillDate->text().toStdString());
|
||||
wellLR.SetCompleteDate(m_pUI->endWellDate->text().toStdString());
|
||||
|
||||
|
||||
// QList<PaiObject*> wellroundchildren;
|
||||
// int count=pWell->GetAllWellRound(wellroundchildren);
|
||||
// for(int i=0;i<count;i++) {
|
||||
// CObjWelllogRound *pWellR=dynamic_cast<CObjWelllogRound *>(wellroundchildren.at(i));
|
||||
// if(pWellR) {
|
||||
// QString filename=pWellR->GetSlfFileName();
|
||||
// if(pWellR->GetName()!=""&&filename!="")
|
||||
// {
|
||||
// CLogIO a_cslfio;
|
||||
// if(a_cslfio.Open(filename.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
// {
|
||||
// Slf_FILE_MESSAGE &nmssage=wellLR.GetFileMessage();
|
||||
// QList<PaiObject*> wellroundchildren;
|
||||
// int count=pWell->GetAllWellRound(wellroundchildren);
|
||||
// for(int i=0;i<count;i++) {
|
||||
// CObjWelllogRound *pWellR=dynamic_cast<CObjWelllogRound *>(wellroundchildren.at(i));
|
||||
// if(pWellR) {
|
||||
// QString filename=pWellR->GetSlfFileName();
|
||||
// if(pWellR->GetName()!=""&&filename!="")
|
||||
// {
|
||||
// CLogIO a_cslfio;
|
||||
// if(a_cslfio.Open(filename.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
// {
|
||||
// Slf_FILE_MESSAGE &nmssage=wellLR.GetFileMessage();
|
||||
|
||||
// Slf_FILE_MESSAGE mssage;
|
||||
// a_cslfio.GetFileMessage(mssage);
|
||||
// strcpy(mssage.AreaName,nmssage.AreaName);
|
||||
// strcpy(mssage.OilCompanyName,nmssage.OilCompanyName);
|
||||
// mssage.TVD=nmssage.TVD;
|
||||
// mssage.Xcoor=nmssage.Xcoor;
|
||||
// mssage.Ycoor=nmssage.Ycoor;
|
||||
// mssage.X0=nmssage.X0;
|
||||
// mssage.Y0=nmssage.Y0;
|
||||
// mssage.Kelly=nmssage.Kelly;
|
||||
// mssage.azca=nmssage.azca;
|
||||
// mssage.Altitude=nmssage.Altitude;
|
||||
// Slf_FILE_MESSAGE mssage;
|
||||
// a_cslfio.GetFileMessage(mssage);
|
||||
// strcpy(mssage.AreaName,nmssage.AreaName);
|
||||
// strcpy(mssage.OilCompanyName,nmssage.OilCompanyName);
|
||||
// mssage.TVD=nmssage.TVD;
|
||||
// mssage.Xcoor=nmssage.Xcoor;
|
||||
// mssage.Ycoor=nmssage.Ycoor;
|
||||
// mssage.X0=nmssage.X0;
|
||||
// mssage.Y0=nmssage.Y0;
|
||||
// mssage.Kelly=nmssage.Kelly;
|
||||
// mssage.azca=nmssage.azca;
|
||||
// mssage.Altitude=nmssage.Altitude;
|
||||
|
||||
// mssage.StartDrillDate=nmssage.StartDrillDate;
|
||||
// mssage.EndDrillDate=nmssage.EndDrillDate;
|
||||
// mssage.StartDrillDate=nmssage.StartDrillDate;
|
||||
// mssage.EndDrillDate=nmssage.EndDrillDate;
|
||||
|
||||
// int len=strlen(filename.toStdString().c_str());
|
||||
// if(len>sizeof(mssage.WellName)) len=sizeof(mssage.WellName);
|
||||
// strncpy(mssage.WellName,welln.toStdString().c_str(),len);
|
||||
// mssage.WellName[len]=0;
|
||||
// a_cslfio.SetFileMessage(mssage);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// int len=strlen(filename.toStdString().c_str());
|
||||
// if(len>sizeof(mssage.WellName)) len=sizeof(mssage.WellName);
|
||||
// strncpy(mssage.WellName,welln.toStdString().c_str(),len);
|
||||
// mssage.WellName[len]=0;
|
||||
// a_cslfio.SetFileMessage(mssage);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(m_DialogType==1) {
|
||||
// QString path=GetLogdataPath();
|
||||
// CObjProject *pPrj=GetProject();
|
||||
// path+=pPrj->GetName();
|
||||
// path+="/#";
|
||||
// path+=pWell->GetName();
|
||||
// CreateDir((char *)path.toStdString().c_str());
|
||||
// path+="/";
|
||||
// path+=pWell->GetName()+".well";
|
||||
// pWell->SetWellFileName(path);
|
||||
// wellLR.SaveMeesge(path);
|
||||
// return;
|
||||
// }
|
||||
// else wellLR.SaveMeesge();
|
||||
// if(oldname==welln) return;
|
||||
// if(pOldWell) {
|
||||
// if(pOldWell&&pWell) {
|
||||
// if(pWell->isUsed()) {
|
||||
// AfxMessageBox("文件正被使用中,无法重名名!\n确认后等待进度条结束再操作!");
|
||||
// return;
|
||||
// }
|
||||
// CDataTree *pDataTree=(CDataTree *)::GetProject()->m_pDataTree;
|
||||
// QList<PaiObject*> wellroundchildren;
|
||||
// int count=pWell->GetAllWellRound(wellroundchildren);
|
||||
// QTreeWidgetItem *pOldwItem=GetTreeItem(pDataTree,pOldWell);
|
||||
// QTreeWidgetItem *pwItem=GetTreeItem(pDataTree,pWell);
|
||||
// RenameWellName(pOldWell,pWell);
|
||||
QStringList slffiles;
|
||||
chakan(path, slffiles, "*.slf");
|
||||
foreach(QString filename, slffiles )
|
||||
{
|
||||
CLogIO a_cslfio;
|
||||
if(a_cslfio.Open(filename.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
{
|
||||
Slf_FILE_MESSAGE &nmssage=wellLR.GetFileMessage();
|
||||
|
||||
// for(int i=0;i<count;i++) {
|
||||
// CObjWelllogRound *pWellR=dynamic_cast<CObjWelllogRound *>(wellroundchildren.at(i));
|
||||
// if(pWellR) {
|
||||
// QTreeWidgetItem *pItem=GetTreeItem(pDataTree,pWellR);
|
||||
// if(pItem&&pOldwItem) {
|
||||
// pwItem->removeChild(pItem);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(pwItem) {
|
||||
// CBaseObject *pBaseObject=(CBaseObject*)( pwItem->data(0,Qt::UserRole + 1).toLongLong() );
|
||||
// PaiObject * pObject =pBaseObject->GetPaiObject();
|
||||
// if(pObject->GetParent()) pObject->GetParent()->RemoveChild(pObject);
|
||||
// if(pwItem->parent()) pwItem->parent()->removeChild(pwItem);
|
||||
// std::vector<PaiObject*>vChild;
|
||||
// CPaiObjectHelper::RecursionGetAllChild(pObject,vChild );
|
||||
// foreach(PaiObject*pChild,vChild){
|
||||
// pDataTree->m_mapNodeItem.erase(dynamic_cast<CBaseObject*>(pChild)); //cache为了加速根据object查找item
|
||||
// }
|
||||
// delete pwItem ;
|
||||
// pwItem = NULL;
|
||||
// QAction* ImportConvertorWellLogDataAct= ::GetGlobalCommand().GetAction(GetCmdID_ImportConvertorWellLogData(),true) ;
|
||||
// ImportConvertorWellLogDataAct->setProperty("CurrentWellName","");
|
||||
// ImportConvertorWellLogDataAct->setProperty("CurrentWellRoundName","");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// if(pWell->isUsed()) {
|
||||
// AfxMessageBox("文件正被使用中,无法重名名!\n确认后等待进度条结束再操作!");
|
||||
// return;
|
||||
// }
|
||||
// pWell->SetName(welln);
|
||||
// RenameWellName(pWell,welln);
|
||||
// }
|
||||
Slf_FILE_MESSAGE mssage;
|
||||
a_cslfio.GetFileMessage(mssage);
|
||||
strcpy(mssage.AreaName,nmssage.AreaName);
|
||||
strcpy(mssage.OilCompanyName,nmssage.OilCompanyName);
|
||||
mssage.TVD=nmssage.TVD;
|
||||
mssage.Xcoor=nmssage.Xcoor;
|
||||
mssage.Ycoor=nmssage.Ycoor;
|
||||
mssage.X0=nmssage.X0;
|
||||
mssage.Y0=nmssage.Y0;
|
||||
mssage.Kelly=nmssage.Kelly;
|
||||
mssage.azca=nmssage.azca;
|
||||
mssage.Altitude=nmssage.Altitude;
|
||||
|
||||
mssage.StartDrillDate=nmssage.StartDrillDate;
|
||||
mssage.EndDrillDate=nmssage.EndDrillDate;
|
||||
|
||||
int len=strlen(filename.toStdString().c_str());
|
||||
if(len>sizeof(mssage.WellName)) len=sizeof(mssage.WellName);
|
||||
strncpy(mssage.WellName,welln.toStdString().c_str(),len);
|
||||
mssage.WellName[len]=0;
|
||||
a_cslfio.SetFileMessage(mssage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(m_DialogType==1) {
|
||||
QString path=GetLogdataPath();
|
||||
// CObjProject *pPrj=GetProject();
|
||||
// path+=pPrj->GetName();
|
||||
path+=pWell->GetPrjname();
|
||||
path+="/#";
|
||||
path+=pWell->GetName();
|
||||
CreateDir((char *)path.toStdString().c_str());
|
||||
path+="/";
|
||||
path+=pWell->GetName()+".well";
|
||||
pWell->SetWellFileName(path);
|
||||
wellLR.SaveMeesge(path);
|
||||
return;
|
||||
}
|
||||
else wellLR.SaveMeesge();
|
||||
if(oldname==welln) return;
|
||||
|
||||
if(pWell->isUsed()) {
|
||||
AfxMessageBox("文件正被使用中,无法重名名!\n确认后等待进度条结束再操作!");
|
||||
return;
|
||||
}
|
||||
pWell->SetName(welln);
|
||||
|
||||
QString newWellpath=GetLogdataPath();
|
||||
newWellpath+=pWell->GetPrjname();
|
||||
newWellpath+="/#";
|
||||
newWellpath+=welln;
|
||||
QDir ss;
|
||||
if(ss.rename(path,newWellpath))//改目录名
|
||||
{
|
||||
QString oldPath = newWellpath + "/" + oldname + ".well";
|
||||
QString newPath = newWellpath + "/" + welln + ".well";
|
||||
if(ss.rename(oldPath,newPath))
|
||||
{
|
||||
SetWellRoundWellName(newPath, welln);
|
||||
|
||||
QStringList slffiles;
|
||||
chakan(newWellpath, slffiles, "*.slf");
|
||||
foreach(QString slfFile1, slffiles )
|
||||
{
|
||||
SetWellRoundWellName(slfFile1, welln);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(NULL,"提示","改目文件名不成功:\n"+oldPath+"\n 到 \n"+newWellpath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(NULL,"提示","改目录名不成功:\n"+path+"\n 到 \n"+newWellpath);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// if(pOldWell) {
|
||||
// if(pOldWell&&pWell) {
|
||||
// if(pWell->isUsed()) {
|
||||
// AfxMessageBox("文件正被使用中,无法重名名!\n确认后等待进度条结束再操作!");
|
||||
// return;
|
||||
// }
|
||||
// CDataTree *pDataTree=(CDataTree *)::GetProject()->m_pDataTree;
|
||||
// QList<PaiObject*> wellroundchildren;
|
||||
// int count=pWell->GetAllWellRound(wellroundchildren);
|
||||
// QTreeWidgetItem *pOldwItem=GetTreeItem(pDataTree,pOldWell);
|
||||
// QTreeWidgetItem *pwItem=GetTreeItem(pDataTree,pWell);
|
||||
// RenameWellName(pOldWell,pWell);
|
||||
|
||||
// for(int i=0;i<count;i++) {
|
||||
// CObjWelllogRound *pWellR=dynamic_cast<CObjWelllogRound *>(wellroundchildren.at(i));
|
||||
// if(pWellR) {
|
||||
// QTreeWidgetItem *pItem=GetTreeItem(pDataTree,pWellR);
|
||||
// if(pItem&&pOldwItem) {
|
||||
// pwItem->removeChild(pItem);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(pwItem) {
|
||||
// CBaseObject *pBaseObject=(CBaseObject*)( pwItem->data(0,Qt::UserRole + 1).toLongLong() );
|
||||
// PaiObject * pObject =pBaseObject->GetPaiObject();
|
||||
// if(pObject->GetParent()) pObject->GetParent()->RemoveChild(pObject);
|
||||
// if(pwItem->parent()) pwItem->parent()->removeChild(pwItem);
|
||||
// std::vector<PaiObject*>vChild;
|
||||
// CPaiObjectHelper::RecursionGetAllChild(pObject,vChild );
|
||||
// foreach(PaiObject*pChild,vChild){
|
||||
// pDataTree->m_mapNodeItem.erase(dynamic_cast<CBaseObject*>(pChild)); //cache为了加速根据object查找item
|
||||
// }
|
||||
// delete pwItem ;
|
||||
// pwItem = NULL;
|
||||
// QAction* ImportConvertorWellLogDataAct= ::GetGlobalCommand().GetAction(GetCmdID_ImportConvertorWellLogData(),true) ;
|
||||
// ImportConvertorWellLogDataAct->setProperty("CurrentWellName","");
|
||||
// ImportConvertorWellLogDataAct->setProperty("CurrentWellRoundName","");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// if(pWell->isUsed()) {
|
||||
// AfxMessageBox("文件正被使用中,无法重名名!\n确认后等待进度条结束再操作!");
|
||||
// return;
|
||||
// }
|
||||
// pWell->SetName(welln);
|
||||
// RenameWellName(pWell,welln);
|
||||
// }
|
||||
// // CDataImport::ChangetoSlf(wellLR.GetFileName().toStdString().c_str(),NULL);
|
||||
}
|
||||
CWellDialog::~CWellDialog()
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ void WellLogDialog::GetOKAndCancel(QPushButton* &okBtn,QPushButton* &cancelBtn)
|
|||
void WellLogDialog::DataToView(){}
|
||||
void WellLogDialog::ViewToData(){}
|
||||
|
||||
void WellLogDialog::Init()
|
||||
void WellLogDialog::Init(CObjWell* pObject)
|
||||
{
|
||||
QPushButton* okBtn;
|
||||
QPushButton* cancelBtn;
|
||||
|
|
@ -184,7 +184,7 @@ void WellLogDialog::Init()
|
|||
cancelBtn->setIcon(QIcon( ::GetImagePath() + "icon/Cancel.png"));
|
||||
QObject::connect(okBtn, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||
QObject::connect(cancelBtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
|
||||
|
||||
m_pObject = pObject;
|
||||
DataToView();
|
||||
}
|
||||
int WellLogDialog::Validate()
|
||||
|
|
|
|||
2098
logPlus/DataImport.cpp
Normal file
2098
logPlus/DataImport.cpp
Normal file
File diff suppressed because it is too large
Load Diff
73
logPlus/DataImport.h
Normal file
73
logPlus/DataImport.h
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#ifndef PAI_FRAME_COSGDataImport_H
|
||||
#define PAI_FRAME_COSGDataImport_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QFileDialog>
|
||||
// #include "OSGWindowShared.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
// #include "VecSceneManager.h"
|
||||
//#include "ConvertorManager.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "ConvertorManager.h"
|
||||
#pragma warning( pop )
|
||||
|
||||
// class QUuid;
|
||||
// class QString;
|
||||
// using namespace pai::datamodel;
|
||||
|
||||
// BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
// class ConvertorManager;
|
||||
// class CVecWindow;
|
||||
// class CTestDialog;
|
||||
// class CCompositeWindow;
|
||||
|
||||
// void /*OSGWINDOWSHARED_EXPORT*/ slotImportSingleWellLogData(CVecViewCommand &viewCommand,QUuid /*e*/,bool bShow);
|
||||
|
||||
class /*OSGWINDOWSHARED_EXPORT*/ CDataImport
|
||||
{
|
||||
public:
|
||||
static bool m_bImportByFolder;
|
||||
|
||||
// //把Well 加入到OSGSceneManager
|
||||
// static void AddWellNode( CVecSceneManager *pSceneManager,CObjWell *pWell,CObjWell *pWellInsertPos );
|
||||
|
||||
// //把Well log 加入到OSGSceneManager
|
||||
// static void AddWellLogNode( CVecSceneManager *pSceneManager,CObjWellLog *pWellLog,CObjWellLog *pWellLogInsertPos );
|
||||
static void ImporttoTree(QString slfFileName,CLogIO *logio,CObjWell *pWell,CObjWelllogRound* pWelllogRound,char *curvename);
|
||||
|
||||
//import well path object to project
|
||||
static QList<CObjWell *> ImportWellTrajectorys(bool IsDir);
|
||||
|
||||
//import bitmap object to project
|
||||
static void ImportBitmaps();
|
||||
|
||||
static QList<CObjWell *> CDataImport::ImportWells(QString path,QStringList &wellfs,int *pNum=NULL,bool IsTran=true);
|
||||
static QList<CObjWell *> CDataImport::ImportWells(QString path,QStringList &wellfs,char *pSuffix,int *pNum=NULL,bool IsTran=true);
|
||||
|
||||
//import core image to project
|
||||
static void ImportCoreImage();
|
||||
static void LoadLayers(QStringList &listFiles);
|
||||
|
||||
//根据well name查找或新建一Well
|
||||
static CObjWell * GetWellByName( QString strWellName );
|
||||
static void ImportConvertorWellLogFiles(QString wellname="",QString wellroundname="");
|
||||
static void ImportGeoStraData();
|
||||
static void OutPutGeoStraData();
|
||||
static void ImportWellXYCoordinate();
|
||||
static void OutPutWellXYCoordinate();
|
||||
|
||||
static int chakan(QList<CObjWell *> &wells,QString path,QStringList &wellfs,int &num,bool GetNum=false,DiDepthProgress *DepthProgress=NULL,char *pSuffix=NULL);
|
||||
static QStringList GetFileNames(const QString &caption = QString(), const QString &filter = QString(),QFileDialog::FileMode filemode=QFileDialog::ExistingFiles);
|
||||
static CObjWell *ChangetoSlf(QString wellFile,DiDepthProgress *DepthProgress=NULL);
|
||||
//whp change 2019.12.12
|
||||
static QString ConvertorWellLogFiles(ConvertorManager &pManager,QString wellname,DiDepthProgress *DepthProgress=NULL);
|
||||
static int flag1;
|
||||
static int flag_check;
|
||||
static int m_flag;
|
||||
//whp add 2020.2.28 for 检查井名文件名是否存在,若存在,获取井次全路径文件名
|
||||
static QString CDataImport::GetOutName(QString wellname,QString filename);
|
||||
static CObjWell *ChangetoSlf(QString wellFile1,DiDepthProgress *pDepthProgress,bool IsTran);
|
||||
};
|
||||
|
||||
// END_OSGGRAPHICS_NAMESPACE
|
||||
#endif
|
||||
|
|
@ -32,6 +32,7 @@ SOURCES += \
|
|||
CStringType.cpp \
|
||||
ConsoleOutputWidget.cpp \
|
||||
CurveLine.cpp \
|
||||
DataImport.cpp \
|
||||
DepPairs.cpp \
|
||||
DrawNrad.cpp \
|
||||
DrawTvd.cpp \
|
||||
|
|
@ -84,6 +85,7 @@ SOURCES += \
|
|||
qtcommonclass.cpp \
|
||||
qtprojectwidgets.cpp \
|
||||
selectwelldialog.cpp \
|
||||
tishidialog.cpp \
|
||||
totalTitleBar.cpp \
|
||||
transparentdraggableGuan.cpp \
|
||||
transparentdraggableRightList.cpp \
|
||||
|
|
@ -98,6 +100,7 @@ HEADERS += \
|
|||
CStringType.h \
|
||||
ConsoleOutputWidget.h \
|
||||
CurveLine.h \
|
||||
DataImport.h \
|
||||
DepPairs.h \
|
||||
DraggablePixmap.h \
|
||||
DrawNrad.h \
|
||||
|
|
@ -150,6 +153,7 @@ HEADERS += \
|
|||
qtcommonclass.h \
|
||||
qtprojectwidgets.h \
|
||||
selectwelldialog.h \
|
||||
tishidialog.h \
|
||||
totalTitleBar.h \
|
||||
transparentdraggableGuan.h \
|
||||
transparentdraggableRightList.h \
|
||||
|
|
@ -175,7 +179,8 @@ FORMS += \
|
|||
mainwindowsplitter.ui \
|
||||
newheaddialog.ui \
|
||||
qtprojectwidgets.ui \
|
||||
selectwelldialog.ui
|
||||
selectwelldialog.ui \
|
||||
tishidialog.ui
|
||||
|
||||
INCLUDEPATH += ../include/ \
|
||||
../CallManage \
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@
|
|||
#include "ImportdataDialog.h"
|
||||
#include "CDataOutput.h"
|
||||
#include "DataManagger.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include "DataImport.h"
|
||||
|
||||
extern QString g_prjname;
|
||||
extern void AppendConsole(Priority priority, const QString &output);
|
||||
|
|
@ -371,6 +373,7 @@ void QtProjectWidgets::loadIndexSysTree(QTreeWidgetItem *parent, QString fileFul
|
|||
itemIndex->setData(0, Qt::UserRole, "wellname"); // 存储额外数据,如ID
|
||||
itemIndex->setData(0, Qt::UserRole + 1, wellFile1); // 存储额外数据,项目名
|
||||
itemIndex->setData(0, Qt::UserRole + 2, wellname); // 存储额外数据,井名
|
||||
itemIndex->setData(0, Qt::UserRole + 3, wellname); // 存储额外数据,井名 QMyTreeWidget::closeEditor里判断是否修改
|
||||
//
|
||||
QIcon icon;
|
||||
icon.addPixmap(QPixmap(GetImagePath() + "well.png"), QIcon::Selected);
|
||||
|
|
@ -479,6 +482,7 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
|||
itemwell->setText(0, wellname);
|
||||
itemwell->setData(0, Qt::UserRole, "wellItem"); // 存储额外数据,如ID
|
||||
itemwell->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,slf文件路径
|
||||
itemwell->setData(0, Qt::UserRole + 3, wellname); // 存储额外数据,表井次名
|
||||
//
|
||||
QIcon iconwell;
|
||||
iconwell.addPixmap(QPixmap(GetImagePath() + "icon/WellRound.png"), QIcon::Selected);
|
||||
|
|
@ -744,7 +748,12 @@ void QtProjectWidgets::initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
|||
//初始化根节点(项目名称)-右键菜单
|
||||
void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||
{
|
||||
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||
QAction* action_New = new QAction("按目录导入测井数据", treeWidget);
|
||||
action_New->setIcon(QIcon(GetImagePath() + "AddFolder.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportFolder()));
|
||||
menu->addAction(action_New);
|
||||
|
||||
action_New = new QAction("数据导入", treeWidget);
|
||||
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||
menu->addAction(action_New);
|
||||
|
|
@ -1043,7 +1052,7 @@ void QtProjectWidgets::s_NewProject()
|
|||
|
||||
// 创建对话框
|
||||
CWellLogProjectDialog* dialog = new CWellLogProjectDialog();
|
||||
dialog->Init();
|
||||
dialog->Init(NULL);
|
||||
int result = dialog->exec();//对话框
|
||||
if (result == QDialog::Accepted) {
|
||||
// 处理用户点击了确定按钮的逻辑
|
||||
|
|
@ -1795,25 +1804,48 @@ void QtProjectWidgets::onEditWelllogRound()
|
|||
{
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
|
||||
QString strTreeTag = wellItem->data(0, Qt::UserRole + 1).toString();
|
||||
QString strWellFile = wellItem->data(0, Qt::UserRole + 1).toString();
|
||||
|
||||
//WellLogDialog* wdia = new WellLogDialog();
|
||||
//CWellLogRoundDialog* wdia = new CWellLogRoundDialog();
|
||||
MyWelllogRound WelllogRound;
|
||||
WelllogRound.LoadMeesge(strTreeTag);
|
||||
WelllogRound.LoadMeesge(strWellFile);
|
||||
CWellDialog* wdia = new CWellDialog();
|
||||
CObjWell* pWell = new CObjWell;
|
||||
pWell->SetWellFileName(strWellFile);
|
||||
QString oldWellName = wellItem->text(0);
|
||||
pWell->SetName(wellItem->text(0));
|
||||
pWell->SetPrjname(g_prjname);
|
||||
wdia->wellLR = WelllogRound;
|
||||
wdia->Init();
|
||||
wdia->Init(pWell);
|
||||
if ( wdia->exec() == QDialog::Accepted )
|
||||
{
|
||||
// if(strWelllogRoundName != "")
|
||||
// {
|
||||
// pWelllogRound->setObjectName(strWelllogRoundName);
|
||||
// }
|
||||
QMessageBox::information(this,"2",strTreeTag);
|
||||
QString newWellName = pWell->GetName();
|
||||
if (newWellName != oldWellName)
|
||||
{
|
||||
QString strProjectFolder = GetProjectFolder();
|
||||
QString strProjectFile = strProjectFolder + g_prjname;
|
||||
strProjectFile += ".wwl";
|
||||
s_OpenProject(strProjectFile);
|
||||
}
|
||||
}
|
||||
|
||||
//QMessageBox::information(this,"1",strTreeTag);
|
||||
//QMessageBox::information(this,"1",strWellFile);
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportFolder()
|
||||
{
|
||||
CDataImport::ImportWellTrajectorys(1);
|
||||
|
||||
QString strProjectFolder = GetProjectFolder();
|
||||
QString strProjectFile = strProjectFolder + g_prjname;
|
||||
strProjectFile += ".wwl";
|
||||
s_OpenProject(strProjectFile);
|
||||
return;
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportSingleWellLogData()
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public slots:
|
|||
void onSlfbackup(); //备份井次
|
||||
void onCutSlf(); //剪切井次
|
||||
void onEditWelllogRound();
|
||||
void onImportFolder(); //按目录导入测井数据
|
||||
void onImportSingleWellLogData();
|
||||
void onImportSlfTable();
|
||||
void onOutWellLogRound();
|
||||
|
|
|
|||
55
logPlus/tishidialog.cpp
Normal file
55
logPlus/tishidialog.cpp
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#include "tishidialog.h"
|
||||
|
||||
TiShiDialog::TiShiDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
m_pUI.setupUi(this);
|
||||
QObject::connect(m_pUI.pushButtonTH, SIGNAL(clicked()), this, SLOT(slotTH()));
|
||||
QObject::connect(m_pUI.pushButtonHB, SIGNAL(clicked()), this, SLOT(slotHB()));
|
||||
QObject::connect(m_pUI.pushButtonLC, SIGNAL(clicked()), this, SLOT(slotLC()));
|
||||
QObject::connect(m_pUI.pushButtonTG, SIGNAL(clicked()), this, SLOT(slotTG()));
|
||||
QObject::connect(m_pUI.checkBox, SIGNAL(clicked()), this, SLOT(slotCheck()));
|
||||
check=0;
|
||||
m_pUI.checkBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
void TiShiDialog::slotCheck()
|
||||
{
|
||||
if(m_pUI.checkBox->checkState()==Qt::Unchecked)check=0;
|
||||
else check=1;
|
||||
}
|
||||
TiShiDialog::~TiShiDialog()
|
||||
{
|
||||
|
||||
}
|
||||
void TiShiDialog::slotTH()
|
||||
{
|
||||
flag=1;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotHB()
|
||||
{
|
||||
flag=2;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotLC()
|
||||
{
|
||||
flag=3;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotTG()
|
||||
{
|
||||
flag=0;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::init(std::vector<char*> OutCurve,QString qss)
|
||||
{
|
||||
for(int i=0;i<OutCurve.size();i++)
|
||||
{
|
||||
m_pUI.textEdit_2->append(QString(OutCurve[i]));
|
||||
}
|
||||
m_pUI.label->setText(qss+"井次中下列数据已存在");
|
||||
}
|
||||
28
logPlus/tishidialog.h
Normal file
28
logPlus/tishidialog.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef TISHIDIALOG_H
|
||||
#define TISHIDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_tishidialog.h"
|
||||
#include <vector>
|
||||
#pragma execution_character_set("utf-8")
|
||||
class TiShiDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TiShiDialog(QWidget *parent = 0);
|
||||
~TiShiDialog();
|
||||
void init(std::vector<char*> OutCurve,QString);
|
||||
int flag;
|
||||
int check;
|
||||
private:
|
||||
Ui::TiShiDialog m_pUI;
|
||||
private slots:
|
||||
void slotTH();
|
||||
void slotHB();
|
||||
void slotLC();
|
||||
void slotTG();
|
||||
void slotCheck();
|
||||
};
|
||||
|
||||
#endif // TISHIDIALOG_H
|
||||
180
logPlus/tishidialog.ui
Normal file
180
logPlus/tishidialog.ui
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TiShiDialog</class>
|
||||
<widget class="QDialog" name="TiShiDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>382</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TiShiDialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>当前井次中下列数据已存在</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>后面所有井均执行此操作</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTH">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>替换</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonHB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>合并</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonLC">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>另存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTG">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>跳过</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -146,8 +146,7 @@ int CLisConvertor::ScanLogFile(char *FileName,char *Message,char **CurveName,ch
|
|||
int pos1=GetBeginPosit(FileName,szTemp);
|
||||
mWellDynamicInfo=&WellDynamicInfo;
|
||||
if((fp=fopen(FileName,"rb"))==NULL) {
|
||||
strcpy(szTemp, "Open Not File:");
|
||||
MessageBox(NULL,FileName,szTemp,MB_OK);
|
||||
QMessageBox::information(NULL,FileName,"Open Not File:",QMessageBox::Ok);
|
||||
return 0;
|
||||
}
|
||||
char path[256];
|
||||
|
|
@ -736,11 +735,9 @@ bool CLisConvertor::Transfer(char *FileName,char *outfile,int *OutCurveNo,char *
|
|||
int maxcurv=100;
|
||||
// format spcification number
|
||||
int nfmsp=0 ,nfrmob;
|
||||
|
||||
char szTemp[128];
|
||||
strcpy(szTemp, "Open Not File:");
|
||||
|
||||
if((fp=fopen(FileName,"rb")) == NULL) {
|
||||
MessageBox(NULL,FileName,szTemp,MB_OK);
|
||||
QMessageBox::information(NULL,FileName,"Open Not File:",QMessageBox::Ok);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,17 @@ INCLUDEPATH += $(OSGHOME)/include \
|
|||
../../../Slfio/include\
|
||||
../../../ConvertorManager/include\
|
||||
../../../OSGDataModel/include\
|
||||
../../../Workflow/include\
|
||||
../../../Workflow/WFCrystal/Crystal/include\
|
||||
../../../Workflow/WFCrystal/Plugin/include\
|
||||
../../../Workflow/WFCrystal/SysUtility/utils/include\
|
||||
../../../Workflow/WFEngine/IOService/include\
|
||||
../../../Workflow/WFEngine/Module/include\
|
||||
../../../Workflow/WFEngine/Component/WorkflowWidget/include\
|
||||
../../../Workflow/WFEngine/ObjectModel/ObjectModel/include\
|
||||
../../../Workflow/WFEngine/WorkflowEngine/include\
|
||||
../../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include\
|
||||
../../../Workflow/WFWidget/include\
|
||||
./GeneratedFiles
|
||||
|
||||
#include(../../OSGDataModel/paiobjectmodel.libinfo)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,17 @@ INCLUDEPATH += $(OSGHOME)/include \
|
|||
../../../Slfio/include\
|
||||
../../../ConvertorManager/include\
|
||||
../../../OSGDataModel/include\
|
||||
../../../Workflow/include\
|
||||
../../../Workflow/WFCrystal/Crystal/include\
|
||||
../../../Workflow/WFCrystal/Plugin/include\
|
||||
../../../Workflow/WFCrystal/SysUtility/utils/include\
|
||||
../../../Workflow/WFEngine/IOService/include\
|
||||
../../../Workflow/WFEngine/Module/include\
|
||||
../../../Workflow/WFEngine/Component/WorkflowWidget/include\
|
||||
../../../Workflow/WFEngine/ObjectModel/ObjectModel/include\
|
||||
../../../Workflow/WFEngine/WorkflowEngine/include\
|
||||
../../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include\
|
||||
../../../Workflow/WFWidget/include\
|
||||
./GeneratedFiles
|
||||
|
||||
#include(../../OSGDataModel/paiobjectmodel.libinfo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user