#include "PropertyWidget.h" #include #include #include #include #include #include "CallManage.h" #include "geometryutils.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 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 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(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); } else if("字体" == m_propertyData[pProperty]) { //字体 // 假设variant已经被设置为包含QColor QFont newFont = variant.value(); m_formInfo->m_curveNameFont = newFont; m_formInfo->update(); } else if("颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); 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(); 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("例区高度(cm)" == m_propertyData[qtProperty]) { } } void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVariant &qVariant) { if("顶深(m)" == m_propertyData[qtProperty]) { if(m_tdImage) { double upper = qVariant.value(); m_tdImage->setUpper(-upper); //保存 m_tdImage->mPlot->SaveToSLFImage(); } } else if("底深(m)" == m_propertyData[qtProperty]) { if(m_tdImage) { double lower = qVariant.value(); 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(); 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(); 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::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(); // 设置字体 m_fromTop->m_font = newFont; } else if("道头字颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); 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(); 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(); 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(); 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(); m_tdText->setUpper(-upper); //保存 m_tdText->mPlot->SaveToSLF_Text(); } } else if("底深(m)" == m_propertyData[pProperty]) { //qDebug() << "底深(m)->改变"; if(m_tdText) { double lower = variant.value(); m_tdText->setLower(-lower); //保存 m_tdText->mPlot->SaveToSLF_Text(); } } else if("文字结论" == m_propertyData[pProperty]) { //qDebug() << "文字结论->改变"; if(m_tdText) { QString newResult = variant.value(); 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(); m_tdText->wordfont = newFont; m_tdText->mItemTitle->setFont(newFont); m_tdText->mPlot->replot(); } else if("字体颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); m_tdText->fontColor = newColor; m_tdText->mItemTitle->setColor(newColor); m_tdText->mPlot->replot(); } else if("背景色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); 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(); m_tdLayer->setUpper(-upper); //保存 m_tdLayer->mPlot->SaveToSLF_Layer(); } } else if("底深(m)" == m_propertyData[pProperty]) { //qDebug() << "底深(m)->改变"; if(m_tdLayer) { double lower = variant.value(); m_tdLayer->setLower(-lower); //保存 m_tdLayer->mPlot->SaveToSLF_Layer(); } } else if("文字结论" == m_propertyData[pProperty]) { //qDebug() << "文字结论->改变"; if(m_tdLayer) { QString newResult = variant.value(); 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(); m_tdLayer->wordfont = newFont; m_tdLayer->mItemTitle->setFont(newFont); m_tdLayer->mPlot->replot(); } else if("字体颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); m_tdLayer->fontColor = newColor; m_tdLayer->mItemTitle->setColor(newColor); m_tdLayer->mPlot->replot(); } else if("背景色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); 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(); m_tdLayer->setLith(newResult); // QCPRange currentRange = m_tdLayer->getRange(); m_tdLayer->setRange(currentRange.lower, currentRange.upper); } } else if (m_strCurrentProperty == JieshiItem_Property) { if (m_tdJieshi) { if ("顶深(m)" == m_propertyData[pProperty]) { double upper = variant.value(); m_tdJieshi->setDragRect(2, -upper); } else if ("底深(m)" == m_propertyData[pProperty]) { double lower = variant.value(); 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(); m_tdGujing->setUpper(-upper); //保存 m_tdGujing->mPlot->SaveToSLF_Gujing(); } } else if("底深(m)" == m_propertyData[pProperty]) { //qDebug() << "底深(m)->改变"; if(m_tdGujing) { double lower = variant.value(); m_tdGujing->setLower(-lower); //保存 m_tdGujing->mPlot->SaveToSLF_Gujing(); } } else if("固井结论" == m_propertyData[pProperty]) { //qDebug() << "固井结论->改变"; if(m_tdGujing) { QString newResult = variant.value(); m_tdGujing->setResult(newResult); // QCPRange currentRange = m_tdGujing->getRange(); m_tdGujing->setRange(currentRange.lower, currentRange.upper); //保存 m_tdGujing->mPlot->SaveToSLF_Gujing(); } } } else if (m_strCurrentProperty == ImageItem_Property) { //先处理通用属性 CommonPropertyChanged(pProperty, variant); changedYxzpItemProperty(pProperty, variant); } else if (m_strCurrentProperty == SwallCoreItem_Property) { //先处理通用属性 CommonPropertyChanged(pProperty, variant); //井壁取心item if("深度" == m_propertyData[pProperty]) { //qDebug() << "深度->改变"; if(m_tdSwallCore) { double lower = variant.value(); // 设置初始范围 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(); m_tdSwallCore->setLith(newResult); // QCPRange currentRange = m_tdSwallCore->getRange(); m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); //保存 m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); } } else if("油气" == m_propertyData[pProperty]) { //qDebug() << "油气->改变"; if(m_tdSwallCore) { QString newResult = variant.value(); m_tdSwallCore->setOil(newResult); // QCPRange currentRange = m_tdSwallCore->getRange(); m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); //保存 m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); } } else if("颜色" == m_propertyData[pProperty]) { //qDebug() << "颜色->改变"; if(m_tdSwallCore) { QString ColorImage = variant.value(); 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 if("起始位置" == m_propertyData[pProperty]) { //qDebug() << "起始位置->改变"; if(m_tdSwallCore) { double Sideleft = variant.value(); 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(); m_tdGeoLith->setUpper(-upper); //保存 m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); } } else if("底深(m)" == m_propertyData[pProperty]) { //qDebug() << "底深(m)->改变"; if(m_tdGeoLith) { double lower = variant.value(); m_tdGeoLith->setLower(-lower); //保存 m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); } } else if("岩性" == m_propertyData[pProperty]) { //qDebug() << "岩性->改变"; if(m_tdGeoLith) { QString newResult = variant.value(); 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 if("油气" == m_propertyData[pProperty]) { //qDebug() << "油气->改变"; if(m_tdGeoLith) { QString newResult = variant.value(); m_tdGeoLith->setOil(newResult); // QCPRange currentRange = m_tdGeoLith->getRange(); m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); //保存 m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); } } else if("颜色" == m_propertyData[pProperty]) { //qDebug() << "颜色->改变"; if(m_tdGeoLith) { QString newResult = variant.value(); 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 if("含油占比(1~8)" == m_propertyData[pProperty]) { //qDebug() << "含油占比(1~8)->改变"; double dOilZhan = variant.value(); 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(); 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(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); } else if("字体" == m_propertyData[pProperty]) { //字体 // 假设variant已经被设置为包含QColor QFont newFont = variant.value(); m_formInfo->m_curveNameFont = newFont; m_formInfo->update(); } else if("颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); m_formInfo->m_lineColor = newColor; m_formInfo->update(); } else if("选择井曲线" == m_propertyData[pProperty]) { QString sFilePath = variant.value(); 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(); // 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; i0) { 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(); 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(); m_tdJiegutext->setLower(-lower); //保存 m_tdJiegutext->mPlot->SaveToSLF_Jiegutext(); //重新加载数据 m_tdJiegutext->ReLoadValues(); } } else if("显示名称" == m_propertyData[pProperty]) { QString newAliasName = variant.value(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); } else if("字体" == m_propertyData[pProperty]) { //字体 // 假设variant已经被设置为包含QColor QFont newFont = variant.value(); m_formInfo->m_curveNameFont = newFont; m_formInfo->update(); } else if("颜色" == m_propertyData[pProperty]) { QColor newColor = variant.value(); m_formInfo->m_lineColor = newColor; m_formInfo->update(); } else if("选择井曲线" == m_propertyData[pProperty]) { QString sFilePath = variant.value(); 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(); // 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; i0) { 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(); 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(); m_formInfo->m_strUnit = newUnit; m_formInfo->update(); } else if("左刻度" == m_propertyData[pProperty]) { double newLeftScale = variant.value(); 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(); m_formInfo->m_vmax = newRightScale; emit CallManage::getInstance()->sig_ChangeRightScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale); } } 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); } if("深度比例尺" == m_propertyData[pProperty]) { //qDebug() << "深度比例尺->改变"; //当前属性类型 if(m_strCurrentProperty == Widget_Property) { 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() << "自定义比例尺->改变"; //当前属性类型 if(m_strCurrentProperty == Widget_Property) { int iScale = 200; QString newScale = variant.value(); //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)" == m_propertyData[pProperty]) { //qDebug() << "开始深度(m)->改变"; //当前属性类型 if(m_strCurrentProperty == Well_Property) { double newStartDepth = variant.value(); 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)->改变"; //当前属性类型 if(m_strCurrentProperty == Well_Property) { double newEndDepth = variant.value(); 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_propertyData[pProperty]) { //qDebug() << "显示名称->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { QString newAliasName = variant.value(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); } } else if("显示单位" == m_propertyData[pProperty]) { //qDebug() << "显示单位->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { QString newUnit = variant.value(); m_formInfo->m_strUnit = newUnit; m_formInfo->update(); } } else if("左刻度" == m_propertyData[pProperty]) { //qDebug() << "左刻度->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { double newLeftScale = variant.value(); 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() << "右刻度->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { double newRightScale = variant.value(); 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() << "刻度类型->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { 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]) { if (m_strCurrentProperty == Curve_Property) { m_formInfo->m_nLeftCross = variant.toInt(); emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid); } } else if ("右跨道个数" == m_propertyData[pProperty]) { if (m_strCurrentProperty == Curve_Property) { m_formInfo->m_nRightCross = variant.toInt(); emit CallManage::getInstance()->sig_ChangeCross(m_strUuid, m_strTrackUuid); } } else if("颜色" == m_propertyData[pProperty]) { //qDebug() << "颜色->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { //曲线颜色 // 假设variant已经被设置为包含QColor QColor newColor = variant.value(); emit CallManage::getInstance()->sig_ChangeLineColor(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newColor); } } else if("线宽" == m_propertyData[pProperty]) { //qDebug() << "线宽->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { double newWidth = variant.value(); emit CallManage::getInstance()->sig_ChangeLineWidth(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newWidth); } } else if("线型" == m_propertyData[pProperty]) { //qDebug() << "线型->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { Qt::PenStyle newStyle = Qt::SolidLine; int iStyle = variant.value(); 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() << "曲线->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { bool bDraw = variant.value(); emit CallManage::getInstance()->sig_ChangeDrawLine(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw); } } else if("杆状" == m_propertyData[pProperty]) { //qDebug() << "杆状->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { bool bDraw = variant.value(); emit CallManage::getInstance()->sig_ChangeDrawGan(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw); } } else if("点状" == m_propertyData[pProperty]) { //qDebug() << "点状->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { bool bDraw = variant.value(); emit CallManage::getInstance()->sig_ChangeDrawPoint(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw); } } else if("绘制对称曲线" == m_propertyData[pProperty]) { //qDebug() << "绘制对称曲线->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { bool bDraw = variant.value(); emit CallManage::getInstance()->sig_ChangeDrawSymmetry(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, bDraw); } } else if("填充模式" == m_propertyData[pProperty]) { //qDebug() << "填充模式->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("填充类型" == m_propertyData[pProperty]) { //qDebug() << "填充类型->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("目标曲线" == m_propertyData[pProperty]) { //qDebug() << "目标曲线->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("填充颜色" == m_propertyData[pProperty]) { //qDebug() << "填充颜色->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("填充岩性" == m_propertyData[pProperty]) { //qDebug() << "填充岩性->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("岩性前景色" == m_propertyData[pProperty]) { //qDebug() << "岩性前景色->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("岩性背景色" == m_propertyData[pProperty]) { //qDebug() << "岩性背景色->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } else if("头部图例" == m_propertyData[pProperty]) { //qDebug() << "头部图例->改变"; //当前属性类型 if(m_strCurrentProperty == Curve_Property) { ChangFillProperty(); } } //图头--------------------------- else if("图例" == m_propertyData[pProperty]) { //qDebug() << "图例->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { QString newSvg = variant.value(); m_item->setData(Qt::UserRole+1, newSvg); // 图片路径 //图头项改变 ChangHeadItemProperty(); } } else if("图例宽(cm)" == m_propertyData[pProperty]) { //qDebug() << "图例宽(cm)->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { double newWidth = variant.value(); m_item->setData(Qt::UserRole+2, newWidth); // 图片路径 m_colWidth_Img = newWidth; //图头项改变 ChangHeadItemProperty(); } } else if("图例高(cm)" == m_propertyData[pProperty]) { //qDebug() << "图例高(cm)->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { double newHight = variant.value(); m_item->setData(Qt::UserRole+3, newHight); // 图片路径 m_rowHeight_Img = newHight; //图头项改变 ChangHeadItemProperty(); } } else if("背景颜色" == m_propertyData[pProperty]) { //qDebug() << "背景颜色->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { //背景颜色 // 假设variant已经被设置为包含QColor QColor newColor = variant.value(); // 设置字体颜色 QBrush brush(newColor); // 使用Qt::red预定义颜色 m_formHead->m_bRefresh=false; m_item->setBackground(brush); } } else if("列宽(cm)" == m_propertyData[pProperty]) { //qDebug() << "列宽(cm)->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { double newWidth = variant.value(); 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)->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { double newHight = variant.value(); 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() << "内容->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { QString newText = variant.value(); m_formHead->m_bRefresh=false; m_item->setText(newText); } } else if("方向" == m_propertyData[pProperty]) { //qDebug() << "方向->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { QString newDirection = pProperty->valueText(); if(newDirection=="垂直") { } else{ //m_item-> } } } else if("字体颜色" == m_propertyData[pProperty]) { //qDebug() << "字体颜色->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { //字体颜色 // 假设variant已经被设置为包含QColor QColor newColor = variant.value(); // 设置字体颜色 QBrush brush(newColor); // 使用Qt::red预定义颜色 m_formHead->m_bRefresh=false; m_item->setForeground(brush); } } else if("字体" == m_propertyData[pProperty]) { //qDebug() << "字体->改变"; //当前属性类型 if(m_strCurrentProperty == Head_Property) { //字体 // 假设variant已经被设置为包含QColor QFont newFont = variant.value(); // 设置字体 m_formHead->m_bRefresh=false; m_item->setFont(newFont); } } else if("间隔" == m_propertyData[pProperty]) { } } 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 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; ihasValue()) { newColor = pProperty->value().value(); } //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(); } //qDebug() << "岩性前景色->"; } else if(it.value()=="岩性背景色") { QtVariantProperty *pProperty = (QtVariantProperty*)it.key(); if(pProperty->hasValue()) { backColor = pProperty->value().value(); } //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::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); return item; } void PropertyWidget::_CreateVariantPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, int propertyType, double dMin, double dMax) { QtProperty *pGroupItem =NULL; { QMap::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::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::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 listMin, QList 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("对数"); // _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("岩性填充", "头部图例", 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("通常", "头部高度(cm)", formInfo->m_bVerticaDrawing, QVariant::Double); _CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("通常", "显示单位", formInfo->m_sdUnit, QVariant::String); _CreateVariantPropertyItem("通常", "标尺颜色", formInfo->m_sdRulerColor, QVariant::Color); _CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("字体", "单位", formInfo->m_nJg, QVariant::String); _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); _CreateVariantPropertyItem("深度标注", "斜深位置", formInfo->m_sdMeasuredDepthPosition, QVariant::String); _CreateVariantPropertyItem("深度标注", "垂深位置", formInfo->m_sdVerticalDepthPosition, QVariant::String); _CreateVariantPropertyItem("深度标注", "海拔垂深位置", formInfo->m_sdElevationVerticalDepthPosition, QVariant::String); _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); } 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{ 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); } } 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); if (nType == 0 || nType == 1) { _CreateVariantPropertyItem("波形绘制参数", "波列基值", formInfo->m_fWaveBase, QVariant::Double); _CreateVariantPropertyItem("波形绘制参数", "波形间隔", formInfo->m_nWaveJg, QVariant::Int); _CreateVariantPropertyItem("波形绘制参数", "波形高度", formInfo->m_fWaveHei, QVariant::Double); _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); _CreateVariantPropertyItem("当前项", "岩性", LithologyImage, VariantManager::filePathTypeId()); _CreateVariantPropertyItem("当前项", "油气", OilGasImage, VariantManager::filePathTypeId()); _CreateVariantPropertyItem("当前项", "颜色", ColorImage, 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); _CreateVariantPropertyItem("当前项", "固井结论", strResult, VariantManager::filePathTypeId()); } void PropertyWidget::initImageProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_yxzpExampleAreaHeight, 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("通常", "例区高度(cm)", formInfo->m_yxzpExampleAreaHeight, 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); // _CreateVariantPropertyItem("边框属性", "线型", borderStyle, QVariant::String); 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::initTvdProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String); _CreateVariantPropertyItem("绘制图形对象", "靶心", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "靶心参数表", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "井斜数据表", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "俯视图", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "侧视图深度在左边", false, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "侧视图(水平位移)", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "侧视图(向东)", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "侧视图(向北)", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "侧视图(侧视角)", false, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "立体轨迹图", true, QVariant::Bool); _CreateVariantPropertyItem("绘制图形对象", "绘制标注信息", true, QVariant::Bool); _CreateVariantPropertyItem("边框线型", "线宽", 3, QVariant::Int); _CreateVariantPropertyItem("边框线型", "颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("格线线型", "线宽", 3, QVariant::Int); _CreateVariantPropertyItem("格线线型", "颜色", QColor(127, 127, 127), QVariant::Color); _CreateVariantPropertyItem("轨迹线型", "线宽", 3, QVariant::Int); _CreateVariantPropertyItem("轨迹线型", "颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("靶心半径线型", "线宽", 3, QVariant::Int); _CreateVariantPropertyItem("靶心半径线型", "颜色", QColor(255, 0, 0), QVariant::Color); _CreateVariantPropertyItem("靶心连线线型", "线宽", 3, QVariant::Int); _CreateVariantPropertyItem("靶心连线线型", "颜色", QColor(255, 0, 0), QVariant::Color); _CreateVariantPropertyItem("字体", "道头字体", QFont(), QVariant::Font); _CreateVariantPropertyItem("字体", "道头颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("字体", "标题字体", QFont(), QVariant::Font); _CreateVariantPropertyItem("字体", "标题颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("字体", "数据表字体", QFont(), QVariant::Font); _CreateVariantPropertyItem("字体", "数据表颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("字体", "刻度字体", QFont(), QVariant::Font); _CreateVariantPropertyItem("字体", "刻度颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("字体", "注释字体", QFont(), QVariant::Font); _CreateVariantPropertyItem("字体", "注释颜色", QColor(0, 0, 0), QVariant::Color); _CreateVariantPropertyItem("井斜数据表参数", "标题名", "井连续井斜仪测量数据表", QVariant::String); _CreateVariantPropertyItem("井斜数据表参数", "头记录高度(cm)", 1.6, QVariant::Double); _CreateVariantPropertyItem("井斜数据表参数", "数据记录高度(cm)", 0.8, QVariant::Double); _CreateVariantPropertyItem("俯视图参数", "标题名", "井井眼俯视图", QVariant::String); _CreateVariantPropertyItem("俯视图参数", "东西位移最小刻度", -100, QVariant::Double); _CreateVariantPropertyItem("俯视图参数", "东西位移最大刻度", 100, QVariant::Double); _CreateVariantPropertyItem("俯视图参数", "南北位移最小刻度", -100, QVariant::Double); _CreateVariantPropertyItem("俯视图参数", "南北位移最大刻度", 100, QVariant::Double); _CreateVariantPropertyItem("俯视图参数", "是否绘制闭合线", false, QVariant::Bool); _CreateVariantPropertyItem("侧视图参数", "标题名", "井井眼侧视图", QVariant::String); _CreateVariantPropertyItem("侧视图参数", "高宽相同", false, QVariant::Bool); _CreateVariantPropertyItem("侧视图(水平位移)", "最大侧视位移(m)", 100, QVariant::Double); _CreateVariantPropertyItem("侧视图(水平位移)", "最小侧视位移(m)", -100, QVariant::Double); _CreateVariantPropertyItem("侧视图(水平位移)", "最大垂深(m)", 10000, QVariant::Double); _CreateVariantPropertyItem("侧视图(水平位移)", "最小垂深(m)", 0, QVariant::Double); _CreateVariantPropertyItem("侧视图(向东)", "最大侧视位移(m)", 100, QVariant::Double); _CreateVariantPropertyItem("侧视图(向东)", "最小侧视位移(m)", -100, QVariant::Double); _CreateVariantPropertyItem("侧视图(向东)", "最大垂深(m)", 10000, QVariant::Double); _CreateVariantPropertyItem("侧视图(向东)", "最小垂深(m)", 0, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "最大侧视位移(m)", 100, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "最小侧视位移(m)", -100, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "最大垂深(m)", 10000, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "最小垂深(m)", 0, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "深度间隔(m)", 100, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "等分个数(=0按深度间隔)", 0, QVariant::Double); _CreateVariantPropertyItem("侧视图(侧视角)", "侧视角(度)", 90, QVariant::Double); // _CreateVariantPropertyItem("立体轨迹图参数", "标题名", "", QVariant::String); _CreateVariantPropertyItem("立体轨迹图参数", "最大位移(m)", 100, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "起始垂深(m)", 0, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "垂深间隔(m)", 100, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "是否绘制立体框", formInfo->m_is3DFrame, QVariant::Bool); _CreateVariantPropertyItem("立体轨迹图参数", "俯视角(度)", 10, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "侧视角(度)", 45, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "倾斜角(度)", 0, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "竖线间隔", 5, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "俯视南北间隔数", 20, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "俯视东西间隔数", 20, QVariant::Double); QStringList listType; listType.append("NONE"); listType.append("狗腿度"); listType.append("井经"); listType.append("成像"); _CreateEnumPropertyItem("立体轨迹图参数", "附加属性类型", listType.indexOf("NONE"), listType); _CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线1", "", QVariant::String); _CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线2", "", QVariant::String); _CreateVariantPropertyItem("立体轨迹图参数", "调色板参数设置",0, QVariant::Int); _CreateVariantPropertyItem("立体轨迹图参数", "直径放大系数", 1, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "波形基值", 0, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "波形最大值", 500, QVariant::Double); _CreateVariantPropertyItem("立体轨迹图参数", "连续填充", false, QVariant::Bool); _CreateVariantPropertyItem("立体闭合方位线型", "线宽", 1, QVariant::Int); _CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color); _CreateVariantPropertyItem("绘图参数", "最小深度间隔(m)", 5, 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, const QString myLith, const QString myOil, const 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); _CreateVariantPropertyItem("当前项", "岩性", myLith, VariantManager::filePathTypeId()); _CreateVariantPropertyItem("当前项", "油气", myOil, VariantManager::filePathTypeId()); _CreateVariantPropertyItem("当前项", "颜色", myColor, 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_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); m_strCurrentProperty = Tubing_Property; } void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal) { 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(); 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(); 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; } }