logplus/logPlus/PropertyWidget.cpp
2026-04-01 09:07:28 +08:00

4290 lines
177 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "PropertyWidget.h"
#include <QScrollBar>
#include <QDateTime>
#include <QDebug>
#include <QSvgRenderer>
#include <QLabel>
#include "CallManage.h"
#include "geometryutils.h"
#include "DrawTvd.h"
extern double g_dPixelPerCm;//每厘米像素数
//extern int m_iY1;
//extern int m_iY2;
PropertyWidget::PropertyWidget(const QString &title, QWidget *parent , Qt::WindowFlags flags )
:QDockWidget(title,parent,flags)
{
//1
m_pPropertyBrowser = new QtTreePropertyBrowser();
this->setWidget(m_pPropertyBrowser);
//
m_pVariantManager = new VariantManager();//new QtVariantPropertyManager();
QtVariantEditorFactory *variantFactory = new VariantFactory();//new QtVariantEditorFactory();
m_pPropertyBrowser->setFactoryForManager(m_pVariantManager, variantFactory);
//
m_pPropertyBrowser->setPropertiesWithoutValueMarked(true);
m_pPropertyBrowser->setRootIsDecorated(true);
m_pPropertyBrowser->setIndentation(8);
connect( m_pVariantManager,SIGNAL(valueChanged(QtProperty *, const QVariant &)),
this,SLOT(SlotPropertyChanged(QtProperty *, const QVariant &)) );
QtColorSchemeComboBoxFactory * colorSchemeComboBoxFactory = new QtColorSchemeComboBoxFactory();
m_pColorSchemeManager = new QtColorSchemeComboBoxPropertyManager();
m_pPropertyBrowser->setFactoryForManager(m_pColorSchemeManager, colorSchemeComboBoxFactory);
connect(m_pColorSchemeManager, SIGNAL(valueChanged(QtProperty *, const int &, bool)), this,
SLOT(SlotPropertyChanged(QtProperty *, const int &, bool)));
}
PropertyWidget::~PropertyWidget()
{
QVector<QtTreePropertyBrowser*> aa;
aa.append(m_pPropertyBrowser);
qDeleteAll(aa);
}
PropertyWidget* PropertyService()
{
static PropertyWidget* singleInstance= new PropertyWidget("", nullptr, 0);
return singleInstance;
}
QWidget* PropertyWidget::GetPropertyWidget()
{
return m_pPropertyBrowser;
}
//初始化,清空
void PropertyWidget::InitCurrentViewInfo(bool bAll)
{
QList<QtProperty*> propertyList = m_pPropertyBrowser->properties();
m_pPropertyBrowser->clear();
foreach(QtProperty *property, propertyList)
{
if (property)
{
delete property;
}
}
//map清空
m_propertyData.clear();
m_mapGroupItem.clear();
if (bAll)
{
m_fromTop = NULL;
m_formInfo = NULL;
m_formHead = NULL;
m_tableWidget = NULL;
m_item = NULL;
m_tdGujing = NULL;
//
m_strUuid = "";
m_strTrackUuid = "";
m_strSlfName = "";
m_strWellName = "";
m_strTrackName = "";
m_strLineName = "";
//
m_strCurrentProperty = "";
}
}
//处理通用属性
void PropertyWidget::CommonPropertyChanged( QtProperty *pProperty, const QVariant &variant )
{
if("显示名称" == m_propertyData[pProperty])
{
QString newAliasName = variant.value<QString>();
m_formInfo->m_strAliasName = newAliasName;
m_formInfo->update();
}
else if("字体" == m_propertyData[pProperty])
{
//字体
// 假设variant已经被设置为包含QColor
QFont newFont = variant.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
m_formInfo->update();
}
else if("颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_formInfo->m_lineColor = newColor;
m_formInfo->update();
}
else if ("垂向绘制" == m_propertyData[pProperty])
{
m_formInfo->m_bVerticaDrawing = variant.toBool();
m_formInfo->update();
}
else if ("旋转角度(°)" == m_propertyData[pProperty])
{
m_formInfo->m_nRotationAngle = variant.toInt();
m_formInfo->update();
}
}
void PropertyWidget::changedYxzpProperty(QtProperty *qtProperty, const QVariant &variant)
{
if("选择井曲线" == m_propertyData[qtProperty])
{
QString sFilePath = variant.value<QString>();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
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;
}
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//改变固井曲线名
emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
}
else if("例区高度" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_formInfo->m_headHeight = temp;
this->m_formInfo->setFixedHeight(temp);
}
}
void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVariant &qVariant)
{
if("顶深(m)" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
double upper = qVariant.value<double>();
m_tdImage->setUpper(-upper);
//保存
m_tdImage->mPlot->SaveToSLFImage();
}
}
else if("底深(m)" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
double lower = qVariant.value<double>();
m_tdImage->setLower(-lower);
m_tdImage->mPlot->SaveToSLFImage();
}
}
else if("图片文件" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
QString imagePath = qVariant.toString();
m_tdImage->setResult(imagePath);
m_tdImage->mPlot->SaveToSLFImage();
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
}
}
else if("左边距%" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
// 左边距
double yxzpLeftMargin = qVariant.toDouble();
m_tdImage->setLeft(yxzpLeftMargin);
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper,yxzpLeftMargin, m_tdImage->getWidth());
m_tdImage->mPlot->SaveToSLFImage();
}
}
else if("宽度%" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
double yxzpLineWidth = qVariant.toDouble();
m_tdImage->setWidth(yxzpLineWidth);
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper, m_tdImage->getLeft(), yxzpLineWidth);
m_tdImage->mPlot->SaveToSLFImage();
}
}
else if("线宽" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
int borderWidth = qVariant.toInt();
m_tdImage->setBorderWidth(borderWidth);
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
}
}
else if("颜色" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
QColor newColor = qVariant.value<QColor>();
m_tdImage->setBorderColor(newColor);
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
}
}
else if("线型" == m_propertyData[qtProperty])
{
if(m_tdImage)
{
Qt::PenStyle newStyle = Qt::SolidLine;
int iStyle = qVariant.value<int>();
switch(iStyle)
{
case 0:
//无
newStyle = Qt::NoPen;
break;
case 1:
//实线
newStyle = Qt::SolidLine;
break;
case 2:
//虚线
newStyle = Qt::DashLine;
break;
case 3:
//点线
newStyle = Qt::DotLine;
break;
case 4:
//虚点线
newStyle = Qt::DashDotLine;
break;
case 5:
//虚点点线
newStyle = Qt::DashDotDotLine;
break;
default:
break;
}
m_tdImage->setBorderStyle(newStyle);
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
}
}
}
void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QVariant &variant, bool isItem)
{
if("曲线名称" == m_propertyData[qtProperty])
{
QFont newFont = variant.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
m_formInfo->update();
}
else if("例区高度" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_formInfo->m_headHeight = temp;
this->m_formInfo->setFixedHeight(temp);
}
else if("线宽" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_formInfo->m_cp_lineWidth = temp;
QVariantMap variantMap;
variantMap["lineWidth"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("颜色" == m_propertyData[qtProperty])
{
QColor temp = variant.value<QColor>();
this->m_formInfo->m_cp_lineColor = temp;
QVariantMap variantMap;
variantMap["lineColor"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("线型" == m_propertyData[qtProperty])
{
int temp = variant.value<int>();
Qt::PenStyle newStyle = Qt::SolidLine;
switch(temp)
{
case 0:
//无
newStyle = Qt::NoPen;
break;
case 1:
//实线
newStyle = Qt::SolidLine;
break;
case 2:
//虚线
newStyle = Qt::DashLine;
break;
case 3:
//点线
newStyle = Qt::DotLine;
break;
case 4:
//虚点线
newStyle = Qt::DashDotLine;
break;
case 5:
//虚点点线
newStyle = Qt::DashDotDotLine;
break;
default:
break;
}
this->m_formInfo->m_cp_lineStyle = newStyle;
QVariantMap variantMap;
variantMap["lineStyle"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("杆状" == m_propertyData[qtProperty])
{
bool temp = variant.toBool();
this->m_formInfo->m_cp_drawAsBar = temp;
QVariantMap variantMap;
variantMap["drawAsBar"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("左界" == m_propertyData[qtProperty])
{
bool temp = variant.toBool();
this->m_formInfo->m_cp_leftBoundary = temp;
QVariantMap variantMap;
variantMap["leftBoundary"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("不绘零等无效值" == m_propertyData[qtProperty])
{
bool temp = variant.toBool();
this->m_formInfo->m_cp_skipZeroInvalidValues = temp;
QVariantMap variantMap;
variantMap["skipZeroInvalidValues"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("绘制包络线" == m_propertyData[qtProperty])
{
bool temp = variant.toBool();
this->m_formInfo->m_cp_drawEnvelope = temp;
QVariantMap variantMap;
variantMap["drawEnvelope"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("点状" == m_propertyData[qtProperty])
{
bool temp = variant.toBool();
this->m_formInfo->m_cp_drawAsDot = temp;
QVariantMap variantMap;
variantMap["drawAsDot"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("符号类型" == m_propertyData[qtProperty])
{
// 目前只有 圆形和矩形
int temp = variant.value<int>();
int newStyle = 0;
switch(temp)
{
case 0:
// 圆形
newStyle = 0;
break;
case 1:
// 矩形
newStyle = 1;
break;
case 2:
// 三角
newStyle = 2;
break;
case 3:
// 菱形
newStyle = 3;
break;
}
this->m_formInfo->m_cp_symbolType = newStyle;
QVariantMap variantMap;
variantMap["symbolType"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("边框颜色" == m_propertyData[qtProperty])
{
QColor temp = variant.value<QColor>();
this->m_formInfo->m_cp_symbolBorderColor = temp;
QVariantMap variantMap;
variantMap["symbolBorderColor"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("大小" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_formInfo->m_cp_symbolSize = temp;
QVariantMap variantMap;
variantMap["symbolSize"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("填充颜色" == m_propertyData[qtProperty])
{
QColor temp = variant.value<QColor>();
this->m_formInfo->m_cp_symbolFillColor = temp;
QVariantMap variantMap;
variantMap["symbolFillColor"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("序号" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_tdCorePhysics->setCpOrder(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("深度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setCpDepth(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("校正深度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setRange(temp,temp,this->m_tdCorePhysics->getCpCoreValue());
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("数值" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setCpCoreValue(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("左刻度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_formInfo->m_cp_leftScale = temp;
this->m_formInfo->repaint();
QVariantMap variantMap;
variantMap["leftScale"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("右刻度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_formInfo->m_cp_rightScale = temp;
this->m_formInfo->repaint();
QVariantMap variantMap;
variantMap["rightScale"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
}
else if("等分刻度数或自定义序列" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_formInfo->m_cp_scaleDivisionsOrCustom = temp;
this->m_formInfo->repaint();
// this->m_tdCorePhysics->setCpScaleDivisionsOrCustom(temp);
}
else if("刻度类型" == m_propertyData[qtProperty])
{
int iStyle = variant.value<int>();
int newStyle = 0;
switch(iStyle)
{
case 0:
// 线性
newStyle = 0;
break;
case 1:
// 对数
newStyle = 1;
break;
case 2:
// 倾角
newStyle = 2;
break;
}
this->m_formInfo->m_cp_scaleType = newStyle;
QVariantMap variantMap;
variantMap["scaleType"] = newStyle;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
// this->m_tdCorePhysics->setCpScaleType(newStyle);
}
else if("显示单位" == m_propertyData[qtProperty])
{
QString temp = variant.toString();
this->m_formInfo->m_strUnit = temp;
// this->m_tdCorePhysics->setCpDisplayUnit(temp);
this->m_formInfo->repaint();
}
else if("曲线单位" == m_propertyData[qtProperty])
{
QFont temp = variant.value<QFont>();
this->m_formInfo->m_strUnitFont = temp;
this->m_formInfo->repaint();
}
else if("曲线刻度" == m_propertyData[qtProperty])
{
QFont temp = variant.value<QFont>();
this->m_formInfo->m_cp_curveScale = temp;
this->m_formInfo->repaint();
}
}
void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant &variant )
{
if(m_strCurrentProperty == "")
return;
if(m_strCurrentProperty == Tvd_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
ChangTvdProperty(pProperty, variant);
return;
}
if (m_strCurrentProperty == Table_Property)//解释结论
{
bool bDraw = false;
QStringList slist;
slist << "显示名称" << "垂向绘制" << "旋转角度(°)" << "字体" << "颜色"
<< "结论占比%" << "显示位置(cm)" << "显示层号" << "层号字体" << "层号旋转";
for (int i = 0; i < slist.length(); i++)
{
if (slist.at(i) == m_propertyData[pProperty])
{
bDraw = m_formInfo->setInfoProperty(m_propertyData[pProperty], variant);
break;
}
}
if (!slist.contains(m_propertyData[pProperty]))
bDraw = true;
if (bDraw)
{
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_strTrackName;
listCond << m_strLineName;
listCond << m_propertyData[pProperty];
listCond << variant;
emit CallManage::getInstance()->sig_changeDrawProperty(listCond);
}
}
else if(m_strCurrentProperty == Track_Property)
{
if(m_fromTop == NULL)
return;
if("道名称" == m_propertyData[pProperty])
{
m_fromTop->m_strTrackName = variant.toString();
}
else if("道头字体" == m_propertyData[pProperty])
{
QFont newFont = variant.value<QFont>();
// 设置字体
m_fromTop->m_font = newFont;
}
else if("道头字颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_fromTop->m_fontColor = newColor;
}
else
{
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_iCurrentCol;
listCond << m_propertyData[pProperty];
listCond << variant;
emit CallManage::getInstance()->sig_changeTrackProperty(listCond);
}
return;
}
else if (m_strCurrentProperty == Wave_Property)
{
bool bDraw = false;
QStringList slist;
slist << "显示名称" << "显示单位" << "曲线名称" << "曲线单位" << "曲线刻度"
<< "类型" << "方式" << "左刻度" << "右刻度" << "幅度刻度" << "最大振幅" << "颜色" << "线宽"
<< "绘制波深度" << "绘制波基线" << "奇偶配色"
<< "波列基值" << "波形间隔" << "波形高度" << "显示刻度" << "色板" << "变密度颜色级数";
for (int i = 0; i < slist.length(); i++)
{
if (slist.at(i) == m_propertyData[pProperty])
{
bDraw = m_formInfo->setInfoProperty(m_propertyData[pProperty], variant);
break;
}
}
if(!slist.contains(m_propertyData[pProperty]))
bDraw = true;
if (bDraw)
{
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_strTrackName;
listCond << m_strLineName;
listCond << m_propertyData[pProperty];
listCond << variant;
emit CallManage::getInstance()->sig_changeDrawProperty(listCond);
}
if ("类型" == m_propertyData[pProperty])
{
this->InitCurrentViewInfo(false);
initWaveProperty(m_formInfo, variant.toInt());
}
return;
}
else if (m_strCurrentProperty == Gujing_Property)//固井结论道
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//
if("选择井曲线" == m_propertyData[pProperty])
{
QString sFilePath = variant.value<QString>();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
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;
}
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//改变固井曲线名
emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
}
}
else if (m_strCurrentProperty == Image_Property) // 岩心照片
{
// 先处理通用属性
CommonPropertyChanged(pProperty, variant);
changedYxzpProperty(pProperty, variant);
}
else if (m_strCurrentProperty == SwallCore_Property)//井壁取心
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
}
else if (m_strCurrentProperty == GeoLith_Property)//录井剖面
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
if("含油占比(1~8)" == m_propertyData[pProperty])
{
//qDebug() << "含油占比(1~8)->改变";
double dOilZhan = variant.value<double>();
m_formInfo->m_dOilZhan = dOilZhan;
//改变录井剖面属性,含油占比
emit CallManage::getInstance()->sig_changeGeoLithLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, dOilZhan);
}
else if("岩性配色显示" == m_propertyData[pProperty] ||
"仅绘含油地层" == m_propertyData[pProperty] ||
"单岩性显示" == m_propertyData[pProperty] ||
"显示含油性" == m_propertyData[pProperty] ||
"含油性居中" == m_propertyData[pProperty] ||
"显示颜色" == m_propertyData[pProperty] ||
"绘制颜色号" == m_propertyData[pProperty])
{
bool bShow = variant.value<bool>();
if(m_propertyData[pProperty] == "岩性配色显示")
{
m_formInfo->m_bLithColor = bShow;
}
else if(m_propertyData[pProperty] == "单岩性显示")
{
m_formInfo->m_bLithOne = bShow;
}
else if(m_propertyData[pProperty] == "显示含油性")
{
m_formInfo->m_bShowOil = bShow;
}
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色")
{
m_formInfo->m_bShowColor = bShow;
}
else if(m_propertyData[pProperty] == "绘制颜色号")
{
m_formInfo->m_bShowColorNum = bShow;
}
//改变录井剖面属性,是否显示
emit CallManage::getInstance()->sig_changeGeoLithShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow);
}
}
else if (m_strCurrentProperty == Text_Property)//文字结论
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
}
else if (m_strCurrentProperty == Layer_Property)//地质分层
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
}
else if (m_strCurrentProperty == TextItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//文字结论item
if("顶深(m)" == m_propertyData[pProperty])
{
//qDebug() << "顶深(m)->改变";
if(m_tdText)
{
double upper = variant.value<double>();
m_tdText->setUpper(-upper);
//保存
m_tdText->mPlot->SaveToSLF_Text();
}
}
else if("底深(m)" == m_propertyData[pProperty])
{
//qDebug() << "底深(m)->改变";
if(m_tdText)
{
double lower = variant.value<double>();
m_tdText->setLower(-lower);
//保存
m_tdText->mPlot->SaveToSLF_Text();
}
}
else if("文字结论" == m_propertyData[pProperty])
{
//qDebug() << "文字结论->改变";
if(m_tdText)
{
QString newResult = variant.value<QString>();
m_tdText->setTitle(newResult);
//
QCPRange currentRange = m_tdText->getRange();
m_tdText->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdText->mPlot->SaveToSLF_Text();
}
}
else if("文字字体" == m_propertyData[pProperty])
{
//字体
QFont newFont = variant.value<QFont>();
m_tdText->wordfont = newFont;
m_tdText->mItemTitle->setFont(newFont);
m_tdText->mPlot->replot();
}
else if("字体颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_tdText->fontColor = newColor;
m_tdText->mItemTitle->setColor(newColor);
m_tdText->mPlot->replot();
}
else if("背景色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_tdText->backgroundColor = newColor;
m_tdText->setColor(newColor);
m_tdText->mPlot->replot();
}
}
else if (m_strCurrentProperty == LayerItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//地质分层item
if("顶深(m)" == m_propertyData[pProperty])
{
//qDebug() << "顶深(m)->改变";
if(m_tdLayer)
{
double upper = variant.value<double>();
m_tdLayer->setUpper(-upper);
//保存
m_tdLayer->mPlot->SaveToSLF_Layer();
}
}
else if("底深(m)" == m_propertyData[pProperty])
{
//qDebug() << "底深(m)->改变";
if(m_tdLayer)
{
double lower = variant.value<double>();
m_tdLayer->setLower(-lower);
//保存
m_tdLayer->mPlot->SaveToSLF_Layer();
}
}
else if("文字结论" == m_propertyData[pProperty])
{
//qDebug() << "文字结论->改变";
if(m_tdLayer)
{
QString newResult = variant.value<QString>();
m_tdLayer->setTitle(newResult);
//
QCPRange currentRange = m_tdLayer->getRange();
m_tdLayer->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdLayer->mPlot->SaveToSLF_Layer();
}
}
else if("文字字体" == m_propertyData[pProperty])
{
//字体
QFont newFont = variant.value<QFont>();
m_tdLayer->wordfont = newFont;
m_tdLayer->mItemTitle->setFont(newFont);
m_tdLayer->mPlot->replot();
}
else if("字体颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_tdLayer->fontColor = newColor;
m_tdLayer->mItemTitle->setColor(newColor);
m_tdLayer->mPlot->replot();
}
else if("背景色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_tdLayer->backgroundColor = newColor;
m_tdLayer->setColor(newColor);
//m_tdLayer->mPlot->replot();
QCPRange currentRange = m_tdLayer->getRange();
m_tdLayer->setRange(currentRange.lower, currentRange.upper);
}
else if("岩性" == m_propertyData[pProperty])
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetLithSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdLayer->setLith(newResult);
//
QCPRange currentRange = m_tdLayer->getRange();
m_tdLayer->setRange(currentRange.lower, currentRange.upper);
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if (m_strCurrentProperty == JieshiItem_Property)
{
if (m_tdJieshi)
{
if ("顶深(m)" == m_propertyData[pProperty])
{
double upper = variant.value<double>();
m_tdJieshi->setDragRect(2, -upper);
}
else if ("底深(m)" == m_propertyData[pProperty])
{
double lower = variant.value<double>();
m_tdJieshi->setDragRect(1, -lower);
}
else
{
QString strProperty = m_propertyData[pProperty];
if (strProperty == "油气结论")
{
m_tdJieshi->setDragResult(0, variant.toString());
return;
}
int nidx = strProperty.indexOf("油气结论");
if (nidx >= 0)
{
int nret = extractNumbers("油气结论(\\d+)", strProperty);
m_tdJieshi->setDragResult(nret, variant.toString());
return;
}
nidx = strProperty.indexOf("分段点");
if (nidx >= 0)
{
int nret = extractNumbers("分段点(\\d+)深度", strProperty);
m_tdJieshi->setDragDepth(nret, variant.toDouble());
return;
}
}
}
}
else if (m_strCurrentProperty == GujingItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//固井结论item
if("顶深(m)" == m_propertyData[pProperty])
{
//qDebug() << "顶深(m)->改变";
if(m_tdGujing)
{
double upper = variant.value<double>();
m_tdGujing->setUpper(-upper);
//保存
m_tdGujing->mPlot->SaveToSLF_Gujing();
}
}
else if("底深(m)" == m_propertyData[pProperty])
{
//qDebug() << "底深(m)->改变";
if(m_tdGujing)
{
double lower = variant.value<double>();
m_tdGujing->setLower(-lower);
//保存
m_tdGujing->mPlot->SaveToSLF_Gujing();
}
}
else if("固井结论" == m_propertyData[pProperty])
{
//qDebug() << "固井结论->改变";
if(m_tdGujing)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetGujingSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdGujing->setResult(newResult);
//
QCPRange currentRange = m_tdGujing->getRange();
m_tdGujing->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdGujing->mPlot->SaveToSLF_Gujing();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
}
else if (m_strCurrentProperty == ImageItem_Property) // 岩心图片
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
changedYxzpItemProperty(pProperty, variant);
}
else if (m_strCurrentProperty == CORE_PHYSICS_ITEM_PROPERTY) // 岩心分析
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
changedCorePhysicsProperty(pProperty, variant, true);
}
else if (m_strCurrentProperty == CORE_PHYSICS_PROPERTY) // 岩心分析
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
changedCorePhysicsProperty(pProperty, variant, false);
}
else if (m_strCurrentProperty == SwallCoreItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//井壁取心item
if("深度" == m_propertyData[pProperty])
{
//qDebug() << "深度->改变";
if(m_tdSwallCore)
{
double lower = variant.value<double>();
// 设置初始范围
double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
double x1 = m_tdSwallCore->mPlot->xAxis->coordToPixel(-lower);
//
double Depth2 = m_tdSwallCore->mPlot->xAxis->pixelToCoord(x1-h);
m_tdSwallCore->setRange(-lower, Depth2);
//保存
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
}
}
else if("岩性" == m_propertyData[pProperty])
{
//qDebug() << "岩性->改变";
if(m_tdSwallCore)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetSymbolDir()+"取心岩性符号";
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdSwallCore->setLith(newResult);
//
QCPRange currentRange = m_tdSwallCore->getRange();
m_tdSwallCore->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("油气" == m_propertyData[pProperty])
{
//qDebug() << "油气->改变";
if(m_tdSwallCore)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetGasSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdSwallCore->setOil(newResult);
//
QCPRange currentRange = m_tdSwallCore->getRange();
m_tdSwallCore->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("颜色" == m_propertyData[pProperty])
{
//qDebug() << "颜色->改变";
if(m_tdSwallCore)
{
QString ColorImage = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetColorSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
ColorImage.replace("\\","/");
//
if(ColorImage.contains(strDefaultPath))
{
QString name = "";
int CoreColor = 0;
ColorImage.replace("\\","/");
int l=ColorImage.lastIndexOf("/");
if(l>-1) name=ColorImage.mid(l+1);
l=name.indexOf(".");
if(l>-1)name=name.left(l);
int ind=m_tdSwallCore->mPlot->colors_SWallCore.indexOf(name);
if(ind<0||ind>=m_tdSwallCore->mPlot->colorinds_SWallCore.size()) CoreColor=0;
else CoreColor=m_tdSwallCore->mPlot->colorinds_SWallCore[ind].toInt();
m_tdSwallCore->setTitle(QString::number(CoreColor));
//
QCPRange currentRange = m_tdSwallCore->getRange();
m_tdSwallCore->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("起始位置" == m_propertyData[pProperty])
{
//qDebug() << "起始位置->改变";
if(m_tdSwallCore)
{
double Sideleft = variant.value<double>();
m_tdSwallCore->m_fLeftSpace = Sideleft*g_dPixelPerCm;
//
QCPRange currentRange = m_tdSwallCore->getRange();
m_tdSwallCore->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
}
}
}
else if (m_strCurrentProperty == GeoLithItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//录井剖面item
if("顶深(m)" == m_propertyData[pProperty])
{
//qDebug() << "顶深(m)->改变";
if(m_tdGeoLith)
{
double upper = variant.value<double>();
m_tdGeoLith->setUpper(-upper);
//保存
m_tdGeoLith->mPlot->SaveToSLF_GeoLith();
}
}
else if("底深(m)" == m_propertyData[pProperty])
{
//qDebug() << "底深(m)->改变";
if(m_tdGeoLith)
{
double lower = variant.value<double>();
m_tdGeoLith->setLower(-lower);
//保存
m_tdGeoLith->mPlot->SaveToSLF_GeoLith();
}
}
else if("岩性" == m_propertyData[pProperty])
{
//qDebug() << "岩性->改变";
if(m_tdGeoLith)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetMudSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdGeoLith->setLith(newResult, m_tdGeoLith->m_Color);
//
QCPRange currentRange = m_tdGeoLith->getRange();
m_tdGeoLith->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdGeoLith->mPlot->SaveToSLF_GeoLith();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("油气" == m_propertyData[pProperty])
{
//qDebug() << "油气->改变";
if(m_tdGeoLith)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetGasSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdGeoLith->setOil(newResult);
//
QCPRange currentRange = m_tdGeoLith->getRange();
m_tdGeoLith->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdGeoLith->mPlot->SaveToSLF_GeoLith();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("颜色" == m_propertyData[pProperty])
{
//qDebug() << "颜色->改变";
if(m_tdGeoLith)
{
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetColorSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdGeoLith->setLith(m_tdGeoLith->m_Lith, newResult);
//
QCPRange currentRange = m_tdGeoLith->getRange();
m_tdGeoLith->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdGeoLith->mPlot->SaveToSLF_GeoLith();
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
else if("含油占比(1~8)" == m_propertyData[pProperty])
{
//qDebug() << "含油占比(1~8)->改变";
double dOilZhan = variant.value<double>();
m_formInfo->m_dOilZhan = dOilZhan;
//改变录井剖面属性,含油占比
emit CallManage::getInstance()->sig_changeGeoLithLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, dOilZhan);
}
else if("岩性配色显示" == m_propertyData[pProperty] ||
"仅绘含油地层" == m_propertyData[pProperty] ||
"单岩性显示" == m_propertyData[pProperty] ||
"显示含油性" == m_propertyData[pProperty] ||
"含油性居中" == m_propertyData[pProperty] ||
"显示颜色" == m_propertyData[pProperty] ||
"绘制颜色号" == m_propertyData[pProperty])
{
bool bShow = variant.value<bool>();
if(m_propertyData[pProperty] == "岩性配色显示")
{
m_formInfo->m_bLithColor = bShow;
}
else if(m_propertyData[pProperty] == "单岩性显示")
{
m_formInfo->m_bLithOne = bShow;
}
else if(m_propertyData[pProperty] == "显示含油性")
{
m_formInfo->m_bShowOil = bShow;
}
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色")
{
m_formInfo->m_bShowColor = bShow;
}
else if(m_propertyData[pProperty] == "绘制颜色号")
{
m_formInfo->m_bShowColorNum = bShow;
}
//改变录井剖面属性,是否显示
emit CallManage::getInstance()->sig_changeGeoLithShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow);
}
}
else if (m_strCurrentProperty == Jiegutext_Property)//气测/FMT/射孔/文本
{
//先处理通用属性
//CommonPropertyChanged(pProperty, variant);
if("显示名称" == m_propertyData[pProperty])
{
QString newAliasName = variant.value<QString>();
m_formInfo->m_strAliasName = newAliasName;
m_formInfo->update();
}
else if("字体" == m_propertyData[pProperty])
{
//字体
// 假设variant已经被设置为包含QColor
QFont newFont = variant.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
m_formInfo->update();
}
else if("颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_formInfo->m_lineColor = newColor;
m_formInfo->update();
}
else if("选择井曲线" == m_propertyData[pProperty])
{
QString sFilePath = variant.value<QString>();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
//if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
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();
//改变曲线名
emit CallManage::getInstance()->sig_changeJiegutextLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
}
else
{
QString strItem = m_propertyData[pProperty];
if(strItem != "")
{
bool bShow = variant.value<bool>();
//
QString strAliasName = m_formInfo->m_strAliasName;
if(strAliasName == "气测-FMT-射孔-文本" || strAliasName == "")
{
if(bShow)
{
strAliasName = strItem;
m_formInfo->m_strAliasName = strAliasName;
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
}
}
else
{
if(bShow)
{
strAliasName += "/" + strItem;
m_formInfo->m_strAliasName = strAliasName;
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
}
else
{
QStringList listAliasName = strAliasName.split("/");//QString字符串分割函数
if(listAliasName.contains(strItem))
{
listAliasName.removeOne(strItem);
}
if(listAliasName.size()==0)
{
strAliasName == "气测-FMT-射孔-文本";
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
}
else
{
strAliasName = "";
for(int i=0; i<listAliasName.size(); i++)
{
if(i>0)
{
strAliasName += "/";
}
strAliasName += listAliasName[i];
}
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
}
}
}
}
}
}
else if (m_strCurrentProperty == JiegutextItem_Property)
{
//气测/FMT/射孔/文本item
if("顶深(m)" == m_propertyData[pProperty])
{
//qDebug() << "顶深(m)->改变";
if(m_tdJiegutext)
{
double upper = variant.value<double>();
m_tdJiegutext->setUpper(-upper);
//保存
m_tdJiegutext->mPlot->SaveToSLF_Jiegutext();
//重新加载数据
m_tdJiegutext->ReLoadValues();
}
}
else if("底深(m)" == m_propertyData[pProperty])
{
//qDebug() << "底深(m)->改变";
if(m_tdJiegutext)
{
double lower = variant.value<double>();
m_tdJiegutext->setLower(-lower);
//保存
m_tdJiegutext->mPlot->SaveToSLF_Jiegutext();
//重新加载数据
m_tdJiegutext->ReLoadValues();
}
}
else if("显示名称" == m_propertyData[pProperty])
{
QString newAliasName = variant.value<QString>();
m_formInfo->m_strAliasName = newAliasName;
m_formInfo->update();
}
else if("字体" == m_propertyData[pProperty])
{
//字体
// 假设variant已经被设置为包含QColor
QFont newFont = variant.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
m_formInfo->update();
}
else if("颜色" == m_propertyData[pProperty])
{
QColor newColor = variant.value<QColor>();
m_formInfo->m_lineColor = newColor;
m_formInfo->update();
}
else if("选择井曲线" == m_propertyData[pProperty])
{
QString sFilePath = variant.value<QString>();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
//if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
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;
}
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//改变曲线名
emit CallManage::getInstance()->sig_changeJiegutextLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
}
else
{
QString strItem = m_propertyData[pProperty];
if(strItem != "")
{
bool bShow = variant.value<bool>();
//
QString strAliasName = m_formInfo->m_strAliasName;
if(strAliasName == "气测-FMT-射孔-文本" || strAliasName == "")
{
if(bShow)
{
strAliasName = strItem;
m_formInfo->m_strAliasName = strAliasName;
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
//刷新
InitCurrentViewInfo();
}
}
else
{
if(bShow)
{
strAliasName += "/" + strItem;
m_formInfo->m_strAliasName = strAliasName;
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
//刷新
InitCurrentViewInfo();
}
else
{
QStringList listAliasName = strAliasName.split("/");//QString字符串分割函数
if(listAliasName.contains(strItem))
{
listAliasName.removeOne(strItem);
}
if(listAliasName.size()==0)
{
strAliasName == "气测-FMT-射孔-文本";
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
//刷新
InitCurrentViewInfo();
}
else
{
strAliasName = "";
for(int i=0; i<listAliasName.size(); i++)
{
if(i>0)
{
strAliasName += "/";
}
strAliasName += listAliasName[i];
}
//改变曲线Title
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
//刷新
InitCurrentViewInfo();
}
}
}
}
}
}
else if (m_strCurrentProperty == Fac_Property)//沉积相
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
if("绘制相" == m_propertyData[pProperty] ||
"绘制亚相" == m_propertyData[pProperty] ||
"微相名称" == m_propertyData[pProperty])
{
bool bShow = variant.value<bool>();
if(m_propertyData[pProperty] == "绘制相")
{
m_formInfo->m_bDrawFac = bShow;
}
else if(m_propertyData[pProperty] == "绘制亚相")
{
m_formInfo->m_bDrawPhase = bShow;
}
else if(m_propertyData[pProperty] == "微相名称")
{
m_formInfo->m_bDrawMFacName = bShow;
}
//改变沉积相属性,是否显示
emit CallManage::getInstance()->sig_changeFacShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow);
}
}
else if (m_strCurrentProperty == Tubing_Property)//套管组件
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
if("显示单位" == m_propertyData[pProperty])
{
QString newUnit = variant.value<QString>();
m_formInfo->m_strUnit = newUnit;
m_formInfo->update();
}
else if("左刻度" == m_propertyData[pProperty])
{
double newLeftScale = variant.value<double>();
m_formInfo->m_vmin = newLeftScale;
emit CallManage::getInstance()->sig_ChangeLeftScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newLeftScale);
}
else if("右刻度" == m_propertyData[pProperty])
{
double newRightScale = variant.value<double>();
m_formInfo->m_vmax = newRightScale;
emit CallManage::getInstance()->sig_ChangeRightScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale);
}
else if("绘制结构" == m_propertyData[pProperty] ||
"绘制管柱" == m_propertyData[pProperty] ||
"绘制工具" == m_propertyData[pProperty] ||
"标注工具" == m_propertyData[pProperty] ||
"绘制接箍" == m_propertyData[pProperty])
{
bool bShow = variant.value<bool>();
if(m_propertyData[pProperty] == "绘制结构")
{
m_formInfo->m_bDrawStruct_Tubing = bShow;
}
else if(m_propertyData[pProperty] == "绘制管柱")
{
m_formInfo->m_bDrawTubing_Tubing = bShow;
}
else if(m_propertyData[pProperty] == "绘制工具")
{
m_formInfo->m_bDrawTools_Tubing = bShow;
}
else if(m_propertyData[pProperty] == "标注工具")
{
m_formInfo->m_bDrawSPTool_Tubing = bShow;
}
else if(m_propertyData[pProperty] == "绘制接箍")
{
m_formInfo->m_bDrawCCL_Tubing = bShow;
}
//改变套管组件属性,是否显示
emit CallManage::getInstance()->sig_changeGuanShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow);
}
else if("油管外径" == m_propertyData[pProperty]||
"套管内径" == m_propertyData[pProperty] ||
"套管外径" == m_propertyData[pProperty])
{
double newD = variant.value<double>();
if(m_propertyData[pProperty] == "油管外径")
{
m_formInfo->m_Oguan_Tubing = newD;
}
else if(m_propertyData[pProperty] == "套管内径")
{
m_formInfo->m_inD_Tubing = newD;
}
else if(m_propertyData[pProperty] == "套管外径")
{
m_formInfo->m_OutD_Tubing = newD;
}
//改变套管组件属性,直径
emit CallManage::getInstance()->sig_changeGuanD(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], newD);
}
}
else if (m_strCurrentProperty == TubingItem_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
//套管组件item
if("标注" == m_propertyData[pProperty])
{
QString newDec = variant.value<QString>();
}
else if("深度(m)" == m_propertyData[pProperty])
{
//qDebug() << "深度(m)->改变";
if(m_tdGuan)
{
double depth = variant.value<double>();
m_tdGuan->setRange(-depth-m_tdGuan->mH/2.0, -depth+m_tdGuan->mH/2.0);
//保存
m_tdGuan->mPlot->SaveToSLF_Tubing();
//检查套管组件名称,是否需要更新套管图形
bool bReDraw = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
if(bReDraw)
{
//组件改变后,重绘管柱
m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName);
}
}
}
else if("组件类型" == m_propertyData[pProperty])
{
//qDebug() << "组件类型->改变";
if(m_tdGuan)
{
//检查套管组件名称,是否需要更新套管图形
bool bReDrawOld = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
//--------------------------
QString newResult = variant.value<QString>();
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = GetSymbolDir()+"管柱组件";
//符号统一
strDefaultPath.replace("\\","/");
newResult.replace("\\","/");
//
if(newResult.contains(strDefaultPath))
{
m_tdGuan->setResult(newResult);
//
QCPRange currentRange = m_tdGuan->getRange();
m_tdGuan->setRange(currentRange.lower, currentRange.upper);
//保存
m_tdGuan->mPlot->SaveToSLF_Tubing();
//---------
bool bReDrawNew = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
if(bReDrawOld || bReDrawNew)
{
//组件改变后,重绘管柱
m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName);
}
}
else {
QMessageBox::information(nullptr,"提示","所选目录不支持");
return;
}
}
}
}
else if (m_strCurrentProperty == Depth_Property) // 深度
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
// 先修改属性值 在修改页面样式
changedDepthProperty(m_propertyData[pProperty], variant);
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_strTrackName;
listCond << m_strLineName;
listCond << m_propertyData[pProperty];
listCond << variant;
emit CallManage::getInstance()->sig_changeDepthProperty(listCond);
}
else if(m_strCurrentProperty == Widget_Property)
{
if("深度比例尺" == m_propertyData[pProperty])
{
//qDebug() << "深度比例尺->改变";
int iScale = 200;
QString newScale = pProperty->valueText();
//qDebug() << "深度比例尺->" << newScale;
//
int pos = newScale.indexOf(":");
if(pos>-1)
{
newScale = newScale.mid(pos+1);
iScale = atoi(newScale.toStdString().c_str());
}
else
{
iScale = 200;
}
//
m_iScale = iScale;
//清空自定义比例尺,防止混淆
for (auto it = m_propertyData.constBegin(); it != m_propertyData.constEnd(); ++it)
{
if(it.value()=="自定义比例尺")
{
m_bSelfChange=true;
QtVariantProperty *tempProperty = (QtVariantProperty*)it.key();
tempProperty->setValue("");
}
}
//通知界面缩放
emit CallManage::getInstance()->sig_changeScale(m_strUuid, iScale);
}
else if("自定义比例尺" == m_propertyData[pProperty])
{
if(m_bSelfChange==true)
{
m_bSelfChange=false;
return;
}
//qDebug() << "自定义比例尺->改变";
int iScale = 200;
QString newScale = variant.value<QString>();
//qDebug() << "自定义比例尺->" << newScale;
newScale.replace("",":");
//
int pos = newScale.indexOf(":");
if(pos>-1)
{
QString leftScale = newScale.mid(0, pos);
double ileftScale = atof(leftScale.toStdString().c_str());
if(ileftScale<=0)
{
//不合规
return;
}
//
QString rightScale = newScale.mid(pos+1);
double iRightScale = atof(rightScale.toStdString().c_str());
if(iRightScale<=0)
{
//不合规
return;
}
iScale = iRightScale/ileftScale;
}
else
{
//不合规
return;
}
//
m_iScale = iScale;
//通知界面缩放
emit CallManage::getInstance()->sig_changeScale(m_strUuid, iScale);
}
}
else if(m_strCurrentProperty == Well_Property)
{
if("开始深度(m)" == m_propertyData[pProperty])
{
//qDebug() << "开始深度(m)->改变";
double newStartDepth = variant.value<double>();
m_iY2 = 0 - newStartDepth;
if(m_iY2 < m_iY1)
{
return;
}
//通知界面
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
}
else if("终止深度(m)" == m_propertyData[pProperty])
{
//qDebug() << "终止深度(m)->改变";
double newEndDepth = variant.value<double>();
m_iY1 = 0 - newEndDepth;
if(m_iY2 < m_iY1)
{
return;
}
//通知界面
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
}
}
else if(m_strCurrentProperty == Curve_Property)
{
//曲线---------------------------
if("选择井曲线" == m_propertyData[pProperty])
{
QString sFilePath = variant.value<QString>();
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;
}
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//改变曲线名
emit CallManage::getInstance()->sig_changeLineName(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
}
else if("显示名称" == m_propertyData[pProperty])
{
//qDebug() << "显示名称->改变";
QString newAliasName = variant.value<QString>();
m_formInfo->m_strAliasName = newAliasName;
m_formInfo->update();
}
else if("显示单位" == m_propertyData[pProperty])
{
//qDebug() << "显示单位->改变";
QString newUnit = variant.value<QString>();
m_formInfo->m_strUnit = newUnit;
m_formInfo->update();
}
else if("左刻度" == m_propertyData[pProperty])
{
//qDebug() << "左刻度->改变";
double newLeftScale = variant.value<double>();
m_formInfo->m_vmin = newLeftScale;
emit CallManage::getInstance()->sig_ChangeLeftScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newLeftScale);
emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid);
//更新填充
ChangFillProperty();
}
else if("右刻度" == m_propertyData[pProperty])
{
//qDebug() << "右刻度->改变";
double newRightScale = variant.value<double>();
m_formInfo->m_vmax = newRightScale;
emit CallManage::getInstance()->sig_ChangeRightScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale);
emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid);
//更新填充
ChangFillProperty();
}
else if("刻度类型" == m_propertyData[pProperty])
{
//qDebug() << "刻度类型->改变";
QString newScaleType = pProperty->valueText();
emit CallManage::getInstance()->sig_ChangeScaleType(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newScaleType);
//更新填充
ChangFillProperty();
}
else if ("左跨道个数" == m_propertyData[pProperty])
{
m_formInfo->m_nLeftCross = variant.toInt();
emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid);
}
else if ("右跨道个数" == m_propertyData[pProperty])
{
m_formInfo->m_nRightCross = variant.toInt();
emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid);
}
else if("颜色" == m_propertyData[pProperty])
{
//qDebug() << "颜色->改变";
//曲线颜色
// 假设variant已经被设置为包含QColor
QColor newColor = variant.value<QColor>();
emit CallManage::getInstance()->sig_ChangeLineColor(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newColor);
}
else if("线宽" == m_propertyData[pProperty])
{
//qDebug() << "线宽->改变";
double newWidth = variant.value<double>();
emit CallManage::getInstance()->sig_ChangeLineWidth(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newWidth);
}
else if("线型" == m_propertyData[pProperty])
{
//qDebug() << "线型->改变";
Qt::PenStyle newStyle = Qt::SolidLine;
int iStyle = variant.value<int>();
switch(iStyle)
{
case 0:
//无
newStyle = Qt::NoPen;
break;
case 1:
//实线
newStyle = Qt::SolidLine;
break;
case 2:
//虚线
newStyle = Qt::DashLine;
break;
case 3:
//点线
newStyle = Qt::DotLine;
break;
case 4:
//虚点线
newStyle = Qt::DashDotLine;
break;
case 5:
//虚点点线
newStyle = Qt::DashDotDotLine;
break;
default:
break;
}
emit CallManage::getInstance()->sig_ChangeLineStyle(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newStyle);
}
else if("曲线" == m_propertyData[pProperty])
{
//qDebug() << "曲线->改变";
bool bDraw = variant.value<bool>();
emit CallManage::getInstance()->sig_ChangeDrawLine(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw);
}
else if("杆状" == m_propertyData[pProperty])
{
//qDebug() << "杆状->改变";
bool bDraw = variant.value<bool>();
emit CallManage::getInstance()->sig_ChangeDrawGan(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw);
}
else if("点状" == m_propertyData[pProperty])
{
//qDebug() << "点状->改变";
bool bDraw = variant.value<bool>();
emit CallManage::getInstance()->sig_ChangeDrawPoint(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw);
}
else if("绘制对称曲线" == m_propertyData[pProperty])
{
//qDebug() << "绘制对称曲线->改变";
bool bDraw = variant.value<bool>();
emit CallManage::getInstance()->sig_ChangeDrawSymmetry(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw);
}
else if("符号类型" == m_propertyData[pProperty])
{
//qDebug() << "符号类型->改变";
QCPScatterStyle::ScatterShape newStyle=QCPScatterStyle::ssCircle;//数据点,符号类型,圆,三角等
QString newStyleTxt = pProperty->valueText();
//
if(newStyleTxt=="")
{
newStyle=QCPScatterStyle::ssNone;
}
else if(newStyleTxt=="")
{
newStyle=QCPScatterStyle::ssDot;
}
else if(newStyleTxt=="十字")
{
newStyle=QCPScatterStyle::ssCross;
}
else if(newStyleTxt=="加号")
{
newStyle=QCPScatterStyle::ssPlus;
}
else if(newStyleTxt=="圆形")
{
newStyle=QCPScatterStyle::ssCircle;
}
else if(newStyleTxt=="圆盘")
{
newStyle=QCPScatterStyle::ssDisc;
}
else if(newStyleTxt=="正方形")
{
newStyle=QCPScatterStyle::ssSquare;
}
else if(newStyleTxt=="菱形")
{
newStyle=QCPScatterStyle::ssDiamond;
}
else if(newStyleTxt=="星形")
{
newStyle=QCPScatterStyle::ssStar;
}
else if(newStyleTxt=="正三角形")
{
newStyle=QCPScatterStyle::ssTriangle;
}
else if(newStyleTxt=="倒三角形")
{
newStyle=QCPScatterStyle::ssTriangleInverted;
}
else if(newStyleTxt=="十字正方形")
{
newStyle=QCPScatterStyle::ssCrossSquare;
}
else if(newStyleTxt=="加号正方形")
{
newStyle=QCPScatterStyle::ssPlusSquare;
}
else if(newStyleTxt=="十字圆形")
{
newStyle=QCPScatterStyle::ssCrossCircle;
}
else if(newStyleTxt=="加号圆形")
{
newStyle=QCPScatterStyle::ssPlusCircle;
}
else if(newStyleTxt=="和平标志")
{
newStyle=QCPScatterStyle::ssPeace;
}
emit CallManage::getInstance()->sig_ChangePointStyle(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newStyle);
}
else if("填充模式" == m_propertyData[pProperty] ||
"填充类型" == m_propertyData[pProperty] ||
"目标曲线" == m_propertyData[pProperty] ||
"填充颜色" == m_propertyData[pProperty] ||
"填充岩性" == m_propertyData[pProperty] ||
"岩性前景色" == m_propertyData[pProperty] ||
"岩性背景色" == m_propertyData[pProperty] ||
"头部图例" == m_propertyData[pProperty])
{
ChangFillProperty();
}
}
else if(m_strCurrentProperty == Head_Property)
{
//图头---------------------------
if("图例" == m_propertyData[pProperty])
{
//qDebug() << "图例->改变";
QString newSvg = variant.value<QString>();
m_item->setData(Qt::UserRole+1, newSvg); // 图片路径
//图头项改变
ChangHeadItemProperty();
}
else if("图例宽(cm)" == m_propertyData[pProperty])
{
//qDebug() << "图例宽(cm)->改变";
double newWidth = variant.value<double>();
m_item->setData(Qt::UserRole+2, newWidth); // 图片路径
m_colWidth_Img = newWidth;
//图头项改变
ChangHeadItemProperty();
}
else if("图例高(cm)" == m_propertyData[pProperty])
{
//qDebug() << "图例高(cm)->改变";
double newHight = variant.value<double>();
m_item->setData(Qt::UserRole+3, newHight); // 图片路径
m_rowHeight_Img = newHight;
//图头项改变
ChangHeadItemProperty();
}
else if("背景颜色" == m_propertyData[pProperty])
{
//qDebug() << "背景颜色->改变";
//背景颜色
// 假设variant已经被设置为包含QColor
QColor newColor = variant.value<QColor>();
// 设置字体颜色
QBrush brush(newColor); // 使用Qt::red预定义颜色
m_formHead->m_bRefresh=false;
m_item->setBackground(brush);
}
else if("列宽(cm)" == m_propertyData[pProperty])
{
//qDebug() << "列宽(cm)->改变";
double newWidth = variant.value<double>();
m_colWidth = newWidth;
m_formHead->m_bRefresh=false;
//图头项改变
m_tableWidget->setColumnWidth(m_iCol, m_colWidth*g_dPixelPerCm);
m_tableWidget->update();
m_formHead->resizeWindow();
}
else if("行高(cm)" == m_propertyData[pProperty])
{
//qDebug() << "行高(cm)->改变";
double newHight = variant.value<double>();
m_rowHeight = newHight;
m_formHead->m_bRefresh=false;
//图头项改变
m_tableWidget->setRowHeight(m_iRow, m_rowHeight*g_dPixelPerCm);
m_tableWidget->update();
m_formHead->resizeWindow();
}
else if("内容" == m_propertyData[pProperty])
{
//qDebug() << "内容->改变";
QString newText = variant.value<QString>();
m_formHead->m_bRefresh=false;
m_item->setText(newText);
}
else if("方向" == m_propertyData[pProperty])
{
//qDebug() << "方向->改变";
QString newDirection = pProperty->valueText();
if(newDirection=="垂直")
{
}
else{
}
}
else if("字体颜色" == m_propertyData[pProperty])
{
//qDebug() << "字体颜色->改变";
//字体颜色
// 假设variant已经被设置为包含QColor
QColor newColor = variant.value<QColor>();
// 设置字体颜色
QBrush brush(newColor); // 使用Qt::red预定义颜色
m_formHead->m_bRefresh=false;
m_item->setForeground(brush);
}
else if("字体" == m_propertyData[pProperty])
{
//qDebug() << "字体->改变";
//字体
// 假设variant已经被设置为包含QColor
QFont newFont = variant.value<QFont>();
// 设置字体
m_formHead->m_bRefresh=false;
m_item->setFont(newFont);
}
}
else if(m_strCurrentProperty == PL_OBJECT_PROPERTY) // 频率统计图
{
CommonPropertyChanged(pProperty, variant);
changedPlObjectProperty(m_propertyData[pProperty], variant);
}
}
void PropertyWidget::SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle)
{
QString str = m_propertyData[property];
if (m_strCurrentProperty == Wave_Property)
{
m_formInfo->setInfoProperty(str, val);
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_strTrackName;
listCond << m_strLineName;
listCond << str;
listCond << val;
emit CallManage::getInstance()->sig_changeDrawProperty(listCond);
}
return;
}
void PropertyWidget::ChangHeadItemProperty()
{
//清空
m_tableWidget->setCellWidget(m_iRow, m_iCol, nullptr);
//---------------------------
QString imagePath = ""; //"./image/胜利符号库/解释结论符号/油层.svg"
QVariant bgData = m_item->data(Qt::UserRole+1); // 我们约定用这个角色存储图片路径
if (bgData.isValid()) {
imagePath = bgData.toString();
}
if(imagePath=="")
{
return;
}
if(imagePath!="")
{
if(imagePath.size()>4)
{
int colWidth = m_colWidth_Img*g_dPixelPerCm;
int rowHeight = m_rowHeight_Img*g_dPixelPerCm;
//
QString strLast = imagePath.right(4);
if(strLast.toLower()==".svg")
{
//
QSvgRenderer* svgRender = new QSvgRenderer();
svgRender->load(imagePath);
//
QPixmap* pixmap = new QPixmap(colWidth-1, rowHeight-1);
pixmap->fill(Qt::transparent);//设置背景透明
QPainter p(pixmap);
svgRender->render(&p);
//1.直接采用控件显示
QLabel* label = new QLabel;
label->setPixmap(*pixmap);
label->setAlignment(Qt::AlignHCenter);
label->show();
//
m_formHead->m_bRefresh=false;
m_tableWidget->setCellWidget(m_iRow, m_iCol, label);
//m_item->setIcon(QIcon(*pixmap));
// 设置背景刷
//QBrush brush(*pixmap);
//m_item->setBackground(brush);
//m_tableWidget->setItem(m_iRow, m_iCol, new QTableWidgetItem(QIcon(*pixmap),tr("")));
}
else if(strLast.toLower()==".png")
{
// 加载图片
QPixmap pixmap(imagePath);
//pixmap.scaled(colWidth-1, rowHeight-1, Qt::KeepAspectRatio, Qt::SmoothTransformation);//缩放
//1.直接采用控件显示
QLabel* label = new QLabel;
label->setPixmap(pixmap.scaled(colWidth-1, rowHeight-1, Qt::KeepAspectRatio, Qt::SmoothTransformation));//图片保持比例缩放
label->setAlignment(Qt::AlignHCenter);
label->show();
//
m_formHead->m_bRefresh=false;
m_tableWidget->setCellWidget(m_iRow, m_iCol, label);
}
}
}
}
void PropertyWidget::ChangTvdProperty( QtProperty *pProperty, const QVariant &variant )
{
// QSet<QtProperty *> pParentProperty= pProperty->getParentItem().begin();
QString strGroup = "";
if (1 == pProperty->getParentItem().count())
{
QtProperty * pParentProperty= *(pProperty->getParentItem().begin());
strGroup = pParentProperty->propertyName();
}
emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
strGroup,m_propertyData[pProperty], variant);
}
void PropertyWidget::ChangFillProperty()
{
QString newFillMode = "无填充";
QString newFillType = "岩性模式";
QString newTargetLine = "左界道";
QColor newColor;//填充颜色
QString newLithosImage = "";//岩性图片
QString newHeadFill = "不绘制";
float vMax = 0.0;
float vMin = 0.0;
QString strOtherScaleType = "线性";
QColor frontColor;//岩性前景色
QColor backColor;//岩性背景色
for (auto it = m_propertyData.constBegin(); it != m_propertyData.constEnd(); ++it)
{
if(it.value()=="填充模式")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newFillMode = pProperty->valueText();
//qDebug() << "填充模式->" << newFillMode;
}
}
else if(it.value()=="填充类型")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newFillType = pProperty->valueText();
//qDebug() << "填充类型->" << newFillType;
}
}
else if(it.value()=="目标曲线")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newTargetLine = pProperty->valueText();
//qDebug() << "目标曲线->" << newTargetLine;
//
if(newTargetLine=="左界道" || newTargetLine=="右界道" || newTargetLine=="对称线")
{
}
else
{
for(int i=0; i<m_strListOtherLine.size(); i++)
{
QString strTmp = m_strListOtherLine[i];
if(strTmp==newTargetLine)
{
vMax = m_listMax[i];
vMin = m_listMin[i];
strOtherScaleType = m_strListOtherScaleType[i];
}
}
}
}
}
else if(it.value()=="填充颜色")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newColor = pProperty->value().value<QColor>();
}
//qDebug() << "填充颜色->";
}
else if(it.value()=="填充岩性")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newLithosImage = pProperty->valueText();
}
//qDebug() << "填充岩性->" << newLithosImage;
}
else if(it.value()=="岩性前景色")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
frontColor = pProperty->value().value<QColor>();
}
//qDebug() << "岩性前景色->";
}
else if(it.value()=="岩性背景色")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
backColor = pProperty->value().value<QColor>();
}
//qDebug() << "岩性背景色->";
}
else if(it.value()=="头部图例")
{
QtVariantProperty *pProperty = (QtVariantProperty*)it.key();
if(pProperty->hasValue())
{
newHeadFill = pProperty->valueText();
//qDebug() << "头部图例->" << newHeadFill;
}
}
}
//
if(newFillMode=="无填充")
{
emit CallManage::getInstance()->sig_ClearFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName);
}
else //if(newFillMode=="填充")
{
emit CallManage::getInstance()->sig_ChangeFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
newFillType, newTargetLine, newColor, newLithosImage, newHeadFill,
vMin, vMax, strOtherScaleType, frontColor, backColor, newFillMode, true);
}
}
QtVariantProperty* PropertyWidget::_CreateVariantPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, int propertyType)
{
QtProperty *pGroupItem =NULL;
{
QMap<QString,QtProperty *>::Iterator it = m_mapGroupItem.find( strGroup );
if( it != m_mapGroupItem.end() )
{
pGroupItem = it.value();
}else
{
pGroupItem = m_pVariantManager->addProperty(QtVariantPropertyManager::groupTypeId(), strGroup);
m_mapGroupItem[strGroup] = pGroupItem ;
m_pPropertyBrowser->addProperty( pGroupItem );
}
}
QtVariantProperty *item = m_pVariantManager->addProperty(propertyType, strPropertyCaption);
item->setValue(vtPropertyValue);
m_propertyData[item] = strPropertyCaption;
pGroupItem->addSubProperty(item);
// 字体不展开
if (QVariant::Font == propertyType || QVariant::Color == propertyType)
{
QList<QtBrowserItem *> list = m_pPropertyBrowser->items(item);
if (list.size() > 0)
m_pPropertyBrowser->setExpanded(list.at(0), false);
}
return item;
}
void PropertyWidget::_CreateVariantPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, int propertyType, double dMin, double dMax)
{
QtProperty *pGroupItem =NULL;
{
QMap<QString,QtProperty *>::Iterator it = m_mapGroupItem.find( strGroup );
if( it != m_mapGroupItem.end() )
{
pGroupItem = it.value();
}else
{
pGroupItem = m_pVariantManager->addProperty(QtVariantPropertyManager::groupTypeId(), strGroup);
m_mapGroupItem[strGroup] = pGroupItem ;
m_pPropertyBrowser->addProperty( pGroupItem );
}
}
QtVariantProperty *item = m_pVariantManager->addProperty(propertyType, strPropertyCaption);
item->setValue(vtPropertyValue);
item->setAttribute("minimum", dMin);
item->setAttribute("maximum", dMax);
m_propertyData[item] = strPropertyCaption;
pGroupItem->addSubProperty(item);
}
void PropertyWidget::_CreateEnumPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, QStringList listValue)
{
QtProperty *pGroupItem =NULL;
{
QMap<QString,QtProperty *>::Iterator it = m_mapGroupItem.find( strGroup );
if( it != m_mapGroupItem.end() )
{
pGroupItem = it.value();
}else
{
pGroupItem = m_pVariantManager->addProperty(QtVariantPropertyManager::groupTypeId(), strGroup);
m_mapGroupItem[strGroup] = pGroupItem ;
m_pPropertyBrowser->addProperty( pGroupItem );
}
}
QtVariantProperty *item = m_pVariantManager->addProperty(QtVariantPropertyManager::enumTypeId(), strPropertyCaption);
m_pVariantManager->setAttribute(item, "enumNames", listValue);
item->setValue(vtPropertyValue);
m_propertyData[item] = strPropertyCaption;
pGroupItem->addSubProperty(item);
}
void PropertyWidget::_CreateColorSchemePropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue)
{
QtProperty *pGroupItem = NULL;
{
QMap<QString, QtProperty *>::Iterator it = m_mapGroupItem.find(strGroup);
if (it != m_mapGroupItem.end())
{
pGroupItem = it.value();
}
else
{
pGroupItem = m_pVariantManager->addProperty(QtVariantPropertyManager::groupTypeId(), strGroup);
m_mapGroupItem[strGroup] = pGroupItem;
m_pPropertyBrowser->addProperty(pGroupItem);
}
}
QtProperty *colorSchemeProperty = m_pColorSchemeManager->addProperty(strPropertyCaption);
m_pColorSchemeManager->setLinear(colorSchemeProperty);
if (colorSchemeProperty)
{
m_propertyData[colorSchemeProperty] = strPropertyCaption;
pGroupItem->addSubProperty(colorSchemeProperty);
m_pColorSchemeManager->setValue(colorSchemeProperty, vtPropertyValue.toInt(), false);
//if (pMetaProperty)
//{
// m_mapProperty[colorSchemeProperty] = pMetaProperty;
//}
}
}
void PropertyWidget::initWidgetProperty(QString strUuid, int iScale)
{
//初始化,清空
InitCurrentViewInfo();
m_iScale = iScale;
m_strUuid = strUuid;
//当前属性类型
m_strCurrentProperty = Widget_Property;
QStringList listSize;
listSize.append("1:10");
listSize.append("1:20");
listSize.append("1:50");
listSize.append("1:100");
listSize.append("1:200");
listSize.append("1:500");
listSize.append("1:1000");
listSize.append("1:2000");
listSize.append("1:3000");
listSize.append("1:4000");
listSize.append("1:5000");
listSize.append("1:10000");
listSize.append("1:20000");
listSize.append("1:1");
QString strScale = "1:" + QString::number(m_iScale);
int iIndex = listSize.indexOf(strScale);
if(iIndex<0)
{
_CreateEnumPropertyItem("通常", "深度比例尺", 0, listSize);
//
_CreateVariantPropertyItem("通常", "自定义比例尺", strScale, QVariant::String);
}
else {
_CreateEnumPropertyItem("通常", "深度比例尺", iIndex, listSize);
_CreateVariantPropertyItem("通常", "自定义比例尺", "", QVariant::String);
}
//
_CreateVariantPropertyItem("水平格线", "粗格线间隔(m)", 10.0, QVariant::Double);
_CreateVariantPropertyItem("水平格线", "中格线间隔(m)", 2.0, QVariant::Double);
}
void PropertyWidget::initWellProperty(QString strUuid, QString strSlfName, QString strWellName, double iY1, double iY2)
{
//初始化,清空
InitCurrentViewInfo();
m_strUuid = strUuid;
m_strSlfName = strSlfName;
m_strWellName = strWellName;
m_iY1 = iY1;
m_iY2 = iY2;
//当前属性类型
m_strCurrentProperty = Well_Property;
//
_CreateVariantPropertyItem("通常", "开始深度(m)", 0-m_iY2, QVariant::Double);
_CreateVariantPropertyItem("通常", "终止深度(m)", 0-m_iY1, QVariant::Double);
}
void PropertyWidget::initTrackProperty(FormTrackTop *fromTop, int iWidth, QMyTableWidget *myTableWidget, int iCurrentCol)
{
//初始化,清空
InitCurrentViewInfo();
//
m_myTableWidget = myTableWidget;
m_iCurrentCol = iCurrentCol;
m_fromTop = fromTop;
//
m_strTrackName = fromTop->m_strTrackName;
m_strUuid = fromTop->m_strUuid;
m_strWellName = fromTop->m_strWellName;
m_strSlfName = fromTop->m_strSlfName;
//
double cmWidth = (double)iWidth/(double)g_dPixelPerCm;
_CreateVariantPropertyItem("通常", "道宽(cm)", cmWidth, QVariant::Double);
_CreateVariantPropertyItem("通常", "道名称", m_strTrackName, QVariant::String);
_CreateVariantPropertyItem("通常", "道头字体", fromTop->m_font, QVariant::Font);
_CreateVariantPropertyItem("通常", "道头字颜色", fromTop->m_fontColor, QVariant::Color);
//当前属性类型
m_strCurrentProperty = Track_Property;
}
void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax, QStringList strListOtherScaleType)
{
//初始化,清空
InitCurrentViewInfo();
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
m_formInfo = formInfo;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
//其他曲线
m_strListOtherLine.clear();
m_listMin.clear();
m_listMax.clear();
m_strListOtherScaleType.clear();
//
m_strListOtherLine.append(strListOtherLine);
m_listMin.append(listMin);
m_listMax.append(listMax);
m_strListOtherScaleType.append(strListOtherScaleType);
QStringList listStyle;
listStyle.append("");
listStyle.append("实线");
listStyle.append("虚线");
listStyle.append("点线");
listStyle.append("虚点线");
listStyle.append("虚点点线");
//
QStringList listHeadFill;
listHeadFill.append("不绘制");
listHeadFill.append("绘制");
//
QStringList listTargetLine;
listTargetLine.append("左界道");
listTargetLine.append("右界道");
listTargetLine.append("对称线");
listTargetLine.append(strListOtherLine);//其他曲线
//
QStringList listFillType;
listFillType.append("岩性模式");
listFillType.append("颜色模式");
//listFillType.append("成像化");
//
QStringList listFillMode;
listFillMode.append("无填充");
listFillMode.append("左填充");
listFillMode.append("右填充");
listFillMode.append("左右填充");
//
QStringList listScaleType;
listScaleType.append("线性");
listScaleType.append("对数");
//
QStringList listPointStyle;
listPointStyle.append("");
listPointStyle.append("");
listPointStyle.append("十字");
listPointStyle.append("加号");
listPointStyle.append("圆形");
listPointStyle.append("圆盘");
listPointStyle.append("正方形");
listPointStyle.append("菱形");
listPointStyle.append("星形");
listPointStyle.append("正三角形");
listPointStyle.append("倒三角形");
listPointStyle.append("十字正方形");
listPointStyle.append("加号正方形");
listPointStyle.append("十字圆形");
listPointStyle.append("加号圆形");
listPointStyle.append("和平标志");
//
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String);
//
_CreateVariantPropertyItem("刻度设置", "左刻度", formInfo->m_vmin, QVariant::Double);
_CreateVariantPropertyItem("刻度设置", "右刻度", formInfo->m_vmax, QVariant::Double);
_CreateEnumPropertyItem("刻度设置", "刻度类型", listScaleType.indexOf(formInfo->m_strScaleType), listScaleType);
_CreateVariantPropertyItem("刻度设置", "左跨道个数", formInfo->m_nLeftCross, QVariant::Int);
_CreateVariantPropertyItem("刻度设置", "右跨道个数", formInfo->m_nRightCross, QVariant::Int);
//
_CreateVariantPropertyItem("曲线线型", "线宽", formInfo->m_dWidth, QVariant::Double, 1, 20);
_CreateVariantPropertyItem("曲线线型", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateEnumPropertyItem("曲线线型", "线型", (int)formInfo->m_lineStyle, listStyle);
//绘制方式
_CreateVariantPropertyItem("绘制方式", "曲线", formInfo->m_bDrawLine, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制对称曲线", formInfo->m_bDrawSymmetry, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "杆状", formInfo->m_bDrawGan, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "点状", formInfo->m_bDrawPoint, QVariant::Bool);
_CreateEnumPropertyItem("数据点", "符号类型", (int)formInfo->m_pointStyle, listPointStyle);
//
_CreateEnumPropertyItem("岩性填充", "头部图例", listHeadFill.indexOf(formInfo->m_newHeadFill), listHeadFill);
_CreateEnumPropertyItem("岩性填充", "目标曲线", listTargetLine.indexOf(formInfo->m_newTargetLine), listTargetLine);
_CreateEnumPropertyItem("岩性填充", "填充类型", listFillType.indexOf(formInfo->m_newFillType), listFillType);
_CreateEnumPropertyItem("岩性填充", "填充模式", listFillMode.indexOf(formInfo->m_newFillMode), listFillMode);
_CreateVariantPropertyItem("岩性填充", "填充颜色", formInfo->m_newColor, QVariant::Color);
if(formInfo->m_newLithosImage=="")
{
_CreateVariantPropertyItem("岩性填充", "填充岩性", ::GetLithSymbolDir(), VariantManager::filePathTypeId());
}
else {
_CreateVariantPropertyItem("岩性填充", "填充岩性", formInfo->m_newLithosImage, VariantManager::filePathTypeId()); //"./image/胜利符号库/岩性符号/砂岩.png"
}
_CreateVariantPropertyItem("岩性填充", "岩性前景色", formInfo->m_frontColor, QVariant::Color);
_CreateVariantPropertyItem("岩性填充", "岩性背景色", formInfo->m_backColor, QVariant::Color);
//当前属性类型
m_strCurrentProperty = Curve_Property;
}
QColor intToQColor(int intColor) {
int red = intColor & 0xFF;
int green = (intColor >> 8) & 0xFF;
int blue = (intColor >> 16) & 0xFF;
return QColor(red, green, blue);
}
void PropertyWidget::initHeadProperty(FormHead *formHead, QTableWidget *tableWidget, QTableWidgetItem* item, int row, int col)
{
//初始化,清空
InitCurrentViewInfo();
m_formHead = formHead;
m_tableWidget = tableWidget;
m_item = item;
m_iRow = row;
m_iCol = col;
//当前属性类型
m_strCurrentProperty = Head_Property;
QStringList listDirection;
listDirection.append("水平");
listDirection.append("垂直");
QString imagePath = ""; //"./image/胜利符号库/解释结论符号/油层.svg"
QVariant bgData = m_item->data(Qt::UserRole+1); // 我们约定用这个角色存储图片路径
if (bgData.isValid()) {
imagePath = bgData.toString();
}
//图例宽
QVariant colWidth_Img = m_item->data(Qt::UserRole+2);
if (colWidth_Img.isValid()) {
m_colWidth_Img = colWidth_Img.toDouble();
}
//图例高
QVariant rowHeight_Img = m_item->data(Qt::UserRole+3);
if (rowHeight_Img.isValid()) {
m_rowHeight_Img = rowHeight_Img.toDouble();
}
//行高、列宽
m_colWidth = tableWidget->columnWidth(col)/g_dPixelPerCm;
m_rowHeight = tableWidget->rowHeight(row)/g_dPixelPerCm;
_CreateVariantPropertyItem("单元格", "图例", imagePath, VariantManager::filePathTypeId()); //"./image/胜利符号库/岩性符号/砂岩.png"
_CreateVariantPropertyItem("单元格", "图例宽(cm)", m_colWidth_Img, QVariant::Double, 0, 100);
_CreateVariantPropertyItem("单元格", "图例高(cm)", m_rowHeight_Img, QVariant::Double, 0, 100);
_CreateVariantPropertyItem("单元格", "背景颜色", m_item->background().color(), QVariant::Color);
_CreateVariantPropertyItem("文本", "内容", item->text(), QVariant::String);
_CreateVariantPropertyItem("文本", "字体", m_item->font(), QVariant::Font);
//_CreateEnumPropertyItem("文本", "方向", 0, listDirection);
_CreateVariantPropertyItem("文本", "字体颜色", m_item->foreground().color(), QVariant::Color);
_CreateVariantPropertyItem("表格", "行高(cm)", m_rowHeight, QVariant::Double, 0, 100);
_CreateVariantPropertyItem("表格", "列宽(cm)", m_colWidth, QVariant::Double, 0, 100);
}
void PropertyWidget::initTableProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("名称", "显示名称", formInfo->m_strLineName, QVariant::String);
_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("名称", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("名称", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateVariantPropertyItem("显示", "结论占比%", formInfo->m_nConclusionProportion, QVariant::Int);
_CreateVariantPropertyItem("显示", "显示位置(cm)", formInfo->m_nShowPos, QVariant::Int);
_CreateVariantPropertyItem("显示", "显示层号", formInfo->m_bShowLayerNo, QVariant::Bool);
_CreateVariantPropertyItem("显示", "层号字体", formInfo->m_layerFont, QVariant::Font);
_CreateVariantPropertyItem("显示", "层号旋转", formInfo->m_fLayerRotate, QVariant::Double);
m_strCurrentProperty = Table_Property;
}
void PropertyWidget::initDepthProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "头部高度", formInfo->m_headHeight, QVariant::Double);
_CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("通常", "标尺颜色", formInfo->m_sdRulerColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "名称", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font);
_CreateVariantPropertyItem("深度标注", "间隔", formInfo->m_sdInterval, QVariant::Double);
_CreateVariantPropertyItem("深度标注", "标注字体", formInfo->m_sdLabelFont, QVariant::Font);
_CreateVariantPropertyItem("深度标注", "旋转(°)", formInfo->m_sdRotationAngle, QVariant::Double);
_CreateVariantPropertyItem("深度标注", "绘制起点深度", formInfo->m_sdDrawStartDepth, QVariant::Bool);
_CreateVariantPropertyItem("深度标注", "绘制终点深度", formInfo->m_sdDrawEndDepth, QVariant::Bool);
_CreateVariantPropertyItem("深度标注", "斜深", formInfo->m_sdMeasuredDepth, QVariant::Bool);
_CreateVariantPropertyItem("深度标注", "海拔垂深", formInfo->m_sdElevationVerticalDepth, QVariant::Bool);
_CreateVariantPropertyItem("深度标注", "垂深", formInfo->m_sdVerticalDepth, QVariant::Bool);
QStringList listStyle;
listStyle.append("靠左");
listStyle.append("居中");
listStyle.append("靠右");
_CreateEnumPropertyItem("深度标注", "斜深位置", formInfo->m_sdMeasuredDepthPosition, listStyle);
_CreateEnumPropertyItem("深度标注", "垂深位置", formInfo->m_sdVerticalDepthPosition, listStyle);
_CreateEnumPropertyItem("深度标注", "海拔垂深位置", formInfo->m_sdElevationVerticalDepthPosition, listStyle);
_CreateVariantPropertyItem("主刻度线", "主刻度线长度", formInfo->m_sdMajorTickLineLength, QVariant::Int);
_CreateVariantPropertyItem("主刻度线", "主刻度线宽度", formInfo->m_sdMajorTickLineWidth, QVariant::Int);
_CreateVariantPropertyItem("次刻度线", "次刻度线长度", formInfo->m_sdMinorTickLineLength, QVariant::Int);
_CreateVariantPropertyItem("次刻度线", "次刻度线宽度", formInfo->m_sdMinorTickLineWidth, QVariant::Int);
m_strCurrentProperty = Depth_Property;
}
void PropertyWidget::initProperty(FormInfo *formInfo)
{
if (formInfo == NULL)
return;
//初始化,清空
InitCurrentViewInfo();
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
if (formInfo->m_strType == "tableObject")
{
if (m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT")
{
//固井结论
this->initGujingProperty(formInfo);
}
else if (m_strLineName == "IMAGE_DATA")
{
// 岩心图片
this->initImageProperty(formInfo);
}
else if (m_strLineName == "SWALL_CORE")
{
//井壁取心
this->initSwallCoreProperty(formInfo);
}
else if (m_strLineName == "GEO_LITH")
{
//录井剖面
this->initGeoLithProperty(formInfo);
}
else if (m_strLineName == "WORDS_RELUST")
{
//文字结论
this->initTextProperty(formInfo);
}
else if (m_strLineName == "LAYER_DATA")
{
//地质分层
this->initLayerProperty(formInfo);
}
else if (m_strLineName == "CORE_PHYSICS")
{
// 岩心分析
this->initCorePhysicsProperty(formInfo);
}
else
{
this->initTableProperty(formInfo);
}
}
else if (formInfo->m_strType == "depthObject")
{
this->initDepthProperty(formInfo);
}
else if (formInfo->m_strType == "roseObject")
{
this->initRoseProperty(formInfo);
}
else if (formInfo->m_strType == "waveObject")
{
this->initWaveProperty(formInfo, formInfo->m_nDrawType);
}
else if (formInfo->m_strType == "JiegutextObject")
{
//气测/FMT/射孔/文本
this->initJiegutextProperty(formInfo);
}
else if (formInfo->m_strType == "LogfaceObject")
{
//沉积相
this->initFacProperty(formInfo);
}
else if(formInfo->m_strType=="SantuyibiaoObject")
{
this->initTvdProperty(formInfo);
}
else if (formInfo->m_strType == "TubingstringObject")
{
//套管组件
this->initTubingProperty(formInfo);
}
else if (formInfo->m_strType == "plObject")
{
//频率统计图
this->initPlObjectProperty(formInfo);
}
}
void PropertyWidget::initRoseProperty(FormInfo *formInfo)
{
//
_CreateVariantPropertyItem("数据", "名称", formInfo->m_strAliasName, QVariant::String);
QStringList listType;
listType.append("曲线型数据");
listType.append("表格型数据");
_CreateEnumPropertyItem("数据", "数据类型", listType.indexOf("曲线型数据"), listType);
_CreateVariantPropertyItem("数据", "显示单位", "°", QVariant::String);
_CreateVariantPropertyItem("数据", "井文件名称", m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("数据", "方位曲线", "STRDIR", QVariant::String);
_CreateVariantPropertyItem("数据", "倾角曲线", "CALM", QVariant::String);
//
_CreateVariantPropertyItem("玫瑰图", "扇形", 36, QVariant::Int);
_CreateVariantPropertyItem("玫瑰图", "圆半径(cm)", 1, QVariant::Int);
_CreateVariantPropertyItem("玫瑰图", "辐射圈", 9, QVariant::Int);
_CreateVariantPropertyItem("玫瑰图", "方位打印间隔", 3, QVariant::Int);
_CreateVariantPropertyItem("玫瑰图", "圆线颜色", QColor(0,0,0), QVariant::Color);
_CreateVariantPropertyItem("玫瑰图", "圆线宽度", 2, QVariant::Int);
_CreateVariantPropertyItem("玫瑰图", "应力线颜色", QColor(255, 170, 0), QVariant::Color);
_CreateVariantPropertyItem("玫瑰图", "垮塌线颜色", QColor(0, 0, 255), QVariant::Color);
_CreateVariantPropertyItem("玫瑰图", "绘制辐射线?", true, QVariant::Bool);
_CreateVariantPropertyItem("玫瑰图", "绘制井眼垮塌", true, QVariant::Bool);
_CreateVariantPropertyItem("玫瑰图", "是否填充", true, QVariant::Bool);
_CreateVariantPropertyItem("玫瑰图", "是否绘制标注?", true, QVariant::Bool);
// _CreateVariantPropertyItem("玫瑰图", "道头字体", fromTop->m_font, QVariant::Font);
// _CreateVariantPropertyItem("玫瑰图", "道头字颜色", fromTop->m_fontColor, QVariant::Color);
}
void PropertyWidget::initWaveProperty(FormInfo *formInfo, int nType)
{
if (formInfo == NULL)
return;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strLineName, QVariant::String);
//_CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_strUnit, QVariant::Double);
QStringList lineType;
lineType.append("线性");
lineType.append("对数");
lineType.append("核磁对数");
lineType.append("二维核磁");
lineType.append("色级图");
lineType.append("时间对数");
lineType.append("时间指数");
_CreateEnumPropertyItem("通常", "曲线类型", lineType.indexOf("线性"), lineType);
_CreateVariantPropertyItem("曲线单位", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_curveUnitFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线刻度", formInfo->m_curveScaleFont, QVariant::Font);
QStringList drawType;
drawType.append("波形");
drawType.append("填充");
drawType.append("变密度(成像)");
drawType.append("全阵列");
drawType.append("奇数阵列");
drawType.append("偶数阵列");
drawType.append("变密度(镜像)");
drawType.append("自选阵列");
drawType.append("三维图像");
drawType.append("多臂井径");
_CreateEnumPropertyItem("绘图类型", "类型", formInfo->m_nDrawType, drawType);
if (nType == 2)
{
QStringList fillType;
fillType.append("全周");
fillType.append("正半周");
fillType.append("负半周");
_CreateEnumPropertyItem("填充方式", "方式", formInfo->m_nFillType, fillType);
}
if (nType == 0 || nType == 1)
{
_CreateVariantPropertyItem("波形绘制参数", "绘制波深度", formInfo->m_bDrawDepth, QVariant::Bool);
_CreateVariantPropertyItem("波形绘制参数", "绘制波基线", formInfo->m_bDrawBase, QVariant::Bool);
_CreateVariantPropertyItem("波形绘制参数", "奇偶配色", formInfo->m_bOddEven, QVariant::Bool);
}
//_CreateVariantPropertyItem("波形绘制参数", "自动平滑", true, QVariant::Bool);
_CreateVariantPropertyItem("波形绘制参数", "左刻度", formInfo->m_vmin, QVariant::Double);
_CreateVariantPropertyItem("波形绘制参数", "右刻度", formInfo->m_vmax, QVariant::Double);
_CreateVariantPropertyItem("波形绘制参数", "幅度刻度", formInfo->m_strAmp, QVariant::String);
_CreateVariantPropertyItem("波形绘制参数", "最大振幅", formInfo->m_fMaxAmp, QVariant::Double);
_CreateVariantPropertyItem("波形绘制参数", "显示刻度", formInfo->m_bShowScale, QVariant::Bool);
_CreateVariantPropertyItem("波形绘制参数", "波列基值", formInfo->m_fWaveBase, QVariant::Double);
_CreateVariantPropertyItem("波形绘制参数", "波形间隔", formInfo->m_nWaveJg, QVariant::Int);
_CreateVariantPropertyItem("波形绘制参数", "波形高度", formInfo->m_fWaveHei, QVariant::Double);
if (nType == 0 || nType == 1)
{
_CreateVariantPropertyItem("波形绘制参数", "线宽", formInfo->m_dWidth, QVariant::Int);
_CreateVariantPropertyItem("波形绘制参数", "颜色", formInfo->m_lineColor, QVariant::Color);
}
//_CreateVariantPropertyItem("成像显示", "RGBA数据", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "绘制阵列数", 1, QVariant::Int);
//_CreateVariantPropertyItem("成像显示", "是否顶底倒置", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "是否行列互换", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "无效值跳过", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "是否方位校正", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "是否深度校正", false, QVariant::Bool);
//_CreateVariantPropertyItem("成像显示", "是否自动计算波参数", "", QVariant::String);
if (nType == 2)
{
_CreateColorSchemePropertyItem("调色板参数设置", "色板", formInfo->m_nSchemeIndex);
_CreateVariantPropertyItem("调色板参数设置", "变密度颜色级数", formInfo->m_nColorNum, QVariant::Int);
}
// _CreateVariantPropertyItem("调色板参数设置", "图例置顶", false, QVariant::Bool);
// _CreateVariantPropertyItem("调色板参数设置", "反转显示", false, QVariant::Bool);
m_strCurrentProperty = Wave_Property;
}
void PropertyWidget::initJieshiItemProperty(TransparentGroupResult* tdJieshi, double lower, double upper, QString strResult)
{
//初始化,清空
InitCurrentViewInfo();
m_tdJieshi = tdJieshi;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
_CreateVariantPropertyItem("当前项", "解释层号", tdJieshi->getTitle(), QVariant::String);
QtVariantProperty* pItem = _CreateVariantPropertyItem("当前项", "油气结论", tdJieshi->getOilGasConclusion(0), VariantManager::filePathTypeId());
m_pVariantManager->setAttribute(pItem, "filepath", GetOilSymbolDir());
m_pVariantManager->setAttribute(pItem, "filter", "图片(*.png *.svg)");
_CreateVariantPropertyItem("当前项", "备注", tdJieshi->getRemark(), QVariant::String);
for (int i = 1; i <= 10; i++)
{
QString s = tdJieshi->getOilGasConclusion(i);
QtVariantProperty* pItem = _CreateVariantPropertyItem("当前项", QString("油气结论%1").arg(i), s, VariantManager::filePathTypeId());
//pItem->setAttribute("FilePath", "123542");
m_pVariantManager->setAttribute(pItem, "filepath", GetOilSymbolDir());
m_pVariantManager->setAttribute(pItem, "filter", "图片(*.png *.svg)");
}
for (int i = 1; i <= 10; i++)
{
QString s = tdJieshi->getOilGasDepth(i);
_CreateVariantPropertyItem("当前项", QString("分段点%1深度").arg(i), s, QVariant::Double);
}
//当前属性类型
m_strCurrentProperty = JieshiItem_Property;
}
void PropertyWidget::initSwallCoreProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
m_strCurrentProperty = SwallCore_Property;
}
void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* tdSwallCore, double Depth, QString LithologyImage, QString OilGasImage, QString ColorImage, double Sideleft, double width, int iColor)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdSwallCore->mPlot->m_formTrack->getFormInfoByParameters(tdSwallCore->mPlot->m_strUuid, tdSwallCore->mPlot->m_strWellName,
tdSwallCore->mPlot->m_strTrackName, tdSwallCore->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
//当前属性类型
m_strCurrentProperty = SwallCoreItem_Property;
m_tdSwallCore = tdSwallCore;
//
_CreateVariantPropertyItem("当前项", "深度", -Depth, QVariant::Double);
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetSymbolDir()+"取心岩性符号";
//符号统一
strDefaultPath.replace("\\","/");
LithologyImage.replace("\\","/");
//
if(LithologyImage.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "岩性", LithologyImage, VariantManager::filePathTypeId());
}
else{
_CreateVariantPropertyItem("当前项", "岩性", strDefaultPath, VariantManager::filePathTypeId());
}
//只能选择自己的符号,不能选择其他。
strDefaultPath = ::GetGasSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
OilGasImage.replace("\\","/");
//
if(OilGasImage.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "油气", OilGasImage, VariantManager::filePathTypeId());
}
else
{
_CreateVariantPropertyItem("当前项", "油气", strDefaultPath, VariantManager::filePathTypeId());
}
//只能选择自己的符号,不能选择其他。
strDefaultPath = ::GetColorSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
ColorImage.replace("\\","/");
//
if(ColorImage.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "颜色", ColorImage, VariantManager::filePathTypeId());
}
else
{
_CreateVariantPropertyItem("当前项", "颜色", strDefaultPath, VariantManager::filePathTypeId());
}
_CreateVariantPropertyItem("当前项", "起始位置", Sideleft, QVariant::Double);
//_CreateVariantPropertyItem("当前项", "宽度", -Depth, QVariant::Double);
}
void PropertyWidget::initTextProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
m_strCurrentProperty = Text_Property;
}
void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, double lower, double upper, QString strResult)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdText->mPlot->m_formTrack->getFormInfoByParameters(tdText->mPlot->m_strUuid, tdText->mPlot->m_strWellName,
tdText->mPlot->m_strTrackName, tdText->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
//当前属性类型
m_strCurrentProperty = TextItem_Property;
m_tdText = tdText;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
_CreateVariantPropertyItem("当前项", "文字结论", strResult, QVariant::String);
QFont myFont = tdText->wordfont; //("Arial", 12, QFont::Bold); // 名称字体
QColor myColor = tdText->fontColor; //Qt::black; //颜色
QColor backColor = tdText->backgroundColor; //QColor(255, 255, 255);//背景色
_CreateVariantPropertyItem("当前项", "字体颜色", myColor, QVariant::Color);
_CreateVariantPropertyItem("当前项", "文字字体", myFont, QVariant::Font);
_CreateVariantPropertyItem("当前项", "背景色", backColor, QVariant::Color);
}
void PropertyWidget::initLayerProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
m_strCurrentProperty = Layer_Property;
}
void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, double lower, double upper, QString strResult)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdLayer->mPlot->m_formTrack->getFormInfoByParameters(tdLayer->mPlot->m_strUuid, tdLayer->mPlot->m_strWellName,
tdLayer->mPlot->m_strTrackName, tdLayer->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
//当前属性类型
m_strCurrentProperty = LayerItem_Property;
m_tdLayer = tdLayer;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
_CreateVariantPropertyItem("当前项", "文字结论", strResult, QVariant::String);
QFont myFont = tdLayer->wordfont; //("Arial", 12, QFont::Bold); // 名称字体
QColor myColor = tdLayer->fontColor; //Qt::black; //颜色
QColor backColor = tdLayer->backgroundColor; //QColor(255, 255, 255);//背景色
_CreateVariantPropertyItem("当前项", "字体颜色", myColor, QVariant::Color);
_CreateVariantPropertyItem("当前项", "文字字体", myFont, QVariant::Font);
_CreateVariantPropertyItem("当前项", "背景色", backColor, QVariant::Color);
_CreateVariantPropertyItem("当前项", "岩性", ::GetLithSymbolDir(), VariantManager::filePathTypeId());
}
void PropertyWidget:: initGujingProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
m_strCurrentProperty = Gujing_Property;
}
void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing, double lower, double upper, QString strResult)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdGujing->mPlot->m_formTrack->getFormInfoByParameters(tdGujing->mPlot->m_strUuid, tdGujing->mPlot->m_strWellName,
tdGujing->mPlot->m_strTrackName, tdGujing->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
//当前属性类型
m_strCurrentProperty = GujingItem_Property;
m_tdGujing = tdGujing;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetGujingSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
strResult.replace("\\","/");
//
if(strResult.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "固井结论", strResult, VariantManager::filePathTypeId());
}
else
{
_CreateVariantPropertyItem("当前项", "固井结论", strDefaultPath, VariantManager::filePathTypeId());
}
}
void PropertyWidget::initImageProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
_CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("通常", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("通常", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateVariantPropertyItem("当前项", "标注字体", formInfo->m_yxzpLabelFont, QVariant::Font);
_CreateVariantPropertyItem("当前项", "标注旋转", formInfo->m_yxzpLabelRotation, QVariant::Int);
_CreateVariantPropertyItem("当前项", "两端绘制", formInfo->m_yxzpTwoEndDrawing, QVariant::Bool);
_CreateVariantPropertyItem("当前项", "绘制颜色", formInfo->m_yxzpDrawColor, QVariant::Bool);
m_strCurrentProperty = Image_Property;
}
void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString pictureFile,
double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName,
tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
_CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("通常", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("通常", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateVariantPropertyItem("当前项", "标注字体", formInfo->m_yxzpLabelFont, QVariant::Font);
_CreateVariantPropertyItem("当前项", "标注旋转", formInfo->m_yxzpLabelRotation, QVariant::Int);
_CreateVariantPropertyItem("当前项", "两端绘制", formInfo->m_yxzpTwoEndDrawing, QVariant::Bool);
_CreateVariantPropertyItem("当前项", "绘制颜色", formInfo->m_yxzpDrawColor, QVariant::Bool);
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
_CreateVariantPropertyItem("当前项", "图片文件", pictureFile, VariantManager::filePathTypeId());
_CreateVariantPropertyItem("当前项", "左边距%", left, QVariant::Int);
_CreateVariantPropertyItem("当前项", "宽度%", width, QVariant::Int);
_CreateVariantPropertyItem("边框属性", "线宽", borderWidth, QVariant::Int);
_CreateVariantPropertyItem("边框属性", "颜色", borderColor, QVariant::Color);
QStringList listStyle;
listStyle.append("");
listStyle.append("实线");
listStyle.append("虚线");
listStyle.append("点线");
listStyle.append("虚点线");
listStyle.append("虚点点线");
_CreateEnumPropertyItem("边框属性", "线型", (int)borderStyle, listStyle);
}
//当前属性类型
m_strCurrentProperty = ImageItem_Property;
m_tdImage = tdImage;
}
void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
//显示
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);
m_strCurrentProperty = GeoLith_Property;
}
void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo, bool isItem)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("曲线线型", "线宽", formInfo->m_cp_lineWidth, QVariant::Int);
_CreateVariantPropertyItem("曲线线型", "颜色", formInfo->m_cp_lineColor, QVariant::Color);
QStringList listStyle;
listStyle.append("");
listStyle.append("实线");
listStyle.append("虚线");
listStyle.append("点线");
listStyle.append("虚点线");
listStyle.append("虚点点线");
_CreateEnumPropertyItem("曲线线型", "线型", (int)formInfo->m_cp_lineStyle, listStyle);
_CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_cp_leftScale, QVariant::Double);
_CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_cp_rightScale, QVariant::Double);
_CreateVariantPropertyItem("显示设置", "等分刻度数或自定义序列", formInfo->m_cp_scaleDivisionsOrCustom, QVariant::Int);
QStringList listStyle4;
listStyle4.append("线性");
listStyle4.append("对数");
listStyle4.append("倾角");
_CreateEnumPropertyItem("显示设置", "刻度类型", formInfo->m_cp_scaleType, listStyle4);
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_strUnitFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线刻度", formInfo->m_cp_curveScale, QVariant::Font);
_CreateVariantPropertyItem("绘制方式", "杆状", formInfo->m_cp_drawAsBar, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "左界", formInfo->m_cp_leftBoundary, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "不绘零等无效值", formInfo->m_cp_skipZeroInvalidValues, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制包络线", formInfo->m_cp_drawEnvelope, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "点状", formInfo->m_cp_drawAsDot, QVariant::Bool);
QStringList listStyle2;
listStyle2.append("圆形");
listStyle2.append("矩形");
listStyle2.append("三角");
listStyle2.append("菱形");
_CreateEnumPropertyItem("数据点", "符号类型", formInfo->m_cp_symbolType, listStyle2);
_CreateVariantPropertyItem("数据点", "边框颜色", formInfo->m_cp_symbolBorderColor, QVariant::Color);
_CreateVariantPropertyItem("数据点", "大小", formInfo->m_cp_symbolSize, QVariant::Int);
_CreateVariantPropertyItem("数据点", "填充颜色", formInfo->m_cp_symbolFillColor, QVariant::Color);
QStringList listStyle3;
listStyle3.append("圆形");
listStyle3.append("矩形");
listStyle3.append("三角");
listStyle3.append("菱形");
_CreateEnumPropertyItem("表格数据", "字段名称", formInfo->m_cp_fieldName, listStyle3);
if(!isItem)
{
// 赋值会触发 SlotPropertyChanged
m_strCurrentProperty = CORE_PHYSICS_PROPERTY;
}
}
void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage)
{
//初始化,清空
InitCurrentViewInfo();
// qDebug() << "=========-----this:" << tdImage << " mPlot:" << tdImage->mPlot;
// QMyCustomPlot *mPlot = tdImage->mPlot;
// qDebug() << tdImage->mPlot->m_strUuid << "====";
// qDebug() << tdImage->mPlot->m_strWellName << "====";
// qDebug() << tdImage->mPlot->m_strTrackName << "====";
// qDebug() << tdImage->mPlot->m_strLineName << "====";
// qDebug() << tdImage->mPlot->m_formTrack << "====";
FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName,
tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
this->initCorePhysicsProperty(formInfo, true);
_CreateVariantPropertyItem("当前项", "序号", tdImage->getCpOrder(), QVariant::Int);
_CreateVariantPropertyItem("当前项", "深度", tdImage->getCpDepth(), QVariant::Double);
_CreateVariantPropertyItem("当前项", "校正深度", tdImage->getCpCorrDepth(), QVariant::Double);
_CreateVariantPropertyItem("当前项", "数值", tdImage->getCpCoreValue(), QVariant::Double);
}
// 当前属性类型
m_strCurrentProperty = CORE_PHYSICS_ITEM_PROPERTY;
m_tdCorePhysics = tdImage;
}
// 斜井三图一表属性
void PropertyWidget::initTvdProperty(FormInfo *formInfo)
{
if (!formInfo->m_pTvd)
return;
_CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String);
_CreateVariantPropertyItem("绘制图形对象", "靶心", formInfo->m_pTvd->objViewInfo->m_IsDrawBX, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "靶心参数表", formInfo->m_pTvd->objViewInfo->m_IsDrawBxcs, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "井斜数据表", formInfo->m_pTvd->objViewInfo->m_IsDrawTable, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "俯视图", formInfo->m_pTvd->objViewInfo->m_IsDrawFst, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图深度在左边", formInfo->m_pTvd->objViewInfo->m_DepthLeft, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(水平位移)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst1, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向东)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst2, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向北)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst3, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(侧视角)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "立体轨迹图", formInfo->m_pTvd->objViewInfo->m_IsDrawLtgjt, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "绘制标注信息", formInfo->m_pTvd->objViewInfo->m_isDrawNote, QVariant::Bool);
_CreateVariantPropertyItem("边框线型", "线宽", formInfo->m_pTvd->m_FrameWidth, QVariant::Int);
_CreateVariantPropertyItem("边框线型", "颜色", formInfo->m_pTvd->m_FrameColor, QVariant::Color);
_CreateVariantPropertyItem("格线线型", "线宽", formInfo->m_pTvd->m_GridWidth, QVariant::Int);
_CreateVariantPropertyItem("格线线型", "颜色", formInfo->m_pTvd->m_GridColor, QVariant::Color);
_CreateVariantPropertyItem("轨迹线型", "线宽", formInfo->m_pTvd->m_GuijiWidth, QVariant::Int);
_CreateVariantPropertyItem("轨迹线型", "颜色", formInfo->m_pTvd->m_GuijiColor, QVariant::Color);
_CreateVariantPropertyItem("靶心半径线型", "线宽", formInfo->m_pTvd->m_BxbjWidth, QVariant::Int);
_CreateVariantPropertyItem("靶心半径线型", "颜色", formInfo->m_pTvd->m_BxbjColor, QVariant::Color);
_CreateVariantPropertyItem("靶心连线线型", "线宽", formInfo->m_pTvd->m_BxlxWidth, QVariant::Int);
_CreateVariantPropertyItem("靶心连线线型", "颜色", formInfo->m_pTvd->m_BxlxColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "道头字体", formInfo->m_pTvd->objViewInfo->m_HeadFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "道头颜色", formInfo->m_pTvd->objViewInfo->m_HeadColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "标题字体", formInfo->m_pTvd->objViewInfo->m_TitleFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "标题颜色", formInfo->m_pTvd->objViewInfo->m_TitleColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "数据表字体", formInfo->m_pTvd->objViewInfo->m_TableFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "数据表颜色", formInfo->m_pTvd->objViewInfo->m_TableColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "刻度字体", formInfo->m_pTvd->objViewInfo->m_ScaleFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "刻度颜色", formInfo->m_pTvd->objViewInfo->m_ScaleColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "注释字体", formInfo->m_pTvd->objViewInfo->m_NoteFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "注释颜色", formInfo->m_pTvd->objViewInfo->m_NoteColor, QVariant::Color);
_CreateVariantPropertyItem("井斜数据表参数", "标题名", formInfo->m_pTvd->m_Title_table, QVariant::String);
_CreateVariantPropertyItem("井斜数据表参数", "头记录高度(cm)", formInfo->m_pTvd->objViewInfo->m_Head_Height, QVariant::Double);
_CreateVariantPropertyItem("井斜数据表参数", "数据记录高度(cm)", formInfo->m_pTvd->objViewInfo->m_Rec_Height, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "标题名", formInfo->m_pTvd->objViewInfo->m_Title_fst, QVariant::String);
_CreateVariantPropertyItem("俯视图参数", "东西位移最小刻度", formInfo->m_pTvd->objViewInfo->m_MinXe, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "东西位移最大刻度", formInfo->m_pTvd->objViewInfo->m_MaxXe, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "南北位移最小刻度", formInfo->m_pTvd->objViewInfo->m_MinYn, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "南北位移最大刻度", formInfo->m_pTvd->objViewInfo->m_MaxYn, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "是否绘制闭合线", formInfo->m_pTvd->objViewInfo->m_bPlotBhx, QVariant::Bool);
_CreateVariantPropertyItem("侧视图参数", "标题名", formInfo->m_pTvd->objViewInfo->m_Title_cst, QVariant::String);
_CreateVariantPropertyItem("侧视图参数", "高宽相同", formInfo->m_pTvd->objViewInfo->m_heqw, QVariant::Bool);
_CreateVariantPropertyItem("侧视图(水平位移)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_HOFF, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_HOFF, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_HOFF, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_HOFF, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_XE, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_XE, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_XE, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_XE, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向北)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_YN, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向北)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_YN, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向北)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_YN, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向北)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_YN, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "深度间隔(m)", formInfo->m_pTvd->objViewInfo->m_DepSpace, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "等分个数(=0按深度间隔)", formInfo->m_pTvd->objViewInfo->m_DepSpaceN, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "侧视角(度)", formInfo->m_pTvd->objViewInfo->m_CsAngle, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "标题名", formInfo->m_pTvd->m_Title_ltgj, QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "最大位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy1, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "起始垂深(m)", formInfo->m_pTvd->objViewInfo->m_LTTTVD, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "垂深间隔(m)", formInfo->m_pTvd->objViewInfo->m_DepSpace1, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "是否绘制立体框", formInfo->m_pTvd->objViewInfo->m_is3DFrame, QVariant::Bool);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle_X, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "侧视角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "倾斜角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle_Z, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "竖线间隔", formInfo->m_pTvd->objViewInfo->m_LTTTVD, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视南北间隔数", formInfo->m_pTvd->objViewInfo->m_YD, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视东西间隔数", formInfo->m_pTvd->objViewInfo->m_XD, QVariant::Double);
QStringList listType;
listType.append("NONE");
listType.append("狗腿度");
listType.append("井经");
listType.append("成像");
_CreateEnumPropertyItem("立体轨迹图参数", "附加属性类型", formInfo->m_pTvd->objViewInfo->m_IsDrawProperty, listType);
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线1", formInfo->m_pTvd->objViewInfo->m_CurveName1, QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线2", formInfo->m_pTvd->objViewInfo->m_CurveName2, QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "调色板参数设置",0, QVariant::Int);//formInfo->m_pTvd->objViewInfo->m_ColorTableIndex
_CreateVariantPropertyItem("立体轨迹图参数", "直径放大系数", formInfo->m_pTvd->objViewInfo->m_calscale, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "波形基值", formInfo->m_pTvd->objViewInfo->m_baseval, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "波形最大值", formInfo->m_pTvd->objViewInfo->m_maxval, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "连续填充", formInfo->m_pTvd->objViewInfo->m_isBlock, QVariant::Bool);
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 1, QVariant::Int);
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("绘图参数", "最小深度间隔(m)", formInfo->m_pTvd->objViewInfo->m_Rlev, QVariant::Double);
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
//当前属性类型
m_strCurrentProperty = Tvd_Property;
}
void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, QString myLith, QString myOil, QString myColor)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdGeoLith->mPlot->m_formTrack->getFormInfoByParameters(tdGeoLith->mPlot->m_strUuid, tdGeoLith->mPlot->m_strWellName,
tdGeoLith->mPlot->m_strTrackName, tdGeoLith->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
//显示
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);
}
//当前属性类型
m_strCurrentProperty = GeoLithItem_Property;
m_tdGeoLith = tdGeoLith;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = ::GetMudSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
myLith.replace("\\","/");
//
if(myLith.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "岩性", myLith, VariantManager::filePathTypeId());
}
else{
_CreateVariantPropertyItem("当前项", "岩性", strDefaultPath, VariantManager::filePathTypeId());
}
//只能选择自己的符号,不能选择其他。
strDefaultPath = ::GetGasSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
myOil.replace("\\","/");
//
if(myOil.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "油气", myOil, VariantManager::filePathTypeId());
}
else
{
_CreateVariantPropertyItem("当前项", "油气", strDefaultPath, VariantManager::filePathTypeId());
}
//只能选择自己的符号,不能选择其他。
strDefaultPath = ::GetColorSymbolDir();
//符号统一
strDefaultPath.replace("\\","/");
myColor.replace("\\","/");
//
if(myColor.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "颜色", myColor, VariantManager::filePathTypeId());
}
else
{
_CreateVariantPropertyItem("当前项", "颜色", strDefaultPath, VariantManager::filePathTypeId());
}
}
//气测/FMT/射孔/文本
void PropertyWidget::initJiegutextProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
QStringList listAliasName = formInfo->m_strAliasName.split("/");//QString字符串分割函数
//
for(int i=0; i< formInfo->m_FieldNameList.size(); i++)
{
bool bCkeck = false;
if(listAliasName.contains(formInfo->m_FieldNameList[i]))
{
bCkeck = true;
}
_CreateVariantPropertyItem("表格数据", formInfo->m_FieldNameList[i], bCkeck, QVariant::Bool);
}
m_strCurrentProperty = Jiegutext_Property;
}
void PropertyWidget::initJiegutextItemProperty(TransparentDraggableJiegutext* tdJiegutext, double lower, double upper)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdJiegutext->mPlot->m_formTrack->getFormInfoByParameters(tdJiegutext->mPlot->m_strUuid, tdJiegutext->mPlot->m_strWellName,
tdJiegutext->mPlot->m_strTrackName, tdJiegutext->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
QStringList listAliasName = formInfo->m_strAliasName.split("/");//QString字符串分割函数
//
for(int i=0; i< formInfo->m_FieldNameList.size(); i++)
{
bool bCkeck = false;
if(listAliasName.contains(formInfo->m_FieldNameList[i]))
{
bCkeck = true;
}
_CreateVariantPropertyItem("表格数据", formInfo->m_FieldNameList[i], bCkeck, QVariant::Bool);
}
}
//当前属性类型
m_strCurrentProperty = JiegutextItem_Property;
m_tdJiegutext = tdJiegutext;
//
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
}
//沉积相
void PropertyWidget::initFacProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
//显示
_CreateVariantPropertyItem("数据", "绘制相", formInfo->m_bDrawFac, QVariant::Bool);
_CreateVariantPropertyItem("数据", "绘制亚相", formInfo->m_bDrawPhase, QVariant::Bool);
_CreateVariantPropertyItem("数据", "微相名称", formInfo->m_bDrawMFacName, QVariant::Bool);
m_strCurrentProperty = Fac_Property;
}
//套管组件
void PropertyWidget::initTubingProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
// _CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_vmin, QVariant::Double);
// _CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_vmax, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "绘制结构", formInfo->m_bDrawStruct_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制管柱", formInfo->m_bDrawTubing_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制工具", formInfo->m_bDrawTools_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "标注工具", formInfo->m_bDrawSPTool_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制接箍", formInfo->m_bDrawCCL_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "油管外径", formInfo->m_Oguan_Tubing, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "套管内径", formInfo->m_inD_Tubing, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "套管外径", formInfo->m_OutD_Tubing, QVariant::Double);
m_strCurrentProperty = Tubing_Property;
}
void PropertyWidget::initTubingItemProperty(TransparentDraggableGuan* tdGuan, double lower, double upper, QString strResult)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdGuan->mPlot->m_formTrack->getFormInfoByParameters(tdGuan->mPlot->m_strUuid, tdGuan->mPlot->m_strWellName,
tdGuan->mPlot->m_strTrackName, tdGuan->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
//
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
// _CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_vmin, QVariant::Double);
// _CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_vmax, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "绘制结构", formInfo->m_bDrawStruct_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制管柱", formInfo->m_bDrawTubing_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制工具", formInfo->m_bDrawTools_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "标注工具", formInfo->m_bDrawSPTool_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "绘制接箍", formInfo->m_bDrawCCL_Tubing, QVariant::Bool);
_CreateVariantPropertyItem("绘制方式", "油管外径", formInfo->m_Oguan_Tubing, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "套管内径", formInfo->m_inD_Tubing, QVariant::Double);
_CreateVariantPropertyItem("绘制方式", "套管外径", formInfo->m_OutD_Tubing, QVariant::Double);
}
//当前属性类型
m_strCurrentProperty = TubingItem_Property;
m_tdGuan = tdGuan;
//
_CreateVariantPropertyItem("当前项", "深度(m)", -(upper+lower)/2.0, QVariant::Double);
//只能选择自己的符号,不能选择其他。
QString strDefaultPath = GetSymbolDir()+"管柱组件";
//符号统一
strDefaultPath.replace("\\","/");
strResult.replace("\\","/");
//
if(strResult.contains(strDefaultPath))
{
_CreateVariantPropertyItem("当前项", "组件类型", strResult, VariantManager::filePathTypeId());
}
else {
_CreateVariantPropertyItem("当前项", "组件类型", strDefaultPath, VariantManager::filePathTypeId());
}
}
void PropertyWidget::initPlObjectProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("数据", "数据名称", formInfo->m_strAliasName, QVariant::String);
QStringList listType;
listType.append("曲线型数据");
listType.append("表格型数据");
_CreateEnumPropertyItem("数据", "数据类型", formInfo->m_pl_dataType, listType);
_CreateVariantPropertyItem("数据", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("数据", "井文件名称", formInfo->m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("数据", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String);
_CreateVariantPropertyItem("数据", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
_CreateVariantPropertyItem("字体", "名称", formInfo->m_strAliasNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "刻度", formInfo->m_strAliasName, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_strAliasName, QVariant::Font);
_CreateVariantPropertyItem("控制曲线", "曲线名", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("控制曲线", "最小值", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("控制曲线", "最大值", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "扇形", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆半径(cm)", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆线颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆线宽度", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "是否填充", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "填充颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线数", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "统计线高度(cm)", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线粗细", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "是否绘制标注?", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "绘制直方图?", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("基线", "宽度", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("基线", "颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "统计间隔", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "最小倾角", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "最大倾角", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "高导缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "高阻缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "网状缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "诱导缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "层理", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "侵蚀面", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "孔洞", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "气孔", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "砾石", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "结核", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "团块", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "断层", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "垂直缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "自定义1", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "自定义2", formInfo->m_strAliasName, QVariant::String);
m_strCurrentProperty = PL_OBJECT_PROPERTY;
}
void PropertyWidget::changedPlObjectProperty(QString strProperty, QVariant varVal)
{
if ("数据名称" == strProperty)
{
m_formInfo->m_strAliasName = varVal.toString();
this->m_formInfo->repaint();
}
if ("显示单位" == strProperty)
{
this->m_formInfo->m_strUnit = varVal.toString();
this->m_formInfo->repaint();
}
else if ("例区高度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_headHeight = temp;
this->m_formInfo->setFixedHeight(temp);
}
else if ("名称" == strProperty)
{
QFont newFont = varVal.value<QFont>();
this->m_formInfo->m_strAliasNameFont = newFont;
this->m_formInfo->repaint();
}
else if ("单位" == strProperty)
{
QFont temp = varVal.value<QFont>();
this->m_formInfo->m_strUnitFont = temp;
this->m_formInfo->repaint();
}
}
void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal)
{
if ("显示单位" == strProperty)
{
this->m_formInfo->m_strUnit = varVal.toString();
this->m_formInfo->repaint();
}
else if ("主刻度线长度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_sdMajorTickLineLength = temp;
}
else if ("主刻度线宽度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_sdMajorTickLineWidth = temp;
}
else if ("次刻度线长度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_sdMinorTickLineLength = temp;
}
else if ("次刻度线宽度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_sdMinorTickLineWidth = temp;
}
else if ("标尺颜色" == strProperty)
{
QColor newColor = varVal.value<QColor>();
this->m_formInfo->m_sdRulerColor = newColor;
}
else if ("间隔" == strProperty)
{
double temp = varVal.toDouble();
// 应用到Y轴
this->m_formInfo->m_sdInterval = temp;
}
else if ("标注字体" == strProperty)
{
QFont newFont = varVal.value<QFont>();
this->m_formInfo->m_sdLabelFont = newFont;
}
else if ("旋转(°)" == strProperty)
{
double temp = varVal.toDouble();
this->m_formInfo->m_sdRotationAngle = temp;
}
else if ("斜深" == strProperty)
{
bool temp = varVal.toBool();
this->m_formInfo->m_sdMeasuredDepth = temp;
}
else if ("单位" == strProperty)
{
QFont temp = varVal.value<QFont>();
this->m_formInfo->m_strUnitFont = temp;
this->m_formInfo->repaint();
}
else if ("头部高度" == strProperty)
{
int temp = varVal.toInt();
this->m_formInfo->m_headHeight = temp;
this->m_formInfo->setFixedHeight(temp);
}
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;
}
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;
}
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;
}
else if ("垂深" == strProperty)
{
bool temp = varVal.toBool();
this->m_formInfo->m_sdVerticalDepth = temp;
}
else if ("海拔垂深" == strProperty)
{
bool temp = varVal.toBool();
this->m_formInfo->m_sdElevationVerticalDepth = temp;
}
}