2025-10-29 17:23:30 +08:00
|
|
|
|
#include "forminfo.h"
|
|
|
|
|
|
#include "ui_forminfo.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "CallManage.h"
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
#include <QMimeData>
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
#include <QVBoxLayout>
|
2026-02-09 18:14:22 +08:00
|
|
|
|
#include <QMenu>
|
2026-03-05 08:10:44 +08:00
|
|
|
|
#include <QPainterPath>
|
2025-11-20 09:32:51 +08:00
|
|
|
|
#include "geometryutils.h"
|
2026-02-04 12:16:25 +08:00
|
|
|
|
#include "qtColorSchemeComboBox.h"
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
//曲线名称(单个)
|
|
|
|
|
|
FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor) :
|
|
|
|
|
|
QWidget(parent),
|
|
|
|
|
|
ui(new Ui::FormInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
//
|
|
|
|
|
|
setAcceptDrops(true);
|
|
|
|
|
|
|
|
|
|
|
|
m_strSlfName = strSlfName;
|
|
|
|
|
|
m_strWellName = strWellName;
|
|
|
|
|
|
m_strTrackName = strTrackName;
|
|
|
|
|
|
m_strLineName = strLineName;
|
|
|
|
|
|
m_lineColor = lineColor;
|
|
|
|
|
|
//
|
2025-11-20 09:32:51 +08:00
|
|
|
|
m_dWidth = 3;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
m_lineStyle = Qt::SolidLine;
|
|
|
|
|
|
m_newFillMode = "无填充";
|
|
|
|
|
|
m_newHeadFill = "不绘制";
|
2026-02-13 22:56:10 +08:00
|
|
|
|
// //
|
|
|
|
|
|
// QPushButton *button = new QPushButton("Drag Me", this);
|
|
|
|
|
|
// QVBoxLayout *layout = new QVBoxLayout(this);
|
|
|
|
|
|
// layout->addWidget(button);
|
|
|
|
|
|
// setLayout(layout);
|
|
|
|
|
|
// // 设置拖拽功能
|
|
|
|
|
|
// setWindowFlags(Qt::FramelessWindowHint | Qt::Window);
|
|
|
|
|
|
// setAttribute(Qt::WA_TranslucentBackground);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
//左刻度
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, QString, double)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//右刻度
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRightScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeRightScale(QString, QString, QString, QString, QString, double)));
|
2025-11-03 18:14:56 +08:00
|
|
|
|
//刻度类型
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
//颜色
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QString, QColor)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//线宽
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineWidth(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLineWidth(QString, QString, QString, QString, QString, double)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//线型
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)), this, SLOT(s_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)));
|
2026-02-28 17:20:13 +08:00
|
|
|
|
|
|
|
|
|
|
//绘制方式
|
|
|
|
|
|
//曲线
|
|
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawLine(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawLine(QString, QString, QString, QString, QString, bool)));
|
|
|
|
|
|
//杆状
|
|
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawGan(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawGan(QString, QString, QString, QString, QString, bool)));
|
|
|
|
|
|
//点状
|
|
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawPoint(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawPoint(QString, QString, QString, QString, QString, bool)));
|
|
|
|
|
|
//绘制对称曲线
|
|
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)));
|
|
|
|
|
|
|
2026-03-18 16:16:11 +08:00
|
|
|
|
//斜井三图一表
|
|
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
|
|
|
|
|
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//岩性填充-不填充
|
2025-11-04 14:44:14 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//岩性填充-填充
|
2025-11-24 15:36:38 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QString, QColor, QColor, QString, bool)),
|
|
|
|
|
|
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QString, QColor, QColor, QString, bool)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
2026-01-26 18:06:51 +08:00
|
|
|
|
//修改曲线选择状态 iSelect=0未知,1标准曲线,2主曲线,3从曲线
|
2026-01-30 09:47:13 +08:00
|
|
|
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStatus(QString, QString, QString, QString, QString, int, bool)), this, SLOT(s_ChangeLineStatus(QString, QString, QString, QString, QString, int, bool)));
|
2026-01-26 18:06:51 +08:00
|
|
|
|
|
2026-02-13 22:56:10 +08:00
|
|
|
|
QFont font1("微软雅黑", 10);
|
|
|
|
|
|
QFont font2("微软雅黑", 8);
|
|
|
|
|
|
m_curveNameFont = font1; // 曲线名称
|
|
|
|
|
|
m_curveUnitFont = font2; // 曲线单位
|
|
|
|
|
|
m_curveScaleFont = font2; // 曲线刻度
|
|
|
|
|
|
m_layerFont = font1;
|
|
|
|
|
|
m_bShowScale = true;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FormInfo::~FormInfo()
|
|
|
|
|
|
{
|
|
|
|
|
|
delete ui;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-04 12:16:25 +08:00
|
|
|
|
void FormInfo::initProperty(QJsonObject obj)
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_vmin = obj.value("vmin").toDouble();
|
|
|
|
|
|
m_vmax = obj.value("vmax").toDouble();
|
|
|
|
|
|
m_strUnit = obj.value("Unit").toString();
|
|
|
|
|
|
|
|
|
|
|
|
QString strType = obj.value("Type").toString();
|
|
|
|
|
|
if ("waveObject" == strType)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_nDrawType = obj.value("DrawType").toInt();
|
|
|
|
|
|
m_nFillType = obj.value("FillType").toInt();
|
|
|
|
|
|
m_strAmp = obj.value("Amp").toString();
|
|
|
|
|
|
m_fMaxAmp = obj.value("MaxAmp").toDouble();
|
|
|
|
|
|
m_nSchemeIndex = obj.value("SchemeIndex").toInt();
|
|
|
|
|
|
m_nColorNum = obj.value("ColorNum").toInt();
|
|
|
|
|
|
|
|
|
|
|
|
m_bDrawDepth = obj.value("DrawDepth").toBool();
|
|
|
|
|
|
m_bDrawBase = obj.value("DrawBase").toBool();
|
|
|
|
|
|
m_bOddEven = obj.value("OddEven").toBool();
|
|
|
|
|
|
|
|
|
|
|
|
m_nWaveJg = obj.value("WaveJg").toInt();
|
|
|
|
|
|
m_fWaveHei = obj.value("WaveHei").toDouble();
|
|
|
|
|
|
}
|
2026-02-04 12:16:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
QJsonObject FormInfo::makeJson()
|
|
|
|
|
|
{
|
|
|
|
|
|
// 创建根对象
|
|
|
|
|
|
QJsonObject rootObj;
|
|
|
|
|
|
//
|
2025-11-12 16:56:33 +08:00
|
|
|
|
QString slffilename=QString("");
|
|
|
|
|
|
int ind=m_strSlfName.lastIndexOf('\\');
|
|
|
|
|
|
int ind2=m_strSlfName.lastIndexOf('/');
|
|
|
|
|
|
if(ind2>ind) ind=ind2;
|
|
|
|
|
|
if(ind>-1) {
|
|
|
|
|
|
slffilename=m_strSlfName.mid(ind+1);
|
|
|
|
|
|
}
|
|
|
|
|
|
rootObj["SlfName"] = slffilename;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
rootObj["WellName"] = m_strWellName;
|
2026-02-13 22:56:10 +08:00
|
|
|
|
// rootObj["TrackName"] = m_strTrackName;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
rootObj["LineName"] = m_strLineName;
|
2026-02-13 22:56:10 +08:00
|
|
|
|
rootObj["AliasName"] = m_strAliasName;
|
2026-03-12 15:37:33 +08:00
|
|
|
|
//
|
|
|
|
|
|
rootObj["Type"] = m_strType;
|
|
|
|
|
|
rootObj["curveNameFont"] = m_curveNameFont.toString();
|
|
|
|
|
|
rootObj["lineColor"] = m_lineColor.name();
|
2026-03-03 11:36:54 +08:00
|
|
|
|
|
|
|
|
|
|
if (m_strType == "tableObject")
|
|
|
|
|
|
{
|
2026-03-12 15:37:33 +08:00
|
|
|
|
//垂向绘制
|
|
|
|
|
|
rootObj["VerticaDrawing"] = m_bVerticaDrawing;
|
|
|
|
|
|
rootObj["RotationAngle"] = m_nRotationAngle;
|
|
|
|
|
|
|
|
|
|
|
|
if (m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT"
|
|
|
|
|
|
|| m_strLineName == "SWALL_CORE" || m_strLineName == "WORDS_RELUST" || m_strLineName == "LAYER_DATA")
|
2026-03-05 16:45:06 +08:00
|
|
|
|
{
|
2026-03-12 15:37:33 +08:00
|
|
|
|
//固井结论/井壁取心/文字结论/地质分层
|
2026-03-05 16:45:06 +08:00
|
|
|
|
//item属性写入slf文件,不需要此次记录
|
|
|
|
|
|
return rootObj;
|
|
|
|
|
|
}
|
2026-03-06 16:17:57 +08:00
|
|
|
|
else if (m_strLineName == "GEO_LITH")
|
|
|
|
|
|
{
|
|
|
|
|
|
//录井剖面
|
2026-03-11 14:23:23 +08:00
|
|
|
|
rootObj["OilZhan"] = m_dOilZhan;//含油占比
|
|
|
|
|
|
rootObj["LithColor"] = m_bLithColor;
|
|
|
|
|
|
rootObj["LithOne"] = m_bLithOne;
|
|
|
|
|
|
rootObj["ShowOil"] = m_bShowOil;
|
|
|
|
|
|
rootObj["CenterOil"] = m_bCenterOil;
|
|
|
|
|
|
rootObj["ShowColor"] = m_bShowColor;
|
|
|
|
|
|
rootObj["ShowColorNum"] = m_bShowColorNum;
|
2026-03-06 16:17:57 +08:00
|
|
|
|
//item属性写入slf文件,不需要此次记录
|
|
|
|
|
|
return rootObj;
|
|
|
|
|
|
}
|
2026-03-12 15:37:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
else if (m_strType == "JiegutextObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//气测/FMT/射孔/文本
|
2026-03-16 17:56:11 +08:00
|
|
|
|
|
|
|
|
|
|
//item属性写入slf文件,不需要此次记录
|
|
|
|
|
|
return rootObj;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (m_strType == "LogfaceObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//沉积相
|
2026-03-18 10:17:11 +08:00
|
|
|
|
rootObj["DrawFac"] = m_bDrawFac;
|
|
|
|
|
|
rootObj["DrawPhase"] = m_bDrawPhase;
|
|
|
|
|
|
rootObj["DrawMFacName"] = m_bDrawMFacName;
|
2026-03-12 15:37:33 +08:00
|
|
|
|
//item属性写入slf文件,不需要此次记录
|
|
|
|
|
|
return rootObj;
|
2026-03-03 11:36:54 +08:00
|
|
|
|
}
|
2026-03-18 17:55:43 +08:00
|
|
|
|
else if (m_strType == "TubingstringObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//套管组件
|
2026-03-20 18:04:15 +08:00
|
|
|
|
//垂向绘制
|
|
|
|
|
|
rootObj["VerticaDrawing"] = m_bVerticaDrawing;
|
|
|
|
|
|
rootObj["RotationAngle"] = m_nRotationAngle;
|
|
|
|
|
|
//
|
|
|
|
|
|
rootObj["DrawStruct"] = m_bDrawStruct_Tubing;
|
|
|
|
|
|
rootObj["DrawTubing"] = m_bDrawTubing_Tubing;
|
|
|
|
|
|
rootObj["DrawTools"] = m_bDrawTools_Tubing;
|
|
|
|
|
|
rootObj["DrawSPTool"] = m_bDrawSPTool_Tubing;
|
|
|
|
|
|
rootObj["DrawCCL"] = m_bDrawCCL_Tubing;
|
|
|
|
|
|
//
|
|
|
|
|
|
rootObj["Oguan"] = m_Oguan_Tubing;
|
|
|
|
|
|
rootObj["inD"] = m_inD_Tubing;
|
|
|
|
|
|
rootObj["OutD"] = m_OutD_Tubing;
|
2026-03-18 17:55:43 +08:00
|
|
|
|
|
|
|
|
|
|
//item属性写入slf文件,不需要此次记录
|
|
|
|
|
|
return rootObj;
|
|
|
|
|
|
}
|
2026-03-03 11:36:54 +08:00
|
|
|
|
|
2026-02-13 22:56:10 +08:00
|
|
|
|
rootObj["Unit"] = m_strUnit;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
rootObj["Width"] = m_dWidth;
|
|
|
|
|
|
rootObj["lineStyle"] = m_lineStyle;
|
|
|
|
|
|
rootObj["vmax"] = m_vmax;
|
|
|
|
|
|
rootObj["vmin"] = m_vmin;
|
2025-11-06 14:43:37 +08:00
|
|
|
|
rootObj["ScaleType"] = m_strScaleType;
|
2026-02-13 22:56:10 +08:00
|
|
|
|
rootObj["ShowScale"] = m_bShowScale;
|
|
|
|
|
|
|
|
|
|
|
|
if (m_strType == "curveObject")
|
|
|
|
|
|
{
|
2026-03-03 17:27:51 +08:00
|
|
|
|
rootObj["DrawLine"] = m_bDrawLine; // 曲线
|
|
|
|
|
|
rootObj["DrawGan"] = m_bDrawGan; // 杆状
|
|
|
|
|
|
rootObj["DrawPoint"] = m_bDrawPoint; // 点状
|
|
|
|
|
|
rootObj["DrawSymmetry"] = m_bDrawSymmetry; // 绘制对称曲线
|
|
|
|
|
|
|
2026-02-13 22:56:10 +08:00
|
|
|
|
//岩性填充
|
|
|
|
|
|
rootObj["newFillMode"] = m_newFillMode;
|
|
|
|
|
|
rootObj["newHeadFill"] = m_newHeadFill;
|
|
|
|
|
|
rootObj["newTargetLine"] = m_newTargetLine;
|
|
|
|
|
|
rootObj["newFillType"] = m_newFillType;
|
|
|
|
|
|
//填充颜色
|
2026-02-05 18:02:39 +08:00
|
|
|
|
rootObj["newColor"] = m_newColor.name();
|
2026-02-13 22:56:10 +08:00
|
|
|
|
rootObj["newLithosImage"] = m_newLithosImage;
|
|
|
|
|
|
rootObj["new_vMax"] = m_new_vMax;
|
|
|
|
|
|
rootObj["new_vMin"] = m_new_vMin;
|
|
|
|
|
|
//岩性前景色
|
2026-02-05 18:02:39 +08:00
|
|
|
|
rootObj["frontColor"] = m_frontColor.name();
|
2026-02-13 22:56:10 +08:00
|
|
|
|
//岩性背景色
|
2026-02-05 18:02:39 +08:00
|
|
|
|
rootObj["backColor"] = m_backColor.name();
|
2026-02-13 22:56:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
else if (m_strType == "waveObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
rootObj["DrawType"] = m_nDrawType;
|
|
|
|
|
|
rootObj["FillType"] = m_nFillType;
|
|
|
|
|
|
rootObj["Amp"] = m_strAmp;
|
|
|
|
|
|
rootObj["MaxAmp"] = m_fMaxAmp;
|
|
|
|
|
|
|
|
|
|
|
|
rootObj["DrawDepth"] = m_bDrawDepth; // 绘制波深度
|
|
|
|
|
|
rootObj["DrawBase"] = m_bDrawBase; // 绘制波基线
|
|
|
|
|
|
rootObj["OddEven"] = m_bOddEven; // 奇偶配色
|
|
|
|
|
|
|
|
|
|
|
|
rootObj["WaveJg"] = m_nWaveJg; // 波形间隔
|
|
|
|
|
|
rootObj["WaveHei"] = m_fWaveHei; // 波形高度
|
|
|
|
|
|
|
|
|
|
|
|
rootObj["SchemeIndex"] = m_nSchemeIndex;
|
|
|
|
|
|
rootObj["ColorNum"] = m_nColorNum;
|
|
|
|
|
|
}
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
return rootObj;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::paintEvent(QPaintEvent* event)
|
|
|
|
|
|
{
|
|
|
|
|
|
QPainter painter(this);
|
|
|
|
|
|
QRect rect = this->rect();
|
|
|
|
|
|
//背景透明
|
|
|
|
|
|
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
|
|
|
|
|
|
|
|
|
|
|
|
if(m_newFillMode=="无填充" || m_newHeadFill == "不绘制")
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.setBrush(Qt::NoBrush);
|
|
|
|
|
|
}
|
2025-11-03 18:14:56 +08:00
|
|
|
|
else //if(m_newFillMode=="填充" && m_newHeadFill == "绘制")
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
if(m_newFillType == "岩性模式")
|
|
|
|
|
|
{
|
2025-10-31 17:56:50 +08:00
|
|
|
|
QColor oldFrontColor(0, 0, 0); // 原始颜色
|
|
|
|
|
|
QColor oldBackColor(255, 255, 255); // 原始颜色
|
|
|
|
|
|
//
|
|
|
|
|
|
QImage image(m_newLithosImage);
|
|
|
|
|
|
for (int y = 0; y < image.height(); ++y) {
|
|
|
|
|
|
for (int x = 0; x < image.width(); ++x) {
|
|
|
|
|
|
QColor pixelColor = QColor(image.pixel(x, y));
|
|
|
|
|
|
if (pixelColor == oldFrontColor) {
|
|
|
|
|
|
image.setPixelColor(x, y, m_frontColor); // 使用 setPixelColor 来设置新颜色
|
|
|
|
|
|
}
|
|
|
|
|
|
if (pixelColor == oldBackColor) {
|
|
|
|
|
|
image.setPixelColor(x, y, m_backColor); // 使用 setPixelColor 来设置新颜色
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//
|
|
|
|
|
|
painter.setBrush(QBrush(QPixmap::fromImage(image)));
|
|
|
|
|
|
|
|
|
|
|
|
//painter.setBrush(QBrush(QPixmap(m_newLithosImage)));
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//graph(0)->setBrush(QBrush(QPixmap(":/image/file.png")));
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(m_newFillType == "颜色模式")
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.setBrush(QBrush(m_newColor));
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(m_newFillType == "成像化")
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//painter.setBrush(QBrush(Qt::red, Qt::SolidPattern));
|
2025-11-05 14:03:27 +08:00
|
|
|
|
QRect rectRound(rect.left()+2,rect.top()+4, rect.width()-4, rect.height()-8);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
painter.setPen(QPen(m_lineColor, m_dWidth, m_lineStyle));
|
2025-11-05 14:03:27 +08:00
|
|
|
|
//painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框
|
|
|
|
|
|
painter.drawRect(rectRound);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-03-11 14:23:23 +08:00
|
|
|
|
QString strShowTxt = "";
|
2025-10-29 17:23:30 +08:00
|
|
|
|
painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡
|
2026-02-02 21:32:36 +08:00
|
|
|
|
painter.setFont(m_curveNameFont);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
painter.setPen(m_lineColor); // fontColor QColor(220, 220, 220)
|
2025-11-06 17:34:31 +08:00
|
|
|
|
//painter.drawText(rect.left() + 20, 30, m_strAliasName); // titleBarText QStringLiteral("动画")
|
|
|
|
|
|
//painter.drawText(rect, Qt::AlignCenter, m_strAliasName);
|
2025-11-18 14:04:31 +08:00
|
|
|
|
if(m_strAliasName == "")
|
|
|
|
|
|
{
|
2026-03-10 09:10:16 +08:00
|
|
|
|
//painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, m_strLineName);
|
2025-11-18 14:04:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
else {
|
2026-01-09 15:40:04 +08:00
|
|
|
|
//气测/FMT/射孔/文本
|
|
|
|
|
|
if(m_strType=="JiegutextObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
QStringList list = m_strAliasName.split("/");//QString字符串分割函数
|
|
|
|
|
|
int iMaxNum = list.size();
|
|
|
|
|
|
if (iMaxNum > 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
float fSpace = rect.width()/(float)iMaxNum;
|
|
|
|
|
|
for(int i=0; i<iMaxNum; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.save();
|
|
|
|
|
|
painter.rotate(90);
|
|
|
|
|
|
int x = rect.left() + i*fSpace + 0.5*fSpace;
|
|
|
|
|
|
int y = rect.top()+4;
|
|
|
|
|
|
|
|
|
|
|
|
//painter.drawText(rect.top()+4, rect.left() + i*fSpace + 0.5*fSpace, list[i]);
|
|
|
|
|
|
painter.drawText(y, -x, list[i]);
|
|
|
|
|
|
painter.restore(); // 恢复原始状态
|
|
|
|
|
|
//break;
|
|
|
|
|
|
}
|
|
|
|
|
|
for(int i=0; i<iMaxNum-1; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
QPointF p1 = QPointF(rect.left() + (i+1)*fSpace, rect.top()+4);
|
|
|
|
|
|
QPointF p2 = QPointF(rect.left() + (i+1)*fSpace, rect.bottom()-4);
|
|
|
|
|
|
painter.drawLine(p1, p2);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, m_strAliasName);
|
|
|
|
|
|
}
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-01-26 18:06:51 +08:00
|
|
|
|
|
|
|
|
|
|
//iSelect=0未知,1标准曲线,2主校曲线,3从校曲线
|
|
|
|
|
|
QString strAliasNameTmp = m_strAliasName;
|
|
|
|
|
|
if(m_iSelect==0)
|
|
|
|
|
|
{
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(m_iSelect==1)
|
|
|
|
|
|
{
|
2026-01-30 09:47:13 +08:00
|
|
|
|
if(m_bMerge)//是拼接状态
|
|
|
|
|
|
{
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-目";
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-标";
|
|
|
|
|
|
}
|
2026-01-26 18:06:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
else if(m_iSelect==2)
|
|
|
|
|
|
{
|
2026-01-30 09:47:13 +08:00
|
|
|
|
if(m_bMerge)//是拼接状态
|
|
|
|
|
|
{
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-源";
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-主校";
|
|
|
|
|
|
}
|
2026-01-26 18:06:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
else if(m_iSelect==3)
|
|
|
|
|
|
{
|
2026-01-30 09:47:13 +08:00
|
|
|
|
if(m_bMerge)//是拼接状态
|
|
|
|
|
|
{
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-从接";
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
strAliasNameTmp = strAliasNameTmp + "-从校";
|
|
|
|
|
|
}
|
2026-01-26 18:06:51 +08:00
|
|
|
|
}
|
2026-03-11 14:23:23 +08:00
|
|
|
|
strShowTxt = strAliasNameTmp;
|
|
|
|
|
|
//painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp);
|
2025-11-18 14:04:31 +08:00
|
|
|
|
}
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2025-11-20 09:32:51 +08:00
|
|
|
|
if(m_strType=="waveObject")
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
if (m_nDrawType == 0 || m_nDrawType == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
int nbot = rect.bottom()- rect.height() / 3.0;
|
|
|
|
|
|
QVector<QPointF> pts;
|
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 15.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 12.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 9.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 6.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 3.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 9.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot - rect.height() / 15.0));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0 + (i++)*rect.width() / 3.0 / 8.0, nbot));
|
|
|
|
|
|
pts.append(QPointF(rect.left() + rect.width() / 3.0, nbot));
|
|
|
|
|
|
|
|
|
|
|
|
if (m_nDrawType == 1) {
|
|
|
|
|
|
QPolygonF cRgn;
|
|
|
|
|
|
for (int j = 0; j < pts.size(); j++) {
|
|
|
|
|
|
cRgn.push_back(pts[j]);
|
|
|
|
|
|
}
|
|
|
|
|
|
QPainterPath path;
|
|
|
|
|
|
path.addPolygon(cRgn);
|
|
|
|
|
|
painter.fillPath(path, QBrush(m_lineColor));
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.drawPolygon(pts);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
QtColorTableData::getInstance()->SetCurrentSchemeIndex(m_nSchemeIndex);
|
|
|
|
|
|
//ColorTableIndex = ind;
|
|
|
|
|
|
|
|
|
|
|
|
QtColorTableData::getInstance()->ChangeColorNum(m_nColorNum);
|
|
|
|
|
|
QList<QRgb> rgbList = QtColorTableData::getInstance()->GetRgb();
|
|
|
|
|
|
int iColorNum = rgbList.size();
|
|
|
|
|
|
|
|
|
|
|
|
//头部绘制调色板
|
|
|
|
|
|
float scale = (float)(rect.width() - 4) / (float)iColorNum;
|
|
|
|
|
|
QRectF rt7 = QRectF(rect.left() + 2, rect.top() + rect.height() / 3, rect.width() - 4, rect.height() / 3);
|
|
|
|
|
|
for (int i = 0; i < iColorNum; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
QColor acolor = rgbList.at(i);
|
|
|
|
|
|
float temp = (float)i * scale;
|
|
|
|
|
|
if (i)rt7.setLeft(rect.left() + 2 + temp);
|
|
|
|
|
|
else rt7.setLeft(rect.left() + 2 + temp + 1);
|
|
|
|
|
|
temp = (float)(i + 1) * scale;
|
|
|
|
|
|
rt7.setRight(rect.left() + 2 + temp);
|
|
|
|
|
|
QBrush HeadBrush = QBrush(acolor);
|
|
|
|
|
|
painter.fillRect(rt7, HeadBrush);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-09 17:50:21 +08:00
|
|
|
|
|
2026-03-10 18:21:29 +08:00
|
|
|
|
if(m_strLineName=="RESULT")
|
2025-12-26 17:53:02 +08:00
|
|
|
|
{
|
|
|
|
|
|
//解释结论,不绘制左右范围
|
2026-03-10 09:10:16 +08:00
|
|
|
|
strShowTxt = "解释结论";
|
2026-03-10 18:21:29 +08:00
|
|
|
|
}
|
2025-12-26 17:53:02 +08:00
|
|
|
|
else if(m_strLineName=="CORE_PHYSICS")
|
|
|
|
|
|
{
|
|
|
|
|
|
//岩心分析,不绘制左右范围
|
2026-03-10 09:10:16 +08:00
|
|
|
|
strShowTxt = "岩心实验数据";
|
2025-12-26 17:53:02 +08:00
|
|
|
|
}
|
2026-01-04 16:54:55 +08:00
|
|
|
|
else if(m_strLineName=="FRAC_HOLE.TABLE" && m_strType=="tableObject")
|
2025-12-30 17:38:11 +08:00
|
|
|
|
{
|
|
|
|
|
|
//蝌蚪图,不绘制左右范围
|
2026-03-10 09:10:16 +08:00
|
|
|
|
strShowTxt = "蝌蚪图";
|
2025-12-30 17:38:11 +08:00
|
|
|
|
}
|
2025-11-20 09:32:51 +08:00
|
|
|
|
|
2026-03-10 09:10:16 +08:00
|
|
|
|
if (strShowTxt.length()>0)
|
|
|
|
|
|
{
|
|
|
|
|
|
QRect rt = rect;
|
|
|
|
|
|
QString text = "";
|
|
|
|
|
|
if (!m_bVerticaDrawing)
|
|
|
|
|
|
{
|
|
|
|
|
|
rt.setX(rect.left());
|
|
|
|
|
|
rt.setY(rect.top() + rect.height() / 3);
|
|
|
|
|
|
rt.setWidth(rect.width());
|
|
|
|
|
|
rt.setHeight(rect.height() / 3);
|
|
|
|
|
|
text = strShowTxt;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < strShowTxt.size(); i++) {
|
|
|
|
|
|
if (!i)text += strShowTxt.at(i);
|
|
|
|
|
|
else {
|
|
|
|
|
|
text += "\n";
|
|
|
|
|
|
text += strShowTxt.at(i);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_nRotationAngle != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 获取文本的精确尺寸
|
|
|
|
|
|
QFontMetrics fm(m_curveUnitFont);
|
|
|
|
|
|
int textWidth = fm.horizontalAdvance(text);
|
|
|
|
|
|
int textHeight = fm.height();
|
|
|
|
|
|
|
|
|
|
|
|
painter.save();
|
|
|
|
|
|
painter.translate(rect.center()); // 将原点移到控件中心
|
|
|
|
|
|
painter.rotate(m_nRotationAngle); // 顺时针旋转90度
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 绘制文本(相对于新原点居中)
|
|
|
|
|
|
painter.drawText(-textWidth / 2, // x偏移:向左一半宽度
|
|
|
|
|
|
-textHeight / 2, // y偏移:向上一半高度
|
|
|
|
|
|
text);
|
|
|
|
|
|
|
|
|
|
|
|
painter.restore();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.drawText(rt, Qt::AlignCenter, text);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-11 14:23:23 +08:00
|
|
|
|
//单位------------------------------
|
|
|
|
|
|
painter.setFont(m_curveUnitFont);
|
|
|
|
|
|
painter.setPen(m_lineColor);
|
|
|
|
|
|
//painter.drawText(rect.left() + 20, 55, m_strUnit);
|
|
|
|
|
|
//painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
|
|
|
|
|
|
|
2025-12-26 17:53:02 +08:00
|
|
|
|
//
|
2025-12-22 18:22:45 +08:00
|
|
|
|
if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT"
|
2025-12-23 17:15:39 +08:00
|
|
|
|
|| m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE"
|
2025-12-25 15:10:14 +08:00
|
|
|
|
|| m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT"
|
2026-03-09 17:50:21 +08:00
|
|
|
|
|| m_strLineName == "CORE_PHYSICS" || m_strLineName == "IMAGE_DATA"
|
|
|
|
|
|
|| m_strLineName == "LAYER_DATA") )
|
2025-12-05 18:27:24 +08:00
|
|
|
|
{
|
2025-12-26 17:53:02 +08:00
|
|
|
|
|
2025-12-05 18:27:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
else {
|
2025-12-24 20:45:48 +08:00
|
|
|
|
if(m_strType=="waveObject"
|
2026-02-13 22:56:10 +08:00
|
|
|
|
|| m_strType=="curveObject")
|
2025-12-12 20:10:30 +08:00
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
painter.drawText(rect.left()+10, rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignCenter, m_strUnit);
|
|
|
|
|
|
|
|
|
|
|
|
// 显示刻度
|
|
|
|
|
|
if (m_bShowScale)
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.setFont(m_curveScaleFont);
|
|
|
|
|
|
QFontMetrics fm1(m_curveScaleFont);
|
|
|
|
|
|
QRect textRect = fm1.boundingRect(QString::number(m_vmax, 'f', 0));
|
|
|
|
|
|
painter.drawText(rect.left() + 10, rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignLeft | Qt::AlignVCenter, QString::number(m_vmin));// +" ~ " + QString::number(m_vmax));
|
|
|
|
|
|
painter.drawText(rect.left() + 10, rect.top() + rect.height() * 2 / 3, rect.width() - textRect.width(), rect.height() / 3, Qt::AlignRight | Qt::AlignVCenter, QString::number(m_vmax));
|
|
|
|
|
|
}
|
2025-12-12 20:10:30 +08:00
|
|
|
|
}
|
2025-12-05 18:27:24 +08:00
|
|
|
|
}
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-03-11 14:23:23 +08:00
|
|
|
|
if(m_strLineName=="井眼垮塌矢量图"
|
|
|
|
|
|
|| m_strLineName=="井斜方位图")
|
|
|
|
|
|
{
|
|
|
|
|
|
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
|
|
|
|
|
|
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-20 15:33:39 +08:00
|
|
|
|
if(m_strLineName == "深度")
|
|
|
|
|
|
{
|
|
|
|
|
|
// 2. 给painter设置字体(关键步骤)
|
|
|
|
|
|
painter.setFont(m_strUnitFont);
|
|
|
|
|
|
painter.drawText(rect.left(), rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignCenter, this->m_strUnit);
|
|
|
|
|
|
}
|
2025-10-29 17:23:30 +08:00
|
|
|
|
QWidget::paintEvent(event);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::dragEnterEvent(QDragEnterEvent* event)
|
|
|
|
|
|
{
|
|
|
|
|
|
qDebug() << "FormInfo dragEnterEvent";
|
|
|
|
|
|
|
|
|
|
|
|
const QMimeData* mimeData = event->mimeData();
|
|
|
|
|
|
// 检查拖拽的数据类型,确定是否接受拖拽
|
|
|
|
|
|
if (event->mimeData()->hasFormat("text/plain")) {
|
|
|
|
|
|
event->acceptProposedAction();
|
|
|
|
|
|
//QApplication::setOverrideCursor(Qt::PointingHandCursor); // 设置鼠标为可添加状态
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
event->ignore();
|
2025-11-20 09:32:51 +08:00
|
|
|
|
//QApplication::setOverrideCursor(Qt::ForbiddenCursor); // 设置鼠标为不可添加状态
|
2025-10-29 17:23:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::dragMoveEvent(QDragMoveEvent* event)
|
|
|
|
|
|
{
|
|
|
|
|
|
qDebug() << "FormInfo dragMoveEvent";
|
|
|
|
|
|
|
|
|
|
|
|
// 可以在这里更新鼠标的位置,根据位置判断是否可以放置
|
|
|
|
|
|
// ...
|
|
|
|
|
|
//dragEnterEvent(event); // 可以使用相同的逻辑
|
|
|
|
|
|
//event->accept();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::dropEvent(QDropEvent* event)
|
|
|
|
|
|
{
|
|
|
|
|
|
qDebug() << "FormInfo dropEvent";
|
|
|
|
|
|
|
|
|
|
|
|
// 处理放置动作,更新UI或数据
|
|
|
|
|
|
if (event->mimeData()->hasFormat("text/plain")) {
|
|
|
|
|
|
// 获取拖拽的数据
|
|
|
|
|
|
QString strExtern = event->mimeData()->text();
|
|
|
|
|
|
qDebug() << strExtern;
|
|
|
|
|
|
//
|
|
|
|
|
|
QStringList list = strExtern.split("#@@#");//QString字符串分割函数
|
2025-11-21 10:14:28 +08:00
|
|
|
|
if (list.size() > 3)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
QString strSlfName = list[0];
|
|
|
|
|
|
QString strWellName = list[1];
|
|
|
|
|
|
QString strLineName = list[2];
|
2025-11-21 10:14:28 +08:00
|
|
|
|
QString strType = list[3];
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2025-11-21 10:14:28 +08:00
|
|
|
|
qDebug() << "strSlfName:" << strSlfName<< " strWellName:" << strWellName<< " strLineName:" << strLineName << " strType:" << strType;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
if(m_strWellName == strWellName)
|
|
|
|
|
|
{
|
2025-11-21 10:14:28 +08:00
|
|
|
|
if(strType=="curveObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//新建曲线
|
|
|
|
|
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(strType=="waveObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//新建波列
|
|
|
|
|
|
emit CallManage::getInstance()->sig_AddWave(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
|
|
|
|
|
}
|
2025-11-25 17:56:20 +08:00
|
|
|
|
else if(strType=="tableObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//新建表格曲线
|
|
|
|
|
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
|
|
|
|
|
}
|
2025-10-29 17:23:30 +08:00
|
|
|
|
// 接受拖拽事件
|
|
|
|
|
|
event->setDropAction(Qt::MoveAction);
|
|
|
|
|
|
event->accept();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
// 如果井名不正确,不接受拖拽事件
|
|
|
|
|
|
event->ignore();
|
2025-10-29 17:23:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
// 如果数据格式不正确,不接受拖拽事件
|
|
|
|
|
|
event->ignore();
|
2025-10-29 17:23:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
// 如果数据格式不正确,不接受拖拽事件
|
|
|
|
|
|
event->ignore();
|
2025-10-29 17:23:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
// 恢复鼠标光标
|
|
|
|
|
|
//QApplication::restoreOverrideCursor();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//线宽
|
|
|
|
|
|
void FormInfo::setLineWidth(double dWidth)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_dWidth = dWidth;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
double FormInfo::getLineWidth()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_dWidth;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//线型
|
|
|
|
|
|
void FormInfo::setLineStyle(Qt::PenStyle lineStyle)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_lineStyle = lineStyle;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Qt::PenStyle FormInfo::getLineStyle()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_lineStyle;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::setVMax(float vmax)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_vmax = vmax;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float FormInfo::getVMax()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_vmax;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::setVMin(float vmin)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_vmin = vmin;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float FormInfo::getVMin()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_vmin;
|
|
|
|
|
|
}
|
2025-10-31 17:56:50 +08:00
|
|
|
|
|
|
|
|
|
|
void FormInfo::setFrontColor(QColor frontColor)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_frontColor = frontColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QColor FormInfo::getFrontColor()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_frontColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormInfo::setBackColor(QColor backColor)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_backColor = backColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QColor FormInfo::getBackColor()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_backColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-02 21:32:36 +08:00
|
|
|
|
bool FormInfo::setInfoProperty(QString strProName, QVariant val)
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
bool bDraw = false;
|
|
|
|
|
|
if ("显示名称" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_strAliasName = val.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("显示单位" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_strUnit = val.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("曲线名称" == strProName || "字体" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_curveNameFont = val.value<QFont>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("曲线单位" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_curveUnitFont = val.value<QFont>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("曲线刻度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_curveScaleFont = val.value<QFont>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("类型" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_nDrawType = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("方式" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_nFillType = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("左刻度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_vmin = val.toDouble();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("右刻度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_vmax = val.toDouble();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("幅度刻度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_strAmp = val.toString();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("最大振幅" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_fMaxAmp = val.toFloat();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("显示刻度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_bShowScale = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("绘制波深度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_bDrawDepth = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("绘制波基线" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_bDrawBase = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("奇偶配色" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_bOddEven = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("波列基值" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_fWaveBase = val.toFloat();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("波形间隔" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_nWaveJg = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("波形高度" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_fWaveHei = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("颜色" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_lineColor = val.value<QColor>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("线宽" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_dWidth = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("色板" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_nSchemeIndex = val.toInt();
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("变密度颜色级数" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_nColorNum = val.toInt();
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("垂向绘制" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_bVerticaDrawing = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("旋转角度(°)" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
this->m_nRotationAngle = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("结论占比%" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_nConclusionProportion = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("显示位置(cm)" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_nShowPos = val.toInt();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("显示层号" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_bShowLayerNo = val.toBool();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("层号字体" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_layerFont = val.value<QFont>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if ("层号旋转" == strProName)
|
|
|
|
|
|
{
|
|
|
|
|
|
bDraw = true;
|
|
|
|
|
|
this->m_fLayerRotate = val.toFloat();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this->update();
|
|
|
|
|
|
return bDraw;
|
2026-02-02 21:32:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-04 12:16:25 +08:00
|
|
|
|
int FormInfo::getFillTypeIndex()
|
|
|
|
|
|
{
|
2026-02-13 22:56:10 +08:00
|
|
|
|
return m_nFillType;
|
2026-02-04 12:16:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-26 18:06:51 +08:00
|
|
|
|
//修改曲线选择状态 iSelect=0未知,1标准曲线,2主曲线,3从曲线
|
2026-01-30 09:47:13 +08:00
|
|
|
|
void FormInfo::s_ChangeLineStatus(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iSelect, bool bMerge)
|
2026-01-26 18:06:51 +08:00
|
|
|
|
{
|
|
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2026-01-26 18:06:51 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_iSelect = iSelect;
|
2026-01-30 09:47:13 +08:00
|
|
|
|
m_bMerge = bMerge;
|
2026-01-26 18:06:51 +08:00
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//属性-左刻度
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_vmin = newLeftScale;
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//属性-右刻度
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_vmax = newRightScale;
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-03 18:14:56 +08:00
|
|
|
|
//属性-刻度类型
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType)
|
2025-11-03 18:14:56 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-11-03 18:14:56 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_strScaleType = strScaleType;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//属性-颜色
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_lineColor = lineColor;
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//属性-线宽
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_dWidth = width;
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//属性-线型
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_lineStyle = lineStyle;
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-28 17:20:13 +08:00
|
|
|
|
//曲线
|
|
|
|
|
|
void FormInfo::s_ChangeDrawLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawLine)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_bDrawLine = bDrawLine;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//杆状
|
|
|
|
|
|
void FormInfo::s_ChangeDrawGan(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawGan)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_bDrawGan = bDrawGan;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//点状
|
|
|
|
|
|
void FormInfo::s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_bDrawPoint = bDrawPoint;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//绘制对称曲线
|
|
|
|
|
|
void FormInfo::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_bDrawSymmetry = bDrawSymmetry;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-18 16:16:11 +08:00
|
|
|
|
void FormInfo::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
|
|
|
|
|
QString strGroup, QString strProperty, QVariant variant)
|
|
|
|
|
|
{
|
|
|
|
|
|
if("井斜数据表参数" == strGroup)
|
|
|
|
|
|
{
|
|
|
|
|
|
if("标题名" == strProperty)
|
|
|
|
|
|
m_Title_table = variant.value<QString>();
|
|
|
|
|
|
else if("头记录高度(cm)" == strProperty)
|
|
|
|
|
|
m_Head_Height = variant.value<double>();
|
|
|
|
|
|
else if("数据记录高度(cm)" == strProperty)
|
|
|
|
|
|
m_Rec_Height = variant.value<double>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if("立体轨迹图参数" == strGroup)
|
|
|
|
|
|
{
|
|
|
|
|
|
if("标题名" == strProperty)
|
|
|
|
|
|
m_Title_ltgj = variant.value<QString>();
|
|
|
|
|
|
else if("最大位移(m)" == strProperty)
|
|
|
|
|
|
m_MaxWy1 = variant.value<double>();
|
|
|
|
|
|
else if("起始垂深(m)" == strProperty)
|
|
|
|
|
|
m_LTTTVD = variant.value<double>();
|
|
|
|
|
|
else if("垂深间隔(m)" == strProperty)
|
|
|
|
|
|
m_DepSpace1 = variant.value<double>();
|
|
|
|
|
|
else if("是否绘制立体框" == strProperty)
|
|
|
|
|
|
m_is3DFrame = variant.value<bool>();
|
|
|
|
|
|
else if("俯视角(度)" == strProperty)
|
|
|
|
|
|
m_LttAngle_X = variant.value<double>();
|
|
|
|
|
|
else if("侧视角(度)" == strProperty)
|
|
|
|
|
|
m_LttAngle = variant.value<double>();
|
|
|
|
|
|
else if("倾斜角(度)" == strProperty)
|
|
|
|
|
|
m_LttAngle_Z = variant.value<double>();
|
|
|
|
|
|
else if("竖线间隔" == strProperty)
|
|
|
|
|
|
m_LTTTVD = variant.value<double>();
|
|
|
|
|
|
else if("俯视南北间隔数" == strProperty)
|
|
|
|
|
|
m_YD = variant.value<double>();
|
|
|
|
|
|
else if("俯视东西间隔数" == strProperty)
|
|
|
|
|
|
m_XD = variant.value<double>();
|
|
|
|
|
|
else if("附加属性类型" == strProperty)
|
|
|
|
|
|
m_IsDrawProperty = variant.value<int>();
|
|
|
|
|
|
else if("选择井曲线1" == strProperty)
|
|
|
|
|
|
m_CurveName1 = variant.value<QString>();
|
|
|
|
|
|
else if("选择井曲线2" == strProperty)
|
|
|
|
|
|
m_CurveName2 = variant.value<QString>();
|
|
|
|
|
|
else if("调色板参数设置" == strProperty)
|
|
|
|
|
|
m_ColorTableIndex = variant.value<int>();
|
|
|
|
|
|
else if("直径放大系数" == strProperty)
|
|
|
|
|
|
m_calscale = variant.value<double>();
|
|
|
|
|
|
else if("波形基值" == strProperty)
|
|
|
|
|
|
m_baseval = variant.value<double>();
|
|
|
|
|
|
else if("波形最大值" == strProperty)
|
|
|
|
|
|
m_maxval = variant.value<double>();
|
|
|
|
|
|
else if("连续填充" == strProperty)
|
|
|
|
|
|
m_isBlock = variant.value<bool>();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if("立体轨迹图参数" == strGroup)
|
|
|
|
|
|
{
|
|
|
|
|
|
if("最小深度间隔(m)" == strProperty)
|
|
|
|
|
|
m_Rlev = variant.value<bool>();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//岩性填充-不填充
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_newFillMode = "无填充";
|
|
|
|
|
|
update();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//岩性填充-填充
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void FormInfo::s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
2025-10-29 17:23:30 +08:00
|
|
|
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
2025-11-24 15:36:38 +08:00
|
|
|
|
float vMin, float vMax, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode, bool bFillNow)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
2025-11-04 14:44:14 +08:00
|
|
|
|
if(m_strUuid == strUuid &&
|
2026-02-13 22:56:10 +08:00
|
|
|
|
m_strSlfName == strSlfName &&
|
|
|
|
|
|
m_strWellName == strWellName &&
|
|
|
|
|
|
m_strTrackName == strTrackName &&
|
|
|
|
|
|
m_strLineName == strLineName)
|
2025-10-29 17:23:30 +08:00
|
|
|
|
{
|
|
|
|
|
|
m_newFillType = newFillType;
|
2025-11-06 14:43:37 +08:00
|
|
|
|
m_newTargetLine = newTargetLine;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
m_newColor = newColor;
|
|
|
|
|
|
m_newLithosImage = newLithosImage;
|
2025-11-06 14:43:37 +08:00
|
|
|
|
m_newHeadFill = newHeadFill;
|
|
|
|
|
|
m_new_vMin = vMin;
|
|
|
|
|
|
m_new_vMax = vMax;
|
|
|
|
|
|
m_strOtherScaleType = strOtherScaleType;
|
2025-10-31 17:56:50 +08:00
|
|
|
|
m_frontColor = frontColor;
|
|
|
|
|
|
m_backColor = backColor;
|
2025-11-06 14:43:37 +08:00
|
|
|
|
m_newFillMode = newFillMode;//"填充";
|
2025-10-31 17:56:50 +08:00
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
update();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-09 18:14:22 +08:00
|
|
|
|
void FormInfo::contextMenuEvent(QContextMenuEvent *event)
|
|
|
|
|
|
{
|
|
|
|
|
|
//曲线
|
|
|
|
|
|
if(m_strType=="curveObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
QMenu menu(this);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowCurve);
|
2026-02-11 16:11:45 +08:00
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteCurv);
|
|
|
|
|
|
menu.exec(event->globalPos());
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(m_strType=="tableObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
QMenu menu(this);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
2026-02-09 18:14:22 +08:00
|
|
|
|
menu.exec(event->globalPos());
|
|
|
|
|
|
}
|
2026-03-12 15:37:33 +08:00
|
|
|
|
else if(m_strType=="JiegutextObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//气测/FMT/射孔/文本
|
|
|
|
|
|
QMenu menu(this);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
|
|
|
|
|
menu.exec(event->globalPos());
|
|
|
|
|
|
}
|
2026-03-16 17:56:11 +08:00
|
|
|
|
else if(m_strType=="LogfaceObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//沉积相
|
|
|
|
|
|
QMenu menu(this);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
|
|
|
|
|
menu.exec(event->globalPos());
|
|
|
|
|
|
}
|
2026-03-18 17:55:43 +08:00
|
|
|
|
else if(m_strType=="TubingstringObject")
|
|
|
|
|
|
{
|
|
|
|
|
|
//套管组件
|
|
|
|
|
|
QMenu menu(this);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
|
|
|
|
|
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
|
|
|
|
|
menu.exec(event->globalPos());
|
|
|
|
|
|
}
|
2026-02-09 18:14:22 +08:00
|
|
|
|
}
|
2026-02-02 21:32:36 +08:00
|
|
|
|
|
2026-02-11 16:11:45 +08:00
|
|
|
|
//曲线数据查看
|
2026-02-09 18:14:22 +08:00
|
|
|
|
void FormInfo::onShowCurve()
|
|
|
|
|
|
{
|
|
|
|
|
|
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strLineName);
|
|
|
|
|
|
}
|
2026-02-11 16:11:45 +08:00
|
|
|
|
//删除曲线
|
|
|
|
|
|
void FormInfo::onDeleteCurv()
|
2026-02-09 18:14:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
//删除曲线
|
|
|
|
|
|
emit CallManage::getInstance()->sig_delLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
|
|
|
|
|
}
|
2026-02-11 16:11:45 +08:00
|
|
|
|
|
|
|
|
|
|
//表格查看
|
|
|
|
|
|
void FormInfo::onShowTable()
|
|
|
|
|
|
{
|
|
|
|
|
|
emit CallManage::getInstance()->sig_ShowTable(m_strSlfName, m_strLineName);
|
|
|
|
|
|
}
|
|
|
|
|
|
//删除表格
|
|
|
|
|
|
void FormInfo::onDeleteTable()
|
|
|
|
|
|
{
|
|
|
|
|
|
//删除表格
|
|
|
|
|
|
emit CallManage::getInstance()->sig_delTableLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
|
|
|
|
|
}
|