井壁取心图像,追加左侧尖头
This commit is contained in:
parent
1b03eacaa0
commit
df9db57d8c
|
|
@ -94,10 +94,10 @@ void TransparentDraggableSwallCore::drawLith(double left_Low, double right_Hight
|
|||
return;
|
||||
}
|
||||
|
||||
double x1 = mPlot->xAxis->coordToPixel(left_Low);
|
||||
double x1 = mPlot->xAxis->coordToPixel((left_Low+right_Hight)/2)+m_fImageHeight;
|
||||
double x2 = mPlot->xAxis->coordToPixel((left_Low+right_Hight)/2);
|
||||
double y1 = mPlot->yAxis->coordToPixel(lY1);
|
||||
double y2 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/5);
|
||||
double y1 = mPlot->yAxis->coordToPixel(lY1)+(m_fLeftSpace+m_fTriangleLen);
|
||||
double y2 = mPlot->yAxis->coordToPixel(lY1)+m_fImageWidth+(m_fLeftSpace+m_fTriangleLen);
|
||||
|
||||
bool bWidthBig = false;
|
||||
double newWidth = y2-y1;
|
||||
|
|
@ -253,9 +253,9 @@ void TransparentDraggableSwallCore::drawOil(double left_Low, double right_Hight,
|
|||
}
|
||||
|
||||
double x1 = mPlot->xAxis->coordToPixel((left_Low+right_Hight)/2);
|
||||
double x2 = mPlot->xAxis->coordToPixel(right_Hight);
|
||||
double y1 = mPlot->yAxis->coordToPixel(lY1);
|
||||
double y2 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/5);
|
||||
double x2 = mPlot->xAxis->coordToPixel((left_Low+right_Hight)/2)-m_fImageHeight;
|
||||
double y1 = mPlot->yAxis->coordToPixel(lY1)+(m_fLeftSpace+m_fTriangleLen);
|
||||
double y2 = mPlot->yAxis->coordToPixel(lY1)+m_fImageWidth+(m_fLeftSpace+m_fTriangleLen);
|
||||
|
||||
bool bWidthBig = false;
|
||||
double newWidth = y2-y1;
|
||||
|
|
@ -327,8 +327,8 @@ void TransparentDraggableSwallCore::setRange(double left_Low, double right_Hight
|
|||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
|
||||
mRect->topLeft->setCoords(left_Low, lY1);
|
||||
mRect->bottomRight->setCoords(right_Hight, lY1+(lY2-lY1)/3);
|
||||
mRect->topLeft->setCoords(left_Low, lY1+(m_fLeftSpace+m_fTriangleLen));
|
||||
mRect->bottomRight->setCoords(right_Hight, lY1+(m_fLeftSpace+m_fTriangleLen)+m_fImageWidth+m_fColorWordLen);
|
||||
|
||||
// //位置与rect不一样,否则图像反转
|
||||
// mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/4);
|
||||
|
|
@ -347,11 +347,21 @@ void TransparentDraggableSwallCore::setRange(double left_Low, double right_Hight
|
|||
// 设置父锚点,定位点
|
||||
//mItemTitle->position->setParentAnchor(mRect->bottom);
|
||||
mItemTitle->position->setCoords(mRect->bottomRight->coords().x(), //(mRect->topLeft->coords().x() + mRect->bottomRight->coords().x())/2,
|
||||
lY1+(lY2-lY1)/4); //(mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
lY1+(m_fLeftSpace+m_fTriangleLen)+m_fImageWidth+20); //(mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
|
||||
//mRect->topLeft->setCoords(left, mPlot->yAxis->range().upper);
|
||||
//mRect->bottomRight->setCoords(right, mPlot->yAxis->range().lower);
|
||||
|
||||
//三角形2边
|
||||
m_qcpItemLine1->start->setCoords((left_Low+right_Hight)/2, lY1+m_fLeftSpace);
|
||||
m_qcpItemLine1->end->setCoords(left_Low, lY1+(m_fLeftSpace+m_fTriangleLen));
|
||||
//
|
||||
m_qcpItemLine2->start->setCoords((left_Low+right_Hight)/2, lY1+m_fLeftSpace);
|
||||
m_qcpItemLine2->end->setCoords(right_Hight, lY1+(m_fLeftSpace+m_fTriangleLen));
|
||||
//
|
||||
m_qcpItemLine3->start->setCoords((left_Low+right_Hight)/2, lY1+m_fLeftSpace);
|
||||
m_qcpItemLine3->end->setCoords((left_Low+right_Hight)/2, lY1+(m_fLeftSpace+m_fTriangleLen));
|
||||
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
|
@ -389,6 +399,10 @@ void TransparentDraggableSwallCore::deleteRect()
|
|||
mPlot->removeItem(mPixmap_Oil);
|
||||
//mPlot->removeItem(mPixmap_Color);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
//三角形2边
|
||||
mPlot->removeItem(m_qcpItemLine1);
|
||||
mPlot->removeItem(m_qcpItemLine2);
|
||||
mPlot->removeItem(m_qcpItemLine3);
|
||||
|
||||
mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
|
@ -411,7 +425,7 @@ void TransparentDraggableSwallCore::initRect()
|
|||
mRect = new QCPItemRect(mPlot);
|
||||
mRect->setLayer("overlay"); // 确保在最上层
|
||||
mRect->setBrush(QBrush(QColor(255, 255, 255, 50))); // 半透明蓝色100, 100, 255, 50
|
||||
mRect->setPen(QPen(QColor(70, 70, 255, 200)));
|
||||
mRect->setPen(QPen(QColor(0, 0, 0, 200)));
|
||||
|
||||
// // 创建左右边界控制点
|
||||
// mLeftHandle = new QCPItemRect(mPlot);
|
||||
|
|
@ -458,6 +472,16 @@ void TransparentDraggableSwallCore::initRect()
|
|||
//mItemTitle->position->setType(QCPItemPosition::ptAxisRectRatio);
|
||||
mItemTitle->position->setCoords(0.5, 0);
|
||||
mItemTitle->setLayer("overlay");
|
||||
|
||||
//三角形2边
|
||||
m_qcpItemLine1 = new QCPItemLine(mPlot);
|
||||
m_qcpItemLine1->setPen(QPen(QColor(0, 0, 0, 200)));
|
||||
//
|
||||
m_qcpItemLine2 = new QCPItemLine(mPlot);
|
||||
m_qcpItemLine2->setPen(QPen(QColor(0, 0, 0, 200)));
|
||||
//
|
||||
m_qcpItemLine3 = new QCPItemLine(mPlot);
|
||||
m_qcpItemLine3->setPen(QPen(QColor(0, 0, 0, 200)));
|
||||
}
|
||||
|
||||
void TransparentDraggableSwallCore::updateHandles()
|
||||
|
|
|
|||
|
|
@ -76,6 +76,10 @@ private:
|
|||
QCPItemText *mItemTitle;
|
||||
QString mstrTitle="";
|
||||
QString m_strUuid = "";
|
||||
//三角形2边
|
||||
QCPItemLine *m_qcpItemLine1;
|
||||
QCPItemLine *m_qcpItemLine2;
|
||||
QCPItemLine *m_qcpItemLine3;
|
||||
|
||||
QString m_Lith;
|
||||
QString m_Oil;
|
||||
|
|
@ -92,6 +96,15 @@ private:
|
|||
|
||||
// 添加最小宽度成员变量
|
||||
double mMinWidth;
|
||||
|
||||
//
|
||||
float m_fLeftSpace=0; //左侧空白长度
|
||||
float m_fTriangleLen=40;//三角形长度
|
||||
//
|
||||
float m_fImageWidth=70;//图片长度
|
||||
float m_fImageHeight=20;//图片高度
|
||||
//
|
||||
float m_fColorWordLen=40;//颜色文字长度
|
||||
};
|
||||
|
||||
#endif // TRANSPARENTDRAGGABLESWALLCORE_H
|
||||
|
|
|
|||
|
|
@ -1194,14 +1194,6 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe
|
|||
//图像 成像
|
||||
DrawImageNew_NoFilter(curv, strSlfName, "");
|
||||
|
||||
//道-对象
|
||||
QString strAliasName = "井斜方位图";
|
||||
QString strUnit = "(°)";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "DrawImageObject");
|
||||
//
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
|
|
@ -2066,7 +2058,7 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName,
|
|||
// 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图:
|
||||
//widget->rescaleAxes();
|
||||
|
||||
QString strAliasName = "";
|
||||
QString strAliasName = "成图";
|
||||
QString strUnit = "";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
double width=2;
|
||||
|
|
@ -4054,9 +4046,10 @@ void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
|
|||
m_csCurveAZIM=("AZIM");
|
||||
m_csCurveDEVI=("DEVI");
|
||||
|
||||
m_nCircleLineWidth = 2 ;
|
||||
m_nTailWidth=2;
|
||||
m_TailColor=qRgb(255,0,0);
|
||||
m_crPointFill=qRgb(0,255,0);
|
||||
m_crPointFillDenv=qRgb(0,0,0);
|
||||
m_crCirCleColor = qRgb(0,0,255);
|
||||
m_nRadius = 4;
|
||||
m_nTailLen=8;
|
||||
|
|
@ -4099,7 +4092,7 @@ void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
|
|||
//
|
||||
QPen pPen(m_TailColor,m_nTailWidth);
|
||||
QPen pPen2(m_crCirCleColor,m_nCircleLineWidth);
|
||||
QBrush cBrush(m_crPointFill);
|
||||
QBrush cBrush(m_crPointFillDenv);
|
||||
|
||||
float tempf,flVal;
|
||||
int i,j,nPointNum=0,tempi;
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ public:
|
|||
//井斜方位图
|
||||
QString m_csCurveAZIM, m_csCurveDEVI; // 方位/倾角/可信度 曲线名
|
||||
QColor m_TailColor,m_crCirCleColor;// add m_crCirCleColor圆线颜色
|
||||
QColor m_crPointFillDenv;
|
||||
|
||||
//文字结论
|
||||
void initWords(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user