修改波列道修改道宽,绘图填充问题。
修改波列道修改深度比例尺绘制问题,缩放绘图问题 修改算法执行完毕后,更新左侧树更新可视解释绘图逻辑
This commit is contained in:
parent
58efbe36bb
commit
502043d81e
|
|
@ -3756,10 +3756,11 @@ void FormDraw::setColWidth(float fNewWidth)
|
|||
form->setGeometry(form->geometry().x(), form->geometry().y(), ntmpw, (int)dHight);
|
||||
}
|
||||
}
|
||||
else if(strObjName=="FormLogmud")
|
||||
else if(strObjName=="FormWave"
|
||||
|| strObjName == "FormLogmud")
|
||||
{
|
||||
//
|
||||
FormLogmud *form = (FormLogmud*)childWidget;
|
||||
QWidget *form = /*(FormLogmud*)*/childWidget;
|
||||
if(form)
|
||||
{
|
||||
int dHight = form->geometry().height();
|
||||
|
|
@ -3768,7 +3769,7 @@ void FormDraw::setColWidth(float fNewWidth)
|
|||
{
|
||||
ntmpw = (g_iOneWidth*4)* g_dPixelPerCm;
|
||||
}
|
||||
form->setGeometry(form->geometry().x(), form->geometry().y(), ntmpw, (int)dHight);
|
||||
form->setGeometry(form->geometry().x(), form->geometry().y(), ntmpw - 2, (int)dHight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3821,6 +3822,15 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit
|
|||
{
|
||||
FormWave *formWave = qobject_cast<FormWave*>(childWidget);
|
||||
if (formWave)
|
||||
{
|
||||
formWave->setScale(m_iScale);
|
||||
//formWave->updateDepthY(m_iY1, m_iY2);
|
||||
}
|
||||
}
|
||||
else if (strObjName == "FormLogmud")
|
||||
{
|
||||
FormLogmud *formWave = qobject_cast<FormLogmud*>(childWidget);
|
||||
if (formWave)
|
||||
{
|
||||
formWave->updateDepthY(m_iY1, m_iY2);
|
||||
}
|
||||
|
|
@ -4963,6 +4973,8 @@ void FormDraw::s_addLogMud(QString strUuid, QString strSlfName, QString strWellN
|
|||
//
|
||||
FormLogmud *curv = new FormLogmud(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
curv->m_strUuid = m_strUuid;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initBottomDepth(m_pMinCurve->m_dBottomDepth);
|
||||
|
||||
double dHight = 0;
|
||||
dHight = (m_iY2 - m_iY1)*100.0 / (double)m_iScale * g_dPixelPerCm;
|
||||
|
|
|
|||
|
|
@ -21,14 +21,11 @@ FormLogmud::FormLogmud(QWidget *parent, QString strSlfName, QString strWellName,
|
|||
|
||||
|
||||
m_parent = parent;
|
||||
//斜井三图一表
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
||||
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
||||
//自定义滚动条
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santuyibiao(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double)));
|
||||
//打印
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, int, int)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float, float)), this, SLOT(s_ResizeDepth(QString, int, float, float)));
|
||||
}
|
||||
|
||||
void FormLogmud::DrawTvd()
|
||||
|
|
@ -201,6 +198,22 @@ int FormLogmud::GetInsertIndex(double topDepth, double bottomDepth) const
|
|||
return mid;
|
||||
}
|
||||
|
||||
void FormLogmud::setDepthY(float fy1, float fy2)
|
||||
{
|
||||
m_wellTop = qAbs(fy2);
|
||||
}
|
||||
|
||||
void FormLogmud::updateDepthY(float fy1, float fy2)
|
||||
{
|
||||
m_wellTop = qAbs(fy2);
|
||||
}
|
||||
|
||||
void FormLogmud::initBottomDepth(double dep)
|
||||
{
|
||||
m_dBottomDepth = qAbs(dep);
|
||||
m_dAddY = (m_dBottomDepth - m_dTopDepth) * m_nbb;
|
||||
}
|
||||
|
||||
void FormLogmud::paintEvent(QPaintEvent*)
|
||||
{
|
||||
//
|
||||
|
|
@ -213,12 +226,15 @@ void FormLogmud::paintEvent(QPaintEvent*)
|
|||
for (int i = 0; i < m_childrenItems.size(); i++)
|
||||
{
|
||||
LogmudResultItem* pItem = m_childrenItems.at(i);
|
||||
if (pItem->type == 1)
|
||||
//if (pItem->type == 1)
|
||||
{
|
||||
float top = pItem->GetTopDepth();
|
||||
float bottom = pItem->GetBottomDepth();
|
||||
|
||||
double dTmpBotm = (m_dTopDepth + m_dAddY);
|
||||
if (bottom < m_dTopDepth - 1) continue;
|
||||
if (top > dTmpBotm + 1) continue;
|
||||
|
||||
|
||||
double ddep = m_wellTop - m_dTopDepth;
|
||||
QRectF itemBoundingRect(0, top + ddep/*+Rlev*/, rect.width(), bottom - top);
|
||||
|
|
@ -232,55 +248,48 @@ void FormLogmud::paintEvent(QPaintEvent*)
|
|||
|
||||
}
|
||||
|
||||
void FormLogmud::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant)
|
||||
void FormLogmud::s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY)
|
||||
{
|
||||
if(m_strUuid != strUuid ||
|
||||
m_strSlfName != strSlfName ||
|
||||
m_strWellName != strWellName ||
|
||||
m_strTrackName != strTrackName ||
|
||||
m_strLineName != strLineName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if("通常" == strGroup)
|
||||
{
|
||||
if (m_strUuid != strUuid)
|
||||
return;
|
||||
//m_fTopY = qAbs(fDepthUpperY);
|
||||
//this->setFixedHeight(nHeight*m_nbb);
|
||||
m_dBottomDepth = qAbs(fDepthLowerY);
|
||||
m_dAddY = (m_dBottomDepth - m_dTopDepth) * m_nbb;
|
||||
}
|
||||
|
||||
}
|
||||
if("绘制图形对象" == strGroup)
|
||||
{
|
||||
|
||||
}
|
||||
if("边框线型" == strGroup)
|
||||
{
|
||||
if ("线宽" == strProperty)
|
||||
;
|
||||
else if ("颜色" == strProperty)
|
||||
;
|
||||
}
|
||||
|
||||
update();
|
||||
void FormLogmud::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth)
|
||||
{
|
||||
if (m_strUuid == strUuid)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_dTopDepth = ddepth;
|
||||
update();
|
||||
}
|
||||
|
||||
//自定义滚动条
|
||||
void FormLogmud::vertScrollBarChanged(QString strUuid, double value, double low, double upper)
|
||||
{
|
||||
if(m_strUuid==strUuid)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_dTopDepth = value;
|
||||
//上移或下移
|
||||
QRect geoRect = geometry();
|
||||
//
|
||||
double dDelta = value - upper;
|
||||
double dPercent = dDelta / (low-upper);
|
||||
|
||||
setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
|
||||
}
|
||||
// void FormLogmud::vertScrollBarChanged(QString strUuid, double value, double low, double upper)
|
||||
// {
|
||||
// if(m_strUuid==strUuid)
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// m_dTopDepth = value;
|
||||
// //上移或下移
|
||||
// QRect geoRect = geometry();
|
||||
// //
|
||||
// double dDelta = value - upper;
|
||||
// double dPercent = dDelta / (low-upper);
|
||||
//
|
||||
// setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
|
||||
// }
|
||||
|
||||
//打印
|
||||
void FormLogmud::vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ public:
|
|||
LogmudResultItem *AddItem(double topDepth, double bottomDepth, int insertPos);
|
||||
int GetInsertIndex(double topDepth, double bottomDepth) const;
|
||||
|
||||
void setDepthY(float fy1, float fy2);
|
||||
//改变深度更新绘图
|
||||
void updateDepthY(float fy1, float fy2);
|
||||
void initBottomDepth(double dep);
|
||||
private:
|
||||
Ui::FormLogmud *ui;
|
||||
|
||||
|
|
@ -49,18 +53,18 @@ public:
|
|||
|
||||
double m_wellTop = 0.0;
|
||||
double m_dTopDepth = 0.0;
|
||||
|
||||
double m_dBottomDepth = 0.0;
|
||||
double m_dAddY = 19.0f;
|
||||
int m_nbb = 1;
|
||||
struct logmud_stru *m_LogMun = NULL;
|
||||
QList<LogmudResultItem*> m_childrenItems;//所有小分段
|
||||
public:
|
||||
void DrawTvd();
|
||||
public slots:
|
||||
//斜井三图一表
|
||||
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant);
|
||||
void s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY);
|
||||
|
||||
//滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth);
|
||||
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -69,19 +69,6 @@ void FormWave::initGeometry(QString strUuid, int nscale, double fW, int nH)
|
|||
this->m_strUuid = strUuid;
|
||||
m_iScale = nscale;
|
||||
|
||||
// double dHight = (m_iY2 - m_iY1)*100.0 / (double)nscale * g_dPixelPerCm;
|
||||
// // if (g_iShow == 1)
|
||||
// // {
|
||||
// // //显示刻度
|
||||
// // dHight = dHight + 30;
|
||||
// // }
|
||||
//
|
||||
// qDebug() << "FormWave dHight=" << QString::number((int)dHight);
|
||||
// if (dHight > 32767)
|
||||
// {
|
||||
// dHight = 32767;
|
||||
// }
|
||||
|
||||
int ntmpw = fW * g_dPixelPerCm;
|
||||
this->setGeometry(0, 0, ntmpw - 2, (int)nH);
|
||||
|
||||
|
|
@ -307,6 +294,12 @@ void FormWave::changeColor(int nidx, int ncolorNum)
|
|||
}
|
||||
}
|
||||
|
||||
void FormWave::setScale(int nsc)
|
||||
{
|
||||
m_iScale = nsc;
|
||||
update();
|
||||
}
|
||||
|
||||
void FormWave::paintEvent(QPaintEvent*)
|
||||
{
|
||||
//
|
||||
|
|
@ -327,9 +320,10 @@ void FormWave::s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, f
|
|||
if (m_strUuid != strUuid)
|
||||
return;
|
||||
//m_fTopY = qAbs(fDepthUpperY);
|
||||
|
||||
this->setFixedHeight(nHeight*m_nbb);
|
||||
m_fDepthLowerY = qAbs(fDepthLowerY);
|
||||
m_fAddY = (m_fDepthLowerY - m_fTopY) * m_nbb;
|
||||
m_fAddY = (m_fDepthLowerY - m_fTopY);// *m_nbb;
|
||||
}
|
||||
|
||||
void FormWave::s_changeBlack(QString strUuid, bool bBlack)
|
||||
|
|
@ -425,6 +419,7 @@ void FormWave::s_Refresh_All(QString strUuid, QString strSlfName, QString strWel
|
|||
return;
|
||||
|
||||
LoadFromSLF_wave();
|
||||
update();
|
||||
}
|
||||
|
||||
void FormWave::wheelEvent(QWheelEvent *event) // 滚轮事件
|
||||
|
|
@ -515,7 +510,7 @@ void FormWave::DrawWave(QPainter* pdc, QRectF mrt1)
|
|||
|
||||
//qDebug() << "FormWave : m_fTopY " << m_fTopY;
|
||||
// 计算显示深度
|
||||
float sdepc = m_fTopY, edepc = m_fTopY + m_fAddY;
|
||||
float sdepc = m_fTopY, edepc = (m_fTopY + m_fAddY*m_nbb* (m_iScale/200.0));// *(200 / m_iScale);
|
||||
QRectF rt;// = mrt1;
|
||||
//GetDepth(pdc, mrt1, rt, sdep, edep, sdepc, edepc);
|
||||
int SamplePoint = 0;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public:
|
|||
bool SaveToSLF_LogMud();
|
||||
|
||||
void changeColor(int nidx, int ncolorNum);
|
||||
|
||||
void setScale(int nsc);
|
||||
private:
|
||||
Ui::FormWave *ui;
|
||||
|
||||
|
|
@ -70,6 +72,7 @@ public:
|
|||
int m_iScale = 200;
|
||||
double m_wellTop = 0.0;
|
||||
double m_dTopDepth = 0.0;
|
||||
float m_fZoom = 1.0;
|
||||
|
||||
QSharedMemory m_sharedMemory;
|
||||
|
||||
|
|
|
|||
|
|
@ -206,6 +206,8 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_setRangeVScrollBar2(QString)), this, SLOT(s_setRangeVScrollBar2(QString)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddMultiWell(QString, QString, QString)), this, SLOT(s_AddMultiWell(QString, QString, QString)));
|
||||
//算法计算完毕刷新绘图
|
||||
connect(CallGlobalManage::getInstance(), SIGNAL(sig_Notice_AddObject(QString, QString, QStringList)), this, SLOT(s_Notice_AddObject(QString, QString, QStringList)));
|
||||
|
||||
//图头----------
|
||||
m_dock1=new QDockWidget(tr(""),this);
|
||||
|
|
@ -6274,7 +6276,7 @@ void MainWindowCurve::s_NewLogMud()
|
|||
return;
|
||||
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "Q", "LogMudObject");
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "Q1", "LogMudObject");
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName, double nW)
|
||||
|
|
@ -7936,6 +7938,23 @@ void MainWindowCurve::s_AddMultiWell(QString strUuid, QString strSlfName, QStrin
|
|||
}
|
||||
|
||||
|
||||
void MainWindowCurve::s_Notice_AddObject(QString strName, QString strSlfName, QStringList listObject)
|
||||
{
|
||||
//当前行
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if (sret.length() <= 0)
|
||||
return;
|
||||
QString strWellName = sret.at(0);
|
||||
//直接从选中的井获取,data记录slf路径
|
||||
QString strSlf = sret.at(1);
|
||||
if (strSlfName != strSlf)
|
||||
return;
|
||||
|
||||
//刷新当前井的所有数据
|
||||
emit CallManage::getInstance()->sig_Refresh_All(m_strUuid, strSlfName, strWellName);
|
||||
|
||||
}
|
||||
|
||||
void MainWindowCurve::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
// 检查按键 Ctrl 是否按下
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ public slots:
|
|||
//拖拽井次,生成多井
|
||||
void s_AddMultiWell(QString strUuid, QString strSlfName, QString strWellName);
|
||||
|
||||
void s_Notice_AddObject(QString strName, QString strSlfName, QStringList listObject);
|
||||
public:
|
||||
QAction* m_selectWellAc = nullptr; //选择井
|
||||
QAction* m_hvDraw = nullptr; //横竖
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user