添加多臂井径属性

This commit is contained in:
jiayulong 2026-04-24 11:52:34 +08:00
parent 84092edf7d
commit 02bc42b903
8 changed files with 232 additions and 22 deletions

View File

@ -275,6 +275,9 @@ signals:
//改变井斜方位图属性 //改变井斜方位图属性
void sig_changeDenvProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName); void sig_changeDenvProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
//改变多臂井径属性
void sig_changeMCalsProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName);
// //
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath); //void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);

View File

@ -122,6 +122,12 @@ void CDrawNrad::DrawNrad(QString strSlfName, QString csCurve)
// 初始化 // 初始化
int iMyWidth = m_myCustomPlot->axisRect(0)->width(); int iMyWidth = m_myCustomPlot->axisRect(0)->width();
//重置范围
float vmax = iMyWidth;
float vmin = 0;
m_myCustomPlot->yAxis->setRange(vmin, vmax);
centerX = (iMyWidth+0)/2.0; centerX = (iMyWidth+0)/2.0;
centerY = 0; centerY = 0;
nWidth = iMyWidth; nWidth = iMyWidth;

View File

@ -2392,6 +2392,13 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
// //
changedDenvProperty(m_propertyData[pProperty], variant); changedDenvProperty(m_propertyData[pProperty], variant);
} }
else if (m_strCurrentProperty == MCals_Property)//多臂井径
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//
changedMCalsProperty(m_propertyData[pProperty], variant);
}
} }
void PropertyWidget::SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle) void PropertyWidget::SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle)
@ -3236,6 +3243,11 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
{ {
//井斜方位图 //井斜方位图
this->initDenvProperty(formInfo); this->initDenvProperty(formInfo);
}
else if (formInfo->m_strType == "MCalsObject")
{
//多臂井径
this->initMCalsProperty(formInfo);
} }
else if (formInfo->m_strType == "depthObject") else if (formInfo->m_strType == "depthObject")
{ {
@ -5236,7 +5248,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
emit CallManage::getInstance()->sig_changeRoseProperty(variantMap); emit CallManage::getInstance()->sig_changeRoseProperty(variantMap);
} }
} }
//蝌蚪图
void PropertyWidget::initKedouProperty(FormInfo *formInfo) void PropertyWidget::initKedouProperty(FormInfo *formInfo)
{ {
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
@ -5278,7 +5290,7 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo)
m_strCurrentProperty = Kedou_Property; m_strCurrentProperty = Kedou_Property;
} }
//蝌蚪图
void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal) void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
{ {
bool flag = false; bool flag = false;
@ -5483,7 +5495,7 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
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); 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);
} }
} }
//杆状图
void PropertyWidget::initGanzhuangProperty(FormInfo *formInfo) void PropertyWidget::initGanzhuangProperty(FormInfo *formInfo)
{ {
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
@ -5509,7 +5521,7 @@ void PropertyWidget::initGanzhuangProperty(FormInfo *formInfo)
m_strCurrentProperty = Ganzhuang_Property; m_strCurrentProperty = Ganzhuang_Property;
} }
//杆状图
void PropertyWidget::changedGanzhuangProperty(QString strProperty, QVariant varVal) void PropertyWidget::changedGanzhuangProperty(QString strProperty, QVariant varVal)
{ {
bool flag = false; bool flag = false;
@ -5584,7 +5596,7 @@ void PropertyWidget::changedGanzhuangProperty(QString strProperty, QVariant varV
emit CallManage::getInstance()->sig_changeGanzhuangProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName); emit CallManage::getInstance()->sig_changeGanzhuangProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
} }
} }
//井眼垮塌矢量图
void PropertyWidget::initJyktProperty(FormInfo *formInfo) void PropertyWidget::initJyktProperty(FormInfo *formInfo)
{ {
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
@ -5609,7 +5621,7 @@ void PropertyWidget::initJyktProperty(FormInfo *formInfo)
m_strCurrentProperty = Jykt_Property; m_strCurrentProperty = Jykt_Property;
} }
//井眼垮塌矢量图
void PropertyWidget::changedJyktProperty(QString strProperty, QVariant varVal) void PropertyWidget::changedJyktProperty(QString strProperty, QVariant varVal)
{ {
bool flag = false; bool flag = false;
@ -5695,7 +5707,7 @@ void PropertyWidget::changedJyktProperty(QString strProperty, QVariant varVal)
} }
} }
//井斜方位图
void PropertyWidget::initDenvProperty(FormInfo *formInfo) void PropertyWidget::initDenvProperty(FormInfo *formInfo)
{ {
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
@ -5720,7 +5732,7 @@ void PropertyWidget::initDenvProperty(FormInfo *formInfo)
m_strCurrentProperty = Denv_Property; m_strCurrentProperty = Denv_Property;
} }
//井斜方位图
void PropertyWidget::changedDenvProperty(QString strProperty, QVariant varVal) void PropertyWidget::changedDenvProperty(QString strProperty, QVariant varVal)
{ {
bool flag = false; bool flag = false;
@ -5800,3 +5812,148 @@ void PropertyWidget::changedDenvProperty(QString strProperty, QVariant varVal)
emit CallManage::getInstance()->sig_changeDenvProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName); emit CallManage::getInstance()->sig_changeDenvProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
} }
} }
//多臂井径
void PropertyWidget::initMCalsProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
_CreateVariantPropertyItem("网格图", "最小井径", formInfo->m_MinVal, QVariant::Double);
_CreateVariantPropertyItem("网格图", "最大井径", formInfo->m_MaxVal, QVariant::Double);
_CreateVariantPropertyItem("网格图", "左边井径序号", formInfo->m_iStartArmPos, QVariant::Int);
_CreateVariantPropertyItem("网格图", "右边井径序号", formInfo->m_iEndArmPos, QVariant::Int);
_CreateVariantPropertyItem("网格图", "最小外径占道比例", formInfo->m_MinRatio, QVariant::Double);
_CreateVariantPropertyItem("网格图", "最大外径占道比例", formInfo->m_MaxRatio, QVariant::Double);
_CreateVariantPropertyItem("网格图", "纵向网格间隔", formInfo->m_nVertGrid, QVariant::Int);
_CreateVariantPropertyItem("网格图", "井径曲线间网格", formInfo->m_nHorzGrid, QVariant::Int);
_CreateVariantPropertyItem("网格图", "旋转井径增量", formInfo->m_nHorzStep, QVariant::Int);
_CreateVariantPropertyItem("网格图", "井柱椭圆纵横半径比", formInfo->m_flVFactor, QVariant::Double);
_CreateVariantPropertyItem("网格图", "横格线宽度", formInfo->m_nHLineWidth, QVariant::Int);
_CreateVariantPropertyItem("网格图", "横格线颜色", formInfo->m_HLineColor, QVariant::Color);
_CreateVariantPropertyItem("网格图", "纵格线宽度", formInfo->m_nVLineWidth, QVariant::Int);
_CreateVariantPropertyItem("网格图", "纵格线颜色", formInfo->m_VLineColor, QVariant::Color);
m_strCurrentProperty = MCals_Property;
}
//多臂井径
void PropertyWidget::changedMCalsProperty(QString strProperty, QVariant varVal)
{
bool flag = false;
if("选择井曲线" == strProperty)
{
QString sFilePath = varVal.toString();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
{
QString strOldLineName = m_formInfo->m_strLineName;
QString strOldSlfName = m_formInfo->m_strSlfName;
//暂时不允许改变slf井次名称不然不在同一口井绘制
if(strOldSlfName != sFilePath)
{
QMessageBox::information(nullptr,"提示","不允许改变slf井次名称");
return;
}
//名称不变
if(strOldLineName == strLineName)
{
return;
}
if("" == strLineName)
{
return;
}
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//flag = true;
//此处需要使用strOldLineName
emit CallManage::getInstance()->sig_changeMCalsProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
return;
}
}
}
// 网格图
else if ("最小井径" == strProperty)
{
this->m_formInfo->m_MinVal = varVal.toDouble();
flag = true;
}
else if ("最大井径" == strProperty)
{
this->m_formInfo->m_MaxVal = varVal.toDouble();
flag = true;
}
else if ("左边井径序号" == strProperty)
{
this->m_formInfo->m_iStartArmPos = varVal.toInt();
flag = true;
}
else if ("右边井径序号" == strProperty)
{
this->m_formInfo->m_iEndArmPos = varVal.toInt();
flag = true;
}
else if ("最小外径占道比例" == strProperty)
{
this->m_formInfo->m_MinRatio = varVal.toDouble();
flag = true;
}
else if ("最大外径占道比例" == strProperty)
{
this->m_formInfo->m_MaxRatio = varVal.toDouble();
flag = true;
}
else if ("纵向网格间隔" == strProperty)
{
this->m_formInfo->m_nVertGrid = varVal.toInt();
flag = true;
}
else if ("井径曲线间网格" == strProperty)
{
this->m_formInfo->m_nHorzGrid = varVal.toInt();
flag = true;
}
else if ("旋转井径增量" == strProperty)
{
this->m_formInfo->m_nHorzStep = varVal.toInt();
flag = true;
}
else if ("井柱椭圆纵横半径比" == strProperty)
{
this->m_formInfo->m_flVFactor = varVal.toDouble();
flag = true;
}
else if ("横格线宽度" == strProperty)
{
this->m_formInfo->m_nHLineWidth = varVal.toInt();
flag = true;
}
else if ("横格线颜色" == strProperty)
{
this->m_formInfo->m_HLineColor = varVal.value<QColor>();
flag = true;
}
else if ("纵格线宽度" == strProperty)
{
this->m_formInfo->m_nVLineWidth = varVal.toInt();
flag = true;
}
else if ("纵格线颜色" == strProperty)
{
this->m_formInfo->m_VLineColor = varVal.value<QColor>();
flag = true;
}
if(flag)
{
emit CallManage::getInstance()->sig_changeMCalsProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_formInfo->m_strLineName);
}
}

