From 24bfc1e7dd92ccbdf5040cdc72c18f060bea4050 Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Wed, 11 Mar 2026 10:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/formdraw.cpp | 1866 +++++++++++++++++++++--------------------- 1 file changed, 933 insertions(+), 933 deletions(-) diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 09cbd95..357096c 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -74,7 +74,7 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) : //井眼垮塌矢量图 connect(CallManage::getInstance(), SIGNAL(sig_AddJykt(QString, QString, QString, QString, QString, int)), this, SLOT(s_addJykt(QString, QString, QString, QString, QString,int))); - //井斜方位图 + //井斜方位图 connect(CallManage::getInstance(), SIGNAL(sig_AddDenv(QString, QString, QString, QString, QString, int)), this, SLOT(s_addDenv(QString, QString, QString, QString, QString,int))); //图像 成图 @@ -91,7 +91,7 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) : //沉积相 connect(CallManage::getInstance(), SIGNAL(sig_AddLogface(QString, QString, QString, QString, QString, int)), this, SLOT(s_addLogface(QString, QString, QString, QString, QString,int))); - + //多臂井径 connect(CallManage::getInstance(), SIGNAL(sig_AddMCals(QString, QString, QString, QString, QString, int)), this, SLOT(s_addMCals(QString, QString, QString, QString, QString,int))); @@ -120,61 +120,61 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) return; } - if ("tableObject" == strType) - { - QMyCustomPlot* plot = this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName); - if (plot == NULL) - return; + if ("tableObject" == strType) + { + QMyCustomPlot* plot = this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName); + if (plot == NULL) + return; - QTimer::singleShot(200, this, [=]() { - emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2); - }); - return; - } + QTimer::singleShot(200, this, [=]() { + emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2); + }); + return; + } - //道-对象 - FormInfo* pInfo = m_formTrack->setDrawDt(listdt, objInfo); + //道-对象 + FormInfo* pInfo = m_formTrack->setDrawDt(listdt, objInfo); // QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName); - curv->m_iY1 = m_iY1; - curv->m_iY2 = m_iY2; - curv->initGeometry(m_strUuid, m_iScale, nW); + curv->m_iY1 = m_iY1; + curv->m_iY2 = m_iY2; + curv->initGeometry(m_strUuid, m_iScale, nW); curv->show(); - if ("waveObject" == strType) - { - curv->m_iY1 = m_iY1; - curv->m_iY2 = m_iY2; - curv->m_nMode = pInfo->getFillTypeIndex(); - //curv->m_fmin = pInfo->getVMin(); - //curv->m_fmax = pInfo->getVMax(); - curv->m_nDrawType = pInfo->m_nDrawType; - curv->m_bDrawDepth = pInfo->m_bDrawDepth; // 绘制波深度 - curv->m_bDrawBase = pInfo->m_bDrawBase; // 绘制波深度 - curv->m_bOddEven = pInfo->m_bOddEven; // 绘制波深度 + if ("waveObject" == strType) + { + curv->m_iY1 = m_iY1; + curv->m_iY2 = m_iY2; + curv->m_nMode = pInfo->getFillTypeIndex(); + //curv->m_fmin = pInfo->getVMin(); + //curv->m_fmax = pInfo->getVMax(); + curv->m_nDrawType = pInfo->m_nDrawType; + curv->m_bDrawDepth = pInfo->m_bDrawDepth; // 绘制波深度 + curv->m_bDrawBase = pInfo->m_bDrawBase; // 绘制波深度 + curv->m_bOddEven = pInfo->m_bOddEven; // 绘制波深度 - curv->m_MaxRange = pInfo->m_fMaxAmp; // 最大振幅 - curv->m_Base = pInfo->m_fWaveBase; // 波列基值 - curv->m_nWaveJg = pInfo->m_nWaveJg; // 波形间隔 - curv->m_nWaveHei = pInfo->m_fWaveHei; // 波形高度 + curv->m_MaxRange = pInfo->m_fMaxAmp; // 最大振幅 + curv->m_Base = pInfo->m_fWaveBase; // 波列基值 + curv->m_nWaveJg = pInfo->m_nWaveJg; // 波形间隔 + curv->m_nWaveHei = pInfo->m_fWaveHei; // 波形高度 - curv->m_nColorNum = pInfo->m_nColorNum; - curv->m_nSchemeIndex = pInfo->m_nSchemeIndex; - curv->m_fScaleV = pInfo->getVMax(); - - int _nSamples = 0; - if (g_iSupport3D) - { - initWave_3D(curv, m_strSlfName, strLineName, _nSamples); - } - else - { - //curv->initWave2(m_strSlfName, strLineName); - curv->changePropertyWaveUpdate(); - } - } + curv->m_nColorNum = pInfo->m_nColorNum; + curv->m_nSchemeIndex = pInfo->m_nSchemeIndex; + curv->m_fScaleV = pInfo->getVMax(); + + int _nSamples = 0; + if (g_iSupport3D) + { + initWave_3D(curv, m_strSlfName, strLineName, _nSamples); + } + else + { + //curv->initWave2(m_strSlfName, strLineName); + curv->changePropertyWaveUpdate(); + } + } // 深度 else if("depthObject" == strType) { @@ -206,19 +206,19 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) } } - else if (strType == "tableObject") - { - //新建表格曲线 - emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName); - } + else if (strType == "tableObject") + { + //新建表格曲线 + emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName); + } curv->replot(); connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); - QTimer::singleShot(100, this, [=]() { - emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); - }); - + QTimer::singleShot(100, this, [=]() { + emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); + }); + // m_listLineName.push_back(strLineName); } @@ -226,64 +226,64 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) void FormDraw::setDrawPropert(QJsonObject objInfo) { - if (objInfo.contains("formInfos")) - { - QJsonValue value = objInfo.value("formInfos"); - if (value.isArray()) { - QJsonArray linesArray = value.toArray(); - qDebug() << "linesArray number:" << QString::number(linesArray.size()); - //展示所有曲线 - DisplayLines(linesArray); - } - } + if (objInfo.contains("formInfos")) + { + QJsonValue value = objInfo.value("formInfos"); + if (value.isArray()) { + QJsonArray linesArray = value.toArray(); + qDebug() << "linesArray number:" << QString::number(linesArray.size()); + //展示所有曲线 + DisplayLines(linesArray); + } + } } void FormDraw::DisplayLines(QJsonArray linesArray) { - QMap mapLines; + QMap mapLines; - int id = 0; - int iCount = linesArray.size(); - for (int i = 0; i < iCount; i++) - { - QJsonValue lineValue = linesArray[i]; + int id = 0; + int iCount = linesArray.size(); + for (int i = 0; i < iCount; i++) + { + QJsonValue lineValue = linesArray[i]; - QJsonObject lineObj = lineValue.toObject(); - // - if (lineObj.contains("id")) - { - QJsonValue value = lineObj.value("id"); - if (value.isDouble()) { - id = value.toInt(); - qDebug() << "id:" << QString::number(id); - // - mapLines.insert(id, i); - } - } - } + QJsonObject lineObj = lineValue.toObject(); + // + if (lineObj.contains("id")) + { + QJsonValue value = lineObj.value("id"); + if (value.isDouble()) { + id = value.toInt(); + qDebug() << "id:" << QString::number(id); + // + mapLines.insert(id, i); + } + } + } - for (int id = 0; id < iCount; id++) - { - if (mapLines.contains(id)) - { - int iNum = mapLines.value(id); - //按照id顺序,展示曲线 - QJsonValue lineValue = linesArray[iNum]; - QJsonObject lineObj = lineValue.toObject(); - // - if (lineObj.contains("info")) - { - QJsonValue value = lineObj.value("info"); - if (value.isObject()) { - QJsonObject lineObjInfo = value.toObject(); + for (int id = 0; id < iCount; id++) + { + if (mapLines.contains(id)) + { + int iNum = mapLines.value(id); + //按照id顺序,展示曲线 + QJsonValue lineValue = linesArray[iNum]; + QJsonObject lineObj = lineValue.toObject(); + // + if (lineObj.contains("info")) + { + QJsonValue value = lineObj.value("info"); + if (value.isObject()) { + QJsonObject lineObjInfo = value.toObject(); QString strType = lineObjInfo.value("Type").toString(); - //展示其中一条曲线 + //展示其中一条曲线 if (strType == "curveObject") - { - DisplayLine_One(lineObjInfo); - } + { + DisplayLine_One(lineObjInfo); + } else if (strType == "tableObject") { QString strLineName = ""; @@ -303,14 +303,14 @@ void FormDraw::DisplayLines(QJsonArray linesArray) DisplayTable_One(lineObjInfo); } } - else - { - DisplayType_One(lineObjInfo); - } - } - } - } - } + else + { + DisplayType_One(lineObjInfo); + } + } + } + } + } } //结论 @@ -403,76 +403,76 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo) void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) { - QString strSlfName = ""; - QString strWellName = ""; - // QString strTrackName = ""; - QString strLineName = ""; + QString strSlfName = ""; + QString strWellName = ""; + // QString strTrackName = ""; + QString strLineName = ""; QString strAliasName = "";//显示名称 QString strUnit = "";//单位 QFont curveNameFont("微软雅黑", 10); // 曲线名称字体 - // - double newLeftScale = 0;//左刻度 - double newRightScale = 500;//右刻度 - QString strScaleType;//刻度类型(线性,对数) - // - double width = 3;//线宽 - QColor lineColor = QColor(0, 0, 0);//颜色 - Qt::PenStyle lineStyle = Qt::SolidLine;//线形 - //岩性填充 - QString newHeadFill;//头部图例 - QString newTargetLine;//目标曲线 - QString newFillType;//填充类型 - QString newFillMode;//填充模式 - QColor newColor;//填充颜色 - QString newLithosImage = "";//岩性图片 - float new_vMin;//其他目标曲线 - float new_vMax;//其他目标曲线 - QString strOtherScaleType;//其他目标曲线,刻度类型(线性,对数) - QColor frontColor(0, 0, 0);//岩性前景色 - QColor backColor(255, 255, 255);//岩性背景色 + // + double newLeftScale = 0;//左刻度 + double newRightScale = 500;//右刻度 + QString strScaleType;//刻度类型(线性,对数) + // + double width = 3;//线宽 + QColor lineColor = QColor(0, 0, 0);//颜色 + Qt::PenStyle lineStyle = Qt::SolidLine;//线形 + //岩性填充 + QString newHeadFill;//头部图例 + QString newTargetLine;//目标曲线 + QString newFillType;//填充类型 + QString newFillMode;//填充模式 + QColor newColor;//填充颜色 + QString newLithosImage = "";//岩性图片 + float new_vMin;//其他目标曲线 + float new_vMax;//其他目标曲线 + QString strOtherScaleType;//其他目标曲线,刻度类型(线性,对数) + QColor frontColor(0, 0, 0);//岩性前景色 + QColor backColor(255, 255, 255);//岩性背景色 - if (lineObjInfo.contains("SlfName")) - { - QJsonValue value = lineObjInfo.value("SlfName"); - if (value.isString()) { - strSlfName = value.toString(); - //qDebug() << "SlfName:" << strSlfName; + if (lineObjInfo.contains("SlfName")) + { + QJsonValue value = lineObjInfo.value("SlfName"); + if (value.isString()) { + strSlfName = value.toString(); + //qDebug() << "SlfName:" << strSlfName; - // - QString slffilename = QString(""); - int ind = strSlfName.lastIndexOf('\\'); - int ind2 = strSlfName.lastIndexOf('/'); - if (ind2 > ind) ind = ind2; - if (ind > -1) { - slffilename = strSlfName.mid(ind + 1); - strSlfName = slffilename; - } - } - } - if (lineObjInfo.contains("WellName")) - { - QJsonValue value = lineObjInfo.value("WellName"); - if (value.isString()) { - strWellName = value.toString(); - //qDebug() << "WellName:" << strWellName; - } - } - // if (lineObjInfo.contains("TrackName")) - // { - // QJsonValue value = lineObjInfo.value("TrackName"); - // if (value.isString()) { - // strTrackName = value.toString(); - // //qDebug() << "TrackName:" << strTrackName; - // } - // } - if (lineObjInfo.contains("LineName")) - { - QJsonValue value = lineObjInfo.value("LineName"); - if (value.isString()) { - strLineName = value.toString(); - //qDebug() << "LineName:" << strLineName; - } - } + // + QString slffilename = QString(""); + int ind = strSlfName.lastIndexOf('\\'); + int ind2 = strSlfName.lastIndexOf('/'); + if (ind2 > ind) ind = ind2; + if (ind > -1) { + slffilename = strSlfName.mid(ind + 1); + strSlfName = slffilename; + } + } + } + if (lineObjInfo.contains("WellName")) + { + QJsonValue value = lineObjInfo.value("WellName"); + if (value.isString()) { + strWellName = value.toString(); + //qDebug() << "WellName:" << strWellName; + } + } + // if (lineObjInfo.contains("TrackName")) + // { + // QJsonValue value = lineObjInfo.value("TrackName"); + // if (value.isString()) { + // strTrackName = value.toString(); + // //qDebug() << "TrackName:" << strTrackName; + // } + // } + if (lineObjInfo.contains("LineName")) + { + QJsonValue value = lineObjInfo.value("LineName"); + if (value.isString()) { + strLineName = value.toString(); + //qDebug() << "LineName:" << strLineName; + } + } if (lineObjInfo.contains("AliasName")) { QJsonValue value = lineObjInfo.value("AliasName"); @@ -499,52 +499,52 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) } } - if (lineObjInfo.contains("vmin")) - { - QJsonValue value = lineObjInfo.value("vmin"); - if (value.isDouble()) { - newLeftScale = value.toDouble(); - //qDebug() << "vmin:" << QString::number(newLeftScale); - } - } - if (lineObjInfo.contains("vmax")) - { - QJsonValue value = lineObjInfo.value("vmax"); - if (value.isDouble()) { - newRightScale = value.toDouble(); - //qDebug() << "vmax:" << QString::number(newRightScale); - } - } - if (lineObjInfo.contains("ScaleType")) - { - QJsonValue value = lineObjInfo.value("ScaleType"); - if (value.isString()) { - strScaleType = value.toString(); - //qDebug() << "ScaleType:" << strScaleType; - } - } - if (lineObjInfo.contains("Width")) - { - QJsonValue value = lineObjInfo.value("Width"); - if (value.isDouble()) { - width = value.toDouble(); - //qDebug() << "Width:" << QString::number(width); - } - } + if (lineObjInfo.contains("vmin")) + { + QJsonValue value = lineObjInfo.value("vmin"); + if (value.isDouble()) { + newLeftScale = value.toDouble(); + //qDebug() << "vmin:" << QString::number(newLeftScale); + } + } + if (lineObjInfo.contains("vmax")) + { + QJsonValue value = lineObjInfo.value("vmax"); + if (value.isDouble()) { + newRightScale = value.toDouble(); + //qDebug() << "vmax:" << QString::number(newRightScale); + } + } + if (lineObjInfo.contains("ScaleType")) + { + QJsonValue value = lineObjInfo.value("ScaleType"); + if (value.isString()) { + strScaleType = value.toString(); + //qDebug() << "ScaleType:" << strScaleType; + } + } + if (lineObjInfo.contains("Width")) + { + QJsonValue value = lineObjInfo.value("Width"); + if (value.isDouble()) { + width = value.toDouble(); + //qDebug() << "Width:" << QString::number(width); + } + } - if (lineObjInfo.contains("lineStyle")) - { - QJsonValue value = lineObjInfo.value("lineStyle"); - if (value.isDouble()) { - lineStyle = (Qt::PenStyle)value.toInt(); - //qDebug() << "lineStyle:" << QString::number(lineStyle); - } - } - // + if (lineObjInfo.contains("lineStyle")) + { + QJsonValue value = lineObjInfo.value("lineStyle"); + if (value.isDouble()) { + lineStyle = (Qt::PenStyle)value.toInt(); + //qDebug() << "lineStyle:" << QString::number(lineStyle); + } + } + // if (lineObjInfo.contains("lineColor")) - { - lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); - } + { + lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); + } // bool bDrawLine = true; // 曲线 @@ -584,12 +584,12 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) } } - QString folderPath = GetLogdataPath(); - folderPath = folderPath + g_prjname; - strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; + QString folderPath = GetLogdataPath(); + folderPath = folderPath + g_prjname; + strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; - if (strLineName != "") - { + if (strLineName != "") + { //此处属性注意顺序,后续使用按照顺序 QStringList listOtherProperty; listOtherProperty.append(strAliasName); @@ -627,250 +627,250 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) listOtherProperty.append("0"); } - //新建曲线 - s_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, - newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty); - } + //新建曲线 + s_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, + newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty); + } - //--------------- - if (lineObjInfo.contains("newHeadFill")) - { - QJsonValue value = lineObjInfo.value("newHeadFill"); - if (value.isString()) { - newHeadFill = value.toString(); - //qDebug() << "newHeadFill:" << newHeadFill; - } - } - if (lineObjInfo.contains("newTargetLine")) - { - QJsonValue value = lineObjInfo.value("newTargetLine"); - if (value.isString()) { - newTargetLine = value.toString(); - //qDebug() << "newTargetLine:" << newTargetLine; - } - } - if (lineObjInfo.contains("newFillType")) - { - QJsonValue value = lineObjInfo.value("newFillType"); - if (value.isString()) { - newFillType = value.toString(); - //qDebug() << "newFillType:" << newFillType; - } - } - if (lineObjInfo.contains("newFillMode")) - { - QJsonValue value = lineObjInfo.value("newFillMode"); - if (value.isString()) { - newFillMode = value.toString(); - //qDebug() << "newFillMode:" << newFillMode; - } - } - // + //--------------- + if (lineObjInfo.contains("newHeadFill")) + { + QJsonValue value = lineObjInfo.value("newHeadFill"); + if (value.isString()) { + newHeadFill = value.toString(); + //qDebug() << "newHeadFill:" << newHeadFill; + } + } + if (lineObjInfo.contains("newTargetLine")) + { + QJsonValue value = lineObjInfo.value("newTargetLine"); + if (value.isString()) { + newTargetLine = value.toString(); + //qDebug() << "newTargetLine:" << newTargetLine; + } + } + if (lineObjInfo.contains("newFillType")) + { + QJsonValue value = lineObjInfo.value("newFillType"); + if (value.isString()) { + newFillType = value.toString(); + //qDebug() << "newFillType:" << newFillType; + } + } + if (lineObjInfo.contains("newFillMode")) + { + QJsonValue value = lineObjInfo.value("newFillMode"); + if (value.isString()) { + newFillMode = value.toString(); + //qDebug() << "newFillMode:" << newFillMode; + } + } + // if (lineObjInfo.contains("newColor")) { newColor.setNamedColor(lineObjInfo.value("newColor").toString()); } - if (lineObjInfo.contains("newLithosImage")) - { - QJsonValue value = lineObjInfo.value("newLithosImage"); - if (value.isString()) { - newLithosImage = value.toString(); - //qDebug() << "newLithosImage:" << newLithosImage; - } - } - if (lineObjInfo.contains("new_vMin")) - { - QJsonValue value = lineObjInfo.value("new_vMin"); - if (value.isDouble()) { - new_vMin = value.toDouble(); - //qDebug() << "new_vMin:" << QString::number(new_vMin); - } - } - if (lineObjInfo.contains("new_vMax")) - { - QJsonValue value = lineObjInfo.value("new_vMax"); - if (value.isDouble()) { - new_vMax = value.toDouble(); - //qDebug() << "new_vMax:" << QString::number(new_vMax); - } - } - // + if (lineObjInfo.contains("newLithosImage")) + { + QJsonValue value = lineObjInfo.value("newLithosImage"); + if (value.isString()) { + newLithosImage = value.toString(); + //qDebug() << "newLithosImage:" << newLithosImage; + } + } + if (lineObjInfo.contains("new_vMin")) + { + QJsonValue value = lineObjInfo.value("new_vMin"); + if (value.isDouble()) { + new_vMin = value.toDouble(); + //qDebug() << "new_vMin:" << QString::number(new_vMin); + } + } + if (lineObjInfo.contains("new_vMax")) + { + QJsonValue value = lineObjInfo.value("new_vMax"); + if (value.isDouble()) { + new_vMax = value.toDouble(); + //qDebug() << "new_vMax:" << QString::number(new_vMax); + } + } + // if (lineObjInfo.contains("frontColor")) { frontColor.setNamedColor(lineObjInfo.value("frontColor").toString()); } - // + // if (lineObjInfo.contains("backColor")) { backColor.setNamedColor(lineObjInfo.value("backColor").toString()); } - // - if (newFillMode == "无填充") - { - //emit CallManage::getInstance()->sig_ClearFillMode(m_strUuid, strSlfName, strWellName, strTrackName, strLineName); - } - else //if(newFillMode=="填充") - { - //模板不立刻填充,bFillNow=false - emit CallManage::getInstance()->sig_ChangeFillMode(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, - newFillType, newTargetLine, newColor, newLithosImage, newHeadFill, - new_vMin, new_vMax, strOtherScaleType, frontColor, backColor, newFillMode, false); - } + // + if (newFillMode == "无填充") + { + //emit CallManage::getInstance()->sig_ClearFillMode(m_strUuid, strSlfName, strWellName, strTrackName, strLineName); + } + else //if(newFillMode=="填充") + { + //模板不立刻填充,bFillNow=false + emit CallManage::getInstance()->sig_ChangeFillMode(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, + newFillType, newTargetLine, newColor, newLithosImage, newHeadFill, + new_vMin, new_vMax, strOtherScaleType, frontColor, backColor, newFillMode, false); + } } void FormDraw::DisplayType_One(QJsonObject objInfo) { - QString strType = objInfo.value("Type").toString(); - QString strLineName = objInfo.value("LineName").toString(); - //if (strType == "waveObject") - //{ - // //新建波列 - // //emit CallManage::getInstance()->sig_AddWave(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, strLineName); - //} - //else - { - QStringList dt; - dt << m_strUuid; - dt << m_strWellName; - dt << m_strSlfName; - dt << strLineName; - dt << strType; - dt << QString::number(m_nTrackW); - this->setDrawData(dt, objInfo); - } + QString strType = objInfo.value("Type").toString(); + QString strLineName = objInfo.value("LineName").toString(); + //if (strType == "waveObject") + //{ + // //新建波列 + // //emit CallManage::getInstance()->sig_AddWave(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, strLineName); + //} + //else + { + QStringList dt; + dt << m_strUuid; + dt << m_strWellName; + dt << m_strSlfName; + dt << strLineName; + dt << strType; + dt << QString::number(m_nTrackW); + this->setDrawData(dt, objInfo); + } } void FormDraw::crossTrackSetting() { - if (m_formTrack == NULL || m_vecCurv.size() <= 0) - return; + if (m_formTrack == NULL || m_vecCurv.size() <= 0) + return; - int nleft = 0; // 最大左跨道 - int nright = 0; // 最大右跨道 - int nSingleW = m_formTrack->width(); - QRect rt = m_formTrack->geometry(); - for (int i = 0; i < m_vecCurv.size(); i++) - { - QMyCustomPlot *pCurvPlot = m_vecCurv.at(i); - if (!pCurvPlot) - continue; + int nleft = 0; // 最大左跨道 + int nright = 0; // 最大右跨道 + int nSingleW = m_formTrack->width(); + QRect rt = m_formTrack->geometry(); + for (int i = 0; i < m_vecCurv.size(); i++) + { + QMyCustomPlot *pCurvPlot = m_vecCurv.at(i); + if (!pCurvPlot) + continue; - FormInfo* pInfo = m_formTrack->getFormInfoByParameters(pCurvPlot->m_strUuid, pCurvPlot->m_strWellName, - pCurvPlot->m_strTrackName, pCurvPlot->m_strLineName); - if (pInfo == NULL) - continue; + FormInfo* pInfo = m_formTrack->getFormInfoByParameters(pCurvPlot->m_strUuid, pCurvPlot->m_strWellName, + pCurvPlot->m_strTrackName, pCurvPlot->m_strLineName); + if (pInfo == NULL) + continue; - if (pInfo->m_nLeftCross > nleft) - nleft = pInfo->m_nLeftCross; + if (pInfo->m_nLeftCross > nleft) + nleft = pInfo->m_nLeftCross; - if (pInfo->m_nRightCross > nright) - nright = pInfo->m_nRightCross; + if (pInfo->m_nRightCross > nright) + nright = pInfo->m_nRightCross; - } + } - for (int i = 0; i < m_vecCurv.size(); i++) - { - QMyCustomPlot *pCurvPlot = m_vecCurv.at(i); - if (!pCurvPlot) - continue; + for (int i = 0; i < m_vecCurv.size(); i++) + { + QMyCustomPlot *pCurvPlot = m_vecCurv.at(i); + if (!pCurvPlot) + continue; - FormInfo* pInfo = m_formTrack->getFormInfoByParameters(pCurvPlot->m_strUuid, pCurvPlot->m_strWellName, - pCurvPlot->m_strTrackName, pCurvPlot->m_strLineName); - if (pInfo == NULL) - continue; + FormInfo* pInfo = m_formTrack->getFormInfoByParameters(pCurvPlot->m_strUuid, pCurvPlot->m_strWellName, + pCurvPlot->m_strTrackName, pCurvPlot->m_strLineName); + if (pInfo == NULL) + continue; - pCurvPlot->m_iX1 = pInfo->m_vmin; - pCurvPlot->m_iX2 = pInfo->m_vmax; - pCurvPlot->m_nLeftCross = pInfo->m_nLeftCross; - pCurvPlot->m_nRightCross = pInfo->m_nRightCross; + pCurvPlot->m_iX1 = pInfo->m_vmin; + pCurvPlot->m_iX2 = pInfo->m_vmax; + pCurvPlot->m_nLeftCross = pInfo->m_nLeftCross; + pCurvPlot->m_nRightCross = pInfo->m_nRightCross; - QCPRange yRange;// = pCurvPlot->yAxis->range(); - double rg = pCurvPlot->m_iX2 - pCurvPlot->m_iX1; - yRange.lower = pCurvPlot->m_iX1 - rg * nleft; - yRange.upper = pCurvPlot->m_iX2 + rg * nright; + QCPRange yRange;// = pCurvPlot->yAxis->range(); + double rg = pCurvPlot->m_iX2 - pCurvPlot->m_iX1; + yRange.lower = pCurvPlot->m_iX1 - rg * nleft; + yRange.upper = pCurvPlot->m_iX2 + rg * nright; - pCurvPlot->yAxis->setRange(yRange); - int nnw = (nleft + nright + 1) * nSingleW; - QRect plotRt = pCurvPlot->geometry(); - plotRt.setWidth(nnw); - pCurvPlot->setGeometry(plotRt); - pCurvPlot->replot(); - } + pCurvPlot->yAxis->setRange(yRange); + int nnw = (nleft + nright + 1) * nSingleW; + QRect plotRt = pCurvPlot->geometry(); + plotRt.setWidth(nnw); + pCurvPlot->setGeometry(plotRt); + pCurvPlot->replot(); + } - QRect selfRt = this->geometry(); - selfRt.setX(rt.x() - (nleft * nSingleW)); - selfRt.setWidth((nleft + nright + 1)*nSingleW); - this->setGeometry(selfRt); + QRect selfRt = this->geometry(); + selfRt.setX(rt.x() - (nleft * nSingleW)); + selfRt.setWidth((nleft + nright + 1)*nSingleW); + this->setGeometry(selfRt); } void FormDraw::paintEvent(QPaintEvent*) { - //if (m_listLineName.size() > 0 && m_listLineName.at(0) == "AC") - //{ - // QPainter painter(this); - // QRect rect = this->rect(); - // //背景透明 - // painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(200, 0, 0)); //QColor(67, 67, 67, 100) - //} + //if (m_listLineName.size() > 0 && m_listLineName.at(0) == "AC") + //{ + // QPainter painter(this); + // QRect rect = this->rect(); + // //背景透明 + // painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(200, 0, 0)); //QColor(67, 67, 67, 100) + //} } QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QStringList listOtherProperty) { - if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT" - || strLineName == "GEO_LITH" || strLineName == "SWALL_CORE" - || strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT" - || strLineName == "CORE_PHYSICS" || strLineName == "IMAGE_DATA" - || strLineName == "LAYER_DATA" ) - { + if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT" + || strLineName == "GEO_LITH" || strLineName == "SWALL_CORE" + || strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT" + || strLineName == "CORE_PHYSICS" || strLineName == "IMAGE_DATA" + || strLineName == "LAYER_DATA" ) + { - } - else - { - return NULL; - } - //井名&道名不一致 - if (strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName) - { - } - else - { - return NULL; - } + } + else + { + return NULL; + } + //井名&道名不一致 + if (strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName) + { + } + else + { + return NULL; + } - if (m_listTableName.contains(strLineName)) - { - qDebug() << "FormDraw strLineName already exist! " << strLineName; - return NULL; - } + if (m_listTableName.contains(strLineName)) + { + qDebug() << "FormDraw strLineName already exist! " << strLineName; + return NULL; + } - // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); - curv->m_iY1 = m_iY1; - curv->m_iY2 = m_iY2; - curv->initGeometry(m_strUuid, m_iScale, m_nTrackW); - curv->show(); + // + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + curv->m_iY1 = m_iY1; + curv->m_iY2 = m_iY2; + curv->initGeometry(m_strUuid, m_iScale, m_nTrackW); + curv->show(); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; - if (strLineName == "FRAC_HOLE.TABLE") - { - //蝌蚪图 - curv->mKedou = true; - //隐藏网格 - curv->xAxis->grid()->setVisible(false); - curv->yAxis->grid()->setVisible(false); + if (strLineName == "FRAC_HOLE.TABLE") + { + //蝌蚪图 + curv->mKedou = true; + //隐藏网格 + curv->xAxis->grid()->setVisible(false); + curv->yAxis->grid()->setVisible(false); - initTableLine(curv, strSlfName, strLineName); - } - else if (strLineName == "WORDS_RELUST") - { - //文字结论 + initTableLine(curv, strSlfName, strLineName); + } + else if (strLineName == "WORDS_RELUST") + { + //文字结论 if(listOtherProperty.size()>=3) { QString strAliasName = listOtherProperty[0]; @@ -882,7 +882,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri { initWords(curv, strSlfName, strLineName); } - } + } else if (strLineName == "LAYER_DATA") { //地质层位 @@ -898,14 +898,14 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri initLayer(curv, strSlfName, strLineName); } } - else if (strLineName == "RESULT") - { - //解释结论 - initResult(curv, strSlfName, strLineName); - } - else if (strLineName == "GEO_LITH") - { - //录井剖面 + else if (strLineName == "RESULT") + { + //解释结论 + initResult(curv, strSlfName, strLineName); + } + else if (strLineName == "GEO_LITH") + { + //录井剖面 if(listOtherProperty.size()>=3) { QString strAliasName = listOtherProperty[0]; @@ -917,10 +917,10 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri { initGeoLith(curv, strSlfName, strLineName); } - } - else if (strLineName == "SWALL_CORE") - { - //井壁取心 + } + else if (strLineName == "SWALL_CORE") + { + //井壁取心 if(listOtherProperty.size()>=3) { QString strAliasName = listOtherProperty[0]; @@ -932,10 +932,10 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri { initSwallCore(curv, strSlfName, strLineName); } - } - else if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT") - { - //固井结论 + } + else if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT") + { + //固井结论 if(listOtherProperty.size()>=3) { QString strAliasName = listOtherProperty[0]; @@ -947,23 +947,23 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri { initGujing(curv, strSlfName, strLineName); } - } - else if (strLineName == "CORE_PHYSICS") - { - //岩心实验数据 - initCorePhysics(curv, strSlfName, strLineName); - } - else if (strLineName == "IMAGE_DATA") - { - //岩心图片 - initIMAGE_DATA(curv, strSlfName, strLineName); - } + } + else if (strLineName == "CORE_PHYSICS") + { + //岩心实验数据 + initCorePhysics(curv, strSlfName, strLineName); + } + else if (strLineName == "IMAGE_DATA") + { + //岩心图片 + initIMAGE_DATA(curv, strSlfName, strLineName); + } - connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); + connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); - // - m_listTableName.push_back(strLineName); - return curv; + // + m_listTableName.push_back(strLineName); + return curv; } void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName) @@ -985,11 +985,11 @@ void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellNam // QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); - m_curv = curv; + m_curv = curv; curv->m_strUuid = m_strUuid; //背景设置成透明色 - curv->setBackground(Qt::transparent); - curv->setStyleSheet("background: transparent;"); + curv->setBackground(Qt::transparent); + curv->setStyleSheet("background: transparent;"); double dHight = 0; dHight = (m_iY2-m_iY1)*100.0/(double)m_iScale * g_dPixelPerCm; @@ -1010,12 +1010,12 @@ void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellNam initForm(curv, strSlfName, strLineName); connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); - QTimer::singleShot(100, this, [=]() { - emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); - }); + QTimer::singleShot(100, this, [=]() { + emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); + }); // m_listLineName.push_back(strLineName); - + } void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, @@ -1031,7 +1031,7 @@ void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString s } //qDebug() << "FormDraw s_AddLine_Property"; -AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property"); + AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property"); if(m_listLineName.contains(strLineName)) { @@ -1069,21 +1069,21 @@ AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property"); //curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制 -// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); -// curv->setSizePolicy(policy); + // QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // curv->setSizePolicy(policy); curv->show(); initForm(curv, strSlfName, strLineName, newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty); connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); - QTimer::singleShot(100, this, [=]() { - emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); - }); + QTimer::singleShot(100, this, [=]() { + emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); + }); // m_listLineName.push_back(strLineName); -AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end"); + AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end"); } void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName) @@ -1129,20 +1129,20 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam //curv->setMaximumHeight((int)dHight); //curv->setViewport(QRect(0, 0, g_iOneWidth, (int)dHight));//7500-3184 - int nW = m_nTrackW; - if (nW < 0) - nW = g_iOneWidth; + int nW = m_nTrackW; + if (nW < 0) + nW = g_iOneWidth; curv->setGeometry(0, 0, nW, (int)dHight);//7500-3184 //curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制 -// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); -// curv->setSizePolicy(policy); + // QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // curv->setSizePolicy(policy); curv->show(); - curv->m_iY1 = m_iY1; - curv->m_iY2 = m_iY2; + curv->m_iY1 = m_iY1; + curv->m_iY2 = m_iY2; int _nSamples = 0; if(g_iSupport3D) { @@ -1150,15 +1150,15 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam } else { - curv->initWave(strSlfName, strWaveName); - _nSamples = curv->getScaleV(); + curv->initWave(strSlfName, strWaveName); + _nSamples = curv->getScaleV(); } - curv->replot(); + curv->replot(); connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); - QTimer::singleShot(100, this, [=]() { - emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); - }); + QTimer::singleShot(100, this, [=]() { + emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid); + }); // m_listWaveName.push_back(strWaveName); @@ -1174,9 +1174,9 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam void FormDraw::s_addTableLine(QString strUuid, QString strSlfName, QString strWellName, - QString strTrackName, QString strLineName) + QString strTrackName, QString strLineName) { - this->addTableLine(strUuid, strSlfName, strWellName, strTrackName, strLineName); + this->addTableLine(strUuid, strSlfName, strWellName, strTrackName, strLineName); } void FormDraw::s_mouseWheel(QWheelEvent *event) @@ -1210,10 +1210,10 @@ void FormDraw::setColWidth(int iNewWidth) { int dHight = form->geometry().height(); form->setGeometry(0, 0, iNewWidth, (int)dHight);//7500-3184 - if (form->m_strLineName == "RESULT") - { - form->setConclusionProportion(0); - } + if (form->m_strLineName == "RESULT") + { + form->setConclusionProportion(0); + } form->replot();//屏蔽,缩减时间 } } @@ -1250,8 +1250,8 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit QMyCustomPlot *form = (QMyCustomPlot*)childWidget; if(form) { - form->m_iY1 = m_iY1; - form->m_iY2 = m_iY2; + form->m_iY1 = m_iY1; + form->m_iY2 = m_iY2; int nw = form->geometry().width(); form->setGeometry(0, 0, nw, (int)dHight);//7500-3184 //深度改变 @@ -1310,7 +1310,7 @@ void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackN if(strObjName=="QMyCustomPlot") { QMyCustomPlot *form = (QMyCustomPlot*)childWidget; - m_vecCurv.removeAll(form); + m_vecCurv.removeAll(form); if(form->m_strLineName == strLineName) { childWidget->deleteLater(); // 安排控件的删除,稍后执行 @@ -1422,7 +1422,7 @@ void FormDraw::s_MouseMove(QString strUuid, QString strWellName, QString strTrac else { return; - } + } //qDebug() << "FormDraw s_MouseMove"; // @@ -1472,40 +1472,40 @@ void FormDraw::s_handleRectRangeChange(QCPRange newRange) void FormDraw::setupLineStyleDemo(QMyCustomPlot *customPlot) { -// customPlot->legend->setVisible(true); -// customPlot->legend->setFont(QFont("Helvetica", 9)); -// QPen pen; -// QStringList lineNames; -// lineNames << "lsNone" << "lsLine" << "lsStepLeft" << "lsStepRight" << "lsStepCenter" << "lsImpulse"; + // customPlot->legend->setVisible(true); + // customPlot->legend->setFont(QFont("Helvetica", 9)); + // QPen pen; + // QStringList lineNames; + // lineNames << "lsNone" << "lsLine" << "lsStepLeft" << "lsStepRight" << "lsStepCenter" << "lsImpulse"; -// for (int i = QCPGraph::lsNone; i <= QCPGraph::lsImpulse; ++i) -// { -// customPlot->addGraph(); -// pen.setColor(QColor(qSin(i*1+1.2)*80+80, qSin(i*0.3+0)*80+80, qSin(i*0.3+1.5)*80+80)); -// customPlot->graph()->setPen(pen); // 设置图表的画笔 -// customPlot->graph()->setName(lineNames.at(i-QCPGraph::lsNone)); -// customPlot->graph()->setLineStyle((QCPGraph::LineStyle)i); // 设置图表线段的风格 -// customPlot->graph()->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, 5)); // 设置图表散点图的样式 + // for (int i = QCPGraph::lsNone; i <= QCPGraph::lsImpulse; ++i) + // { + // customPlot->addGraph(); + // pen.setColor(QColor(qSin(i*1+1.2)*80+80, qSin(i*0.3+0)*80+80, qSin(i*0.3+1.5)*80+80)); + // customPlot->graph()->setPen(pen); // 设置图表的画笔 + // customPlot->graph()->setName(lineNames.at(i-QCPGraph::lsNone)); + // customPlot->graph()->setLineStyle((QCPGraph::LineStyle)i); // 设置图表线段的风格 + // customPlot->graph()->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, 5)); // 设置图表散点图的样式 -// QVector x(15), y(15); -// for (int j=0; j<15; ++j) -// { -// x[j] = j/15.0 * 5*3.14 + 0.01; -// y[j] = 7*qSin(x[j])/x[j] - (i-QCPGraph::lsNone)*5 + (QCPGraph::lsImpulse)*5 + 2; -// } -// customPlot->graph()->setData(x, y); -// customPlot->graph()->rescaleAxes(true); -// } -// // 放大一点 -// customPlot->yAxis->scaleRange(1.1, customPlot->yAxis->range().center()); -// customPlot->xAxis->scaleRange(1.1, customPlot->xAxis->range().center()); + // QVector x(15), y(15); + // for (int j=0; j<15; ++j) + // { + // x[j] = j/15.0 * 5*3.14 + 0.01; + // y[j] = 7*qSin(x[j])/x[j] - (i-QCPGraph::lsNone)*5 + (QCPGraph::lsImpulse)*5 + 2; + // } + // customPlot->graph()->setData(x, y); + // customPlot->graph()->rescaleAxes(true); + // } + // // 放大一点 + // customPlot->yAxis->scaleRange(1.1, customPlot->yAxis->range().center()); + // customPlot->xAxis->scaleRange(1.1, customPlot->xAxis->range().center()); -// customPlot->xAxis->setTicks(true); -// customPlot->yAxis->setTicks(true); -// customPlot->xAxis->setTickLabels(true); -// customPlot->yAxis->setTickLabels(true); + // customPlot->xAxis->setTicks(true); + // customPlot->yAxis->setTicks(true); + // customPlot->xAxis->setTickLabels(true); + // customPlot->yAxis->setTickLabels(true); -// customPlot->axisRect()->setupFullAxesBox(); + // customPlot->axisRect()->setupFullAxesBox(); } void FormDraw::setupSelectionDemo(QMyCustomPlot *customPlot) @@ -1515,22 +1515,22 @@ void FormDraw::setupSelectionDemo(QMyCustomPlot *customPlot) customPlot->setInteractions(QCP::iSelectAxes | QCP::iSelectLegend | QCP::iSelectPlottables | QCP::iMultiSelect); // 轴、图例、图表可以被选择,并且是多选的方式 customPlot->setSelectionRectMode(QCP::srmCustom); // 鼠标框选 //customPlot->setSelectionRectMode(QCP::srmSelect); // 鼠标框选 -// customPlot->setMultiSelectModifier(Qt::ControlModifier); // 使用ctrl键来多选 -// customPlot->xAxis->setSelectableParts(QCPAxis::spAxis | QCPAxis::spAxisLabel | QCPAxis::spTickLabels); // 轴的三个部分都可以被选择 -// customPlot->yAxis->setSelectableParts(QCPAxis::spAxis | QCPAxis::spAxisLabel | QCPAxis::spTickLabels); -// customPlot->xAxis->setLabel("xAxis"); -// customPlot->yAxis->setLabel("yAxis"); -// customPlot->legend->setSelectableParts(QCPLegend::spItems); // 图例本身不能被选择,只有里面的项可以被选择 -// customPlot->legend->setSelectedIconBorderPen(Qt::NoPen); // 设置图例里的项被选择时不显示Icon的边框 + // customPlot->setMultiSelectModifier(Qt::ControlModifier); // 使用ctrl键来多选 + // customPlot->xAxis->setSelectableParts(QCPAxis::spAxis | QCPAxis::spAxisLabel | QCPAxis::spTickLabels); // 轴的三个部分都可以被选择 + // customPlot->yAxis->setSelectableParts(QCPAxis::spAxis | QCPAxis::spAxisLabel | QCPAxis::spTickLabels); + // customPlot->xAxis->setLabel("xAxis"); + // customPlot->yAxis->setLabel("yAxis"); + // customPlot->legend->setSelectableParts(QCPLegend::spItems); // 图例本身不能被选择,只有里面的项可以被选择 + // customPlot->legend->setSelectedIconBorderPen(Qt::NoPen); // 设置图例里的项被选择时不显示Icon的边框 //选框黑色虚线 //customPlot->selectionRect()->setPen(QPen(Qt::black,1,Qt::DashLine)); //customPlot->selectionRect()->setBrush(QBrush(QColor(0,0,100,50))); // -// QPen pen(Qt::NoPen); // 使用无画笔,这样就不会有边框了 -// QBrush brush(Qt::transparent); // 使用透明刷子,这样就不会有填充颜色了 -// customPlot->selectionRect()->setPen(pen); // 设置选择区域的画笔为无画笔 -// customPlot->selectionRect()->setBrush(brush); // 设置选择区域的刷子为透明刷子 + // QPen pen(Qt::NoPen); // 使用无画笔,这样就不会有边框了 + // QBrush brush(Qt::transparent); // 使用透明刷子,这样就不会有填充颜色了 + // customPlot->selectionRect()->setPen(pen); // 设置选择区域的画笔为无画笔 + // customPlot->selectionRect()->setBrush(brush); // 设置选择区域的刷子为透明刷子 for (int i=0; i < customPlot->graphCount(); ++i) { QCPGraph *graph = customPlot->graph(i); @@ -1592,7 +1592,7 @@ void FormDraw::setupSelectionDemo(QMyCustomPlot *customPlot) //emit CallManage::getInstance()->sig_addImageToPlot(customPlot, left_Low, right_Hight, ":/image/file.png"); customPlot->addImageToPlot(left_Low, right_Hight, ":/image/file.png"); } - } + } /*QCPDataSelection selection = customPlot->graph(i)->selection(); // 遍历选中的数据范围 @@ -1617,10 +1617,10 @@ void FormDraw::setupSelectionDemo(QMyCustomPlot *customPlot) void FormDraw::s_selectionRectAccepted(const QRect &rect, QMouseEvent *event) { // 转换为坐标轴范围 -// double x1 = widget->xAxis->pixelToCoord(rect.left()); -// double x2 = widget->xAxis->pixelToCoord(rect.right()); -// double y1 = widget->yAxis->pixelToCoord(rect.top()); -// double y2 = widget->yAxis->pixelToCoord(rect.bottom()); + // double x1 = widget->xAxis->pixelToCoord(rect.left()); + // double x2 = widget->xAxis->pixelToCoord(rect.right()); + // double y1 = widget->yAxis->pixelToCoord(rect.top()); + // double y2 = widget->yAxis->pixelToCoord(rect.bottom()); } void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW) @@ -1752,14 +1752,14 @@ void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strW //隐藏刻度 curv->xAxis->setTicks(false); curv->yAxis->setTicks(false); - curv->xAxis2->setTicks(false); + curv->xAxis2->setTicks(false); curv->yAxis2->setTicks(false); //蝌蚪图 - // curv->mKedou = true; + // curv->mKedou = true; //隐藏网格 - // curv->xAxis->grid()->setVisible(false); - // curv->yAxis->grid()->setVisible(false); - DrawStck(curv); + // curv->xAxis->grid()->setVisible(false); + // curv->yAxis->grid()->setVisible(false); + DrawStck(curv); //道-对象 @@ -1821,8 +1821,8 @@ void FormDraw::s_addJykt(QString strUuid, QString strSlfName, QString strWellNam //curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制 -// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); -// curv->setSizePolicy(policy); + // QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // curv->setSizePolicy(policy); curv->show(); @@ -1890,8 +1890,8 @@ void FormDraw::s_addDenv(QString strUuid, QString strSlfName, QString strWellNam //curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制 -// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); -// curv->setSizePolicy(policy); + // QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // curv->setSizePolicy(policy); curv->show(); @@ -1959,8 +1959,8 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe //curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制 -// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); -// curv->setSizePolicy(policy); + // QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // curv->setSizePolicy(policy); curv->show(); @@ -2006,8 +2006,8 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str FormLine *curv = new FormLine(this, strSlfName, strWellName, strTrackName, strLineName); curv->m_strUuid = m_strUuid; //背景设置成透明色 -// curv->setBackground(Qt::transparent); -// curv->setStyleSheet("background: transparent;"); + // curv->setBackground(Qt::transparent); + // curv->setStyleSheet("background: transparent;"); double dHight = 0; dHight = (m_iY2-m_iY1)*100.0/(double)m_iScale * g_dPixelPerCm; @@ -2029,8 +2029,8 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str int _nSamples = 0; curv->DrawTvd(); -// // -// connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); + // // + // connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // m_listLineName.push_back(strLineName); @@ -2105,11 +2105,11 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa curv->xAxis->ticker()->setTickCount(10);//x个主刻度 curv->yAxis->ticker()->setTickCount(60);//y个主刻度 -// //对调XY轴,在最前面设置 -// QCPAxis *yAxis = curv->yAxis; -// QCPAxis *xAxis = curv->xAxis; -// curv->xAxis = yAxis; -// curv->yAxis = xAxis; + // //对调XY轴,在最前面设置 + // QCPAxis *yAxis = curv->yAxis; + // QCPAxis *xAxis = curv->xAxis; + // curv->xAxis = yAxis; + // curv->yAxis = xAxis; //裂缝 QString strWaveName = "FRAC_HOLE.TABLE"; @@ -2507,7 +2507,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName, double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle, QStringList listOtherProperty) { -//AppendConsole(PAI_INFO, "FormDraw initForm"); + //AppendConsole(PAI_INFO, "FormDraw initForm"); CLogIO *logio=new CLogIO(); logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead); @@ -2620,27 +2620,27 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi //赋值 m_vmax = vmax; m_vmin = vmin; -//AppendConsole(PAI_INFO, "FormDraw initForm ReadCurve end"); + //AppendConsole(PAI_INFO, "FormDraw initForm ReadCurve end"); widget->setInteractions(QCP::iSelectLegend | QCP::iSelectPlottables); //框选----- -// widget->setInteraction(QCP::iRangeDrag, false); // 关闭拖动 -// widget->setSelectionRectMode(QCP::SelectionRectMode::srmSelect); // 启用框选放大 -// // -// widget->selectionRect()->setPen(QPen(Qt::black, 1, Qt::DashLine)); // 虚线边框 -// widget->selectionRect()->setBrush(QBrush(QColor(0,0,100,50))); // 半透明蓝色填充 -// // -// QCPSelectionRect *selectionRect = new QCPSelectionRect(widget); -// connect(selectionRect, &QCPSelectionRect::accepted, [=]() { -// // 当选择完成时,获取矩形范围并放大 -// QRectF rect = selectionRect->rect(); // 获取选择的矩形区域(像素坐标) -// // 转换为坐标轴范围 -// double x1 = widget->xAxis->pixelToCoord(rect.left()); -// double x2 = widget->xAxis->pixelToCoord(rect.right()); -// double y1 = widget->yAxis->pixelToCoord(rect.top()); -// double y2 = widget->yAxis->pixelToCoord(rect.bottom()); -// }); + // widget->setInteraction(QCP::iRangeDrag, false); // 关闭拖动 + // widget->setSelectionRectMode(QCP::SelectionRectMode::srmSelect); // 启用框选放大 + // // + // widget->selectionRect()->setPen(QPen(Qt::black, 1, Qt::DashLine)); // 虚线边框 + // widget->selectionRect()->setBrush(QBrush(QColor(0,0,100,50))); // 半透明蓝色填充 + // // + // QCPSelectionRect *selectionRect = new QCPSelectionRect(widget); + // connect(selectionRect, &QCPSelectionRect::accepted, [=]() { + // // 当选择完成时,获取矩形范围并放大 + // QRectF rect = selectionRect->rect(); // 获取选择的矩形区域(像素坐标) + // // 转换为坐标轴范围 + // double x1 = widget->xAxis->pixelToCoord(rect.left()); + // double x2 = widget->xAxis->pixelToCoord(rect.right()); + // double y1 = widget->yAxis->pixelToCoord(rect.top()); + // double y2 = widget->yAxis->pixelToCoord(rect.bottom()); + // }); widget->m_iX1 = vmin; widget->m_iX2 = vmax; @@ -2668,11 +2668,11 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi { widget->yAxis->setScaleType(QCPAxis::stLinear); } - // 加入曲线列表 - m_vecCurv << widget; + // 加入曲线列表 + m_vecCurv << widget; - if (m_formTrack == NULL) - return; + if (m_formTrack == NULL) + return; if(newLeftScale!=-9999) { @@ -2690,11 +2690,11 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi //支持框选 //setupSelectionDemo(widget); -//AppendConsole(PAI_INFO, "FormDraw setupSelectionDemo end"); + //AppendConsole(PAI_INFO, "FormDraw setupSelectionDemo end"); //widget->rescaleAxes(); //widget->replot();//屏蔽,缩减时间 -//AppendConsole(PAI_INFO, "FormDraw initForm end"); + //AppendConsole(PAI_INFO, "FormDraw initForm end"); } void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples) @@ -2713,8 +2713,8 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st float _SDep,_EDep,_Rlev; _SDep = _wave.StartDepth; _EDep = _wave.EndDepth; -// _SDep = 0.0 - m_iY2; -// _EDep = 0.0 - m_iY1; + // _SDep = 0.0 - m_iY2; + // _EDep = 0.0 - m_iY1; _Rlev = _wave.DepLevel; int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5)); @@ -2758,11 +2758,11 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st } delete[] value; -// vmax = (float)_nSamples; -// vmin = 0; + // vmax = (float)_nSamples; + // vmin = 0; -// m_iY1 = 0.0 -_EDep; -// m_iY2 = 0.0 -_SDep; + // m_iY1 = 0.0 -_EDep; + // m_iY2 = 0.0 -_SDep; //------------------------ widget->m_iX1 = vmin; widget->m_iX2 = vmax; @@ -2812,8 +2812,8 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st //y = cos(angle) * r*m_flVFactor; //方法2 :按横向等间距分配,图像边缘部分不太好 -// flCos[j] = cos(angle); -// flSin[j] = sin(angle); + // flCos[j] = cos(angle); + // flSin[j] = sin(angle); y = cos(angle)*r*m_flVFactor; pt[j].setX(centerX + x); @@ -2901,46 +2901,46 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st //qDebug() << "kkPos=" << QString::number(kkPos) << ",iPos=" << QString::number(iPos) << "j=" << QString::number(j) << ",i=" << QString::number(i) << ",wavedata[j][i]=" << QString::number(wavedata[j][i]); } -// //---- -// kkPos = pt[j].x()+0.5; -// iPos = i+pt[j].y(); -// if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) -// { -// } -// else -// { -// wavedataNew[kkPos][iPos] = wavedata[j][i]; -// } -// //---- -// kkPos = pt[j].x()-0.5; -// iPos = i+pt[j].y(); -// if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) -// { -// } -// else -// { -// wavedataNew[kkPos][iPos] = wavedata[j][i]; -// } -// //---- -// kkPos = pt[j].x(); -// iPos = i+pt[j].y()+0.5; -// if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) -// { -// } -// else -// { -// wavedataNew[kkPos][iPos] = wavedata[j][i]; -// } -// //---- -// kkPos = pt[j].x(); -// iPos = i+pt[j].y()-0.5; -// if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) -// { -// } -// else -// { -// wavedataNew[kkPos][iPos] = wavedata[j][i]; -// } + // //---- + // kkPos = pt[j].x()+0.5; + // iPos = i+pt[j].y(); + // if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) + // { + // } + // else + // { + // wavedataNew[kkPos][iPos] = wavedata[j][i]; + // } + // //---- + // kkPos = pt[j].x()-0.5; + // iPos = i+pt[j].y(); + // if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) + // { + // } + // else + // { + // wavedataNew[kkPos][iPos] = wavedata[j][i]; + // } + // //---- + // kkPos = pt[j].x(); + // iPos = i+pt[j].y()+0.5; + // if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) + // { + // } + // else + // { + // wavedataNew[kkPos][iPos] = wavedata[j][i]; + // } + // //---- + // kkPos = pt[j].x(); + // iPos = i+pt[j].y()-0.5; + // if(kkPos>=_nSamples || kkPos<0 || iPos>=m_Record || iPos<0) + // { + // } + // else + // { + // wavedataNew[kkPos][iPos] = wavedata[j][i]; + // } } } @@ -2956,16 +2956,16 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st //double x, y, z; for (int xIndex=0; xIndexdata()->setCell(nx-xIndex-1, yIndex, vmin); - continue; - } - //colorMap->data()->setCell(xIndex, yIndex, wavedata[yIndex][xIndex]); - colorMap->data()->setCell(nx-xIndex-1, yIndex, wavedataNew[yIndex][xIndex]); - } + for (int yIndex=0; yIndexdata()->setCell(nx-xIndex-1, yIndex, vmin); + continue; + } + //colorMap->data()->setCell(xIndex, yIndex, wavedata[yIndex][xIndex]); + colorMap->data()->setCell(nx-xIndex-1, yIndex, wavedataNew[yIndex][xIndex]); + } } @@ -3046,8 +3046,8 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, float _SDep,_EDep,_Rlev; _SDep = _wave.StartDepth; _EDep = _wave.EndDepth; -// _SDep = 0.0 - m_iY2; -// _EDep = 0.0 - m_iY1; + // _SDep = 0.0 - m_iY2; + // _EDep = 0.0 - m_iY1; _Rlev = _wave.DepLevel; int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5)); @@ -3091,8 +3091,8 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, } delete[] value; -// m_iY1 = 0.0 -_EDep; -// m_iY2 = 0.0 -_SDep; + // m_iY1 = 0.0 -_EDep; + // m_iY2 = 0.0 -_SDep; //------------------------ widget->m_iX1 = vmin; widget->m_iX2 = vmax; @@ -3124,16 +3124,16 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, double x, y, z; for (int xIndex=0; xIndexdata()->setCell(nx-xIndex-1, yIndex, vmin); - continue; - } - //colorMap->data()->setCell(xIndex, yIndex, wavedata[yIndex][xIndex]); - colorMap->data()->setCell(nx-xIndex-1, yIndex, wavedata[yIndex][xIndex]); - } + for (int yIndex=0; yIndexdata()->setCell(nx-xIndex-1, yIndex, vmin); + continue; + } + //colorMap->data()->setCell(xIndex, yIndex, wavedata[yIndex][xIndex]); + colorMap->data()->setCell(nx-xIndex-1, yIndex, wavedata[yIndex][xIndex]); + } } // 添加色标: @@ -3143,18 +3143,18 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, //colorMap->setGradient(QCPColorGradient::gpPolar);//gpJet); // 我们还可以创建一个QCPColorGradient实例并向其中添加自己的颜色 // 渐变,请参阅QCPColorGradient的文档以获取可能的效果. -// int nIndex=11; -// QVector colorList; -// bool inpolation = true; -// int iColorNum = getSystemColor(nIndex, colorList, inpolation); -// // -// QCPColorGradient gradient; -// for(int i=0; isetGradient(gradient); + // int nIndex=11; + // QVector colorList; + // bool inpolation = true; + // int iColorNum = getSystemColor(nIndex, colorList, inpolation); + // // + // QCPColorGradient gradient; + // for(int i=0; isetGradient(gradient); QVector m_qvFiles; int n=getColorConfig(m_qvFiles); @@ -3183,13 +3183,13 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, colorMap->rescaleDataRange(); //----调色板-------- -// widget->plotLayout()->addElement(0, 1, colorScale); // 将其添加到主轴矩形的右侧 -// colorScale->setType(QCPAxis::atRight); // 刻度应为垂直条,刻度线/坐标轴标签右侧(实际上,右侧已经是默认值) -// colorScale->axis()->setLabel("Magnetic Field Strength"); -// //确保轴rect和色标同步其底边距和顶边距(以便它们对齐): -// QCPMarginGroup *marginGroup = new QCPMarginGroup(widget); -// widget->axisRect()->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup); -// colorScale->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup); + // widget->plotLayout()->addElement(0, 1, colorScale); // 将其添加到主轴矩形的右侧 + // colorScale->setType(QCPAxis::atRight); // 刻度应为垂直条,刻度线/坐标轴标签右侧(实际上,右侧已经是默认值) + // colorScale->axis()->setLabel("Magnetic Field Strength"); + // //确保轴rect和色标同步其底边距和顶边距(以便它们对齐): + // QCPMarginGroup *marginGroup = new QCPMarginGroup(widget); + // widget->axisRect()->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup); + // colorScale->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup); // 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图: //widget->rescaleAxes(); @@ -3231,11 +3231,11 @@ void FormDraw::initTableLine(QMyCustomPlot *widget, QString strSlfName, QString m_qsProperty=("ID"); m_iPrecision = 3; // - // ReadFracDef(); - // for (int i = 0 ; i < iFracType ; i++) - // { - // m_bTypeDraw[i] = true; - // } + // ReadFracDef(); + // for (int i = 0 ; i < iFracType ; i++) + // { + // m_bTypeDraw[i] = true; + // } if (m_bTableData) { @@ -3247,9 +3247,9 @@ void FormDraw::initTableLine(QMyCustomPlot *widget, QString strSlfName, QString ReadData(strSlfName, strLineName); //------------------------ -// int nPointNum = m_FracTabList.count(); -// if ( nPointNum < 1 )return ; -// FRAC_TABLE frac = m_FracTabList.at(0); + // int nPointNum = m_FracTabList.count(); + // if ( nPointNum < 1 )return ; + // FRAC_TABLE frac = m_FracTabList.at(0); } else { @@ -3264,30 +3264,30 @@ void FormDraw::initTableLine(QMyCustomPlot *widget, QString strSlfName, QString -// bool bFistValue=false; -// float vmax = -9999; -// float vmin = -9999; -// //最大值,最小值 -// vmax=vmin=frac.DIR; -// //slf文件读取曲线 -// for(int i=0; ifrac.DIR)vmin=frac.DIR; -// } -// widget->m_iX1 = vmin; -// widget->m_iX2 = vmax; + // bool bFistValue=false; + // float vmax = -9999; + // float vmin = -9999; + // //最大值,最小值 + // vmax=vmin=frac.DIR; + // //slf文件读取曲线 + // for(int i=0; ifrac.DIR)vmin=frac.DIR; + // } + // widget->m_iX1 = vmin; + // widget->m_iX2 = vmax; int iMyWidth = widget->axisRect(0)->width(); float vmax = iMyWidth; @@ -3566,10 +3566,10 @@ void FormDraw::initResult(QMyCustomPlot *widget, QString strSlfName, QString str widget->yAxis->setTicks(true); widget->xAxis2->setTicks(true); widget->yAxis2->setTicks(true); - widget->xAxis->setTickLabels(true); - widget->yAxis->setTickLabels(true); - widget->xAxis2->setTickLabels(true); - widget->xAxis2->setTickLabels(true); + widget->xAxis->setTickLabels(true); + widget->yAxis->setTickLabels(true); + widget->xAxis2->setTickLabels(true); + widget->xAxis2->setTickLabels(true); // LoadFromSLF_Result(widget, strSlfName, strLineName); @@ -3611,7 +3611,7 @@ bool FormDraw::LoadFromSLF_Result(QMyCustomPlot *widget, QString strSlfName, QSt if(!i) zone=atoi(m_Result->Zone); } - QString strGroupUuid = ""; + QString strGroupUuid = ""; for(int i=0;iaddResultGroup(-m_Result->EndDepth, -m_Result->StartDepth, strGroupUuid, strZone); - QString strUuid = ""; - if (result != "") - { - if (m_Result->MDepth1 != 0) - { - //第一个加Zone解释层号 - pGroup->addResultToPlot(-m_Result->MDepth1, -m_Result->StartDepth, result, strUuid); - } - else - { - pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->StartDepth, result, strUuid); - } - } - if (result1 != "") - { - if (m_Result->MDepth2 != 0) - { - pGroup->addResultToPlot(-m_Result->MDepth2, -m_Result->MDepth1, result1, strUuid); - } - else { - pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->MDepth1, result1, strUuid); - } - } - - if (result2 != "") - { - if (m_Result->MDepth3 != 0) - { - pGroup->addResultToPlot(-m_Result->MDepth3, -m_Result->MDepth2, result2, strUuid); - } - else { - pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->MDepth2, result2, strUuid); - } - } - continue; + // 设置解释结论终止深度 + TransparentGroupResult* pGroup = widget->addResultGroup(-m_Result->EndDepth, -m_Result->StartDepth, strGroupUuid, strZone); + QString strUuid = ""; + if (result != "") + { + if (m_Result->MDepth1 != 0) + { + //第一个加Zone解释层号 + pGroup->addResultToPlot(-m_Result->MDepth1, -m_Result->StartDepth, result, strUuid); + } + else + { + pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->StartDepth, result, strUuid); + } + } + if (result1 != "") + { + if (m_Result->MDepth2 != 0) + { + pGroup->addResultToPlot(-m_Result->MDepth2, -m_Result->MDepth1, result1, strUuid); + } + else { + pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->MDepth1, result1, strUuid); + } + } + + if (result2 != "") + { + if (m_Result->MDepth3 != 0) + { + pGroup->addResultToPlot(-m_Result->MDepth3, -m_Result->MDepth2, result2, strUuid); + } + else { + pGroup->addResultToPlot(-m_Result->EndDepth, -m_Result->MDepth2, result2, strUuid); + } + } + continue; // strUuid = ""; if(result != "") @@ -3816,11 +3816,11 @@ bool FormDraw::LoadFromSLF_Result(QMyCustomPlot *widget, QString strSlfName, QSt widget->addResultToPlot(-m_Result->MDepth1, -m_Result->StartDepth, result, strUuid, strZone); } else - { + { widget->addResultToPlot(-m_Result->EndDepth, -m_Result->StartDepth, result, strUuid, strZone); } } - //return true; + //return true; if(result1 != "") { if(m_Result->MDepth2!=0) @@ -4262,8 +4262,8 @@ void FormDraw::initFgrq(QMyCustomPlot *widget) tempf = (deps-m_Curve.StartDepth)/m_Curve.DepLevel+0.5; if (deps >= ftmpEdep|| - deps > m_Curve.EndDepth|| - deps >=( flDep + nstep)) + deps > m_Curve.EndDepth|| + deps >=( flDep + nstep)) break; if(tempf<0) { @@ -4315,7 +4315,7 @@ void FormDraw::initFgrq(QMyCustomPlot *widget) dirmax=1; for(i=0;i<=m_nArc;i++) ifdir[i]=ifdir[i]*(nR)/dirmax;//-m_nArcLineWidth/2.whp add 2016.10.21 for线粗时扇叶超界 - // ifdir[i]=ifdir[i]*(nRadius-GetLineWidth(pDC,m_nArcLineWidth/2.))/dirmax;//-m_nArcLineWidth/2.whp add 2016.10.21 for线粗时扇叶超界 + // ifdir[i]=ifdir[i]*(nRadius-GetLineWidth(pDC,m_nArcLineWidth/2.))/dirmax;//-m_nArcLineWidth/2.whp add 2016.10.21 for线粗时扇叶超界 ifdir[m_nArc+1]=ifdir[1]; //方位频率 @@ -4329,7 +4329,7 @@ void FormDraw::initFgrq(QMyCustomPlot *widget) continue; QCPItemPolygon* pol = new QCPItemPolygon(widget); pol->topLeft->setCoords(x, y); - pol->bottomRight->setCoords(x, y); + pol->bottomRight->setCoords(x, y); // pol->setPloyVal(i,flVal, ifdir[i]); @@ -4533,8 +4533,8 @@ void FormDraw::initRose(QMyCustomPlot *widget) tempf = (deps-m_Curve.StartDepth)/m_Curve.DepLevel+0.5; if (deps >= ftmpEdep|| - deps > m_Curve.EndDepth|| - deps >=( flDep + nstep)) + deps > m_Curve.EndDepth|| + deps >=( flDep + nstep)) break; if(tempf<0) { @@ -5159,7 +5159,7 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead)) { delete logio; -// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes); + // QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes); return; } int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); @@ -5192,7 +5192,7 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin sscanf(buf,"%f",&m_pResult->Depth); logio->GetTableFieldData(iIndex,2,buf,i+1); sscanf(buf,"%f",&m_pResult->CorrDepth); -// logio->ReadTable(iIndex,i+1,m_pResult); + // logio->ReadTable(iIndex,i+1,m_pResult); int Order = m_pResult->Order; float depth = m_pResult->Depth; @@ -5251,11 +5251,11 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin widget->xAxis = yAxis; widget->yAxis = xAxis; -// //隐藏刻度 -// widget->xAxis->setTicks(false); -// widget->yAxis->setTicks(false); -// widget->xAxis2->setTicks(false); -// widget->yAxis2->setTicks(false); + // //隐藏刻度 + // widget->xAxis->setTicks(false); + // widget->yAxis->setTicks(false); + // widget->xAxis2->setTicks(false); + // widget->yAxis2->setTicks(false); // QString strAliasName = ""; QString strUnit = ""; @@ -5267,7 +5267,7 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin widget->graph(0)->setSelectable(QCP::SelectionType::stMultipleDataRanges);// stSingleData widget->setInteractions(QCP::iSelectAxes | QCP::iSelectLegend | QCP::iSelectPlottables | QCP::iMultiSelect); // 轴、图例、图表可以被选择,并且是多选的方式 -// widget->setSelectionRectMode(QCP::srmCustom); // 鼠标框选 + // widget->setSelectionRectMode(QCP::srmCustom); // 鼠标框选 } void FormDraw::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio) @@ -5395,13 +5395,13 @@ void FormDraw::DrawDip(QMyCustomPlot *widget) y = -dep;//起始深度 -// pDC->setPen(pPen);// [5/22/2019 9:43 hxb] -// rtRect.setLeft(x - GetLineWidth(pDC,m_nRadius)); -// rtRect.setRight(x + GetLineWidth(pDC,m_nRadius)); -// rtRect.setBottom(y +GetLineWidth(pDC,m_nRadius)); -// rtRect.setTop(y -GetLineWidth(pDC,m_nRadius)); -// pDC->setPen(PenCircle); -// pDC->drawEllipse(rtRect.center(),m_nRadius,m_nRadius); + // pDC->setPen(pPen);// [5/22/2019 9:43 hxb] + // rtRect.setLeft(x - GetLineWidth(pDC,m_nRadius)); + // rtRect.setRight(x + GetLineWidth(pDC,m_nRadius)); + // rtRect.setBottom(y +GetLineWidth(pDC,m_nRadius)); + // rtRect.setTop(y -GetLineWidth(pDC,m_nRadius)); + // pDC->setPen(PenCircle); + // pDC->drawEllipse(rtRect.center(),m_nRadius,m_nRadius); QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget); qcpItemEllipse->setPen(pPen); @@ -5415,13 +5415,13 @@ void FormDraw::DrawDip(QMyCustomPlot *widget) //方位 flVal = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR dr=flVal*dgtord; -// // 注意映射方式 -// x +=GetLineWidth(pDC,m_nRadius)*sin(dr); -// y -=GetLineWidth(pDC,m_nRadius)*cos(dr); -// float x1=x +GetLineWidth(pDC,m_nTailLen)*sin(dr); -// float y1=y -GetLineWidth(pDC,m_nTailLen)*cos(dr); -// pDC->setPen(pPen); -// pDC->drawLine(QPointF(x,y),QPointF(x1,y1)); + // // 注意映射方式 + // x +=GetLineWidth(pDC,m_nRadius)*sin(dr); + // y -=GetLineWidth(pDC,m_nRadius)*cos(dr); + // float x1=x +GetLineWidth(pDC,m_nTailLen)*sin(dr); + // float y1=y -GetLineWidth(pDC,m_nTailLen)*cos(dr); + // pDC->setPen(pPen); + // pDC->drawLine(QPointF(x,y),QPointF(x1,y1)); QCPItemLine *qcpItemLine = new QCPItemLine(widget); qcpItemLine->start->setCoords(y, x);//圆心位置 qcpItemLine->end->setCoords(y, x);//圆心位置 @@ -5433,8 +5433,8 @@ void FormDraw::DrawDip(QMyCustomPlot *widget) //移动对象 -// widget->mSizeHandleManager->addItem(qcpItemEllipse, true); -// widget->mSizeHandleManager->addItem(qcpItemLine, true); + // widget->mSizeHandleManager->addItem(qcpItemEllipse, true); + // widget->mSizeHandleManager->addItem(qcpItemLine, true); k++; } @@ -5757,20 +5757,20 @@ void FormDraw::DrawStck(QMyCustomPlot *widget) // pDC->setPen(PenCircle); // pDC->drawEllipse(rtRect.center(),m_nRadius,m_nRadius); -// QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget); -// qcpItemEllipse->setPen(pPen); -// qcpItemEllipse->m_bCustom = true; -// qcpItemEllipse->m_nRadius = m_nRadius; -// qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置 -// qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置 -// qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色 + // QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget); + // qcpItemEllipse->setPen(pPen); + // qcpItemEllipse->m_bCustom = true; + // qcpItemEllipse->m_nRadius = m_nRadius; + // qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置 + // qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置 + // qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色 //方位 dang = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR dr=dang*dgtord; //dx=abs(lstk*cos(dr)); - // dy=sqrt(lstk*lstk*(1-cos(dr)*cos(dr))); + // dy=sqrt(lstk*lstk*(1-cos(dr)*cos(dr))); // // 注意映射方式 // x +=GetLineWidth(pDC,m_nRadius)*sin(dr); // y -=GetLineWidth(pDC,m_nRadius)*cos(dr); @@ -5783,7 +5783,7 @@ void FormDraw::DrawStck(QMyCustomPlot *widget) qcpItemLine->start->setCoords(y, x);//圆心位置 qcpItemLine->end->setCoords(y, x);//圆心位置 qcpItemLine->setPen(pPen); - qcpItemLine->m_bCustom = true; + qcpItemLine->m_bCustom = true; qcpItemLine->m_nTailLen = m_nSltk; //杆长 qcpItemLine->m_nRadius = 0; //半径 qcpItemLine->m_dr = dr; @@ -5882,23 +5882,23 @@ void FormDraw::DrawTabDip(QMyCustomPlot *widget) for (i=0; i -m_iY1) -// { -// continue; -// } + // if ( frac.DEP < -m_iY2 || frac.DEP > -m_iY1) + // { + // continue; + // } -// bDraw = false; -// for (j=0; jsetPen(pPen); -// pDC->drawEllipse(rtRect.left(),rtRect.top(),rtRect.width(),rtRect.height()); -// QPainterPath myPath; -// myPath.addEllipse(rtRect); -// pDC->fillPath(myPath,cBrush); + // int LineWidth = m_nRadius; + // rtRect.setLeft(x - LineWidth); + // rtRect.setRight( x + LineWidth); + // rtRect.setBottom( y + LineWidth); + // rtRect.setTop(y - LineWidth); + // pDC->setPen(pPen); + // pDC->drawEllipse(rtRect.left(),rtRect.top(),rtRect.width(),rtRect.height()); + // QPainterPath myPath; + // myPath.addEllipse(rtRect); + // pDC->fillPath(myPath,cBrush); //CustomEllipse *qcpitemellipse = new CustomEllipse(widget); @@ -5966,41 +5966,41 @@ void FormDraw::DrawTabDip(QMyCustomPlot *widget) //break; -// x += m_nRadius*sin(dr); -// // 注意映射方式 -// y -=m_nRadius*cos(dr); -// //pDC->moveto(x,y); -// float x1=x +m_nTailLen*sin(dr); -// // 注意映射方式 -// float y1= y-m_nTailLen*cos(dr); + // x += m_nRadius*sin(dr); + // // 注意映射方式 + // y -=m_nRadius*cos(dr); + // //pDC->moveto(x,y); + // float x1=x +m_nTailLen*sin(dr); + // // 注意映射方式 + // float y1= y-m_nTailLen*cos(dr); -// pDC->setPen(pPenTail); -// pDC->drawLine(x,y,x1,y1); + // pDC->setPen(pPenTail); + // pDC->drawLine(x,y,x1,y1); -// if ( m_bDrawValue ) //显示倾角、方位 -// { -// rtRect.setTop(rtRect.top()-GetLineWidth(pDC,objViewInfo->GetLogUnitFont().pointSize())); -// rtRect.setBottom(rtRect.bottom()+GetLineWidth(pDC,objViewInfo->GetLogUnitFont().pointSize())); -// QString cs1 = QString::number(frac.DIPorS,'f',m_iPrecision); -// QString cs2 = QString::number(frac.DIR,'f',m_iPrecision); -// cs=cs1+"//"+cs2; -// cs.Replace((" "),""); -// if ( frac.DIPorS >= 30 ) -// { -// x = 2.*(float)(GetLineWidth(pDC,m_nRadius)); -// rtRect.setRight(rtRect.center().x() - x); -// rtRect.setLeft(mrt.left()); -// pDC->drawText(rtRect,Qt::AlignVCenter|Qt::AlignHCenter,cs.GetString()); -// } -// else -// { -// x = 2.*(float)(GetLineWidth(pDC,m_nRadius)); -// rtRect.setLeft(rtRect.center().x() + x); -// rtRect.setRight(mrt.right()); -// pDC->drawText(rtRect,Qt::AlignVCenter,cs.GetString()); -// } -// } + // if ( m_bDrawValue ) //显示倾角、方位 + // { + // rtRect.setTop(rtRect.top()-GetLineWidth(pDC,objViewInfo->GetLogUnitFont().pointSize())); + // rtRect.setBottom(rtRect.bottom()+GetLineWidth(pDC,objViewInfo->GetLogUnitFont().pointSize())); + // QString cs1 = QString::number(frac.DIPorS,'f',m_iPrecision); + // QString cs2 = QString::number(frac.DIR,'f',m_iPrecision); + // cs=cs1+"//"+cs2; + // cs.Replace((" "),""); + // if ( frac.DIPorS >= 30 ) + // { + // x = 2.*(float)(GetLineWidth(pDC,m_nRadius)); + // rtRect.setRight(rtRect.center().x() - x); + // rtRect.setLeft(mrt.left()); + // pDC->drawText(rtRect,Qt::AlignVCenter|Qt::AlignHCenter,cs.GetString()); + // } + // else + // { + // x = 2.*(float)(GetLineWidth(pDC,m_nRadius)); + // rtRect.setLeft(rtRect.center().x() + x); + // rtRect.setRight(mrt.right()); + // pDC->drawText(rtRect,Qt::AlignVCenter,cs.GetString()); + // } + // } } } } @@ -6071,67 +6071,67 @@ void FormDraw::ReadData(QString strSlfName, QString strLineName, int iCurve, Slf return; } - // 读曲线数值 - CMemRdWt mrw; - m_PointNum = 0 ; - if ( iCurve== 0 ) + // 读曲线数值 + CMemRdWt mrw; + m_PointNum = 0 ; + if ( iCurve== 0 ) + { + if(m_Value) delete []m_Value; + m_Value = 0; + } + if ( iCurve== 1 ) + { + if(m_Value2) delete []m_Value2; + m_Value2 = 0; + } + if ( iCurve== 2 ) + { + if(m_Value3) delete []m_Value3; + m_Value3 = 0; + } + DWORD byte; + //CString wellname(sFilePath); + if ( mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 + { + int iIndex=mrw.OpenCurve(strLineName.toStdString().c_str()); + if (iIndex >= 0) { - if(m_Value) delete []m_Value; - m_Value = 0; - } - if ( iCurve== 1 ) - { - if(m_Value2) delete []m_Value2; - m_Value2 = 0; - } - if ( iCurve== 2 ) - { - if(m_Value3) delete []m_Value3; - m_Value3 = 0; - } - DWORD byte; - //CString wellname(sFilePath); - if ( mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 - { - int iIndex=mrw.OpenCurve(strLineName.toStdString().c_str()); - if (iIndex >= 0) - { - mrw.GetCurveInfo(iIndex,curve); - if(curve->DepLevel==0) return; - m_PointNum = (float)(fabs((curve->EndDepth - curve->StartDepth)/curve->DepLevel+0.5)); - m_SDep=curve->StartDepth; - m_EDep=curve->EndDepth; - m_Rlev=curve->DepLevel; + mrw.GetCurveInfo(iIndex,curve); + if(curve->DepLevel==0) return; + m_PointNum = (float)(fabs((curve->EndDepth - curve->StartDepth)/curve->DepLevel+0.5)); + m_SDep=curve->StartDepth; + m_EDep=curve->EndDepth; + m_Rlev=curve->DepLevel; - if ( iCurve== 0 ) + if ( iCurve== 0 ) + { + m_Value=new char[m_PointNum*curve->CodeLen+4]; + if(m_Value) { - m_Value=new char[m_PointNum*curve->CodeLen+4]; - if(m_Value) - { - byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value); + byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value); + } + } + else + { + if ( iCurve == 1 ) + { + m_Value2=new char[m_PointNum*curve->CodeLen+4]; + if(m_Value2){ + byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value2); } } else { - if ( iCurve == 1 ) - { - m_Value2=new char[m_PointNum*curve->CodeLen+4]; - if(m_Value2){ - byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value2); - } - } - else - { - m_Value3=new char[m_PointNum*curve->CodeLen+4]; - if(m_Value3){ - byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value3); - } + m_Value3=new char[m_PointNum*curve->CodeLen+4]; + if(m_Value3){ + byte = mrw.ReadCurve(iIndex,m_SDep,m_PointNum,(void *)m_Value3); } } - mrw.CloseCurve(iIndex); } - mrw.Close(); //关闭井文件 + mrw.CloseCurve(iIndex); } + mrw.Close(); //关闭井文件 + } } //表格 @@ -6236,50 +6236,50 @@ void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector x, QVector< else { m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "curveObject", listOtherProperty); } -//AppendConsole(PAI_INFO, "FormDraw addRandomGraph"); -// widget->addGraph(); -// if(strLineName=="") -// { -// strLineName = QString("曲线 %1").arg(widget->graphCount()); -// } -// widget->graph()->setName(strLineName); -// //禁用自动重绘:在大量数据更新前禁用自动重绘 -// //widget->setNotAntialiasedElements(QCP::aeAll); -// widget->graph()->setData(x, y); + //AppendConsole(PAI_INFO, "FormDraw addRandomGraph"); + // widget->addGraph(); + // if(strLineName=="") + // { + // strLineName = QString("曲线 %1").arg(widget->graphCount()); + // } + // widget->graph()->setName(strLineName); + // //禁用自动重绘:在大量数据更新前禁用自动重绘 + // //widget->setNotAntialiasedElements(QCP::aeAll); + // widget->graph()->setData(x, y); -// if(newLeftScale!=-9999) -// { -// widget->graph()->setLineStyle((QCPGraph::LineStyle)(lineStyle));//曲线 + // if(newLeftScale!=-9999) + // { + // widget->graph()->setLineStyle((QCPGraph::LineStyle)(lineStyle));//曲线 -// widget->graph()->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)(1))); + // widget->graph()->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)(1))); -// QPen graphPen; -// graphPen.setColor(newlineColor); -// graphPen.setWidthF(width); -// graphPen.setStyle(lineStyle);//实线 -// widget->graph()->setPen(graphPen); -// } -// else -// { -// widget->graph()->setLineStyle((QCPGraph::LineStyle)(1));//曲线 + // QPen graphPen; + // graphPen.setColor(newlineColor); + // graphPen.setWidthF(width); + // graphPen.setStyle(lineStyle);//实线 + // widget->graph()->setPen(graphPen); + // } + // else + // { + // widget->graph()->setLineStyle((QCPGraph::LineStyle)(1));//曲线 -// widget->graph()->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)(1))); -// // widget->graph()->setScatterStyle(QCPScatterStyle(QPixmap(":/image/file.png"))); -// //widget->graph()->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 5)); + // widget->graph()->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)(1))); + // // widget->graph()->setScatterStyle(QCPScatterStyle(QPixmap(":/image/file.png"))); + // //widget->graph()->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 5)); -// QPen graphPen; -// newlineColor = QColor(std::rand()%245+10, std::rand()%245+10, std::rand()%245+10); -// graphPen.setColor(newlineColor); -// width = 2; -// graphPen.setWidthF(width); -// graphPen.setStyle(Qt::SolidLine);//实线 -// widget->graph()->setPen(graphPen); -// //widget->replot(); -// } -// //道-对象 -// m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType); -//AppendConsole(PAI_INFO, "FormDraw addRandomGraph end"); + // QPen graphPen; + // newlineColor = QColor(std::rand()%245+10, std::rand()%245+10, std::rand()%245+10); + // graphPen.setColor(newlineColor); + // width = 2; + // graphPen.setWidthF(width); + // graphPen.setStyle(Qt::SolidLine);//实线 + // widget->graph()->setPen(graphPen); + // //widget->replot(); + // } + // //道-对象 + // m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType); + //AppendConsole(PAI_INFO, "FormDraw addRandomGraph end"); } @@ -6353,21 +6353,21 @@ void FormDraw::dropEvent(QDropEvent* event) } else { - // 如果井名不正确,不接受拖拽事件 - event->ignore(); + // 如果井名不正确,不接受拖拽事件 + event->ignore(); } } else { - // 如果数据格式不正确,不接受拖拽事件 - event->ignore(); + // 如果数据格式不正确,不接受拖拽事件 + event->ignore(); } } else { - // 如果数据格式不正确,不接受拖拽事件 - event->ignore(); + // 如果数据格式不正确,不接受拖拽事件 + event->ignore(); } // 恢复鼠标光标 //QApplication::restoreOverrideCursor();