支持修改蝌蚪图属性,记录json模板

This commit is contained in:
jiayulong 2026-04-21 17:05:19 +08:00
parent f4c9bd49f4
commit 58fc749234
10 changed files with 503 additions and 149 deletions

View File

@ -256,6 +256,8 @@ signals:
//改变套管组件属性,直径
void sig_changeGuanD(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, double newD);
//改变蝌蚪图属性
void sig_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
//
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);

View File

@ -79,7 +79,16 @@ void PropertyWidget::InitCurrentViewInfo(bool bAll)
m_formHead = NULL;
m_tableWidget = NULL;
m_item = NULL;
//
m_tdGujing = NULL;
m_tdImage = NULL;
m_tdSwallCore = NULL;
m_tdGeoLith = NULL;
m_tdText = NULL;
m_tdLayer = NULL;
m_tdJiegutext = NULL;
m_tdGuan = NULL;
m_tdCorePhysics = NULL;
//
m_strUuid = "";
m_strTrackUuid = "";
@ -5417,42 +5426,6 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
if(flag)
{
QVariantMap variantMap;
// 必须用来判断当前道
variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName;
// 数据
variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType;
variantMap["m_pl_azimuthCurve"] = this->m_formInfo->m_pl_azimuthCurve;
variantMap["m_pl_inclinationCurve"] = this->m_formInfo->m_pl_inclinationCurve;
// 表数据
variantMap["m_rose_depth_field"] = this->m_formInfo->m_rose_depth_field;
variantMap["m_rose_azimuth_field"] = this->m_formInfo->m_rose_azimuth_field;
variantMap["m_rose_dip_field"] = this->m_formInfo->m_rose_dip_field;
variantMap["m_rose_attribute_field"] = this->m_formInfo->m_rose_attribute_field;
// 控制曲线
variantMap["m_pl_controlCurveName"] = this->m_formInfo->m_pl_controlCurveName;
variantMap["m_pl_controlMinValue"] = this->m_formInfo->m_pl_controlMinValue;
variantMap["m_pl_controlMaxValue"] = this->m_formInfo->m_pl_controlMaxValue;
// 字体
variantMap["m_pl_fontScale"] = this->m_formInfo->m_pl_fontScale;
// 蝌蚪图
variantMap["m_rose_sector_enabled"] = this->m_formInfo->m_rose_sector_enabled;
variantMap["m_rose_circle_radius_cm"] = this->m_formInfo->m_rose_circle_radius_cm;
variantMap["m_rose_radiation_circle_enabled"] = this->m_formInfo->m_rose_radiation_circle_enabled;
variantMap["m_rose_azimuth_print_interval"] = this->m_formInfo->m_rose_azimuth_print_interval;
variantMap["m_rose_circle_line_color"] = this->m_formInfo->m_rose_circle_line_color;
variantMap["m_rose_circle_line_width"] = this->m_formInfo->m_rose_circle_line_width;
variantMap["m_rose_stress_line_color"] = this->m_formInfo->m_rose_stress_line_color;
variantMap["m_rose_collapse_line_color"] = this->m_formInfo->m_rose_collapse_line_color;
variantMap["m_rose_draw_radiation_line"] = this->m_formInfo->m_rose_draw_radiation_line;
variantMap["m_rose_draw_wellbore_collapse"] = this->m_formInfo->m_rose_draw_wellbore_collapse;
variantMap["m_rose_fill_enabled"] = this->m_formInfo->m_rose_fill_enabled;
variantMap["m_rose_draw_annotation"] = this->m_formInfo->m_rose_draw_annotation;
//
variantMap["m_pl_minInclination"] = this->m_formInfo->m_pl_minInclination;
variantMap["m_pl_maxInclination"] = this->m_formInfo->m_pl_maxInclination;
variantMap["m_strUuid"] = this->m_formInfo->m_strUuid;
//emit CallManage::getInstance()->sig_changeRoseProperty(variantMap);
emit CallManage::getInstance()->sig_changeKedouProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
}
}

View File

@ -536,6 +536,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
// 岩心照片
displayImageData(lineObjInfo);
}
else if (strLineName == "FRAC_HOLE.TABLE")
{
// 蝌蚪图
DisplayKedou_One(lineObjInfo);
}
}
else if (strType == "JiegutextObject")
{
@ -1121,6 +1126,85 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
}
}
//蝌蚪图
void FormDraw::DisplayKedou_One(QJsonObject lineObjInfo)
{
QString strSlfName = "";
QString strWellName = "";
QString strLineName = "";
QString strAliasName = "";//显示名称
QFont curveNameFont("微软雅黑", 10); // 名称字体
QColor lineColor = QColor(0, 0, 0);//颜色
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("LineName"))
{
QJsonValue value = lineObjInfo.value("LineName");
if (value.isString()) {
strLineName = value.toString();
//qDebug() << "LineName:" << strLineName;
}
}
if (lineObjInfo.contains("AliasName"))
{
QJsonValue value = lineObjInfo.value("AliasName");
if (value.isString()) {
strAliasName = value.toString();
//qDebug() << "strAliasName:" << strAliasName;
}
}
//字体
if (lineObjInfo.contains("curveNameFont"))
{
QJsonValue value = lineObjInfo.value("curveNameFont");
if (value.isString()) {
curveNameFont.fromString(value.toString());
//qDebug() << "strUnit:" << strUnit;
}
}
QString folderPath = GetLogdataPath();
folderPath = folderPath + g_prjname;
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
if (strLineName != "")
{
/*
QVariantMap variantMap;
// 数据
variantMap["AliasName"] = strAliasName;
variantMap["curveNameFont"] = curveNameFont;*/
//结论
this->addKedou(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, lineObjInfo);
}
}
//气测/FMT/射孔/文本
void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
{
@ -2807,7 +2891,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
return NULL;
}
if (m_listTableName.contains(strLineName))
if (m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return NULL;
@ -2942,7 +3026,75 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
}
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
return curv;
}
QMyCustomPlot* FormDraw::addKedou(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QJsonObject 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" )
{
}
else
{
return NULL;
}
//井名&道名不一致
if (strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
{
}
else
{
return NULL;
}
if (m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return NULL;
}
//
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
//绑定m_formTrack方便关联formInfo
curv->m_formTrack = m_formTrack;
curv->setDepthY(m_iY1, m_iY2);
curv->initGeometry(m_strUuid, m_iScale, m_nTrackW);
curv->show();
if (strLineName == "FRAC_HOLE.TABLE")
{
//蝌蚪图
curv->mKedou = true;
//隐藏网格
curv->xAxis->grid()->setVisible(false);
curv->yAxis->grid()->setVisible(false);
//
curv->m_bRowGridVisible = false;
curv->m_bColGridVisible = false;
QString strAliasName = "蝌蚪图";
QColor newlineColor=QColor(0,0,0);
// 显示名称
// 显示名称
if (listOtherProperty.contains("AliasName"))
{
QJsonValue value = listOtherProperty.value("AliasName");
if (value.isString()) {
strAliasName = value.toString();
}
}
//
initKedou(curv, strSlfName, strLineName, strAliasName, newlineColor, listOtherProperty);
}
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listLineName.push_back(strLineName);
return curv;
}
@ -3032,7 +3184,7 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
return;
}
if(m_listWaveName.contains(strWaveName))
if(m_listLineName.contains(strWaveName))
{
qDebug() << "FormDraw strLineName already exist! " << strWaveName;
return;
@ -3085,7 +3237,7 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
});
//
m_listWaveName.push_back(strWaveName);
m_listLineName.push_back(strWaveName);
QString strAliasName = "";
QString strUnit = "mv";
@ -3263,7 +3415,7 @@ void FormDraw::s_delWave(QString strUuid, QString strWellName, QString strTrackN
}
qDebug() << "FormDraw s_delWave";
if(m_listWaveName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
}
else
@ -3288,7 +3440,7 @@ void FormDraw::s_delWave(QString strUuid, QString strWellName, QString strTrackN
if(form->m_strLineName == strLineName)
{
childWidget->deleteLater(); // 安排控件的删除,稍后执行
m_listWaveName.removeOne(strLineName);
m_listLineName.removeOne(strLineName);
//属性清空
PropertyService()->InitCurrentViewInfo();
@ -3314,7 +3466,7 @@ void FormDraw::s_delTableLine(QString strUuid, QString strWellName, QString strT
}
qDebug() << "FormDraw s_delTableLine";
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
}
else
@ -3339,7 +3491,7 @@ void FormDraw::s_delTableLine(QString strUuid, QString strWellName, QString strT
if(form->m_strLineName == strLineName)
{
childWidget->deleteLater(); // 安排控件的删除,稍后执行
m_listTableName.removeOne(strLineName);
m_listLineName.removeOne(strLineName);
//属性清空
PropertyService()->InitCurrentViewInfo();
@ -3597,10 +3749,7 @@ void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strW
m_Value=NULL;
m_Value2=NULL;
m_Value3=NULL;
//m_csUnit = "(°)";
m_bTableData=0;//表格或曲线
m_LeftVal2=0;
m_RightVal2=360;
//m_csCurveDDIR="DDIR";
//m_csCurveDANG="DANG";
//m_csCurveGrad="GRAD";
@ -3834,7 +3983,7 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin
return NULL;
}
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return NULL;
@ -3868,7 +4017,7 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin
// connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
QString strAliasName = "斜井三图一表";
QString strUnit = "";
@ -3894,7 +4043,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa
return;
}
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return;
@ -3939,7 +4088,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
QString strAliasName = "裂缝描述";
QString strUnit = "";
@ -3962,7 +4111,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe
return;
}
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return;
@ -4037,7 +4186,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
QString strUnit = "";
double width=2;
@ -4067,7 +4216,7 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell
return;
}
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return;
@ -4140,7 +4289,7 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
QString strAliasName = "沉积相";
QColor newlineColor=QColor(0,0,0);
@ -4234,7 +4383,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
return;
}
if(m_listTableName.contains(strLineName))
if(m_listLineName.contains(strLineName))
{
qDebug() << "FormDraw strLineName already exist! " << strLineName;
return;
@ -4353,7 +4502,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
//
m_listTableName.push_back(strLineName);
m_listLineName.push_back(strLineName);
QString strAliasName = "套管组件";
QColor newlineColor=QColor(0,0,0);
@ -5004,8 +5153,8 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName,
//widget->rescaleAxes();
}
//表格曲线
void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QStringList listOtherProperty)
//蝌蚪图
void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QJsonObject listOtherProperty)
{
int iMyWidth = widget->axisRect(0)->width();
float vmax = iMyWidth;
@ -5023,7 +5172,6 @@ void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strL
widget->xAxis = yAxis;
widget->yAxis = xAxis;
m_LeftVal = 0;
m_RightVal = 90;
//隐藏刻度
@ -5037,43 +5185,15 @@ void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strL
widget->yAxis2->setVisible(false);
//-----------------------------------
widget->m_Value=NULL;
widget->m_Value2=NULL;
widget->m_Value3=NULL;
//m_csUnit = "(°)";
widget->m_bTableData=0;//表格或曲线
widget->m_LeftVal2=0;
widget->m_RightVal2=360;
widget->m_csCurveDDIR = "DDIR"; // 方位 曲线名
widget->m_csCurveDANG = "DANG";//倾角
widget->m_csCurveGrad = "GRAD";
widget->m_nTailWidth=2;
widget->m_crTail=qRgb(0,0,0);
widget->m_crPointFill=qRgb(0,0,0);
//
widget->m_crGridSmall=qRgb(100,100,100);
widget->m_nRadius = 6;
widget->m_nTailLen = 10;
widget->m_nCircleWidth=1;
widget->m_flGrad1 = 10; //可信度
widget->m_flGrad2 = 50;
//Table dip
widget->m_qsTable="FRAC_HOLE.TABLE";
widget->m_qsDIR=("DIR"); // 方位 曲线名
widget->m_qsDIP=("DIPorS");//倾角
widget->m_qsDepth="DEP";
widget->m_qsID = "ID";
widget->m_qsProperty=("ID");
widget->m_iPrecision = 3;
//蝌蚪图
widget->Draw_Kedou();
//------
QString strUnit = "";
double width=2;
QString strScaleType = "";
//道-对象
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject");
FormInfo* pInfo = m_formTrack->AddKedou(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject", listOtherProperty);
//蝌蚪图
widget->Draw_Kedou();
}
@ -6576,9 +6696,6 @@ void FormDraw::DrawJykt(QMyCustomPlot *widget, QString strSlfName)
void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
{
//初始化数据
m_LeftVal2=0;
m_RightVal2=90;
m_csCurveAZIM=("AZIM");
m_csCurveDEVI=("DEVI");

View File

@ -46,6 +46,8 @@ public:
//表格:固井结论等
void DisplayTable_One(QJsonObject lineObjInfo);
//蝌蚪图
void DisplayKedou_One(QJsonObject lineObjInfo);
//气测/FMT/射孔/文本
void DisplayJiegutext_One(QJsonObject lineObjInfo);
@ -89,6 +91,9 @@ protected:
QMyCustomPlot* addTableLine(QString strUuid, QString strSlfName, QString strWellName,
QString strTrackName, QString strLineName, QStringList listOtherProperty={});
QMyCustomPlot* addKedou(QString strUuid, QString strSlfName, QString strWellName,
QString strTrackName, QString strLineName, QJsonObject listOtherProperty={});
public slots:
void dragEnterEvent(QDragEnterEvent* event);
void dragMoveEvent(QDragMoveEvent* event);
@ -121,8 +126,6 @@ public:
FormTrack *m_formTrack = NULL;
QStringList m_listLineName;
QStringList m_listWaveName;
QStringList m_listTableName;
BorderFlags m_BorderFlags;
@ -146,7 +149,7 @@ public:
void DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString &strWaveName, int &_nSamples);
//表格曲线
void initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "蝌蚪图", QColor newlineColor=QColor(0,0,0), QStringList listOtherProperty={});
void initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "蝌蚪图", QColor newlineColor=QColor(0,0,0), QJsonObject listOtherProperty={});
void ReadFracDef();
void ReadData(QString strSlfName, QString strLineName);//表格
void ReadData(QString strSlfName, QString strLineName, int iCurve, Slf_CURVE *curve);//曲线
@ -161,20 +164,14 @@ public:
int FracNum;
float *m_pflTab_Frac;
bool m_bFracIsOK;
//CString m_csUnit;
//
Slf_CURVE m_Curve,m_Curve2,m_Curve3;
char *m_Value = NULL,*m_Value2 = NULL,*m_Value3 = NULL;
// 以下变量需保存在模板里
// 绘制时,方位/倾角/可信度曲线的深度、采样间隔应该一致
//CString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad; // 方位/倾角/可信度 曲线名
float m_LeftVal2,m_RightVal2;
float m_flGrad1,m_flGrad2; // 可信度
int m_bTableData = 0;//表格或曲线
QRectF m_Rect;
char *m_Value = NULL,*m_Value2 = NULL,*m_Value3 = NULL;
float m_flGrad1,m_flGrad2; // 可信度
int m_bTableData = 0; //表格或曲线
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
float m_nSltk; // 杆状图长度
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
float m_nSltk; // 杆状图长度
QColor m_crPointFill,m_crTail,m_crCircle;
QColor m_crGridSmall;
//TabDip

View File

@ -98,6 +98,120 @@ FormInfo::~FormInfo()
delete ui;
}
void FormInfo::initProperty_Kedou(QJsonObject obj)
{
if(obj.isEmpty())
{
// 字体
// 数据类型选择
this->m_pl_dataType = 0; // 数据类型
// 曲线选择
this->m_pl_azimuthCurve = "DDIR"; // 方位曲线
this->m_pl_inclinationCurve = "DANG"; // 倾角曲线
this->m_pl_GradCurve = "GRAD"; // 可信度曲线
// 表数据字段
this->m_rose_depth_field = "DEPT"; // 深度字段
this->m_rose_azimuth_field = "DDIR"; // 方位字段
this->m_rose_dip_field = "DANG"; // 倾角字段
this->m_rose_attribute_field = "ID"; // 属性字段
//蝌蚪符号
this->m_nRadius = 6; // 圆半径
this->m_nCircleWidth = 1; // 圆线宽度
this->m_nTailLen = 10; // 尾线长度
this->m_nTailWidth = 2; // 尾线宽度
// 显示控制
this->m_pl_minInclination = 0; // 最小倾角
this->m_pl_maxInclination = 360; // 最大倾角
this->m_flGrad1 = 10; // 可信度1
this->m_flGrad2 = 50; // 可信度2
// 显示控制(数据表)
this->m_crack_decimal_digits = 2; // 小数位数
// 分类
this->m_pl_highGap = false; // 高导缝
this->m_pl_highReservoir = false; // 高阻缝
this->m_pl_reticularFracture = false; // 网状缝
this->m_pl_inducedFracture = false; // 诱导缝
this->m_pl_bedLayer = false; // 层理
this->m_pl_erosionSurface = false; // 侵蚀面
this->m_pl_pore = false; // 孔洞
this->m_pl_vesicle = false; // 气孔
this->m_pl_gravel = false; // 砾石
this->m_pl_nodule = false; // 结核
this->m_pl_lumps = false; // 团块
this->m_pl_fault = false; // 断层
this->m_pl_verticalFracture = false; // 垂直缝
this->m_pl_custom1 = false; // 自定义1
this->m_pl_custom2 = false; // 自定义2
}
else
{
QString strType = obj.value("Type").toString();
if ("tableObject" == strType)
{
// 字体
// 名称
this->m_curveNameFont.fromString(obj["curveNameFont"].toString());
// 单位
this->m_strUnitFont.fromString(obj["m_strUnitFont"].toString());
// 刻度
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
// 数据类型选择
this->m_pl_dataType = obj["m_pl_dataType"].toInt(); // 数据类型
// 曲线选择
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
this->m_pl_inclinationCurve = obj["m_pl_inclinationCurve"].toString(); // 倾角曲线
this->m_pl_GradCurve = obj["m_pl_GradCurve"].toString(); // 可信度曲线
// 表数据字段
this->m_rose_depth_field = obj["m_rose_depth_field"].toString(); // 深度字段
this->m_rose_azimuth_field = obj["m_rose_azimuth_field"].toString(); // 方位字段
this->m_rose_dip_field = obj["m_rose_dip_field"].toString(); // 倾角字段
this->m_rose_attribute_field = obj["m_rose_attribute_field"].toString(); // 属性字段
//蝌蚪符号
this->m_nRadius = obj["m_nRadius"].toDouble(); // 圆半径
this->m_nCircleWidth = obj["m_nCircleWidth"].toDouble();// 圆线宽度
this->m_nTailLen = obj["m_nTailLen"].toDouble(); // 尾线长度
this->m_nTailWidth = obj["m_nTailWidth"].toDouble(); // 尾线宽度
this->m_crCircle.setNamedColor(obj["m_crCircle"].toString());// 圆线颜色
this->m_crTail.setNamedColor(obj["m_crTail"].toString());// 尾线颜色
// 显示控制
this->m_pl_minInclination = obj["m_pl_minInclination"].toDouble(); // 最小倾角
this->m_pl_maxInclination = obj["m_pl_maxInclination"].toDouble(); // 最大倾角
this->m_flGrad1 = obj["m_flGrad1"].toDouble(); // 可信度1
this->m_flGrad2 = obj["m_flGrad2"].toDouble(); // 可信度2
// 显示控制(数据表)
this->m_crack_decimal_digits = obj["m_crack_decimal_digits"].toInt(); // 小数位数
// 分类
this->m_pl_highGap = obj["m_pl_highGap"].toBool(); // 高导缝
this->m_pl_highReservoir = obj["m_pl_highReservoir"].toBool(); // 高阻缝
this->m_pl_reticularFracture = obj["m_pl_reticularFracture"].toBool(); // 网状缝
this->m_pl_inducedFracture = obj["m_pl_inducedFracture"].toBool(); // 诱导缝
this->m_pl_bedLayer = obj["m_pl_bedLayer"].toBool(); // 层理
this->m_pl_erosionSurface = obj["m_pl_erosionSurface"].toBool(); // 侵蚀面
this->m_pl_pore = obj["m_pl_pore"].toBool(); // 孔洞
this->m_pl_vesicle = obj["m_pl_vesicle"].toBool(); // 气孔
this->m_pl_gravel = obj["m_pl_gravel"].toBool(); // 砾石
this->m_pl_nodule = obj["m_pl_nodule"].toBool(); // 结核
this->m_pl_lumps = obj["m_pl_lumps"].toBool(); // 团块
this->m_pl_fault = obj["m_pl_fault"].toBool(); // 断层
this->m_pl_verticalFracture = obj["m_pl_verticalFracture"].toBool(); // 垂直缝
this->m_pl_custom1 = obj["m_pl_custom1"].toBool(); // 自定义1
this->m_pl_custom2 = obj["m_pl_custom2"].toBool(); // 自定义2
}
}
}
void FormInfo::initProperty(QJsonObject obj)
{
m_vmin = obj.value("vmin").toDouble();
@ -366,6 +480,56 @@ QJsonObject FormInfo::makeJson()
//item属性写入slf文件不需要此次记录
return rootObj;
}
else if (m_strLineName == "FRAC_HOLE.TABLE")
{
//蝌蚪图
// 字体
//rootObj["m_strAliasNameFont"] = this->m_strAliasNameFont.toString(); // 名称
rootObj["m_strUnitFont"] = this->m_strUnitFont.toString(); // 单位
rootObj["m_pl_fontScale"] = this->m_pl_fontScale.toString(); // 刻度
// 数据类型选择
rootObj["m_pl_dataType"] = this->m_pl_dataType; // 数据类型
// 曲线选择
rootObj["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; // 方位曲线
rootObj["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; // 倾角曲线
rootObj["m_pl_GradCurve"] = this->m_pl_GradCurve; // 可信度曲线
//字段选择(数据表)
rootObj["m_rose_depth_field"] = this->m_rose_depth_field; // 深度字段
rootObj["m_rose_azimuth_field"] = this->m_rose_azimuth_field; // 方位字段
rootObj["m_rose_dip_field"] = this->m_rose_dip_field; // 倾角字段
rootObj["m_rose_attribute_field"] = this->m_rose_attribute_field; // 属性字段
//蝌蚪符号
rootObj["m_nRadius"] = this->m_nRadius; // 圆半径
rootObj["m_nCircleWidth"] = this->m_nCircleWidth; // 圆线宽度
rootObj["m_nTailLen"] = this->m_nTailLen; // 尾线长度
rootObj["m_nTailWidth"] = this->m_nTailWidth; // 尾线宽度
rootObj["m_crCircle"] = this->m_crCircle.name(); // 圆线颜色
rootObj["m_crTail"] = this->m_crTail.name(); // 尾线颜色
// 显示控制
rootObj["m_pl_minInclination"] = this->m_pl_minInclination; // 最小倾角
rootObj["m_pl_maxInclination"] = this->m_pl_maxInclination; // 最大倾角
rootObj["m_flGrad1"] = this->m_flGrad1; // 可信度1
rootObj["m_flGrad2"] = this->m_flGrad2; // 可信度2
// 显示控制(数据表)
rootObj["m_crack_decimal_digits"] = this->m_crack_decimal_digits; // 小数位数
// 分类
rootObj["m_pl_highGap"] = this->m_pl_highGap; // 高导缝
rootObj["m_pl_highReservoir"] = this->m_pl_highReservoir; // 高阻缝
rootObj["m_pl_reticularFracture"] = this->m_pl_reticularFracture; // 网状缝
rootObj["m_pl_inducedFracture"] = this->m_pl_inducedFracture; // 诱导缝
rootObj["m_pl_bedLayer"] = this->m_pl_bedLayer; // 层理
rootObj["m_pl_erosionSurface"] = this->m_pl_erosionSurface; // 侵蚀面
rootObj["m_pl_pore"] = this->m_pl_pore; // 孔洞
rootObj["m_pl_vesicle"] = this->m_pl_vesicle; // 气孔
rootObj["m_pl_gravel"] = this->m_pl_gravel; // 砾石
rootObj["m_pl_nodule"] = this->m_pl_nodule; // 结核
rootObj["m_pl_lumps"] = this->m_pl_lumps; // 团块
rootObj["m_pl_fault"] = this->m_pl_fault; // 断层
rootObj["m_pl_verticalFracture"] = this->m_pl_verticalFracture; // 垂直缝
rootObj["m_pl_custom1"] = this->m_pl_custom1; // 自定义1
rootObj["m_pl_custom2"] = this->m_pl_custom2; // 自定义2
return rootObj;
}
}
else if (m_strType == "JiegutextObject")
{

View File

@ -26,6 +26,7 @@ public:
~FormInfo();
void initProperty(QJsonObject obj);
void initProperty_Kedou(QJsonObject obj);
void paintClassify(QPainter &painter, int compassCenterY);
private:
@ -364,10 +365,16 @@ public:
//蝌蚪图
QString m_pl_GradCurve = "GRAD"; // 可信度曲线
float m_flGrad1,m_flGrad2; // 可信度
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
QColor m_crTail,m_crCircle;//颜色
float m_flGrad1 = 10; // 可信度
float m_flGrad2 = 50; // 可信度
float m_nRadius = 6; // 半径
float m_nCircleWidth = 2; // 圆线宽度
float m_nTailWidth = 2; // 尾宽度
float m_nTailLen = 10; // 尾长
QColor m_crCircle = qRgb(0,0,0); //颜色
QColor m_crTail = qRgb(0,0,0); //颜色
QColor m_crPointFill = qRgb(0,0,0);
public:
void setLineWidth(double dWidth);
double getLineWidth();

View File

@ -312,6 +312,43 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
}
}
FormInfo* FormTrack::AddKedou(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty)
{
if(strLineName == "FRAC_HOLE.TABLE")
{
}
else
{
return nullptr;
}
qDebug() << "FormTrack AddKedou";
ui->tableWidget->m_strUuid = m_strUuid;
int row = ui->tableWidget->rowCount();
ui->tableWidget->setRowCount(row + 1);
//曲线信息栏
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
formInfo->m_strUuid = m_strUuid;
formInfo->initProperty_Kedou(listOtherProperty);
formInfo->m_strAliasName = strAliasName;
formInfo->m_strUnit = strUnit;
formInfo->m_strScaleType = strScaleType;
formInfo->m_strType = "tableObject";
formInfo->setLineWidth(dWidth);
formInfo->setVMax(vmax);
formInfo->setVMin(vmin);
formInfo->setFrontColor(QColor(0,0,0));
formInfo->setBackColor(QColor(255,255,255));
//设置高度
ui->tableWidget->setRowHeight(row, 100);
//
ui->tableWidget->setCellWidget(row, 0, formInfo);
}
FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj)
{
QString strWellName = listdt.at(1);

View File

@ -44,6 +44,7 @@ public:
public:
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QStringList listOtherProperty={});
FormInfo* AddKedou(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty={});
FormInfo* setDrawDt(QStringList listdt, QJsonObject obj);