View File

@ -82,6 +82,8 @@
#define Jykt_Property "Jykt_Property" //井眼垮塌矢量图 #define Jykt_Property "Jykt_Property" //井眼垮塌矢量图
#define Denv_Property "Denv_Property" //井斜方位图 #define Denv_Property "Denv_Property" //井斜方位图
#define MCals_Property "MCals_Property" //多臂井径
#pragma execution_character_set("utf-8") #pragma execution_character_set("utf-8")
/** /**
@ -277,6 +279,10 @@ public:
void initDenvProperty(FormInfo *formInfo); void initDenvProperty(FormInfo *formInfo);
void changedDenvProperty(QString strProName, QVariant val); void changedDenvProperty(QString strProName, QVariant val);
//多臂井径
void initMCalsProperty(FormInfo *formInfo);
void changedMCalsProperty(QString strProName, QVariant val);
public slots: public slots:
void SlotPropertyChanged(QtProperty *property, const QVariant &variant); void SlotPropertyChanged(QtProperty *property, const QVariant &variant);
void SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle); void SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle);

View File

@ -3415,7 +3415,7 @@ void FormDraw::s_mouseWheel(QWheelEvent *event)
void FormDraw::setColWidth(float fNewWidth) void FormDraw::setColWidth(float fNewWidth)
{ {
m_nTrackW = fNewWidth; m_nTrackW = fNewWidth;
fNewWidth = fNewWidth * g_dPixelPerCm; //fNewWidth = fNewWidth * g_dPixelPerCm;
// 获取当前widget的所有子控件 // 获取当前widget的所有子控件
const QObjectList &children = this->children(); const QObjectList &children = this->children();
//判断为空 //判断为空
@ -4438,7 +4438,7 @@ void FormDraw::initMCals(QMyCustomPlot *widget, QString strSlfName, QString strL
FormInfo* pInfo = m_formTrack->AddMCals(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "MCalsObject", listOtherProperty); FormInfo* pInfo = m_formTrack->AddMCals(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "MCalsObject", listOtherProperty);
//多臂井径 //多臂井径
widget->Draw_MCals(); widget->Draw_MCals(strLineName, strLineName);
} }
//套管组件 //套管组件

View File

@ -404,10 +404,10 @@ public:
int m_nHorzGrid = 0; //井径曲线间网格 int m_nHorzGrid = 0; //井径曲线间网格
int m_nHorzStep = 5; //旋转井径增量 int m_nHorzStep = 5; //旋转井径增量
float m_flVFactor = 0.8; //井柱椭圆纵横半径比 float m_flVFactor = 0.8; //井柱椭圆纵横半径比
int m_nHLineWidth =1; int m_nHLineWidth =1; //横格线宽度
QColor m_HLineColor = QColor(0,0,0); QColor m_HLineColor = QColor(0,0,0);//横格线颜色
int m_nVLineWidth =1; int m_nVLineWidth =1; //纵格线宽度
QColor m_VLineColor = QColor(0,0,0); QColor m_VLineColor = QColor(0,0,0);//纵格线颜色
public: public:
void setLineWidth(double dWidth); void setLineWidth(double dWidth);

View File

@ -222,6 +222,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
connect(CallManage::getInstance(), SIGNAL(sig_changeJyktProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeJyktProperty(QString, QString, QString, QString, QString))); connect(CallManage::getInstance(), SIGNAL(sig_changeJyktProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeJyktProperty(QString, QString, QString, QString, QString)));
//改变井斜方位图属性 //改变井斜方位图属性
connect(CallManage::getInstance(), SIGNAL(sig_changeDenvProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeDenvProperty(QString, QString, QString, QString, QString))); connect(CallManage::getInstance(), SIGNAL(sig_changeDenvProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeDenvProperty(QString, QString, QString, QString, QString)));
//改变多臂井径属性
connect(CallManage::getInstance(), SIGNAL(sig_changeMCalsProperty(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeMCalsProperty(QString, QString, QString, QString, QString, QString)));
} }
void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW) void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW)
@ -10720,6 +10722,19 @@ void QMyCustomPlot::resetPosition()
//地质层位 //地质层位
resetPosition_Layer(); resetPosition_Layer();
//
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
if (pInfo == NULL)
{
return;
}
if(pInfo->m_strType == "MCalsObject")
{
//多臂井径
Draw_MCals(m_strLineName, m_strLineName);
return;
}
//刷新 //刷新
replot(); replot();
} }
@ -12797,21 +12812,40 @@ void QMyCustomPlot::Draw_Denv()
this->replot(); this->replot();
} }
//多臂井径 //改变多臂井径属性
void QMyCustomPlot::Draw_MCals() void QMyCustomPlot::s_changeMCalsProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName)
{ {
//this->clearGraphs(); if(m_strUuid == strUuid &&
m_strSlfName == strSlfName &&
m_strWellName == strWellName &&
m_strTrackName == strTrackName &&
m_strLineName == strLineName)
{
}
else
{
return;
}
//绘制多臂井径
Draw_MCals(strLineName, strNewLineName);
}
//多臂井径
void QMyCustomPlot::Draw_MCals(QString strLineName, QString strNewLineName)
{
this->clearGraphs();
this->clearItems(); this->clearItems();
// //
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, strNewLineName);
if (pInfo == NULL) if (pInfo == NULL)
{ {
return; return;
} }
//多臂井径 //多臂井径
QString strWaveName = "FCA2"; m_strLineName = pInfo->m_strLineName; //"FCA2";
CDrawNrad *drawNrad = new CDrawNrad(this); CDrawNrad *drawNrad = new CDrawNrad(this);
//属性 //属性
drawNrad->m_LeftVal = pInfo->m_MinVal;//最小井径 drawNrad->m_LeftVal = pInfo->m_MinVal;//最小井径
@ -12829,7 +12863,7 @@ void QMyCustomPlot::Draw_MCals()
drawNrad->m_nVertLineWidth = pInfo->m_nVLineWidth; drawNrad->m_nVertLineWidth = pInfo->m_nVLineWidth;
drawNrad->m_crVertLine = pInfo->m_VLineColor; drawNrad->m_crVertLine = pInfo->m_VLineColor;
drawNrad->ReadData(m_strSlfName, strWaveName); drawNrad->ReadData(m_strSlfName, m_strLineName);
drawNrad->DrawNrad(m_strSlfName, strWaveName); drawNrad->DrawNrad(m_strSlfName, m_strLineName);
this->replot(); this->replot();
} }

View File

@ -688,6 +688,10 @@ public slots:
//改变井斜方位图属性 //改变井斜方位图属性
void s_changeDenvProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName); void s_changeDenvProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
//改变多臂井径属性
void s_changeMCalsProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName);
public: public:
//蝌蚪图重绘网格线 //蝌蚪图重绘网格线
bool mKedou = false; bool mKedou = false;
@ -778,7 +782,7 @@ public:
CPickFrac *m_cPickFrac; CPickFrac *m_cPickFrac;
//多臂井径 //多臂井径
void Draw_MCals(); void Draw_MCals(QString strLineName, QString strNewLineName);
private: private: