深度 属性
This commit is contained in:
parent
c7a8392ffd
commit
8af9525efb
|
|
@ -2421,14 +2421,14 @@ void PropertyWidget::initTableProperty(FormInfo *formInfo)
|
|||
void PropertyWidget::initDepthProperty(FormInfo *formInfo)
|
||||
{
|
||||
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "头部高度(cm)", formInfo->m_bVerticaDrawing, QVariant::Double);
|
||||
_CreateVariantPropertyItem("通常", "头部高度(cm)", formInfo->m_headHeight, QVariant::Double);
|
||||
_CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
|
||||
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_sdUnit, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "标尺颜色", formInfo->m_sdRulerColor, QVariant::Color);
|
||||
|
||||
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "单位", formInfo->m_nJg, QVariant::String);
|
||||
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font);
|
||||
|
||||
_CreateVariantPropertyItem("深度标注", "间隔", formInfo->m_sdInterval, QVariant::Double);
|
||||
_CreateVariantPropertyItem("深度标注", "标注字体", formInfo->m_sdLabelFont, QVariant::Font);
|
||||
|
|
@ -3311,4 +3311,23 @@ void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal)
|
|||
bool temp = varVal.toBool();
|
||||
this->m_formInfo->m_sdMeasuredDepth = temp;
|
||||
}
|
||||
else if ("显示单位" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_strUnit = varVal.toString();
|
||||
this->m_formInfo->repaint();
|
||||
}
|
||||
else if ("单位" == strProperty)
|
||||
{
|
||||
QFont temp = varVal.value<QFont>();
|
||||
this->m_formInfo->m_strUnitFont = temp;
|
||||
this->m_formInfo->repaint();
|
||||
}
|
||||
else if ("头部高度(cm)" == strProperty)
|
||||
{
|
||||
int temp = varVal.toInt();
|
||||
this->m_formInfo->m_headHeight = temp;
|
||||
this->m_formInfo->setFixedHeight(temp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,6 +182,11 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
// 深度
|
||||
else if("depthObject" == strType)
|
||||
{
|
||||
// 在s_addDepth方法设置单位无效
|
||||
pInfo->m_strUnit = "(米)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 12);
|
||||
|
||||
|
||||
initDepth(curv);
|
||||
}
|
||||
else if("plObject" == strType)
|
||||
|
|
|
|||
|
|
@ -537,6 +537,12 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
|||
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
|
||||
}
|
||||
|
||||
if(m_strLineName == "深度")
|
||||
{
|
||||
// 2. 给painter设置字体(关键步骤)
|
||||
painter.setFont(m_strUnitFont);
|
||||
painter.drawText(rect.left(), rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignCenter, this->m_strUnit);
|
||||
}
|
||||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ public:
|
|||
QString m_strLineName;
|
||||
QString m_strAliasName;//显示名称
|
||||
QString m_strUnit;//单位
|
||||
QFont m_strUnitFont;//单位字体
|
||||
// 头部高度
|
||||
int m_headHeight = 100;
|
||||
|
||||
bool m_bVerticaDrawing = false; // 垂向绘制
|
||||
int m_nRotationAngle = 0; // 旋转角度
|
||||
|
|
@ -210,12 +213,9 @@ public:
|
|||
//tvd
|
||||
|
||||
// 深度
|
||||
// 头部高度
|
||||
double m_sdHeadHeight;
|
||||
// ---------------- 基础配置 ----------------
|
||||
QColor m_sdRulerColor; // 标尺颜色
|
||||
QString m_sdUnit; // 显示单位
|
||||
double m_sdInterval; // 间隔
|
||||
double m_sdInterval = 1; // 间隔
|
||||
QFont m_sdLabelFont = QFont("微软雅黑", 16); // 标注字体
|
||||
double m_sdRotationAngle = 0.0; // 旋转(°)
|
||||
double m_sdDrawStartDepth; // 绘制起点深度
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public slots:
|
|||
|
||||
void s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||
void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
// 深度
|
||||
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addJykt(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user