Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
54fd59e965
|
|
@ -188,6 +188,9 @@ signals:
|
|||
//改变深度
|
||||
void sig_changeDepth(QString strUuid, QString strSlfName, QString strWellName, int iY1, int iY2);
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
void sig_changeScrollBar(QString strUuid);
|
||||
|
||||
void sig_changeWellProperty(QString strSlfName, QString strWellName, QVariantList listVal);
|
||||
|
||||
//改变道宽
|
||||
|
|
@ -218,16 +221,39 @@ signals:
|
|||
void sig_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||
//校深线段
|
||||
void sig_AddShifLineToPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight);
|
||||
//校深(主校补充线段)
|
||||
void sig_AddShiftLine_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//校深线段(主校补充线段)
|
||||
void sig_AddShifLineToPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//校准线段移动
|
||||
void sig_MoveLine_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//校准线段颜色(重新选中)
|
||||
void sig_ChangeLineColor_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
//补充线段颜色(重新选中)
|
||||
void sig_ChangeLineColor_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
|
||||
//右键--清除当前分段线
|
||||
void sig_DelSelectShiftLine(QString strUuid);
|
||||
//清除当前分段线
|
||||
void sig_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
void sig_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strTrackName_Right, QString strLineName_Right);
|
||||
//清除当前分段线
|
||||
void sig_DelSelectShiftLineFromPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
|
||||
//右键--清除全部分段线
|
||||
void sig_DelAllShiftLine(QString strUuid);
|
||||
//清除全部分段线
|
||||
void sig_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
//清除全部分段线
|
||||
void sig_DelAllShiftLineFromPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//校准曲线拖动后,通知补充线段移动
|
||||
void sig_ChangeRange_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//补充曲线拖动后,通知校准线段移动
|
||||
void sig_ChangeRange_Jiaozhun(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//补充曲线选中后,改变校准线段颜色(重新选中)
|
||||
void sig_ChangeSelectShiftLineColor_Jiaozhun(QString strUuid, QString strUuid_biaozhun);
|
||||
//校准曲线选中后,改变补充线段颜色(重新选中)
|
||||
void sig_ChangeSelectShiftLineColor_Master(QString strUuid, QString strUuid_biaozhun);
|
||||
|
||||
//执行校正
|
||||
void sig_RuncorFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "TransparentDraggableLine.h"
|
||||
#include "TransparentDraggableLine.h"
|
||||
#include "CallManage.h"
|
||||
|
||||
extern double g_dPixelPerCm;//每厘米像素数
|
||||
//static GeoIndicatorGenerator m_drawGeo;
|
||||
|
|
@ -53,6 +54,8 @@ void TransparentDraggableLine::setRange(double left_Low, double right_Hight, boo
|
|||
qcpItemLine->start->setCoords(left_Low, lY1);//圆心位置
|
||||
qcpItemLine->end->setCoords(right_Hight, lY2);//圆心位置
|
||||
|
||||
emit CallManage::getInstance()->sig_ChangeRange_Master(mPlot->m_strUuid, right_Hight, right_Hight, m_strUuid);
|
||||
|
||||
//updateHandles();
|
||||
//刷新,针对批量修改不在此处刷新,后面统一刷新
|
||||
if(bReplot)
|
||||
|
|
@ -95,7 +98,7 @@ void TransparentDraggableLine::initRect()
|
|||
connect(mPlot, &QCustomPlot::mouseRelease, this, &TransparentDraggableLine::onMouseRelease);
|
||||
|
||||
qcpItemLine = new QCPItemLine(mPlot);
|
||||
qcpItemLine->setPen(QPen(Qt::black, 1));
|
||||
qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
qcpItemLine->setLayer("overlay"); // 确保在最上层
|
||||
|
||||
//上下边界
|
||||
|
|
@ -142,12 +145,12 @@ void TransparentDraggableLine::onMousePress(QMouseEvent *event)
|
|||
{
|
||||
//之前的选中线段,恢复黑色
|
||||
TransparentDraggableLine *tmpLine = (TransparentDraggableLine*)mPlot->m_SelectShiftLine;
|
||||
tmpLine->qcpItemLine->setPen(QPen(Qt::blue));
|
||||
tmpLine->qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
}
|
||||
|
||||
//重新设置选中线段
|
||||
mPlot->m_SelectShiftLine = this;
|
||||
qcpItemLine->setPen(QPen(Qt::red));
|
||||
qcpItemLine->setPen(QPen(Qt::red, 2));
|
||||
|
||||
double delta = (lY2-m_lY1)/10.0;
|
||||
if(x < m_lY1+delta)
|
||||
|
|
@ -162,6 +165,9 @@ void TransparentDraggableLine::onMousePress(QMouseEvent *event)
|
|||
{
|
||||
mDragMode = DragRect;
|
||||
}
|
||||
|
||||
//改变补充线段颜色(重新选中)
|
||||
emit CallManage::getInstance()->sig_ChangeSelectShiftLineColor_Master(mPlot->m_strUuid, m_strUuid);
|
||||
}
|
||||
else {
|
||||
mDragMode = DragNone;
|
||||
|
|
|
|||
238
logPlus/TransparentDraggableLine_Master.cpp
Normal file
238
logPlus/TransparentDraggableLine_Master.cpp
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
#include "TransparentDraggableLine_Master.h"
|
||||
#include "CallManage.h"
|
||||
|
||||
extern double g_dPixelPerCm;//每厘米像素数
|
||||
//static GeoIndicatorGenerator m_drawGeo;
|
||||
|
||||
TransparentDraggableLine_Master::TransparentDraggableLine_Master(QMyCustomPlot *parentPlot, QString strUuid, double minWidth, QString strTitle)
|
||||
: QObject(parentPlot), mPlot(parentPlot), mstrTitle(strTitle), mMinWidth(minWidth)
|
||||
{
|
||||
m_strUuid = strUuid;
|
||||
//
|
||||
initRect();
|
||||
}
|
||||
|
||||
TransparentDraggableLine_Master::~TransparentDraggableLine_Master()
|
||||
{
|
||||
if(mPlot)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//设置最小宽度
|
||||
void TransparentDraggableLine_Master::setMinWidth(double minWidth)
|
||||
{
|
||||
mMinWidth = minWidth;
|
||||
}
|
||||
|
||||
//设置标题
|
||||
void TransparentDraggableLine_Master::setTitle(QString strTitle)
|
||||
{
|
||||
mstrTitle = strTitle;
|
||||
//mPlot->replot();
|
||||
}
|
||||
|
||||
// 设置矩形范围
|
||||
void TransparentDraggableLine_Master::setRange(double left_Low, double right_Hight, bool bReplot)
|
||||
{
|
||||
m_left_Low = left_Low;
|
||||
m_right_Hight = right_Hight;
|
||||
|
||||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
|
||||
for(int i =0; i<mPlot->m_x.size(); i++)
|
||||
{
|
||||
if(abs(mPlot->m_x[i]-right_Hight) < 0.1)
|
||||
{
|
||||
lY2 = mPlot->m_y[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_lY1 = lY1;
|
||||
m_lY2 = lY2;
|
||||
|
||||
qcpItemLine->start->setCoords(left_Low, lY1);//圆心位置
|
||||
qcpItemLine->end->setCoords(right_Hight, lY2);//圆心位置
|
||||
|
||||
emit CallManage::getInstance()->sig_ChangeRange_Jiaozhun(mPlot->m_strUuid, right_Hight, right_Hight, m_strUuid);
|
||||
|
||||
//updateHandles();
|
||||
//刷新,针对批量修改不在此处刷新,后面统一刷新
|
||||
if(bReplot)
|
||||
{
|
||||
mPlot->replot();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前范围
|
||||
void TransparentDraggableLine_Master::getRange()
|
||||
{
|
||||
m_left_Low = qcpItemLine->start->coords().x();
|
||||
m_right_Hight = qcpItemLine->end->coords().x();
|
||||
}
|
||||
|
||||
// 设置矩形颜色
|
||||
void TransparentDraggableLine_Master::setColor(const QColor &color)
|
||||
{
|
||||
}
|
||||
|
||||
// 删除框图
|
||||
void TransparentDraggableLine_Master::deleteRect()
|
||||
{
|
||||
if(mPlot) {
|
||||
mPlot->m_mapDraggable_Line_Master.remove(m_strUuid);
|
||||
|
||||
mPlot->removeItem(qcpItemLine);
|
||||
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TransparentDraggableLine_Master::initRect()
|
||||
{
|
||||
// 连接鼠标事件
|
||||
connect(mPlot, &QCustomPlot::mousePress, this, &TransparentDraggableLine_Master::onMousePress);
|
||||
connect(mPlot, &QCustomPlot::mouseMove, this, &TransparentDraggableLine_Master::onMouseMove);
|
||||
connect(mPlot, &QCustomPlot::mouseRelease, this, &TransparentDraggableLine_Master::onMouseRelease);
|
||||
|
||||
qcpItemLine = new QCPItemLine(mPlot);
|
||||
qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
qcpItemLine->setLayer("overlay"); // 确保在最上层
|
||||
|
||||
//上下边界
|
||||
updateHandles();
|
||||
}
|
||||
|
||||
void TransparentDraggableLine_Master::updateHandles()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TransparentDraggableLine_Master::onDelRect()
|
||||
{
|
||||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
|
||||
void TransparentDraggableLine_Master::onMousePress(QMouseEvent *event)
|
||||
{
|
||||
if(event->button() != Qt::LeftButton)//右键
|
||||
{
|
||||
// QMenu menu(nullptr);
|
||||
// QAction *delAction = menu.addAction("删除框图");
|
||||
// connect(delAction, &QAction::triggered, this, &TransparentDraggableLine_Master::onDelRect);
|
||||
|
||||
// menu.exec(event->globalPos());
|
||||
// return;
|
||||
}
|
||||
|
||||
event->accept();
|
||||
|
||||
// 检查点击了哪个部分
|
||||
double y = mPlot->xAxis->pixelToCoord(event->pos().y());//x轴展示深度
|
||||
double x = mPlot->yAxis->pixelToCoord(event->pos().x());
|
||||
//double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
//double lY2 = mPlot->yAxis->range().upper;
|
||||
|
||||
if(qcpItemLine->selectTest(event->pos(), false) < 5)
|
||||
{
|
||||
if(mPlot->m_SelectShiftLine)
|
||||
{
|
||||
//之前的选中线段,恢复黑色
|
||||
TransparentDraggableLine_Master *tmpLine = (TransparentDraggableLine_Master*)mPlot->m_SelectShiftLine;
|
||||
tmpLine->qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
}
|
||||
|
||||
//重新设置选中线段
|
||||
mPlot->m_SelectShiftLine = this;
|
||||
qcpItemLine->setPen(QPen(Qt::red, 2));
|
||||
//
|
||||
double delta = (m_lY2-m_lY1)/10.0;
|
||||
if(x < m_lY1+delta)
|
||||
{
|
||||
mDragMode = DragLeft;
|
||||
}
|
||||
else if(x > m_lY2-delta)
|
||||
{
|
||||
mDragMode = DragRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
mDragMode = DragRect;
|
||||
}
|
||||
|
||||
//改变校准线段颜色(重新选中)
|
||||
emit CallManage::getInstance()->sig_ChangeSelectShiftLineColor_Jiaozhun(mPlot->m_strUuid, m_strUuid);
|
||||
}
|
||||
else {
|
||||
mDragMode = DragNone;
|
||||
return;
|
||||
}
|
||||
|
||||
getRange();
|
||||
|
||||
mDragStartY = y;
|
||||
}
|
||||
|
||||
void TransparentDraggableLine_Master::onMouseMove(QMouseEvent *event)
|
||||
{
|
||||
if(mDragMode == DragNone) return;
|
||||
|
||||
event->accept();
|
||||
|
||||
//double x = mPlot->xAxis->pixelToCoord(event->pos().x());
|
||||
//double dx = x - mDragStartX;
|
||||
|
||||
double y = mPlot->xAxis->pixelToCoord(event->pos().y());
|
||||
double dy = y - mDragStartY;
|
||||
mDragStartY = y;
|
||||
|
||||
switch(mDragMode) {
|
||||
case DragLeft: {
|
||||
m_left_Low = m_left_Low + dy;
|
||||
m_right_Hight = m_right_Hight + dy;//追加的
|
||||
break;
|
||||
}
|
||||
case DragRight: {
|
||||
m_left_Low = m_left_Low + dy;//追加的
|
||||
m_right_Hight = m_right_Hight + dy;
|
||||
break;
|
||||
}
|
||||
case DragRect: {
|
||||
m_left_Low = m_left_Low + dy;
|
||||
m_right_Hight = m_right_Hight + dy;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
setRange(m_left_Low, m_right_Hight);
|
||||
}
|
||||
|
||||
void TransparentDraggableLine_Master::onMouseRelease(QMouseEvent *event)
|
||||
{
|
||||
if(event->button() == Qt::LeftButton && mDragMode != DragNone) {
|
||||
event->accept();
|
||||
//避免二次绘制框图
|
||||
mPlot->m_bDrawRect = false;
|
||||
//emit rangeChanged(getRange());
|
||||
mDragMode = DragNone;
|
||||
//取消选中状态
|
||||
// QCPDataSelection emptySelection;
|
||||
// mPlot->graph(0)->setSelection(emptySelection);
|
||||
// mPlot->replot();
|
||||
|
||||
//取消选中框
|
||||
mPlot->selectionRect()->cancel();
|
||||
mPlot->replot();
|
||||
mPlot->selectionRect()->mActive=true;
|
||||
}
|
||||
}
|
||||
|
||||
71
logPlus/TransparentDraggableLine_Master.h
Normal file
71
logPlus/TransparentDraggableLine_Master.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#ifndef TransparentDraggableLine_Master_MAATSR_H
|
||||
#define TransparentDraggableLine_Master_MAATSR_H
|
||||
|
||||
#include <QObject>
|
||||
#include "qmycustomplot.h"
|
||||
#include <QString>
|
||||
#include <QMenu>
|
||||
|
||||
#pragma execution_character_set("utf-8") // 强制指定执行字符集为 UTF-8
|
||||
|
||||
//曲线校深--线段
|
||||
class TransparentDraggableLine_Master : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TransparentDraggableLine_Master(QMyCustomPlot *parentPlot, QString strUuid="", double minWidth = 1.0, QString strTitle = "");
|
||||
|
||||
|
||||
~TransparentDraggableLine_Master();
|
||||
|
||||
//设置最小宽度
|
||||
void setMinWidth(double minWidth);
|
||||
//设置标题
|
||||
void setTitle(QString strTitle);
|
||||
|
||||
// 设置矩形范围
|
||||
void setRange(double left_Low, double right_Hight, bool bReplot=true);
|
||||
// 获取当前范围
|
||||
void getRange();
|
||||
|
||||
// 设置矩形颜色
|
||||
void setColor(const QColor &color);
|
||||
|
||||
// 删除框图
|
||||
void deleteRect();
|
||||
|
||||
signals:
|
||||
void rangeChanged(QCPRange newRange);
|
||||
|
||||
private:
|
||||
void initRect();
|
||||
void updateHandles() ;
|
||||
|
||||
private slots:
|
||||
void onDelRect();
|
||||
void onMousePress(QMouseEvent *event);
|
||||
void onMouseMove(QMouseEvent *event);
|
||||
void onMouseRelease(QMouseEvent *event);
|
||||
|
||||
public:
|
||||
QMyCustomPlot *mPlot;
|
||||
|
||||
QCPItemLine *qcpItemLine;
|
||||
QString mstrTitle="";
|
||||
QString m_strUuid = "";
|
||||
|
||||
enum DragMode { DragNone, DragLeft, DragRight, DragRect };
|
||||
DragMode mDragMode = DragNone;
|
||||
//double mDragStartX = 0;
|
||||
double mDragStartY = 0;
|
||||
|
||||
double m_left_Low = 0;
|
||||
double m_right_Hight = 0;
|
||||
double m_lY1 = 0;
|
||||
double m_lY2 = 0;
|
||||
|
||||
// 添加最小宽度成员变量
|
||||
double mMinWidth;
|
||||
};
|
||||
|
||||
#endif // TransparentDraggableLine_Master_MAATSR_H
|
||||
|
|
@ -3900,7 +3900,7 @@ void FormDraw::s_addGanZhuangTu(QString strUuid, QString strSlfName, QString str
|
|||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
curv->m_strUuid = m_strUuid;
|
||||
//curv->m_strUuid = m_strUuid;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, g_iOneWidth);
|
||||
curv->show();
|
||||
|
|
@ -4091,6 +4091,10 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin
|
|||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject");
|
||||
emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, "Santuyibiao",
|
||||
(QObject *)(curv->m_drawTvd));
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
emit CallManage::getInstance()->sig_changeScrollBar(m_strUuid);
|
||||
|
||||
return curv;
|
||||
}
|
||||
|
||||
|
|
@ -4393,7 +4397,7 @@ void FormDraw::s_addMCals(QString strUuid, QString strSlfName, QString strWellNa
|
|||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
curv->m_strUuid = m_strUuid;
|
||||
//curv->m_strUuid = m_strUuid;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, g_iOneWidth);
|
||||
curv->show();
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ SOURCES += \
|
|||
TransparentDraggableJiegutext.cpp \
|
||||
TransparentDraggableLayer.cpp \
|
||||
TransparentDraggableLine.cpp \
|
||||
TransparentDraggableLine_Master.cpp \
|
||||
TransparentDraggableMFac.cpp \
|
||||
TransparentDraggablePhase.cpp \
|
||||
TransparentDraggableRect.cpp \
|
||||
|
|
@ -119,6 +120,7 @@ HEADERS += \
|
|||
TransparentDraggableJiegutext.h \
|
||||
TransparentDraggableLayer.h \
|
||||
TransparentDraggableLine.h \
|
||||
TransparentDraggableLine_Master.h \
|
||||
TransparentDraggableMFac.h \
|
||||
TransparentDraggablePhase.h \
|
||||
TransparentDraggableRect.h \
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
|||
ui->verticalScrollBar->setRange(-m_iY2, -m_iY1);
|
||||
ui->verticalScrollBar->setValue(-m_iY2);
|
||||
connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vertScrollBarChanged(int)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeScrollBar(QString)), this, SLOT(s_changeScrollBar(QString)));
|
||||
|
||||
connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, double)), this, SLOT(s_NewTrackChangeWidth(QString, double)));
|
||||
//connect(this, SIGNAL(sig_NewWell(QString, QString)), this, SLOT(s_NewWell(QString, QString)));
|
||||
|
|
@ -135,11 +136,22 @@ 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_AddShiftLine_Master(QString, double, double, QString)), this, SLOT(s_AddShiftLine_Master(QString, double, double, QString)));
|
||||
//右键--清除当前分段线
|
||||
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_ChangeRange_Master(QString, double, double, QString)), this, SLOT(s_ChangeRange_Master(QString, double, double, QString)));
|
||||
//补充曲线拖动后,通知校准线段移动
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRange_Jiaozhun(QString, double, double, QString)), this, SLOT(s_ChangeRange_Jiaozhun(QString, double, double, QString)));
|
||||
//补充曲线选中后,改变校准线段颜色(重新选中)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeSelectShiftLineColor_Jiaozhun(QString, QString)), this, SLOT(s_ChangeSelectShiftLineColor_Jiaozhun(QString, QString)));
|
||||
//校准曲线选中后,改变补充线段颜色(重新选中)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeSelectShiftLineColor_Master(QString, QString)), this, SLOT(s_ChangeSelectShiftLineColor_Master(QString, QString)));
|
||||
|
||||
//执行校正
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Runcor_List(QString, QList<double>, QList<double>)), this, SLOT(s_Runcor_List(QString, QList<double>, QList<double>)));
|
||||
|
||||
|
|
@ -332,8 +344,8 @@ void MainWindowCurve::initMainToolBar()
|
|||
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc);
|
||||
//ui->mainToolBar->addAction(m_currtempliteAc);
|
||||
ui->mainToolBar->addAction(m_saveastemplateAc);
|
||||
//ui->mainToolBar->addAction(m_executeDepthShiftAc);
|
||||
//ui->mainToolBar->addAction(m_joindepthAc);
|
||||
ui->mainToolBar->addAction(m_executeDepthShiftAc);
|
||||
ui->mainToolBar->addAction(m_joindepthAc);
|
||||
ui->mainToolBar->addAction(m_ModuleOpenAc);
|
||||
ui->mainToolBar->addAction(m_SaveAsPictureAc);//导出长图
|
||||
ui->mainToolBar->addAction(m_SaveAsPdfAc);//导出PDF
|
||||
|
|
@ -1006,12 +1018,17 @@ void MainWindowCurve::s_Standard()
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
//主校(源拼接)曲线中,去掉本条曲线
|
||||
if(m_RightCurve.m_strSlfName == m_SelectTableItem.m_strSlfName &&
|
||||
m_RightCurve.m_strWellName == m_SelectTableItem.m_strWellName &&
|
||||
m_RightCurve.m_strTrackName == m_SelectTableItem.m_strTrackName &&
|
||||
m_RightCurve.m_strLineName == m_SelectTableItem.m_strLineName)
|
||||
{
|
||||
//-------------------------------------
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLine(m_strUuid);
|
||||
|
||||
//主校曲线中,切换为不选择
|
||||
m_RightCurve.m_iTableType=0;
|
||||
m_RightCurve.m_strUuid = "";
|
||||
|
|
@ -1042,6 +1059,10 @@ void MainWindowCurve::s_Standard()
|
|||
//当前有标准(目标拼接)曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
//-------------------------------------
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLine(m_strUuid);
|
||||
|
||||
//当前已经选中为标准曲线
|
||||
if(m_LeftCurve.m_strSlfName == m_SelectTableItem.m_strSlfName &&
|
||||
m_LeftCurve.m_strWellName == m_SelectTableItem.m_strWellName &&
|
||||
|
|
@ -1110,6 +1131,10 @@ void MainWindowCurve::s_Correction()
|
|||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
//-------------------------------------
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLine(m_strUuid);
|
||||
|
||||
//当前已经选中为标准曲线
|
||||
if(m_LeftCurve.m_strSlfName == m_SelectTableItem.m_strSlfName &&
|
||||
m_LeftCurve.m_strWellName == m_SelectTableItem.m_strWellName &&
|
||||
|
|
@ -1156,6 +1181,11 @@ void MainWindowCurve::s_Correction()
|
|||
m_RightCurve.m_strTrackName == m_SelectTableItem.m_strTrackName &&
|
||||
m_RightCurve.m_strLineName == m_SelectTableItem.m_strLineName)
|
||||
{
|
||||
|
||||
//-------------------------------------
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLine(m_strUuid);
|
||||
|
||||
//修改当前曲线选择状态 iSelect=0未知
|
||||
emit CallManage::getInstance()->sig_ChangeLineStatus(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, m_SelectTableItem.m_strLineName, 0, m_bMerge);
|
||||
|
||||
|
|
@ -1256,6 +1286,144 @@ 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_AddShiftLine_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun)
|
||||
{
|
||||
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_AddShifLineToPlot_Master(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName, left_Low, right_Hight, strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//校准曲线拖动后,通知补充线段移动
|
||||
void MainWindowCurve::s_ChangeRange_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun)
|
||||
{
|
||||
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_AddShifLineToPlot_Master(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName, left_Low, right_Hight, strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//补充曲线拖动后,通知校准线段移动
|
||||
void MainWindowCurve::s_ChangeRange_Jiaozhun(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun)
|
||||
{
|
||||
if(strUuid != m_strUuid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择标准曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
//通知界面,校准线段移动
|
||||
emit CallManage::getInstance()->sig_MoveLine_Jiaozhun(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName, left_Low, right_Hight, strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//补充曲线选中后,改变校准线段颜色(重新选中)
|
||||
void MainWindowCurve::s_ChangeSelectShiftLineColor_Jiaozhun(QString strUuid, QString strUuid_biaozhun)
|
||||
{
|
||||
if(strUuid != m_strUuid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//当前有标准曲线
|
||||
if(m_LeftCurve.m_iTableType==3 && m_LeftCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "提示", "请先选择标准曲线!");
|
||||
return;
|
||||
}
|
||||
|
||||
//通知界面,改变校准线段颜色(重新选中)
|
||||
emit CallManage::getInstance()->sig_ChangeLineColor_Jiaozhun(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName, strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//校准曲线选中后,改变补充线段颜色(重新选中)
|
||||
void MainWindowCurve::s_ChangeSelectShiftLineColor_Master(QString strUuid, QString strUuid_biaozhun)
|
||||
{
|
||||
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_ChangeLineColor_Master(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName, strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//右键--清除当前分段线
|
||||
void MainWindowCurve::s_DelSelectShiftLine(QString strUuid)
|
||||
{
|
||||
|
|
@ -1274,18 +1442,25 @@ void MainWindowCurve::s_DelSelectShiftLine(QString strUuid)
|
|||
return;
|
||||
}
|
||||
|
||||
// //当前有主校曲线
|
||||
// if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//当前有主校曲线
|
||||
if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
//不在此处删除,在删除标准曲线的内部处理
|
||||
//通知界面,清除当前分段线
|
||||
emit CallManage::getInstance()->sig_DelSelectShiftLineFromPlot(m_strUuid,
|
||||
m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName,
|
||||
m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName);
|
||||
}
|
||||
else
|
||||
{
|
||||
//通知界面,清除当前分段线
|
||||
emit CallManage::getInstance()->sig_DelSelectShiftLineFromPlot(m_strUuid,
|
||||
m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName,
|
||||
"", "");
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
//右键--清除全部分段线
|
||||
|
|
@ -1306,18 +1481,20 @@ void MainWindowCurve::s_DelAllShiftLine(QString strUuid)
|
|||
return;
|
||||
}
|
||||
|
||||
// //当前有主校曲线
|
||||
// if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// QMessageBox::warning(this, "提示", "请先选择校正曲线!");
|
||||
// return;
|
||||
// }
|
||||
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLineFromPlot(m_strUuid, m_LeftCurve.m_strSlfName, m_LeftCurve.m_strWellName, m_LeftCurve.m_strTrackName, m_LeftCurve.m_strLineName);
|
||||
|
||||
//当前有主校曲线
|
||||
if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLineFromPlot_Master(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// QMessageBox::warning(this, "提示", "请先选择校正曲线!");
|
||||
// return;
|
||||
}
|
||||
}
|
||||
|
||||
//自动对比
|
||||
|
|
@ -2111,6 +2288,11 @@ void MainWindowCurve::s_ClearAllSetCurve()
|
|||
//当前有主校曲线
|
||||
if(m_RightCurve.m_iTableType==3 && m_RightCurve.m_strFormInfoType=="curveObject")
|
||||
{
|
||||
//-----------------------
|
||||
//通知界面,清除全部分段线
|
||||
emit CallManage::getInstance()->sig_DelAllShiftLineFromPlot_Master(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName);
|
||||
//-----------------------
|
||||
|
||||
//修改当前曲线选择状态 iSelect=0未知
|
||||
emit CallManage::getInstance()->sig_ChangeLineStatus(m_strUuid, m_RightCurve.m_strSlfName, m_RightCurve.m_strWellName, m_RightCurve.m_strTrackName, m_RightCurve.m_strLineName, 0, m_bMerge);
|
||||
|
||||
|
|
@ -2621,6 +2803,16 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
|||
// changeDepthForPrint();
|
||||
// }
|
||||
|
||||
//--/////////////////////////////////
|
||||
//重置行高
|
||||
int iTableSize_Head_Tmp = 0;
|
||||
getTableSize_Head(iTableSize_Head_Tmp);
|
||||
if(iTableSize_Head_Tmp > (100+m_nObjLayerH))
|
||||
{
|
||||
//打印出图,改变深度
|
||||
changeDepthForPrint();
|
||||
}
|
||||
//--/////////////////////////////////
|
||||
|
||||
printer.setPageMargins(0.0,0.0,0.0,0.0,QPrinter::DevicePixel);
|
||||
printer.setFullPage(true);
|
||||
|
|
@ -2650,7 +2842,6 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
|||
//高度
|
||||
for(int i=0; i<ui->tableWidget_2->rowCount(); i++)
|
||||
{
|
||||
|
||||
iHight += ui->tableWidget_2->rowHeight(i);
|
||||
}
|
||||
iHight += 9 + (ui->tableWidget_2->rowCount()+1);//上margin + 边框n+1
|
||||
|
|
@ -3718,16 +3909,12 @@ void MainWindowCurve::s_NewGanZhuangTu()
|
|||
return;
|
||||
}
|
||||
|
||||
int nW = 4;
|
||||
QStringList sret = this->insertCol(nW);
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if(sret.length() <= 0)
|
||||
return;
|
||||
QString strWellName = sret.at(0);
|
||||
//直接从选中的井获取,data记录slf路径
|
||||
QString strSlfName = sret.at(1);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "GANZHUANG.LINE", "ganzhuangtuObject", nW);
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "GANZHUANG.LINE", "ganzhuangtuObject");
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_roseAc()
|
||||
|
|
@ -3776,16 +3963,12 @@ void MainWindowCurve::s_Jykt()
|
|||
return;
|
||||
}
|
||||
|
||||
int nW = 4;
|
||||
QStringList sret = this->insertCol(nW);
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if(sret.length() <= 0)
|
||||
return;
|
||||
QString strWellName = sret.at(0);
|
||||
//直接从选中的井获取,data记录slf路径
|
||||
QString strSlfName = sret.at(1);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "JINGYANKUATA.LINE", "JyktObject", nW);
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "JINGYANKUATA.LINE", "JyktObject");
|
||||
}
|
||||
|
||||
//井斜方位图
|
||||
|
|
@ -3797,17 +3980,12 @@ void MainWindowCurve::s_Denv()
|
|||
emit CallManage::getInstance()->sig_AddDenv(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "XIEFANGWEI.LINE");
|
||||
return;
|
||||
}
|
||||
|
||||
int nW = 4;
|
||||
QStringList sret = this->insertCol(nW);
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if(sret.length() <= 0)
|
||||
return;
|
||||
QString strWellName = sret.at(0);
|
||||
//直接从选中的井获取,data记录slf路径
|
||||
QString strSlfName = sret.at(1);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "XIEFANGWEI.LINE", "DenvObject", nW);
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "XIEFANGWEI.LINE", "DenvObject");
|
||||
}
|
||||
|
||||
//图像 成图
|
||||
|
|
@ -3889,19 +4067,12 @@ void MainWindowCurve::s_NewMCals()
|
|||
return;
|
||||
}
|
||||
|
||||
int nW = 4;
|
||||
QStringList sret = this->insertCol(nW);
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if(sret.length() <= 0)
|
||||
return;
|
||||
QString strWellName = sret.at(0);
|
||||
//直接从选中的井获取,data记录slf路径
|
||||
QString strSlfName = sret.at(1);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "FCA2", "MCalsObject", nW);
|
||||
|
||||
// //新建井+道+曲线(首条)
|
||||
// NewWellAndTrack(sret.at(0), sret.at(1), "FCA2", "MCalsObject");
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "FCA2", "MCalsObject");
|
||||
}
|
||||
|
||||
//套管组件
|
||||
|
|
@ -4544,8 +4715,8 @@ void MainWindowCurve::changeDepthForPrint()
|
|||
//
|
||||
//获取井well前2行的高度
|
||||
int iTableSize_Head = 100 + m_nObjLayerH;
|
||||
//此处还没有生成well,所以不能这样获取
|
||||
//getTableSize_Head(iTableSize_Head);
|
||||
//
|
||||
getTableSize_Head(iTableSize_Head);
|
||||
//
|
||||
ui->tableWidget_2->setRowHeight(1, (int)iHeightOfScreen+iTableSize_Head+(3+1)+10);
|
||||
//update();
|
||||
|
|
@ -4971,5 +5142,21 @@ void MainWindowCurve::setTableSize_Well()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
void MainWindowCurve::s_changeScrollBar(QString strUuid)
|
||||
{
|
||||
if(m_strUuid==strUuid)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int iCurValue = ui->verticalScrollBar->value();
|
||||
vertScrollBarChanged(iCurValue);
|
||||
|
||||
//ui->verticalScrollBar->setValue(iCurValue+1);//-m_iY2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,11 +162,22 @@ public slots:
|
|||
|
||||
//右键--添加分段线
|
||||
void s_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||
//校深(主校补充线段)
|
||||
void s_AddShiftLine_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//右键--清除当前分段线
|
||||
void s_DelSelectShiftLine(QString strUuid);
|
||||
//右键--清除全部分段线
|
||||
void s_DelAllShiftLine(QString strUuid);
|
||||
|
||||
//校准曲线拖动后,通知补充线段移动
|
||||
void s_ChangeRange_Master(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//补充曲线拖动后,通知校准线段移动
|
||||
void s_ChangeRange_Jiaozhun(QString strUuid, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//补充曲线选中后,改变校准线段颜色(重新选中)
|
||||
void s_ChangeSelectShiftLineColor_Jiaozhun(QString strUuid, QString strUuid_biaozhun);
|
||||
//校准曲线选中后,改变补充线段颜色(重新选中)
|
||||
void s_ChangeSelectShiftLineColor_Master(QString strUuid, QString strUuid_biaozhun);
|
||||
|
||||
//右键菜单响应函数
|
||||
void slotContextMenu(QPoint pos);
|
||||
void slotDeleteSelectWell();
|
||||
|
|
@ -240,6 +251,9 @@ public slots:
|
|||
//编辑曲线,框选拉伸/压缩
|
||||
void s_EShiftDepth(QString strSlfName, QString strLineName, int count, QList<double> left_Low_List, QList<double> right_Hight_List);
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
void s_changeScrollBar(QString strUuid);
|
||||
|
||||
//
|
||||
void s_selectWell(); //选择井
|
||||
void s_showHeadTable(); //显示/隐藏图头
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "TransparentDraggableFac.h"
|
||||
#include "transparentdraggableGuan.h"
|
||||
#include "TransparentDraggableLine.h"
|
||||
#include "TransparentDraggableLine_Master.h"
|
||||
#include "transparentdraggableSelectRect.h"
|
||||
#include "transparentdraggableLayer.h"
|
||||
#include "transparentdraggableRightList.h"
|
||||
|
|
@ -162,10 +163,23 @@ 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_AddShifLineToPlot_Master(QString, QString, QString, QString, QString, double, double, QString)), this, SLOT(s_AddShifLineToPlot_Master(QString, QString, QString, QString, QString, double, double, QString)));
|
||||
//校准线段移动
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_MoveLine_Jiaozhun(QString, QString, QString, QString, QString, double, double, QString)), this, SLOT(s_MoveLine_Jiaozhun(QString, QString, QString, QString, QString, double, double, QString)));
|
||||
//校准线段颜色(重新选中)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor_Jiaozhun(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeLineColor_Jiaozhun(QString, QString, QString, QString, QString, QString)));
|
||||
//补充线段颜色(重新选中)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor_Master(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeLineColor_Master(QString, QString, QString, QString, QString, QString)));
|
||||
|
||||
//清除当前分段线
|
||||
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_DelSelectShiftLineFromPlot(QString, QString, QString, QString, QString, QString, QString)), this, SLOT(s_DelSelectShiftLineFromPlot(QString, QString, QString, QString, QString, QString, QString)));
|
||||
//清除当前分段线
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_DelSelectShiftLineFromPlot_Master(QString, QString, QString, QString, QString, QString)), this, SLOT(s_DelSelectShiftLineFromPlot_Master(QString, 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_DelAllShiftLineFromPlot_Master(QString, QString, QString, QString, QString)), this, SLOT(s_DelAllShiftLineFromPlot_Master(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)));
|
||||
|
|
@ -251,6 +265,9 @@ void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW)
|
|||
|
||||
int ntmpw = fW * g_dPixelPerCm;
|
||||
this->setGeometry(0, 0, ntmpw - 2, (int)dHight);
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
emit CallManage::getInstance()->sig_changeScrollBar(m_strUuid);
|
||||
}
|
||||
|
||||
void QMyCustomPlot::changePropertyWaveUpdate()
|
||||
|
|
@ -4868,8 +4885,154 @@ void QMyCustomPlot::s_AddShifLineToPlot(QString strUuid, QString strSlfName, QSt
|
|||
addLineToPlot(left_Low, right_Hight, "");
|
||||
}
|
||||
|
||||
//校深线段(主校补充线段)
|
||||
void QMyCustomPlot::s_AddShifLineToPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
addLineToPlot_Master(left_Low, right_Hight, "", strUuid_biaozhun);
|
||||
}
|
||||
|
||||
//校准线段移动
|
||||
void QMyCustomPlot::s_MoveLine_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
TransparentDraggableLine *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line.begin();
|
||||
while( it != m_mapDraggable_Line.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
if(pDraggableLine->m_strUuid == strUuid_biaozhun)
|
||||
{
|
||||
//存在老的同id线段,进行移动
|
||||
double lY2 = this->yAxis->range().upper;
|
||||
pDraggableLine->qcpItemLine->end->setCoords(left_Low, lY2);//圆心位置
|
||||
replot();
|
||||
return;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
//校准线段颜色(重新选中)
|
||||
void QMyCustomPlot::s_ChangeLineColor_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
TransparentDraggableLine *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line.begin();
|
||||
while( it != m_mapDraggable_Line.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
if(pDraggableLine->m_strUuid == strUuid_biaozhun)
|
||||
{
|
||||
//存在老的同id线段
|
||||
if(this->m_SelectShiftLine)
|
||||
{
|
||||
//之前的选中线段,恢复黑色
|
||||
TransparentDraggableLine *tmpLine = (TransparentDraggableLine*)this->m_SelectShiftLine;
|
||||
if(tmpLine)
|
||||
{
|
||||
tmpLine->qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
}
|
||||
}
|
||||
|
||||
//重新设置选中线段
|
||||
m_SelectShiftLine = pDraggableLine;
|
||||
pDraggableLine->qcpItemLine->setPen(QPen(Qt::red, 2));
|
||||
|
||||
replot();
|
||||
return;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
//补充线段颜色(重新选中)
|
||||
void QMyCustomPlot::s_ChangeLineColor_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
TransparentDraggableLine_Master *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line_Master.begin();
|
||||
while( it != m_mapDraggable_Line_Master.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine_Master*)it.value();
|
||||
if(pDraggableLine->m_strUuid == strUuid_biaozhun)
|
||||
{
|
||||
//存在老的同id线段
|
||||
if(this->m_SelectShiftLine)
|
||||
{
|
||||
//之前的选中线段,恢复黑色
|
||||
TransparentDraggableLine_Master *tmpLine = (TransparentDraggableLine_Master*)this->m_SelectShiftLine;
|
||||
if(tmpLine)
|
||||
{
|
||||
tmpLine->qcpItemLine->setPen(QPen(Qt::blue, 2));
|
||||
}
|
||||
}
|
||||
|
||||
//重新设置选中线段
|
||||
m_SelectShiftLine = pDraggableLine;
|
||||
pDraggableLine->qcpItemLine->setPen(QPen(Qt::red, 2));
|
||||
|
||||
replot();
|
||||
return;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
//清除当前分段线
|
||||
void QMyCustomPlot::s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
void QMyCustomPlot::s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strTrackName_Right, QString strLineName_Right)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
|
|
@ -4887,12 +5050,56 @@ void QMyCustomPlot::s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlf
|
|||
if(m_SelectShiftLine)
|
||||
{
|
||||
TransparentDraggableLine *pDraggableLine = (TransparentDraggableLine *)m_SelectShiftLine;
|
||||
|
||||
//先清除补充线段
|
||||
emit CallManage::getInstance()->sig_DelSelectShiftLineFromPlot_Master(m_strUuid,
|
||||
m_strSlfName, m_strWellName, strTrackName_Right, strLineName_Right, pDraggableLine->m_strUuid);
|
||||
|
||||
//再清除当前选中线段
|
||||
pDraggableLine->deleteRect();
|
||||
m_SelectShiftLine = nullptr;
|
||||
}
|
||||
replot();
|
||||
}
|
||||
|
||||
//清除当前分段线
|
||||
void QMyCustomPlot::s_DelSelectShiftLineFromPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun)
|
||||
{
|
||||
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();
|
||||
// m_SelectShiftLine = nullptr;
|
||||
// }
|
||||
TransparentDraggableLine_Master *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line_Master.begin();
|
||||
while( it != m_mapDraggable_Line_Master.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine_Master*)it.value();
|
||||
if(pDraggableLine->m_strUuid == strUuid_biaozhun)
|
||||
{
|
||||
pDraggableLine->deleteRect();
|
||||
m_SelectShiftLine = nullptr;
|
||||
break;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
replot();
|
||||
}
|
||||
|
||||
//清除全部分段线
|
||||
void QMyCustomPlot::s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
|
|
@ -4916,8 +5123,36 @@ void QMyCustomPlot::s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfNam
|
|||
pDraggableLine = (TransparentDraggableLine*)it.value();
|
||||
it++;
|
||||
pDraggableLine->deleteRect();
|
||||
m_SelectShiftLine = nullptr;
|
||||
}
|
||||
m_SelectShiftLine = nullptr;
|
||||
this->replot();
|
||||
}
|
||||
|
||||
//清除全部分段线
|
||||
void QMyCustomPlot::s_DelAllShiftLineFromPlot_Master(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;
|
||||
}
|
||||
|
||||
TransparentDraggableLine_Master *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line_Master.begin();
|
||||
while( it != m_mapDraggable_Line_Master.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine_Master*)it.value();
|
||||
it++;
|
||||
pDraggableLine->deleteRect();
|
||||
}
|
||||
m_SelectShiftLine = nullptr;
|
||||
this->replot();
|
||||
}
|
||||
|
||||
|
|
@ -5715,6 +5950,39 @@ void QMyCustomPlot::addLineToPlot(double left_Low, double right_Hight, const QSt
|
|||
dragRect->setTitle(strText);
|
||||
m_mapDraggable_Line[strUuid] = dragRect;
|
||||
|
||||
//通知界面,增加一条主校补充线段
|
||||
emit CallManage::getInstance()->sig_AddShiftLine_Master(m_strUuid, left_Low, right_Hight, strUuid);
|
||||
}
|
||||
|
||||
//校深线段(主校补充线段)
|
||||
void QMyCustomPlot::addLineToPlot_Master(double left_Low, double right_Hight, const QString strText, QString strUuid_biaozhun, QColor crColor)
|
||||
{
|
||||
QString strUuid = strUuid_biaozhun;
|
||||
|
||||
TransparentDraggableLine_Master *pDraggableLine =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Line_Master.begin();
|
||||
while( it != m_mapDraggable_Line_Master.end() )
|
||||
{
|
||||
pDraggableLine = (TransparentDraggableLine_Master*)it.value();
|
||||
if(pDraggableLine->m_strUuid == strUuid_biaozhun)
|
||||
{
|
||||
//存在老的同id线段,进行移动
|
||||
pDraggableLine->setRange(left_Low, right_Hight);
|
||||
return;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
|
||||
// 在初始化代码中
|
||||
TransparentDraggableLine_Master *dragRect = new TransparentDraggableLine_Master(this, strUuid);
|
||||
// 设置初始范围
|
||||
dragRect->setRange(left_Low, right_Hight);
|
||||
// 可选:设置颜色
|
||||
dragRect->setColor(crColor); // 半透明白色
|
||||
//最小宽度
|
||||
dragRect->setMinWidth(0.1);
|
||||
dragRect->setTitle(strText);
|
||||
m_mapDraggable_Line_Master[strUuid] = dragRect;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::addTextToPlot(double left_Low, double right_Hight, const QString strText, bool bRefresh, QColor crColor)
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ public:
|
|||
QMap<QString, QObject*> m_mapDraggable_Guan;
|
||||
QMap<QString, QObject*> m_mapDraggable_Jiegutext;
|
||||
QMap<QString, QObject*> m_mapDraggable_Line;
|
||||
QMap<QString, QObject*> m_mapDraggable_Line_Master;
|
||||
QMap<QString, QObject*> m_mapDraggable_SelectRect;
|
||||
QMap<QString, QObject*> m_mapDraggable_RightList;
|
||||
QMap<QString, QObject*> m_mapDraggable_CorePhysics; // 岩心分析
|
||||
|
|
@ -457,6 +458,9 @@ public:
|
|||
|
||||
//校深线段
|
||||
void addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor=QColor(255, 255, 255, 80));
|
||||
//校深线段(主校补充线段)
|
||||
void addLineToPlot_Master(double left_Low, double right_Hight, const QString strText, QString strUuid_biaozhun, QColor crColor=QColor(255, 255, 255, 80));
|
||||
|
||||
|
||||
//框选并编辑曲线
|
||||
void addSelectRectToPlot(double left_Low, double right_Hight, int left_Low_Number, int right_Hight_Number);
|
||||
|
|
@ -516,16 +520,28 @@ public slots:
|
|||
void onAddShiftLine();
|
||||
//校深线段
|
||||
void s_AddShifLineToPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight);
|
||||
//校深线段(主校补充线段)
|
||||
void s_AddShifLineToPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//校准线段移动
|
||||
void s_MoveLine_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double left_Low, double right_Hight, QString strUuid_biaozhun);
|
||||
//校准线段颜色(重新选中)
|
||||
void s_ChangeLineColor_Jiaozhun(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
//补充线段颜色(重新选中)
|
||||
void s_ChangeLineColor_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
|
||||
//右键--清除当前分段线
|
||||
void onDelSelectShiftLine();
|
||||
//清除当前分段线
|
||||
void s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
void s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strTrackName_Right, QString strLineName_Right);
|
||||
//清除当前分段线
|
||||
void s_DelSelectShiftLineFromPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strUuid_biaozhun);
|
||||
|
||||
//右键--清除全部分段线
|
||||
void onDelAllShiftLine();
|
||||
//清除全部分段线
|
||||
void s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
//清除全部分段线
|
||||
void s_DelAllShiftLineFromPlot_Master(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//右键--编辑曲线
|
||||
void onEditLine();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user