View File

@ -213,6 +213,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
connect(CallManage::getInstance(), SIGNAL(sig_changeGuanShow(QString, QString, QString, QString, QString, QString, bool)), this, SLOT(s_changeGuanShow(QString, QString, QString, QString, QString, QString, bool)));
//改变套管组件属性,直径
connect(CallManage::getInstance(), SIGNAL(sig_changeGuanD(QString, QString, QString, QString, QString, QString, double)), this, SLOT(s_changeGuanD(QString, QString, QString, QString, QString, QString, double)));
//改变蝌蚪图属性
connect(CallManage::getInstance(), SIGNAL(sig_changeKedouProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeKedouProperty(QString, QString, QString, QString, QString)));
}
void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW)
@ -11789,7 +11791,48 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value)
}
void QMyCustomPlot::Draw_Kedou()
{
{
//this->clearGraphs();
this->clearItems();
//
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
if (pInfo == NULL)
{
return;
}
//-----------------------------------
this->m_Value=NULL;
this->m_Value2=NULL;
this->m_Value3=NULL;
this->m_bTableData = pInfo->m_pl_dataType;//曲线//表格
// 曲线选择
this->m_csCurveDDIR = pInfo->m_pl_azimuthCurve; // 方位 曲线名
this->m_csCurveDANG = pInfo->m_pl_inclinationCurve;//倾角
this->m_csCurveGrad = pInfo->m_pl_GradCurve; // 可信度曲线
//字段选择(数据表)
this->m_qsDepth = pInfo->m_rose_depth_field; // 深度字段
this->m_qsDIR = pInfo->m_rose_azimuth_field; // 方位字段
this->m_qsDIP = pInfo->m_rose_dip_field; // 倾角字段
this->m_qsID = this->m_qsProperty = pInfo->m_rose_attribute_field; // 属性字段
//蝌蚪符号
this->m_nRadius = pInfo->m_nRadius; // 圆半径
this->m_nCircleWidth = pInfo->m_nCircleWidth; // 圆线宽度
this->m_nTailLen = pInfo->m_nTailLen; // 尾线长度
this->m_nTailWidth = pInfo->m_nTailWidth; // 尾线宽度
this->m_crCircle = pInfo->m_crCircle; // 圆线颜色
this->m_crTail = pInfo->m_crTail; // 尾线颜色
this->m_crPointFill=this->m_crCircle;
//
this->m_crGridSmall=qRgb(100,100,100);
this->m_flGrad1 = pInfo->m_flGrad1; //可信度
this->m_flGrad2 = pInfo->m_flGrad2;
//Table dip
this->m_qsTable="FRAC_HOLE.TABLE";
this->m_iPrecision = pInfo->m_crack_decimal_digits;
if (m_bTableData)
{
ReadFracDef_gaodaofeng();
@ -11797,20 +11840,10 @@ void QMyCustomPlot::Draw_Kedou()
{
m_bTypeDraw[i] = true;
}
//
m_qsDIR="DDIR"; // 方位 曲线名
m_qsDIP="DANG";//倾角
m_qsDepth="DEPT";
m_qsID = "ID";
ReadData(m_strSlfName, m_strLineName);
}
else
{
//
m_csCurveDDIR = "DDIR"; // 方位 曲线名
m_csCurveDANG = "DANG";//倾角
m_csCurveGrad = "GRAD";
this->ReadData(m_strSlfName, m_csCurveDDIR, 0, &m_Curve);
this->ReadData(m_strSlfName, m_csCurveDANG, 1, &m_Curve2);
this->ReadData(m_strSlfName, m_csCurveGrad, 2, &m_Curve3);
@ -11824,6 +11857,7 @@ void QMyCustomPlot::Draw_Kedou()
{
this->DrawDip_Kedou();
}
this->replot();
}
void QMyCustomPlot::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio)
@ -11861,18 +11895,10 @@ void QMyCustomPlot::DrawTabDip_Kedou()
if ( nPointNum < 1 )return ;
dgtord=3.14159265/180.;
//
m_nCircleWidth = 1;
m_nRadius = 6;
m_crCircle = QColor(0,0,0);
//
m_nTailWidth = 2;
m_nTailLen = 10;
m_crTail = QColor(0,0,0);
int iMyWidth = this->axisRect(0)->width(); //setSizeConstraintRect()
int iMyHeight = this->axisRect(0)->height(); //setSizeConstraintRect()
qDebug() << "iMyWidth=" << QString::number(iMyWidth) << ", iMyHeight=" << QString::number(iMyHeight);
//qDebug() << "iMyWidth=" << QString::number(iMyWidth) << ", iMyHeight=" << QString::number(iMyHeight);
//-----------
int l;
@ -11883,8 +11909,8 @@ void QMyCustomPlot::DrawTabDip_Kedou()
int m_nScaleThinGrid=10;
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
//绘制网格线,注意颜色、宽度属性
QPen pPenStraightLine(m_crTail, m_nTailWidth);
QPen pPenStraightLineSmall(m_crGridSmall, m_nTailWidth/2);
QPen pPenStraightLine(m_crTail, 2);
QPen pPenStraightLineSmall(m_crGridSmall, 1);
for(i=0;i<m_nScaleThinGrid;i++)
{
if ( i == 0 ) x =1;
@ -11917,6 +11943,15 @@ void QMyCustomPlot::DrawTabDip_Kedou()
CalcDipWidth(9,flWidth, 1.2, 0, iMyWidth, 1.);
//圆圈
QPen pPen(m_crCircle);
pPen.setWidth(m_nCircleWidth);
//尾巴
QPen pPenTail(m_crTail);
pPenTail.setWidth(m_nTailWidth);
n = m_FracDefList.count();
for (i=0; i<nPointNum; i++)
{
@ -11935,13 +11970,6 @@ void QMyCustomPlot::DrawTabDip_Kedou()
if(bDraw)
{
QBrush cBrush(fd.crColor);
//圆圈
QPen pPen(m_crCircle);
pPen.setWidth(m_nCircleWidth);
//尾巴
QPen pPenTail(m_crTail);
pPenTail.setWidth(m_nTailWidth);
// 角度
flVal = frac.DIPorS;
@ -11998,8 +12026,8 @@ void QMyCustomPlot::DrawDip_Kedou()
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
//绘制网格线,注意颜色、宽度属性
QPen pPenStraightLine(m_crTail, m_nTailWidth);
QPen pPenStraightLineSmall(m_crGridSmall, m_nTailWidth/2);
QPen pPenStraightLine(m_crGridSmall, 2);
QPen pPenStraightLineSmall(m_crGridSmall, 1);
for(i=0;i<m_nScaleThinGrid;i++)
{
if ( i == 0 ) x =1;
@ -12030,7 +12058,14 @@ void QMyCustomPlot::DrawDip_Kedou()
}
}
QPen pPen(m_crTail,m_nTailWidth);
//圆圈
QPen pPen(m_crCircle);
pPen.setWidth(m_nCircleWidth);
//尾巴
QPen pPenTail(m_crTail);
pPenTail.setWidth(m_nTailWidth);
//
QBrush cBrushFill(m_crPointFill);
float flDepthScale,tempf,flVal;
@ -12103,7 +12138,7 @@ void QMyCustomPlot::DrawDip_Kedou()
QCPItemLine *qcpItemLine = new QCPItemLine(this);
qcpItemLine->start->setCoords(y, x);//圆心位置
qcpItemLine->end->setCoords(y, x);//圆心位置
qcpItemLine->setPen(pPen);
qcpItemLine->setPen(pPenTail);
qcpItemLine->m_bCustom = true;
qcpItemLine->m_nTailLen = m_nTailLen; //尾长
qcpItemLine->m_nRadius = m_nRadius; //半径
@ -12111,3 +12146,22 @@ void QMyCustomPlot::DrawDip_Kedou()
k++;
}
}
//改变蝌蚪图属性
void QMyCustomPlot::s_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
{
if(m_strUuid == strUuid &&
m_strSlfName == strSlfName &&
m_strWellName == strWellName &&
m_strTrackName == strTrackName &&
m_strLineName == strLineName)
{
}
else
{
return;
}
//绘制蝌蚪图
Draw_Kedou();
}

View File

@ -674,6 +674,9 @@ public slots:
//改变套管组件属性,直径
void s_changeGuanD(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, double newD);
//改变蝌蚪图属性
void s_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
public:
//蝌蚪图重绘网格线
bool mKedou = false;
@ -730,7 +733,6 @@ public:
void addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, const QPointF& p1, const QPointF& p2, const QPen& wPen);
//蝌蚪
float m_LeftVal2,m_RightVal2; //最小倾角、最大倾角
float m_flGrad1,m_flGrad2; // 可信度
int m_iPrecision; //小数位数
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度