深度属性
This commit is contained in:
parent
7c9a29c031
commit
d19f388895
|
|
@ -4273,8 +4273,6 @@ void PropertyWidget::initTubingItemProperty(TransparentDraggableGuan* tdGuan, do
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal)
|
||||
{
|
||||
if ("显示单位" == strProperty)
|
||||
|
|
@ -4342,66 +4340,15 @@ void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal)
|
|||
}
|
||||
else if ("斜深位置" == strProperty)
|
||||
{
|
||||
int temp = varVal.toInt();
|
||||
int newStyle = 0;
|
||||
switch(temp)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
newStyle = Qt::NoPen;
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
newStyle = Qt::SolidLine;
|
||||
break;
|
||||
case 2:
|
||||
// 偏右
|
||||
newStyle = Qt::DashLine;
|
||||
break;
|
||||
}
|
||||
this->m_formInfo->m_sdMeasuredDepthPosition = newStyle;
|
||||
this->m_formInfo->m_sdMeasuredDepthPosition = varVal.toInt();
|
||||
}
|
||||
else if ("垂深位置" == strProperty)
|
||||
{
|
||||
int temp = varVal.toInt();
|
||||
int newStyle = 0;
|
||||
switch(temp)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
newStyle = Qt::NoPen;
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
newStyle = Qt::SolidLine;
|
||||
break;
|
||||
case 2:
|
||||
// 偏右
|
||||
newStyle = Qt::DashLine;
|
||||
break;
|
||||
}
|
||||
this->m_formInfo->m_sdVerticalDepthPosition = newStyle;
|
||||
this->m_formInfo->m_sdVerticalDepthPosition = varVal.toInt();
|
||||
}
|
||||
else if ("海拔垂深位置" == strProperty)
|
||||
{
|
||||
int temp = varVal.toInt();
|
||||
int newStyle = 0;
|
||||
switch(temp)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
newStyle = Qt::NoPen;
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
newStyle = Qt::SolidLine;
|
||||
break;
|
||||
case 2:
|
||||
// 偏右
|
||||
newStyle = Qt::DashLine;
|
||||
break;
|
||||
}
|
||||
this->m_formInfo->m_sdElevationVerticalDepthPosition = newStyle;
|
||||
this->m_formInfo->m_sdElevationVerticalDepthPosition = varVal.toInt();
|
||||
}
|
||||
else if ("垂深" == strProperty)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -197,38 +197,32 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
curv->yAxis->setTicker(fixedTicker);
|
||||
// 标注字体
|
||||
curv->yAxis->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis2->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis3->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
// 旋转(°)
|
||||
curv->yAxis->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis2->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis3->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
// 斜深
|
||||
curv->yAxis->setTickLabels(pInfo->m_sdMeasuredDepth);
|
||||
// 海拔垂深
|
||||
{
|
||||
bool temp = pInfo->m_sdElevationVerticalDepth;
|
||||
if(!curv->m_yAxis2)
|
||||
{
|
||||
curv->m_yAxis2 = new QCPAxis(curv->axisRect(), QCPAxis::atLeft);
|
||||
curv->axisRect()->addAxis(QCPAxis::atLeft, curv->m_yAxis2);
|
||||
curv->m_yAxis2->setRange(0, 100);
|
||||
curv->m_yAxis2->setOffset(40);
|
||||
curv->m_yAxis2->setTickLabelPadding(10);
|
||||
}
|
||||
|
||||
curv->m_yAxis2->setVisible(temp);
|
||||
curv->m_yAxis2->setTickLabels(temp);
|
||||
curv->m_yAxis2->setTickLabelSide(QCPAxis::lsInside);
|
||||
}
|
||||
// 垂深
|
||||
bool temp2 = pInfo->m_sdVerticalDepth;
|
||||
if(!curv->m_yAxis3)
|
||||
{
|
||||
curv->m_yAxis3 = new QCPAxis(curv->axisRect(), QCPAxis::atLeft);
|
||||
curv->axisRect()->addAxis(QCPAxis::atLeft, curv->m_yAxis3);
|
||||
curv->m_yAxis3->setRange(0, 100);
|
||||
curv->m_yAxis3->setOffset(40);
|
||||
curv->m_yAxis3->setTickLabelPadding(10);
|
||||
}
|
||||
curv->m_yAxis3->setVisible(temp2); // 显示第三个Y轴
|
||||
curv->m_yAxis3->setTickLabels(temp2);
|
||||
curv->m_yAxis3->setTickLabelSide(QCPAxis::lsInside);
|
||||
|
||||
QSize size = curv->size(); // 包含宽高的QSize对象
|
||||
int width2 = size.width();
|
||||
int center = width2 / 2 - pInfo->m_sdLabelFont.pointSize();
|
||||
int right = width2 - pInfo->m_sdLabelFont.pointSize() - 5;
|
||||
// 斜深位置
|
||||
switch(pInfo->m_sdMeasuredDepthPosition)
|
||||
{
|
||||
|
|
@ -238,10 +232,10 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->yAxis->setTickLabelPadding(30);
|
||||
curv->yAxis->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->yAxis->setTickLabelPadding(50);
|
||||
curv->yAxis->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -254,10 +248,10 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis3->setTickLabelPadding(30);
|
||||
curv->m_yAxis3->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis3->setTickLabelPadding(50);
|
||||
curv->m_yAxis3->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 海拔垂深位置
|
||||
|
|
@ -269,10 +263,10 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis2->setTickLabelPadding(30);
|
||||
curv->m_yAxis2->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis2->setTickLabelPadding(50);
|
||||
curv->m_yAxis2->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 主刻度线长度
|
||||
|
|
@ -5955,21 +5949,34 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
|
|||
|
||||
void FormDraw::initDepth(QMyCustomPlot *curv)
|
||||
{
|
||||
// x轴隐藏
|
||||
curv->setScaleX(0, 1024);
|
||||
curv->yAxis->setTicks(true);
|
||||
curv->yAxis->setVisible(true);
|
||||
curv->yAxis->setBasePen(Qt::NoPen);
|
||||
//curv->yAxis->setTickLabels(true);
|
||||
|
||||
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
QFont font1("微软雅黑", 8);
|
||||
curv->yAxis->setTickLabelFont(font1);
|
||||
//curv->yAxis->setRangeReversed(true);
|
||||
|
||||
//curv->axisRect()->setupFullAxesBox();
|
||||
curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
curv->m_bX2Y = false;
|
||||
|
||||
if(!curv->m_yAxis2)
|
||||
{
|
||||
curv->m_yAxis2 = new QCPAxis(curv->axisRect(), QCPAxis::atLeft);
|
||||
curv->axisRect()->addAxis(QCPAxis::atLeft, curv->m_yAxis2);
|
||||
curv->m_yAxis2->setRange(0, 100);
|
||||
curv->m_yAxis2->setOffset(40);
|
||||
curv->m_yAxis2->setTickLabelPadding(10);
|
||||
}
|
||||
|
||||
if(!curv->m_yAxis3)
|
||||
{
|
||||
curv->m_yAxis3 = new QCPAxis(curv->axisRect(), QCPAxis::atLeft);
|
||||
curv->axisRect()->addAxis(QCPAxis::atLeft, curv->m_yAxis3);
|
||||
curv->m_yAxis3->setRange(0, 100);
|
||||
curv->m_yAxis3->setOffset(40);
|
||||
curv->m_yAxis3->setTickLabelPadding(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FormDraw::initFgrq(QMyCustomPlot *widget)
|
||||
|
|
|
|||
|
|
@ -224,6 +224,21 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
vec << trackTop;
|
||||
trackTop->m_strUuid = m_strUuid;
|
||||
trackTop->m_nTrackW = dW;// / static_cast<int>(g_dPixelPerCm);
|
||||
|
||||
|
||||
if(strTrackName.contains("深度"))
|
||||
{
|
||||
trackTop->m_nTrackW = 1.2;
|
||||
QVariantList listCond;
|
||||
listCond << strUuid;
|
||||
listCond << strSlfName;
|
||||
listCond << strWellName;
|
||||
listCond << columnCount;
|
||||
listCond << "道宽(cm)";
|
||||
listCond << "1.2";
|
||||
emit CallManage::getInstance()->sig_changeTrackProperty(listCond);
|
||||
}
|
||||
|
||||
ui->tableWidget->setCellWidget(i, columnCount, trackTop);
|
||||
}
|
||||
else if(i==1)
|
||||
|
|
|
|||
|
|
@ -5400,6 +5400,11 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
|
|||
}
|
||||
else if ("斜深位置" == strProperty)
|
||||
{
|
||||
QSize size = this->size(); // 包含宽高的QSize对象
|
||||
int width2 = size.width();
|
||||
int center = width2 / 2 - this->yAxis->tickLabelFont().pointSize();
|
||||
int right = width2 - this->yAxis->tickLabelFont().pointSize() - 5;
|
||||
|
||||
// 没有直接设置偏移方法 动态计算太麻烦
|
||||
int temp = varVal.toInt();
|
||||
switch(temp)
|
||||
|
|
@ -5410,10 +5415,10 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
|
|||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
this->yAxis->setTickLabelPadding(30);
|
||||
this->yAxis->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
this->yAxis->setTickLabelPadding(50);
|
||||
this->yAxis->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user