Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
# Conflicts: # logPlus/mainwindowcurve.h
This commit is contained in:
commit
e024658d35
|
|
@ -151,11 +151,23 @@ signals:
|
|||
//校深线段
|
||||
void sig_AddShifLineToPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight);
|
||||
|
||||
//右键--清除当前分段线
|
||||
void sig_DelSelectShiftLine(QString strUuid);
|
||||
//清除当前分段线
|
||||
void sig_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//右键--清除全部分段线
|
||||
void sig_DelAllShiftLine(QString strUuid);
|
||||
//清除全部分段线
|
||||
void sig_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//执行校正
|
||||
void sig_RuncorFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
void sig_Runcor_List(QString strUuid, QList<double> left_Low_List, QList<double> right_Hight_List);
|
||||
|
||||
//Plot重新加载数据
|
||||
void sig_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
|
||||
|
||||
//
|
||||
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ QString GetProjectFolder()
|
|||
}
|
||||
//
|
||||
QString strProjectDir;
|
||||
strProjectDir = applicationDirPath.mid(0,index+1) + "/project/";
|
||||
strProjectDir = applicationDirPath.mid(0,index+1) + "project/";
|
||||
//
|
||||
QDir dir(strProjectDir);
|
||||
if( !dir.exists( strProjectDir ) )
|
||||
|
|
@ -120,7 +120,7 @@ QString GetLogdataPath()
|
|||
}
|
||||
//
|
||||
QString strImagePath;
|
||||
strImagePath = applicationDirPath.mid(0,index+1) + "/Logdata/";
|
||||
strImagePath = applicationDirPath.mid(0,index+1) + "Logdata/";
|
||||
//
|
||||
QDir dir(strImagePath);
|
||||
if( !dir.exists( strImagePath ) )
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ void TransparentDraggableLine::setTitle(QString strTitle)
|
|||
// 设置矩形范围
|
||||
void TransparentDraggableLine::setRange(double left_Low, double right_Hight)
|
||||
{
|
||||
m_left_Low = left_Low;
|
||||
m_right_Hight = right_Hight;
|
||||
|
||||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ private slots:
|
|||
void onMouseMove(QMouseEvent *event);
|
||||
void onMouseRelease(QMouseEvent *event);
|
||||
|
||||
private:
|
||||
public:
|
||||
QMyCustomPlot *mPlot;
|
||||
|
||||
QCPItemLine *qcpItemLine;
|
||||
|
|
|
|||
|
|
@ -121,9 +121,14 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString)));
|
||||
//右键--添加分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddShiftLine(QString, double, double)), this, SLOT(s_AddShiftLine(QString, double, double)));
|
||||
//右键--清除当前分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_DelSelectShiftLine(QString)), this, SLOT(s_DelSelectShiftLine(QString)));
|
||||
//右键--清除全部分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_DelAllShiftLine(QString)), this, SLOT(s_DelAllShiftLine(QString)));
|
||||
|
||||
//执行校正
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Runcor_List(QString, QList<double>, QList<double>)), this, SLOT(s_Runcor_List(QString, QList<double>, QList<double>)));
|
||||
|
||||
//图头
|
||||
m_dock1=new QDockWidget(tr(""),this);
|
||||
m_dock1->setFeatures(QDockWidget::NoDockWidgetFeatures);//QDockWidget::DockWidgetMovable
|
||||
|
|
@ -497,7 +502,7 @@ void MainWindowCurve::initToolBar_2()
|
|||
connect(m_CorrectionAc, &QAction::triggered, this, &MainWindowCurve::s_Correction);
|
||||
// connect(m_ShiftotherAc, &QAction::triggered, this, &MainWindowCurve::s_Shiftother);
|
||||
connect(m_autocorAc, &QAction::triggered, this, &MainWindowCurve::s_autocor);
|
||||
// connect(m_runcorAc, &QAction::triggered, this, &MainWindowCurve::s_runcor);
|
||||
connect(m_runcorAc, &QAction::triggered, this, &MainWindowCurve::s_runcor);
|
||||
connect(m_ClearAllSetCurveAc, &QAction::triggered, this, &MainWindowCurve::s_ClearAllSetCurve);
|
||||
connect(m_ClearSetCurveAc, &QAction::triggered, this, &MainWindowCurve::s_ClearSetCurve);
|
||||
|
||||
|
|
@ -560,15 +565,10 @@ void MainWindowCurve::ApplyShiftDepth(QString strSlfName, QString strLineName, d
|
|||
logio->CorrectObjectDepth(curveindex, DepthOffset);
|
||||
isok=1;
|
||||
}
|
||||
// Slf_CURVE acurveinfo;
|
||||
// logio->GetCurveInfo(curveindex,&acurveinfo);
|
||||
delete logio;
|
||||
|
||||
//DepthOffset = 0;
|
||||
// if(isRun&&isok) {
|
||||
// isLoad=false;
|
||||
// LoadFromSLF();
|
||||
// }
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, strSlfName, strLineName);
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_Shift()
|
||||
|
|
@ -651,10 +651,9 @@ void MainWindowCurve::MoveShift(QString strSlfName, QString strLineName, float s
|
|||
WriteShiftMessage(*logio,szBuffer,strLineName);
|
||||
logio->CorrectObjectDepth(curveindex,delta);
|
||||
delete logio;
|
||||
// if(isRun) {
|
||||
// isLoad=false;
|
||||
// LoadFromSLF();
|
||||
// }
|
||||
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, strSlfName, strLineName);
|
||||
return;
|
||||
}
|
||||
curveindex=logio->OpenChannel(strLineName.toStdString().c_str());
|
||||
|
|
@ -685,10 +684,9 @@ void MainWindowCurve::MoveShift(QString strSlfName, QString strLineName, float s
|
|||
}
|
||||
}
|
||||
delete logio;
|
||||
// if(isRun) {
|
||||
// isLoad=false;
|
||||
// LoadFromSLF();
|
||||
// }
|
||||
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, strSlfName, strLineName);
|
||||
}
|
||||
|
||||
void MainWindowCurve::slotRun()
|
||||
|
|
@ -1066,6 +1064,38 @@ void MainWindowCurve::s_AddShiftLine(QString strUuid, double left_Low, double ri
|
|||
emit CallManage::getInstance()->sig_AddShifLineToPlot(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName, left_Low, right_Hight);
|
||||
}
|
||||
|
||||
//右键--清除当前分段线
|
||||
void MainWindowCurve::s_DelSelectShiftLine(QString strUuid)
|
||||
{
|
||||
if(strUuid != m_strUuid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择标准曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
// //当前有主校曲线
|
||||
// if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// QMessageBox::warning(this, "提示", "请先选择校正曲线!");
|
||||
// return;
|
||||
// }
|
||||
|
||||
//通知界面,清除当前分段线
|
||||
emit CallManage::getInstance()->sig_DelSelectShiftLineFromPlot(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName);
|
||||
}
|
||||
|
||||
//右键--清除全部分段线
|
||||
void MainWindowCurve::s_DelAllShiftLine(QString strUuid)
|
||||
{
|
||||
|
|
@ -1094,7 +1124,7 @@ void MainWindowCurve::s_DelAllShiftLine(QString strUuid)
|
|||
// return;
|
||||
// }
|
||||
|
||||
//通知界面,增加一条校深线段
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLineFromPlot(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName);
|
||||
}
|
||||
|
||||
|
|
@ -1239,6 +1269,200 @@ void MainWindowCurve::s_autocor()
|
|||
}
|
||||
}
|
||||
|
||||
//执行校正
|
||||
void MainWindowCurve::s_runcor()
|
||||
{
|
||||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择标准曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有主校曲线
|
||||
if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择校正曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
//通知界面,执行校正
|
||||
emit CallManage::getInstance()->sig_RuncorFromPlot(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName);
|
||||
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_Runcor_List(QString strUuid, QList<double> left_Low_List, QList<double> right_Hight_List)
|
||||
{
|
||||
if(strUuid != m_strUuid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择标准曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有主校曲线
|
||||
if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择校正曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
m_mergeLineList.clear();
|
||||
//
|
||||
int itemCount =left_Low_List.size();
|
||||
int m_nDepPairsNum=itemCount;
|
||||
QList<SelectTableItem> ShiftCurvesAll;
|
||||
ShiftCurvesAll.append(m_RightCurve);
|
||||
ShiftCurvesAll.append(m_ShiftCurves);
|
||||
if(ShiftCurvesAll.size()<1) return;
|
||||
|
||||
//
|
||||
for(int i=0;i<itemCount;i++)
|
||||
{
|
||||
CurveLine * pLine = new CurveLine();
|
||||
pLine->SetLeftDepth(left_Low_List[i]);
|
||||
pLine->SetRightDepth(right_Hight_List[i]);
|
||||
m_mergeLineList.append(pLine);
|
||||
}
|
||||
qsort(m_mergeLineList,0,m_mergeLineList.size()-1,0);
|
||||
|
||||
if(itemCount==1) {
|
||||
int flag = QMessageBox::information(NULL,"确认","确认要执行深度平移校正吗?",QMessageBox::Yes,QMessageBox::No);
|
||||
if(flag==QMessageBox::No) return;
|
||||
|
||||
float m_MoveDep=m_mergeLineList[0]->GetLeftDepth()-m_mergeLineList[0]->GetRightDepth();
|
||||
for(int i=0;i<ShiftCurvesAll.size();i++) {
|
||||
SelectTableItem plog2=ShiftCurvesAll[i];
|
||||
QString Filename1=plog2.m_strSlfName;
|
||||
CMemRdWt mem;
|
||||
if(mem.Open(Filename1.toStdString().c_str())) {
|
||||
QString curve=ShiftCurvesAll[i].m_strLineName;
|
||||
int iIndex=mem.FindObjectName((char *)curve.toStdString().c_str());
|
||||
if (iIndex >= 0)
|
||||
{
|
||||
CString szBuffer="";
|
||||
szBuffer=QString::number(m_MoveDep,'f',3)+"\r\n";
|
||||
WriteShiftMessage(mem,szBuffer,curve);
|
||||
mem.CorrectObjectDepth(iIndex,m_MoveDep);
|
||||
mem.Close();
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, Filename1, curve);
|
||||
}
|
||||
else {
|
||||
mem.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if(itemCount==3) {
|
||||
QMessageBox box(QMessageBox::Warning,"确认","选择校深方式:");
|
||||
box.setStandardButtons (QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel);
|
||||
box.setButtonText(QMessageBox::Yes,QString("压缩拉伸"));
|
||||
box.setButtonText (QMessageBox::No,QString("平移"));
|
||||
box.setButtonText (QMessageBox::Cancel,QString("放弃"));
|
||||
int ret=box.exec();
|
||||
if(ret==QMessageBox::Cancel) return;
|
||||
if(ret==QMessageBox::No) {
|
||||
float sdep=m_mergeLineList[0]->GetLeftDepth();
|
||||
float edep=m_mergeLineList[2]->GetLeftDepth();
|
||||
float m_MoveDep=m_mergeLineList[1]->GetLeftDepth()-m_mergeLineList[1]->GetRightDepth();
|
||||
for(int i=0;i<ShiftCurvesAll.size();i++) {
|
||||
SelectTableItem plog2=ShiftCurvesAll[i];
|
||||
QString Filename1=plog2.m_strSlfName;
|
||||
CMemRdWt mem;
|
||||
if(mem.Open(Filename1.toStdString().c_str())) {
|
||||
QString curve=ShiftCurvesAll[i].m_strLineName;
|
||||
int iIndex=mem.OpenChannel(curve.toStdString().c_str());
|
||||
if (iIndex >= 0)
|
||||
{
|
||||
Slf_CHANNEL mc;
|
||||
mem.GetChannelInfo(iIndex,&mc);
|
||||
if(m_MoveDep) {
|
||||
CString szBuffer="";
|
||||
szBuffer.Format("%10.3f %10.3f %10.3f\r\n",sdep,edep,m_MoveDep);
|
||||
WriteShiftMessage(mem,szBuffer,curve);
|
||||
}
|
||||
}
|
||||
mem.Close();
|
||||
|
||||
//单条曲线校深
|
||||
MoveShift(Filename1, curve, sdep, edep, m_MoveDep);
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, Filename1, curve);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(m_nDepPairsNum<1)
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "无校正深度线或深度移动量!");
|
||||
return;
|
||||
}
|
||||
int flag = QMessageBox::information(NULL,"确认","确认要执行深度校正吗?",QMessageBox::Yes,QMessageBox::No);
|
||||
if(flag != QMessageBox::Yes) return;
|
||||
}
|
||||
|
||||
float m_MoveDep=0;
|
||||
CString szBuffer="";
|
||||
if(m_nDepPairsNum>0) {
|
||||
CString szBuffer1="";
|
||||
for(int i=0;i<m_nDepPairsNum;i++)
|
||||
{
|
||||
float sdep=m_mergeLineList[i]->GetLeftDepth();
|
||||
float edep=m_mergeLineList[i]->GetRightDepth()+m_MoveDep;
|
||||
szBuffer1.Format("%g %g\r\n",sdep,edep);
|
||||
szBuffer+=szBuffer1;
|
||||
}
|
||||
}
|
||||
else if(m_MoveDep) {
|
||||
szBuffer=QString::number(-m_MoveDep,'f',3)+"\r\n";
|
||||
}
|
||||
for(int i=0;i<ShiftCurvesAll.size();i++) {
|
||||
SelectTableItem plog2=ShiftCurvesAll[i];
|
||||
QString curve=plog2.m_strLineName;
|
||||
QString Filename1=plog2.m_strSlfName;
|
||||
CMemRdWt mem;
|
||||
if(mem.Open(Filename1.toStdString().c_str()))
|
||||
{
|
||||
int iIndex=mem.FindObjectName((char *)curve.toStdString().c_str());
|
||||
if (iIndex >= 0) {
|
||||
WriteShiftMessage(mem,szBuffer,curve,"depth_inp");
|
||||
WriteShiftMessage(mem,szBuffer,curve);
|
||||
if(m_MoveDep&&!m_nDepPairsNum) {
|
||||
mem.CorrectObjectDepth(iIndex,-m_MoveDep);
|
||||
}
|
||||
else if(m_nDepPairsNum){
|
||||
mem.EShiftDepth((char *)curve.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
mem.Close();
|
||||
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, Filename1, curve);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//清除全部曲线设置
|
||||
void MainWindowCurve::s_ClearAllSetCurve()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,26 +46,6 @@ public:
|
|||
bool eventFilter(QObject* obj, QEvent* event);
|
||||
void onPasteExcelData();
|
||||
|
||||
public slots:
|
||||
void slot_time();
|
||||
//改变缩放比例
|
||||
void s_changeScale(QString strUuid, int iNewScale);
|
||||
//改变深度
|
||||
void s_changeDepth(QString strUuid, QString strSlfName, QString strWellName, int iY1, int iY2);
|
||||
//改变道宽
|
||||
void s_changeWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, int iCurrentCol, int iNewWidth);
|
||||
//改变属性
|
||||
void s_changeTrackProperty(QVariantList vlist);
|
||||
|
||||
void onItemClicked(QTableWidgetItem* item);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType);
|
||||
|
||||
//右键--添加分段线
|
||||
void s_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||
//右键--清除全部分段线
|
||||
void s_DelAllShiftLine(QString strUuid);
|
||||
|
||||
public slots:
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
void dragMoveEvent(QDragMoveEvent* event);
|
||||
|
|
@ -111,8 +91,6 @@ public:
|
|||
void DisplayWell_One(QJsonObject wellObjInfo);
|
||||
//展示所有道
|
||||
void DisplayTracks(QJsonArray tracksArray);
|
||||
|
||||
void DisplayTrack_Top(QJsonObject trackTop, int id);
|
||||
//展示其中一道
|
||||
void DisplayTrack_One(QJsonObject trackObjInfo, int id);
|
||||
//展示所有曲线
|
||||
|
|
@ -149,11 +127,30 @@ signals:
|
|||
void sig_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽
|
||||
void sig_NewWell(QString strWellName);
|
||||
|
||||
public slots:
|
||||
void slot_time();
|
||||
//改变缩放比例
|
||||
void s_changeScale(QString strUuid, int iNewScale);
|
||||
//改变深度
|
||||
void s_changeDepth(QString strUuid, QString strSlfName, QString strWellName, int iY1, int iY2);
|
||||
//改变道宽
|
||||
void s_changeWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, int iCurrentCol, int iNewWidth);
|
||||
|
||||
void onItemClicked(QTableWidgetItem* item);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType);
|
||||
|
||||
//右键--添加分段线
|
||||
void s_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||
//右键--清除当前分段线
|
||||
void s_DelSelectShiftLine(QString strUuid);
|
||||
//右键--清除全部分段线
|
||||
void s_DelAllShiftLine(QString strUuid);
|
||||
|
||||
public slots:
|
||||
void s_NewWell(QString strWellName, QString strSlfName);//新建井
|
||||
void s_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽
|
||||
void s_NewTrack_No_Line(QString strWellName, QString strTrackName);//新建空白道,没有曲线
|
||||
void s_NewTrack_No_Line(QJsonObject obj);//新建空白道,没有曲线
|
||||
void s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
||||
|
||||
|
|
@ -197,6 +194,9 @@ public slots:
|
|||
void s_Correction();
|
||||
//自动对比
|
||||
void s_autocor();
|
||||
//执行校正
|
||||
void s_runcor();
|
||||
void s_Runcor_List(QString strUuid, QList<double> left_Low_List, QList<double> right_Hight_List);
|
||||
//清除全部曲线设置
|
||||
void s_ClearAllSetCurve();
|
||||
//清除全部从曲线设置
|
||||
|
|
|
|||
|
|
@ -79,9 +79,16 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QString, QColor, QColor, QString, bool)));
|
||||
//添加校深线段
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddShifLineToPlot(QString, QString, QString, QString, QString, double, double)), this, SLOT(s_AddShifLineToPlot(QString, QString, QString, QString, QString, double, double)));
|
||||
//清除当前分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_DelSelectShiftLineFromPlot(QString, QString, QString, QString, QString)), this, SLOT(s_DelSelectShiftLineFromPlot(QString, QString, QString, QString, QString)));
|
||||
//清除全部分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_DelAllShiftLineFromPlot(QString, QString, QString, QString, QString)), this, SLOT(s_DelAllShiftLineFromPlot(QString, QString, QString, QString, QString)));
|
||||
|
||||
//执行校正
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_RuncorFromPlot(QString, QString, QString, QString, QString)), this, SLOT(s_RuncorFromPlot(QString, QString, QString, QString, QString)));
|
||||
|
||||
//Plot重新加载数据
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ReloadPlot(QString, QString, QString)), this, SLOT(s_ReloadPlot(QString, QString, QString)));
|
||||
}
|
||||
|
||||
//蝌蚪图,重绘网格线
|
||||
|
|
@ -343,6 +350,7 @@ void QMyCustomPlot::contextMenuEvent(QContextMenuEvent *event)
|
|||
QMenu menu(this);
|
||||
|
||||
menu.addAction("添加分段线", this, &QMyCustomPlot::onAddShiftLine);
|
||||
menu.addAction("清除当前分段线", this, &QMyCustomPlot::onDelSelectShiftLine);
|
||||
menu.addAction("清除全部分段线", this, &QMyCustomPlot::onDelAllShiftLine);
|
||||
|
||||
// QAction *resetAction = menu.addAction("添加框图");
|
||||
|
|
@ -366,6 +374,13 @@ void QMyCustomPlot::onAddShiftLine()
|
|||
emit CallManage::getInstance()->sig_AddShiftLine(m_strUuid, left_Low, right_Hight);
|
||||
}
|
||||
|
||||
//右键--清除当前分段线
|
||||
void QMyCustomPlot::onDelSelectShiftLine()
|
||||
{
|
||||
//通知界面,清除当前分段线
|
||||
emit CallManage::getInstance()->sig_DelSelectShiftLine(m_strUuid);
|
||||
}
|
||||
|
||||
//右键--清除全部分段线
|
||||
void QMyCustomPlot::onDelAllShiftLine()
|
||||
{
|
||||
|
|
@ -422,7 +437,30 @@ void QMyCustomPlot::s_AddShifLineToPlot(QString strUuid, QString strSlfName, QSt
|
|||
addLineToPlot(left_Low, right_Hight, "");
|
||||
}
|
||||
|
||||
//校深线段
|
||||
//清除当前分段线
|
||||
void QMyCustomPlot::s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_SelectShiftLine)
|
||||
{
|
||||
TransparentDraggableLine *pDraggableLine = (TransparentDraggableLine *)m_SelectShiftLine;
|
||||
pDraggableLine->deleteRect();
|
||||
}
|
||||
}
|
||||
|
||||
//清除全部分段线
|
||||
void QMyCustomPlot::s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
|
|
@ -439,17 +477,115 @@ void QMyCustomPlot::s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfNam
|
|||
}
|
||||
|
||||
TransparentDraggableLine *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line.begin();
|
||||
while( it != m_mapDraggable_Line.end() )
|
||||
{
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line.begin();
|
||||
while( it != m_mapDraggable_Line.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
it++;
|
||||
pDraggableLine->deleteRect();
|
||||
}
|
||||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
it++;
|
||||
pDraggableLine->deleteRect();
|
||||
}
|
||||
}
|
||||
|
||||
//执行校正
|
||||
void QMyCustomPlot::s_RuncorFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QList<double> left_Low_List;
|
||||
QList<double> right_Hight_List;
|
||||
|
||||
TransparentDraggableLine *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line.begin();
|
||||
while( it != m_mapDraggable_Line.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
left_Low_List.append(0-pDraggableLine->m_left_Low);
|
||||
right_Hight_List.append(0-pDraggableLine->m_right_Hight);
|
||||
|
||||
//
|
||||
it++;
|
||||
}
|
||||
|
||||
if(left_Low_List.size()<=0)
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "无校正深度线或深度移动量!");
|
||||
return;
|
||||
}
|
||||
|
||||
//执行校正
|
||||
emit CallManage::getInstance()->sig_Runcor_List(m_strUuid, left_Low_List, right_Hight_List);
|
||||
}
|
||||
|
||||
//Plot重新加载数据
|
||||
void QMyCustomPlot::s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName)
|
||||
{
|
||||
if(m_strSlfName == strSlfName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//读取slf
|
||||
CLogIO *logio=new CLogIO();
|
||||
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||
//
|
||||
int index=logio->OpenCurve(strLineName.toStdString().c_str());
|
||||
if(index<0) {
|
||||
delete logio;
|
||||
return;
|
||||
}
|
||||
|
||||
Slf_CURVE curveinfo;
|
||||
float *val;
|
||||
DWORD count;
|
||||
float sdep,edep,rlev;
|
||||
//
|
||||
logio->GetCurveInfo(index,&curveinfo);
|
||||
sdep=curveinfo.StartDepth;
|
||||
edep=curveinfo.EndDepth;
|
||||
rlev=curveinfo.DepLevel;
|
||||
//
|
||||
count=(curveinfo.EndDepth-curveinfo.StartDepth)/curveinfo.DepLevel+1.5;
|
||||
val=new float[count];
|
||||
logio->ReadCurve(index,curveinfo.StartDepth,count,&val[0]);
|
||||
logio->CloseCurve(index);
|
||||
delete logio;
|
||||
|
||||
//slf文件读取曲线
|
||||
QVector<double> x, y;
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
x.append(-(sdep+ rlev*i));
|
||||
y.append(val[i]);
|
||||
}
|
||||
|
||||
//先清空
|
||||
m_x.clear();
|
||||
m_y.clear();
|
||||
//
|
||||
m_x.append(x);
|
||||
m_y.append(y);
|
||||
|
||||
graph(0)->data()->clear();
|
||||
graph(0)->setData(m_x, m_y);
|
||||
replot(QCustomPlot::rpQueuedReplot); //刷新曲线
|
||||
}
|
||||
|
||||
void QMyCustomPlot::addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor)
|
||||
{
|
||||
QtCommonClass *qtCommon = new QtCommonClass(this);
|
||||
|
|
|
|||
|
|
@ -148,11 +148,22 @@ public slots:
|
|||
//校深线段
|
||||
void s_AddShifLineToPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight);
|
||||
|
||||
//右键--清除当前分段线
|
||||
void onDelSelectShiftLine();
|
||||
//清除当前分段线
|
||||
void s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//右键--清除全部分段线
|
||||
void onDelAllShiftLine();
|
||||
//清除全部分段线
|
||||
void s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//执行校正
|
||||
void s_RuncorFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//Plot重新加载数据
|
||||
void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
|
||||
|
||||
void onAddRect();
|
||||
|
||||
//蝌蚪图重绘网格线
|
||||
|
|
|
|||
|
|
@ -864,6 +864,9 @@ void QtProjectWidgets::ApplyShiftDepth(QString strSlfName, QString strLineName,
|
|||
isok=1;
|
||||
}
|
||||
delete logio;
|
||||
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot("all", strSlfName, strLineName);
|
||||
}
|
||||
|
||||
//表格数据查看
|
||||
|
|
@ -949,6 +952,21 @@ void QtProjectWidgets::onDepthShift_Well(bool checked)
|
|||
WriteShiftMessage(*logio,szBuffer,objname);
|
||||
}
|
||||
delete logio;
|
||||
|
||||
//整口井重新加载数据
|
||||
logio=new CMemRdWt();
|
||||
if(!logio->Open(m_strSlfName.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
{
|
||||
delete logio;
|
||||
return ;
|
||||
};
|
||||
Count=logio->GetObjectCount();
|
||||
for(int i=0;i<Count;i++) {
|
||||
if(logio->GetObjectStatus(i)!=OBJECT_NORMAL) continue;
|
||||
logio->GetObjectName(i,objname);
|
||||
//Plot重新加载数据
|
||||
emit CallManage::getInstance()->sig_ReloadPlot("all", m_strSlfName, objname);
|
||||
}
|
||||
}
|
||||
|
||||
//创建新表
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user