Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
9595301021
|
|
@ -38,6 +38,13 @@ signals:
|
|||
void sig_OpenProject(QString strName);//打开项目
|
||||
void sig_CloseProject();//关闭项目
|
||||
|
||||
void sig_ImportSingleWellLogData();//数据导入
|
||||
void sig_OutWellLogRound();//输出数据,数据导出
|
||||
|
||||
void sig_SaveAsPicture(); //导出长图
|
||||
void sig_SaveAsPdf(); //导出PDF
|
||||
void sig_SaveAsSvg(); //导出SVG
|
||||
|
||||
void sig_ShowParameterCard(QString strSlfName, QString strName);//参数表查看
|
||||
void sig_ShowCurve(QMap<QString,QList<QString>> mapShowObject);//曲线数据查看
|
||||
void sig_DepthShift(QString strSlfName, QString strName, double DepthOffset);//深度移动
|
||||
|
|
@ -256,6 +263,12 @@ signals:
|
|||
//改变套管组件属性,直径
|
||||
void sig_changeGuanD(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, double newD);
|
||||
|
||||
//改变蝌蚪图属性
|
||||
void sig_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//改变杆状图属性
|
||||
void sig_changeGanzhuangProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//
|
||||
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
||||
|
||||
|
|
|
|||
|
|
@ -1504,7 +1504,7 @@ void TranToAscii(CMemRdWt *mrw,QString Outfile,float sdep,float edep,float rlev,
|
|||
return;
|
||||
}
|
||||
FILE *fp;
|
||||
fp=fopen(Outfile.toStdString().c_str(),"wt+");
|
||||
fp=fopen(UTF8ToGBK(Outfile)/*Outfile.toStdString().c_str()*/,"wt+");
|
||||
if(fp==NULL)
|
||||
{
|
||||
QMessageBox::information(NULL,"提示","打开输出文件"+Outfile+"失败");
|
||||
|
|
@ -4333,7 +4333,7 @@ void TranSlf2Data(int FormatType,QMap <QString,vector<QString> > OutFileInfVec,O
|
|||
//如果输出文件目录不存在,先创建目录
|
||||
QFileInfo rFileInfo(Outfile);
|
||||
QDir rDir = rFileInfo.absoluteDir();
|
||||
if(!rDir.exists())rDir.mkpath(rFileInfo.absolutePath());
|
||||
if(!rDir.exists())rDir.mkpath(UTF8ToGBK(rFileInfo.absolutePath()));
|
||||
|
||||
if(FormatType<=3)
|
||||
TranToAscii(&mrw,Outfile,Outsdep,Outedep,Outrlev,NumObject,&OutInf[0],FormatType,IsCheck[5]);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,16 @@ void PropertyWidget::InitCurrentViewInfo(bool bAll)
|
|||
m_formHead = NULL;
|
||||
m_tableWidget = NULL;
|
||||
m_item = NULL;
|
||||
//
|
||||
m_tdGujing = NULL;
|
||||
m_tdImage = NULL;
|
||||
m_tdSwallCore = NULL;
|
||||
m_tdGeoLith = NULL;
|
||||
m_tdText = NULL;
|
||||
m_tdLayer = NULL;
|
||||
m_tdJiegutext = NULL;
|
||||
m_tdGuan = NULL;
|
||||
m_tdCorePhysics = NULL;
|
||||
//
|
||||
m_strUuid = "";
|
||||
m_strTrackUuid = "";
|
||||
|
|
@ -2362,7 +2371,13 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
//
|
||||
changedKedouProperty(m_propertyData[pProperty], variant);
|
||||
}
|
||||
|
||||
else if (m_strCurrentProperty == Ganzhuang_Property)//杆状图
|
||||
{
|
||||
//先处理通用属性
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
//
|
||||
changedGanzhuangProperty(m_propertyData[pProperty], variant);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -3189,6 +3204,11 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
|
|||
//蝌蚪图
|
||||
this->initKedouProperty(formInfo);
|
||||
}
|
||||
else if (m_strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
//杆状图
|
||||
this->initGanzhuangProperty(formInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->initTableProperty(formInfo);
|
||||
|
|
@ -5207,11 +5227,6 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo)
|
|||
_CreateVariantPropertyItem("曲线选择", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String);
|
||||
_CreateVariantPropertyItem("曲线选择", "可信度曲线", formInfo->m_pl_GradCurve, QVariant::String);
|
||||
//
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "深度字段", formInfo->m_rose_depth_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "方位字段", formInfo->m_rose_azimuth_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "倾角字段", formInfo->m_rose_dip_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "属性字段", formInfo->m_rose_attribute_field, QVariant::String);
|
||||
//
|
||||
_CreateVariantPropertyItem("蝌蚪符号", "圆半径", formInfo->m_nRadius, QVariant::Double);
|
||||
_CreateVariantPropertyItem("蝌蚪符号", "圆线宽度", formInfo->m_nCircleWidth, QVariant::Double);
|
||||
_CreateVariantPropertyItem("蝌蚪符号", "尾线长度", formInfo->m_nTailLen, QVariant::Double);
|
||||
|
|
@ -5225,6 +5240,11 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo)
|
|||
_CreateVariantPropertyItem("显示控制", "可信度2", formInfo->m_flGrad2, QVariant::Double);
|
||||
//
|
||||
_CreateVariantPropertyItem("显示控制(数据表)", "小数位数", formInfo->m_crack_decimal_digits, QVariant::Int);
|
||||
//
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "深度字段", formInfo->m_rose_depth_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "方位字段", formInfo->m_rose_azimuth_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "倾角字段", formInfo->m_rose_dip_field, QVariant::String);
|
||||
_CreateVariantPropertyItem("字段选择(数据表)", "属性字段", formInfo->m_rose_attribute_field, QVariant::String);
|
||||
// 分类
|
||||
this->loadClassifyProperty(formInfo);
|
||||
|
||||
|
|
@ -5238,8 +5258,6 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
|
|||
if ("名称" == strProperty)
|
||||
{
|
||||
QFont newFont = varVal.value<QFont>();
|
||||
// this->m_formInfo->m_strAliasNameFont = newFont;
|
||||
// this->m_formInfo->repaint();
|
||||
m_formInfo->m_curveNameFont = newFont;
|
||||
m_formInfo->update();
|
||||
}
|
||||
|
|
@ -5310,11 +5328,13 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
|
|||
else if ("最小倾角" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_minInclination = varVal.toDouble();
|
||||
this->m_formInfo->repaint();
|
||||
flag = true;
|
||||
}
|
||||
else if ("最大倾角" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_maxInclination = varVal.toDouble();
|
||||
this->m_formInfo->repaint();
|
||||
flag = true;
|
||||
}
|
||||
else if ("可信度1" == strProperty)
|
||||
|
|
@ -5357,102 +5377,178 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal)
|
|||
else if ("高导缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_highGap = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("高阻缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_highReservoir = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("网状缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_reticularFracture = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("诱导缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_inducedFracture = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("层理" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_bedLayer = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("侵蚀面" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_erosionSurface = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("孔洞" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_pore = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("气孔" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_vesicle = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("砾石" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_gravel = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("结核" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_nodule = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("团块" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_lumps = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("断层" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_fault = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("垂直缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_verticalFracture = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("自定义1" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_custom1 = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("自定义2" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_custom2 = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
|
||||
if(flag)
|
||||
{
|
||||
QVariantMap variantMap;
|
||||
// 必须用来判断当前道
|
||||
variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName;
|
||||
// 数据
|
||||
variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType;
|
||||
variantMap["m_pl_azimuthCurve"] = this->m_formInfo->m_pl_azimuthCurve;
|
||||
variantMap["m_pl_inclinationCurve"] = this->m_formInfo->m_pl_inclinationCurve;
|
||||
// 表数据
|
||||
variantMap["m_rose_depth_field"] = this->m_formInfo->m_rose_depth_field;
|
||||
variantMap["m_rose_azimuth_field"] = this->m_formInfo->m_rose_azimuth_field;
|
||||
variantMap["m_rose_dip_field"] = this->m_formInfo->m_rose_dip_field;
|
||||
variantMap["m_rose_attribute_field"] = this->m_formInfo->m_rose_attribute_field;
|
||||
// 控制曲线
|
||||
variantMap["m_pl_controlCurveName"] = this->m_formInfo->m_pl_controlCurveName;
|
||||
variantMap["m_pl_controlMinValue"] = this->m_formInfo->m_pl_controlMinValue;
|
||||
variantMap["m_pl_controlMaxValue"] = this->m_formInfo->m_pl_controlMaxValue;
|
||||
// 字体
|
||||
variantMap["m_pl_fontScale"] = this->m_formInfo->m_pl_fontScale;
|
||||
// 蝌蚪图
|
||||
variantMap["m_rose_sector_enabled"] = this->m_formInfo->m_rose_sector_enabled;
|
||||
variantMap["m_rose_circle_radius_cm"] = this->m_formInfo->m_rose_circle_radius_cm;
|
||||
variantMap["m_rose_radiation_circle_enabled"] = this->m_formInfo->m_rose_radiation_circle_enabled;
|
||||
variantMap["m_rose_azimuth_print_interval"] = this->m_formInfo->m_rose_azimuth_print_interval;
|
||||
variantMap["m_rose_circle_line_color"] = this->m_formInfo->m_rose_circle_line_color;
|
||||
variantMap["m_rose_circle_line_width"] = this->m_formInfo->m_rose_circle_line_width;
|
||||
variantMap["m_rose_stress_line_color"] = this->m_formInfo->m_rose_stress_line_color;
|
||||
variantMap["m_rose_collapse_line_color"] = this->m_formInfo->m_rose_collapse_line_color;
|
||||
variantMap["m_rose_draw_radiation_line"] = this->m_formInfo->m_rose_draw_radiation_line;
|
||||
variantMap["m_rose_draw_wellbore_collapse"] = this->m_formInfo->m_rose_draw_wellbore_collapse;
|
||||
variantMap["m_rose_fill_enabled"] = this->m_formInfo->m_rose_fill_enabled;
|
||||
variantMap["m_rose_draw_annotation"] = this->m_formInfo->m_rose_draw_annotation;
|
||||
//
|
||||
variantMap["m_pl_minInclination"] = this->m_formInfo->m_pl_minInclination;
|
||||
variantMap["m_pl_maxInclination"] = this->m_formInfo->m_pl_maxInclination;
|
||||
|
||||
variantMap["m_strUuid"] = this->m_formInfo->m_strUuid;
|
||||
//emit CallManage::getInstance()->sig_changeRoseProperty(variantMap);
|
||||
emit CallManage::getInstance()->sig_changeKedouProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PropertyWidget::initGanzhuangProperty(FormInfo *formInfo)
|
||||
{
|
||||
|
||||
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
_CreateVariantPropertyItem("井文件名", "井文件名称", m_strSlfName, QVariant::String);
|
||||
|
||||
//
|
||||
_CreateVariantPropertyItem("曲线选择", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String);
|
||||
_CreateVariantPropertyItem("曲线选择", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String);
|
||||
_CreateVariantPropertyItem("曲线选择", "可信度曲线", formInfo->m_pl_GradCurve, QVariant::String);
|
||||
//
|
||||
_CreateVariantPropertyItem("倾角刻度", "最小倾角", formInfo->m_pl_minInclination, QVariant::Double);
|
||||
_CreateVariantPropertyItem("倾角刻度", "最大倾角", formInfo->m_pl_maxInclination, QVariant::Double);
|
||||
//
|
||||
_CreateVariantPropertyItem("可信度", "可信度1", formInfo->m_flGrad1, QVariant::Double);
|
||||
_CreateVariantPropertyItem("可信度", "可信度2", formInfo->m_flGrad2, QVariant::Double);
|
||||
//
|
||||
_CreateVariantPropertyItem("曲线单位", "显示单位", formInfo->m_strUnit, QVariant::String);
|
||||
//
|
||||
_CreateVariantPropertyItem("杆设置", "线长度", formInfo->m_nTailLen, QVariant::Double);
|
||||
_CreateVariantPropertyItem("杆设置", "线宽度", formInfo->m_nTailWidth, QVariant::Double);
|
||||
_CreateVariantPropertyItem("杆设置", "线颜色", formInfo->m_crTail, QVariant::Color);
|
||||
|
||||
m_strCurrentProperty = Ganzhuang_Property;
|
||||
}
|
||||
|
||||
void PropertyWidget::changedGanzhuangProperty(QString strProperty, QVariant varVal)
|
||||
{
|
||||
bool flag = false;
|
||||
|
||||
if ("方位曲线" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_azimuthCurve = varVal.toString();
|
||||
flag = true;
|
||||
}
|
||||
else if ("倾角曲线" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_inclinationCurve = varVal.toString();
|
||||
flag = true;
|
||||
}
|
||||
else if ("可信度曲线" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_GradCurve = varVal.toString();
|
||||
flag = true;
|
||||
}
|
||||
// 杆
|
||||
else if ("线长度" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_nTailLen = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("线宽度" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_nTailWidth = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("线颜色" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_crTail = varVal.value<QColor>();
|
||||
flag = true;
|
||||
}
|
||||
//
|
||||
else if ("最小倾角" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_minInclination = varVal.toDouble();
|
||||
this->m_formInfo->repaint();
|
||||
flag = true;
|
||||
}
|
||||
else if ("最大倾角" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_maxInclination = varVal.toDouble();
|
||||
this->m_formInfo->repaint();
|
||||
flag = true;
|
||||
}
|
||||
else if ("可信度1" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_flGrad1 = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("可信度2" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_flGrad2 = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("显示单位" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_strUnit = varVal.toString();
|
||||
this->m_formInfo->repaint();
|
||||
}
|
||||
|
||||
if(flag)
|
||||
{
|
||||
emit CallManage::getInstance()->sig_changeGanzhuangProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
#define TubingItem_Property "TubingItem_Property" //套管组件item
|
||||
|
||||
#define Kedou_Property "Kedou_Property" //蝌蚪图
|
||||
#define Ganzhuang_Property "Ganzhuang_Property" //杆状图
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
|
|
@ -262,6 +263,10 @@ public:
|
|||
void initKedouProperty(FormInfo *formInfo);
|
||||
void changedKedouProperty(QString strProName, QVariant val);
|
||||
|
||||
//杆状图
|
||||
void initGanzhuangProperty(FormInfo *formInfo);
|
||||
void changedGanzhuangProperty(QString strProName, QVariant val);
|
||||
|
||||
public slots:
|
||||
void SlotPropertyChanged(QtProperty *property, const QVariant &variant);
|
||||
void SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ FormDraw::FormDraw(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString)), this, SLOT(s_addTableLine(QString, QString, QString, QString, QString)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddGanZhuangTu(QString, QString, QString, QString, QString, int)), this, SLOT(s_addGanZuangTu(QString, QString, QString, QString, QString,int)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddGanZhuangTu(QString, QString, QString, QString, QString, int)), this, SLOT(s_addGanZhuangTu(QString, QString, QString, QString, QString,int)));
|
||||
|
||||
//井眼垮塌矢量图
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddJykt(QString, QString, QString, QString, QString, int)), this, SLOT(s_addJykt(QString, QString, QString, QString, QString,int)));
|
||||
|
|
@ -536,6 +536,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
|||
// 岩心照片
|
||||
displayImageData(lineObjInfo);
|
||||
}
|
||||
else if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
// 蝌蚪图、杆状图
|
||||
DisplayKedou_One(lineObjInfo);
|
||||
}
|
||||
}
|
||||
else if (strType == "JiegutextObject")
|
||||
{
|
||||
|
|
@ -1121,6 +1126,79 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
//蝌蚪图
|
||||
void FormDraw::DisplayKedou_One(QJsonObject lineObjInfo)
|
||||
{
|
||||
QString strSlfName = "";
|
||||
QString strWellName = "";
|
||||
QString strLineName = "";
|
||||
QString strAliasName = "";//显示名称
|
||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||
|
||||
if (lineObjInfo.contains("SlfName"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("SlfName");
|
||||
if (value.isString()) {
|
||||
strSlfName = value.toString();
|
||||
//qDebug() << "SlfName:" << strSlfName;
|
||||
|
||||
//
|
||||
QString slffilename = QString("");
|
||||
int ind = strSlfName.lastIndexOf('\\');
|
||||
int ind2 = strSlfName.lastIndexOf('/');
|
||||
if (ind2 > ind) ind = ind2;
|
||||
if (ind > -1) {
|
||||
slffilename = strSlfName.mid(ind + 1);
|
||||
strSlfName = slffilename;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lineObjInfo.contains("WellName"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("WellName");
|
||||
if (value.isString()) {
|
||||
strWellName = value.toString();
|
||||
//qDebug() << "WellName:" << strWellName;
|
||||
}
|
||||
}
|
||||
if (lineObjInfo.contains("LineName"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("LineName");
|
||||
if (value.isString()) {
|
||||
strLineName = value.toString();
|
||||
//qDebug() << "LineName:" << strLineName;
|
||||
}
|
||||
}
|
||||
if (lineObjInfo.contains("AliasName"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("AliasName");
|
||||
if (value.isString()) {
|
||||
strAliasName = value.toString();
|
||||
//qDebug() << "strAliasName:" << strAliasName;
|
||||
}
|
||||
}
|
||||
//字体
|
||||
if (lineObjInfo.contains("curveNameFont"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("curveNameFont");
|
||||
if (value.isString()) {
|
||||
curveNameFont.fromString(value.toString());
|
||||
//qDebug() << "strUnit:" << strUnit;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
//蝌蚪图、杆状
|
||||
this->addKedou(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, lineObjInfo);
|
||||
}
|
||||
}
|
||||
|
||||
//气测/FMT/射孔/文本
|
||||
void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
||||
{
|
||||
|
|
@ -2807,7 +2885,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (m_listTableName.contains(strLineName))
|
||||
if (m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return NULL;
|
||||
|
|
@ -2824,14 +2902,6 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
|
|||
if (strLineName == "FRAC_HOLE.TABLE")
|
||||
{
|
||||
//蝌蚪图
|
||||
curv->mKedou = true;
|
||||
//隐藏网格
|
||||
curv->xAxis->grid()->setVisible(false);
|
||||
curv->yAxis->grid()->setVisible(false);
|
||||
//
|
||||
curv->m_bRowGridVisible = false;
|
||||
curv->m_bColGridVisible = false;
|
||||
//
|
||||
initKedou(curv, strSlfName, strLineName);
|
||||
}
|
||||
else if (strLineName == "WORDS_RELUST")
|
||||
|
|
@ -2944,7 +3014,80 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
|
|||
}
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
return curv;
|
||||
}
|
||||
|
||||
QMyCustomPlot* FormDraw::addKedou(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QJsonObject listOtherProperty)
|
||||
{
|
||||
//蝌蚪、杆状
|
||||
if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
//井名&道名不一致
|
||||
if (strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, m_nTrackW);
|
||||
curv->show();
|
||||
|
||||
if (strLineName == "FRAC_HOLE.TABLE")
|
||||
{
|
||||
//蝌蚪图
|
||||
QString strAliasName = "蝌蚪图";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
// 显示名称
|
||||
// 显示名称
|
||||
if (listOtherProperty.contains("AliasName"))
|
||||
{
|
||||
QJsonValue value = listOtherProperty.value("AliasName");
|
||||
if (value.isString()) {
|
||||
strAliasName = value.toString();
|
||||
}
|
||||
}
|
||||
//
|
||||
initKedou(curv, strSlfName, strLineName, strAliasName, newlineColor, listOtherProperty);
|
||||
}
|
||||
else if(strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
QString strAliasName = "杆状图";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
// 显示名称
|
||||
// 显示名称
|
||||
if (listOtherProperty.contains("AliasName"))
|
||||
{
|
||||
QJsonValue value = listOtherProperty.value("AliasName");
|
||||
if (value.isString()) {
|
||||
strAliasName = value.toString();
|
||||
}
|
||||
}
|
||||
//
|
||||
initGanzhuang(curv, strSlfName, strLineName, strAliasName, newlineColor, listOtherProperty);
|
||||
}
|
||||
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
//
|
||||
m_listLineName.push_back(strLineName);
|
||||
return curv;
|
||||
}
|
||||
|
||||
|
|
@ -3034,7 +3177,7 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
return;
|
||||
}
|
||||
|
||||
if(m_listWaveName.contains(strWaveName))
|
||||
if(m_listLineName.contains(strWaveName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strWaveName;
|
||||
return;
|
||||
|
|
@ -3087,7 +3230,7 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
//
|
||||
m_listWaveName.push_back(strWaveName);
|
||||
m_listLineName.push_back(strWaveName);
|
||||
|
||||
QString strAliasName = "";
|
||||
QString strUnit = "mv";
|
||||
|
|
@ -3265,7 +3408,7 @@ void FormDraw::s_delWave(QString strUuid, QString strWellName, QString strTrackN
|
|||
}
|
||||
qDebug() << "FormDraw s_delWave";
|
||||
|
||||
if(m_listWaveName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
@ -3290,7 +3433,7 @@ void FormDraw::s_delWave(QString strUuid, QString strWellName, QString strTrackN
|
|||
if(form->m_strLineName == strLineName)
|
||||
{
|
||||
childWidget->deleteLater(); // 安排控件的删除,稍后执行
|
||||
m_listWaveName.removeOne(strLineName);
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
|
@ -3316,7 +3459,7 @@ void FormDraw::s_delTableLine(QString strUuid, QString strWellName, QString strT
|
|||
}
|
||||
qDebug() << "FormDraw s_delTableLine";
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
@ -3341,7 +3484,7 @@ void FormDraw::s_delTableLine(QString strUuid, QString strWellName, QString strT
|
|||
if(form->m_strLineName == strLineName)
|
||||
{
|
||||
childWidget->deleteLater(); // 安排控件的删除,稍后执行
|
||||
m_listTableName.removeOne(strLineName);
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
|
@ -3566,9 +3709,8 @@ void FormDraw::s_selectionRectAccepted(const QRect &rect, QMouseEvent *event)
|
|||
// double y2 = widget->yAxis->pixelToCoord(rect.bottom());
|
||||
}
|
||||
|
||||
void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
void FormDraw::s_addGanZhuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
{
|
||||
|
||||
//井名&道名不一致
|
||||
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||
{
|
||||
|
|
@ -3591,103 +3733,17 @@ void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strW
|
|||
curv->m_strUuid = m_strUuid;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, g_iOneWidth);
|
||||
|
||||
curv->show();
|
||||
|
||||
//杆状图
|
||||
initGanzhuang(curv, strSlfName, strLineName);
|
||||
|
||||
////////////////////////////////////////
|
||||
m_Value=NULL;
|
||||
m_Value2=NULL;
|
||||
m_Value3=NULL;
|
||||
//m_csUnit = "(°)";
|
||||
m_bTableData=0;//表格或曲线
|
||||
m_LeftVal2=0;
|
||||
m_RightVal2=360;
|
||||
//m_csCurveDDIR="DDIR";
|
||||
//m_csCurveDANG="DANG";
|
||||
//m_csCurveGrad="GRAD";
|
||||
m_nTailWidth=2;
|
||||
m_crTail=qRgb(0,0,0);
|
||||
m_crPointFill=qRgb(0,0,0);
|
||||
|
||||
m_crGridSmall=qRgb(100,100,100);
|
||||
m_nRadius = 6;
|
||||
m_nTailLen = 10;
|
||||
m_nCircleWidth=1;
|
||||
m_flGrad1 = 10;
|
||||
m_flGrad2 = 50;
|
||||
|
||||
//Table dip
|
||||
m_qsTable="FRAC_HOLE.TABLE";
|
||||
m_qsDIR=("DIR"); // 方位 曲线名
|
||||
m_qsDIP=("DIPorS");//倾角
|
||||
m_qsDepth="DEP";
|
||||
m_qsID = "ID";
|
||||
m_qsProperty=("ID");
|
||||
m_iPrecision = 3;
|
||||
|
||||
//读数据
|
||||
m_csCurveDDIR = "DDIR"; // 方位 曲线名
|
||||
m_csCurveDANG = "DANG";//倾角
|
||||
m_csCurveGrad = "GRAD";
|
||||
this->ReadData(strSlfName, m_csCurveDDIR, 0, &m_Curve);
|
||||
this->ReadData(strSlfName, m_csCurveDANG, 1, &m_Curve2);
|
||||
this->ReadData(strSlfName, m_csCurveGrad, 2, &m_Curve3);
|
||||
curv->yAxis->setTickLabels(true);
|
||||
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
QFont font1("微软雅黑", 16); //fontSize 10
|
||||
curv->yAxis->setTickLabelFont(font1);
|
||||
//
|
||||
// curv->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
// curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
int iMyWidth = curv->axisRect(0)->width();
|
||||
float vmax = iMyWidth;
|
||||
float vmin = 0;
|
||||
curv->setScaleX(vmin, vmax);
|
||||
curv->axisRect()->setupFullAxesBox();
|
||||
//
|
||||
curv->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
|
||||
//对调XY轴,在最前面设置
|
||||
QCPAxis *yAxis = curv->yAxis;
|
||||
QCPAxis *xAxis = curv->xAxis;
|
||||
curv->xAxis = yAxis;
|
||||
curv->yAxis = xAxis;
|
||||
|
||||
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = 90;
|
||||
//隐藏刻度
|
||||
curv->xAxis->setTicks(false);
|
||||
curv->yAxis->setTicks(false);
|
||||
curv->xAxis2->setTicks(false);
|
||||
curv->yAxis2->setTicks(false);
|
||||
curv->xAxis->setVisible(false);
|
||||
curv->xAxis2->setVisible(false);
|
||||
curv->yAxis->setVisible(false);
|
||||
curv->yAxis2->setVisible(false);
|
||||
//蝌蚪图
|
||||
// curv->mKedou = true;
|
||||
//隐藏网格
|
||||
// curv->xAxis->grid()->setVisible(false);
|
||||
// curv->yAxis->grid()->setVisible(false);
|
||||
DrawStck(curv);
|
||||
|
||||
|
||||
//道-对象
|
||||
QString strAliasName = "杆状图";
|
||||
QString strUnit = "";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "ganzhuangtuObject");
|
||||
//
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
m_listLineName.push_back(strLineName);
|
||||
}
|
||||
|
||||
|
||||
void FormDraw::s_addJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
{
|
||||
//井名&道名不一致
|
||||
|
|
@ -3836,7 +3892,7 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return NULL;
|
||||
|
|
@ -3870,7 +3926,7 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin
|
|||
// connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "斜井三图一表";
|
||||
QString strUnit = "";
|
||||
|
|
@ -3896,7 +3952,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa
|
|||
return;
|
||||
}
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
|
|
@ -3941,7 +3997,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa
|
|||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "裂缝描述";
|
||||
QString strUnit = "";
|
||||
|
|
@ -3964,7 +4020,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe
|
|||
return;
|
||||
}
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
|
|
@ -4039,7 +4095,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe
|
|||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strUnit = "";
|
||||
double width=2;
|
||||
|
|
@ -4069,7 +4125,7 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell
|
|||
return;
|
||||
}
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
|
|
@ -4142,7 +4198,7 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell
|
|||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "沉积相";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
|
|
@ -4236,7 +4292,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
return;
|
||||
}
|
||||
|
||||
if(m_listTableName.contains(strLineName))
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
|
|
@ -4355,7 +4411,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listTableName.push_back(strLineName);
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "套管组件";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
|
|
@ -5006,9 +5062,18 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName,
|
|||
//widget->rescaleAxes();
|
||||
}
|
||||
|
||||
//表格曲线
|
||||
void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QStringList listOtherProperty)
|
||||
//蝌蚪图
|
||||
void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QJsonObject listOtherProperty)
|
||||
{
|
||||
widget->mKedou = true;
|
||||
|
||||
//隐藏网格
|
||||
widget->xAxis->grid()->setVisible(false);
|
||||
widget->yAxis->grid()->setVisible(false);
|
||||
//
|
||||
widget->m_bRowGridVisible = false;
|
||||
widget->m_bColGridVisible = false;
|
||||
|
||||
int iMyWidth = widget->axisRect(0)->width();
|
||||
float vmax = iMyWidth;
|
||||
float vmin = 0;
|
||||
|
|
@ -5025,6 +5090,54 @@ void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strL
|
|||
widget->xAxis = yAxis;
|
||||
widget->yAxis = xAxis;
|
||||
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = 90;
|
||||
//隐藏刻度
|
||||
widget->xAxis->setTicks(false);
|
||||
widget->yAxis->setTicks(false);
|
||||
widget->xAxis2->setTicks(false);
|
||||
widget->yAxis2->setTicks(false);
|
||||
widget->xAxis->setVisible(false);
|
||||
widget->xAxis2->setVisible(false);
|
||||
widget->yAxis->setVisible(false);
|
||||
widget->yAxis2->setVisible(false);
|
||||
|
||||
//-----------------------------------
|
||||
QString strUnit = "(°)";
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
FormInfo* pInfo = m_formTrack->AddKedou(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject", listOtherProperty);
|
||||
|
||||
//蝌蚪图
|
||||
widget->Draw_Kedou();
|
||||
}
|
||||
|
||||
//杆状图
|
||||
void FormDraw::initGanzhuang(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QJsonObject listOtherProperty)
|
||||
{
|
||||
//隐藏网格
|
||||
widget->xAxis->grid()->setVisible(false);
|
||||
widget->yAxis->grid()->setVisible(false);
|
||||
//
|
||||
widget->m_bRowGridVisible = false;
|
||||
widget->m_bColGridVisible = false;
|
||||
|
||||
int iMyWidth = widget->axisRect(0)->width();
|
||||
float vmax = iMyWidth;
|
||||
float vmin = 0;
|
||||
|
||||
widget->setScaleX(vmin, iMyWidth);
|
||||
widget->axisRect()->setupFullAxesBox();
|
||||
//
|
||||
widget->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
widget->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
|
||||
//对调XY轴,在最前面设置
|
||||
QCPAxis *yAxis = widget->yAxis;
|
||||
QCPAxis *xAxis = widget->xAxis;
|
||||
widget->xAxis = yAxis;
|
||||
widget->yAxis = xAxis;
|
||||
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = 90;
|
||||
|
|
@ -5039,44 +5152,18 @@ void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strL
|
|||
widget->yAxis2->setVisible(false);
|
||||
|
||||
//-----------------------------------
|
||||
widget->m_Value=NULL;
|
||||
widget->m_Value2=NULL;
|
||||
widget->m_Value3=NULL;
|
||||
//m_csUnit = "(°)";
|
||||
widget->m_bTableData=0;//表格或曲线
|
||||
widget->m_LeftVal2=0;
|
||||
widget->m_RightVal2=360;
|
||||
widget->m_csCurveDDIR = "DDIR"; // 方位 曲线名
|
||||
widget->m_csCurveDANG = "DANG";//倾角
|
||||
widget->m_csCurveGrad = "GRAD";
|
||||
widget->m_nTailWidth=2;
|
||||
widget->m_crTail=qRgb(0,0,0);
|
||||
widget->m_crPointFill=qRgb(0,0,0);
|
||||
//
|
||||
widget->m_crGridSmall=qRgb(100,100,100);
|
||||
widget->m_nRadius = 6;
|
||||
widget->m_nTailLen = 10;
|
||||
widget->m_nCircleWidth=1;
|
||||
widget->m_flGrad1 = 10; //可信度
|
||||
widget->m_flGrad2 = 50;
|
||||
//Table dip
|
||||
widget->m_qsTable="FRAC_HOLE.TABLE";
|
||||
widget->m_qsDIR=("DIR"); // 方位 曲线名
|
||||
widget->m_qsDIP=("DIPorS");//倾角
|
||||
widget->m_qsDepth="DEP";
|
||||
widget->m_qsID = "ID";
|
||||
widget->m_qsProperty=("ID");
|
||||
widget->m_iPrecision = 3;
|
||||
//蝌蚪图
|
||||
widget->Draw_Kedou();
|
||||
|
||||
//------
|
||||
QString strUnit = "";
|
||||
QString strUnit = "(°)";
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
if(!listOtherProperty.isEmpty())
|
||||
{
|
||||
strUnit = listOtherProperty["Unit"].toString(); // 单位
|
||||
}
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject");
|
||||
FormInfo* pInfo = m_formTrack->AddGanzhuang(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject", listOtherProperty);
|
||||
|
||||
//杆状图
|
||||
widget->Draw_Ganzhuang();
|
||||
}
|
||||
|
||||
void FormDraw::initWords(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QStringList listOtherProperty)
|
||||
|
|
@ -6578,9 +6665,6 @@ void FormDraw::DrawJykt(QMyCustomPlot *widget, QString strSlfName)
|
|||
void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
|
||||
{
|
||||
//初始化数据
|
||||
m_LeftVal2=0;
|
||||
m_RightVal2=90;
|
||||
|
||||
m_csCurveAZIM=("AZIM");
|
||||
m_csCurveDEVI=("DEVI");
|
||||
|
||||
|
|
@ -6681,139 +6765,6 @@ void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
|
|||
}
|
||||
}
|
||||
|
||||
void FormDraw::DrawStck(QMyCustomPlot *widget)
|
||||
{
|
||||
float flWidth[50];
|
||||
int l;
|
||||
float dep;
|
||||
int m_nScaleThinGrid=10;
|
||||
float lstk=2;
|
||||
float dang,ddir;
|
||||
float dg,dy,dx;
|
||||
// 计算位置
|
||||
int iMyWidth = widget->axisRect(0)->width();
|
||||
float x1 = 0;
|
||||
float x2 = iMyWidth;
|
||||
float x=0,y=0;
|
||||
int j=0,i=0,k=0;
|
||||
float flTemp=0;
|
||||
for(int i=0;i<50;i++) flWidth[i]=0;
|
||||
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
|
||||
|
||||
|
||||
QPen pPen(m_crTail,m_nTailWidth);
|
||||
QBrush cBrushFill(m_crPointFill);
|
||||
|
||||
float flDepthScale,tempf,flVal;
|
||||
int nPointNum=0,tempi;
|
||||
QRectF rt,rtRect;
|
||||
float dgtord,dr;
|
||||
for(int i=0;i<50;i++) flWidth[i]=0;
|
||||
if(m_Value==0 || m_Value2==0)
|
||||
{
|
||||
Refurbish();
|
||||
}
|
||||
if ( m_Value==0 || m_Value2==0 )
|
||||
return ;
|
||||
|
||||
dgtord=3.14159265/180.;
|
||||
|
||||
CalcDipWidth(9, flWidth, 1.2, 0, iMyWidth, 1);
|
||||
|
||||
|
||||
while ( 1)
|
||||
{
|
||||
dep = m_SDep + k * m_Rlev;
|
||||
if ( dep >m_EDep )
|
||||
break;
|
||||
|
||||
if(dep<m_SDep)
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
i=(dep-m_Curve2.StartDepth)/m_Curve2.DepLevel+0.5;
|
||||
if(i<0)
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
flVal = GetData(m_Curve2.RepCode,(char *)&m_Value2[i*m_Curve2.CodeLen]);//DANG
|
||||
if ( flVal > m_RightVal || flVal < m_LeftVal )
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
tempi = (int)( flVal /10.);
|
||||
|
||||
tempf = 0.;
|
||||
for (j=0; j<tempi; j++)
|
||||
{
|
||||
tempf += flWidth[j];
|
||||
}
|
||||
x =160;//= tempf + (flVal-tempi*10.)*(flWidth[j+1]/10.);
|
||||
y = -dep;//起始深度
|
||||
|
||||
|
||||
// pDC->setPen(pPen);// [5/22/2019 9:43 hxb]
|
||||
// rtRect.setLeft(x - GetLineWidth(pDC,m_nRadius));
|
||||
// rtRect.setRight(x + GetLineWidth(pDC,m_nRadius));
|
||||
// rtRect.setBottom(y +GetLineWidth(pDC,m_nRadius));
|
||||
// rtRect.setTop(y -GetLineWidth(pDC,m_nRadius));
|
||||
// pDC->setPen(PenCircle);
|
||||
// pDC->drawEllipse(rtRect.center(),m_nRadius,m_nRadius);
|
||||
|
||||
// QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget);
|
||||
// qcpItemEllipse->setPen(pPen);
|
||||
// qcpItemEllipse->m_bCustom = true;
|
||||
// qcpItemEllipse->m_nRadius = m_nRadius;
|
||||
// qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置
|
||||
// qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置
|
||||
// qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色
|
||||
|
||||
|
||||
//方位
|
||||
dang = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR
|
||||
dr=dang*dgtord;
|
||||
//dx=abs(lstk*cos(dr));
|
||||
// dy=sqrt(lstk*lstk*(1-cos(dr)*cos(dr)));
|
||||
// // 注意映射方式
|
||||
// x +=GetLineWidth(pDC,m_nRadius)*sin(dr);
|
||||
// y -=GetLineWidth(pDC,m_nRadius)*cos(dr);
|
||||
// float x1=x +GetLineWidth(pDC,m_nTailLen)*sin(dr);
|
||||
// float y1=y -GetLineWidth(pDC,m_nTailLen)*cos(dr);
|
||||
// pDC->setPen(pPen);
|
||||
// pDC->drawLine(QPointF(x,y),QPointF(x1,y1));
|
||||
|
||||
QCPItemLine *qcpItemLine = new QCPItemLine(widget);
|
||||
qcpItemLine->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->setPen(pPen);
|
||||
qcpItemLine->m_bCustom = true;
|
||||
qcpItemLine->m_nTailLen = m_nSltk; //杆长
|
||||
qcpItemLine->m_nRadius = 0; //半径
|
||||
qcpItemLine->m_dr = dr;
|
||||
QCPItemLine *qcpItemLine1 = new QCPItemLine(widget);
|
||||
qcpItemLine1->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine1->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine1->setPen(pPen);
|
||||
qcpItemLine1->m_bCustom = true;
|
||||
qcpItemLine1->m_nTailLen = m_nSltk; //杆长
|
||||
qcpItemLine1->m_nRadius = 0; //半径
|
||||
qcpItemLine1->m_dr = dr+PI;
|
||||
|
||||
//移动对象
|
||||
// widget->mSizeHandleManager->addItem(qcpItemEllipse, true);
|
||||
// widget->mSizeHandleManager->addItem(qcpItemLine, true);
|
||||
|
||||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//read config file: FRAC.CFG,save info into m_FracDef
|
||||
void FormDraw::ReadFracDef()
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public:
|
|||
|
||||
//表格:固井结论等
|
||||
void DisplayTable_One(QJsonObject lineObjInfo);
|
||||
//蝌蚪图
|
||||
void DisplayKedou_One(QJsonObject lineObjInfo);
|
||||
|
||||
//气测/FMT/射孔/文本
|
||||
void DisplayJiegutext_One(QJsonObject lineObjInfo);
|
||||
|
|
@ -89,6 +91,9 @@ protected:
|
|||
QMyCustomPlot* addTableLine(QString strUuid, QString strSlfName, QString strWellName,
|
||||
QString strTrackName, QString strLineName, QStringList listOtherProperty={});
|
||||
|
||||
QMyCustomPlot* addKedou(QString strUuid, QString strSlfName, QString strWellName,
|
||||
QString strTrackName, QString strLineName, QJsonObject listOtherProperty={});
|
||||
|
||||
public slots:
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
void dragMoveEvent(QDragMoveEvent* event);
|
||||
|
|
@ -121,8 +126,6 @@ public:
|
|||
FormTrack *m_formTrack = NULL;
|
||||
|
||||
QStringList m_listLineName;
|
||||
QStringList m_listWaveName;
|
||||
QStringList m_listTableName;
|
||||
|
||||
BorderFlags m_BorderFlags;
|
||||
|
||||
|
|
@ -146,11 +149,13 @@ public:
|
|||
void DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString &strWaveName, int &_nSamples);
|
||||
|
||||
//表格曲线
|
||||
void initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "蝌蚪图", QColor newlineColor=QColor(0,0,0), QStringList listOtherProperty={});
|
||||
void initKedou(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "蝌蚪图", QColor newlineColor=QColor(0,0,0), QJsonObject listOtherProperty={});
|
||||
void initGanzhuang(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "杆状图", QColor newlineColor=QColor(0,0,0), QJsonObject listOtherProperty={});
|
||||
|
||||
void ReadFracDef();
|
||||
void ReadData(QString strSlfName, QString strLineName);//表格
|
||||
void ReadData(QString strSlfName, QString strLineName, int iCurve, Slf_CURVE *curve);//曲线
|
||||
void DrawStck(QMyCustomPlot *widget);
|
||||
|
||||
void CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio);
|
||||
void Refurbish();
|
||||
void DrawJykt(QMyCustomPlot *widget, QString strSlfName);
|
||||
|
|
@ -161,17 +166,11 @@ public:
|
|||
int FracNum;
|
||||
float *m_pflTab_Frac;
|
||||
bool m_bFracIsOK;
|
||||
//CString m_csUnit;
|
||||
//
|
||||
Slf_CURVE m_Curve,m_Curve2,m_Curve3;
|
||||
char *m_Value = NULL,*m_Value2 = NULL,*m_Value3 = NULL;
|
||||
// 以下变量需保存在模板里
|
||||
// 绘制时,方位/倾角/可信度曲线的深度、采样间隔应该一致
|
||||
//CString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad; // 方位/倾角/可信度 曲线名
|
||||
float m_LeftVal2,m_RightVal2;
|
||||
float m_flGrad1,m_flGrad2; // 可信度
|
||||
int m_bTableData = 0;//表格或曲线
|
||||
QRectF m_Rect;
|
||||
int m_bTableData = 0; //表格或曲线
|
||||
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
||||
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
|
||||
float m_nSltk; // 杆状图长度
|
||||
|
|
@ -258,7 +257,7 @@ public slots:
|
|||
void s_handleRectRangeChange(QCPRange newRange);
|
||||
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
||||
|
||||
void s_addGanZuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);//杆状图
|
||||
void s_addGanZhuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);//杆状图
|
||||
//井眼垮塌矢量图
|
||||
void s_addJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
//井斜方位图
|
||||
|
|
|
|||
|
|
@ -98,6 +98,173 @@ FormInfo::~FormInfo()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void FormInfo::initProperty_Kedou(QJsonObject obj)
|
||||
{
|
||||
if(obj.isEmpty())
|
||||
{
|
||||
// 字体
|
||||
|
||||
// 数据类型选择
|
||||
this->m_pl_dataType = 0; // 数据类型
|
||||
|
||||
// 曲线选择
|
||||
this->m_pl_azimuthCurve = "DDIR"; // 方位曲线
|
||||
this->m_pl_inclinationCurve = "DANG"; // 倾角曲线
|
||||
this->m_pl_GradCurve = "GRAD"; // 可信度曲线
|
||||
|
||||
// 表数据字段
|
||||
this->m_rose_depth_field = "DEPT"; // 深度字段
|
||||
this->m_rose_azimuth_field = "DDIR"; // 方位字段
|
||||
this->m_rose_dip_field = "DANG"; // 倾角字段
|
||||
this->m_rose_attribute_field = "ID"; // 属性字段
|
||||
|
||||
//蝌蚪符号
|
||||
this->m_nRadius = 6; // 圆半径
|
||||
this->m_nCircleWidth = 1; // 圆线宽度
|
||||
this->m_nTailLen = 10; // 尾线长度
|
||||
this->m_nTailWidth = 2; // 尾线宽度
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = 0; // 最小倾角
|
||||
this->m_pl_maxInclination = 360; // 最大倾角
|
||||
this->m_flGrad1 = 1; // 可信度1
|
||||
this->m_flGrad2 = 5; // 可信度2
|
||||
// 显示控制(数据表)
|
||||
this->m_crack_decimal_digits = 2; // 小数位数
|
||||
|
||||
// 分类
|
||||
this->m_pl_highGap = false; // 高导缝
|
||||
this->m_pl_highReservoir = false; // 高阻缝
|
||||
this->m_pl_reticularFracture = false; // 网状缝
|
||||
this->m_pl_inducedFracture = false; // 诱导缝
|
||||
this->m_pl_bedLayer = false; // 层理
|
||||
this->m_pl_erosionSurface = false; // 侵蚀面
|
||||
this->m_pl_pore = false; // 孔洞
|
||||
this->m_pl_vesicle = false; // 气孔
|
||||
this->m_pl_gravel = false; // 砾石
|
||||
this->m_pl_nodule = false; // 结核
|
||||
this->m_pl_lumps = false; // 团块
|
||||
this->m_pl_fault = false; // 断层
|
||||
this->m_pl_verticalFracture = false; // 垂直缝
|
||||
this->m_pl_custom1 = false; // 自定义1
|
||||
this->m_pl_custom2 = false; // 自定义2
|
||||
}
|
||||
else
|
||||
{
|
||||
QString strType = obj.value("Type").toString();
|
||||
if ("tableObject" == strType)
|
||||
{
|
||||
// 字体
|
||||
// 名称
|
||||
this->m_curveNameFont.fromString(obj["curveNameFont"].toString());
|
||||
// 单位
|
||||
this->m_strUnitFont.fromString(obj["m_strUnitFont"].toString());
|
||||
// 刻度
|
||||
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
|
||||
|
||||
// 数据类型选择
|
||||
this->m_pl_dataType = obj["m_pl_dataType"].toInt(); // 数据类型
|
||||
|
||||
// 曲线选择
|
||||
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
|
||||
this->m_pl_inclinationCurve = obj["m_pl_inclinationCurve"].toString(); // 倾角曲线
|
||||
this->m_pl_GradCurve = obj["m_pl_GradCurve"].toString(); // 可信度曲线
|
||||
|
||||
// 表数据字段
|
||||
this->m_rose_depth_field = obj["m_rose_depth_field"].toString(); // 深度字段
|
||||
this->m_rose_azimuth_field = obj["m_rose_azimuth_field"].toString(); // 方位字段
|
||||
this->m_rose_dip_field = obj["m_rose_dip_field"].toString(); // 倾角字段
|
||||
this->m_rose_attribute_field = obj["m_rose_attribute_field"].toString(); // 属性字段
|
||||
|
||||
//蝌蚪符号
|
||||
this->m_nRadius = obj["m_nRadius"].toDouble(); // 圆半径
|
||||
this->m_nCircleWidth = obj["m_nCircleWidth"].toDouble();// 圆线宽度
|
||||
this->m_nTailLen = obj["m_nTailLen"].toDouble(); // 尾线长度
|
||||
this->m_nTailWidth = obj["m_nTailWidth"].toDouble(); // 尾线宽度
|
||||
this->m_crCircle.setNamedColor(obj["m_crCircle"].toString());// 圆线颜色
|
||||
this->m_crTail.setNamedColor(obj["m_crTail"].toString());// 尾线颜色
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = obj["m_pl_minInclination"].toDouble(); // 最小倾角
|
||||
this->m_pl_maxInclination = obj["m_pl_maxInclination"].toDouble(); // 最大倾角
|
||||
this->m_flGrad1 = obj["m_flGrad1"].toDouble(); // 可信度1
|
||||
this->m_flGrad2 = obj["m_flGrad2"].toDouble(); // 可信度2
|
||||
// 显示控制(数据表)
|
||||
this->m_crack_decimal_digits = obj["m_crack_decimal_digits"].toInt(); // 小数位数
|
||||
|
||||
// 分类
|
||||
this->m_pl_highGap = obj["m_pl_highGap"].toBool(); // 高导缝
|
||||
this->m_pl_highReservoir = obj["m_pl_highReservoir"].toBool(); // 高阻缝
|
||||
this->m_pl_reticularFracture = obj["m_pl_reticularFracture"].toBool(); // 网状缝
|
||||
this->m_pl_inducedFracture = obj["m_pl_inducedFracture"].toBool(); // 诱导缝
|
||||
this->m_pl_bedLayer = obj["m_pl_bedLayer"].toBool(); // 层理
|
||||
this->m_pl_erosionSurface = obj["m_pl_erosionSurface"].toBool(); // 侵蚀面
|
||||
this->m_pl_pore = obj["m_pl_pore"].toBool(); // 孔洞
|
||||
this->m_pl_vesicle = obj["m_pl_vesicle"].toBool(); // 气孔
|
||||
this->m_pl_gravel = obj["m_pl_gravel"].toBool(); // 砾石
|
||||
this->m_pl_nodule = obj["m_pl_nodule"].toBool(); // 结核
|
||||
this->m_pl_lumps = obj["m_pl_lumps"].toBool(); // 团块
|
||||
this->m_pl_fault = obj["m_pl_fault"].toBool(); // 断层
|
||||
this->m_pl_verticalFracture = obj["m_pl_verticalFracture"].toBool(); // 垂直缝
|
||||
this->m_pl_custom1 = obj["m_pl_custom1"].toBool(); // 自定义1
|
||||
this->m_pl_custom2 = obj["m_pl_custom2"].toBool(); // 自定义2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FormInfo::initProperty_Ganzhuang(QJsonObject obj)
|
||||
{
|
||||
if(obj.isEmpty())
|
||||
{
|
||||
// 字体
|
||||
|
||||
// 曲线选择
|
||||
this->m_pl_azimuthCurve = "DDIR"; // 方位曲线
|
||||
this->m_pl_inclinationCurve = "DANG"; // 倾角曲线
|
||||
this->m_pl_GradCurve = "GRAD"; // 可信度曲线
|
||||
|
||||
//杆
|
||||
this->m_nTailLen = 15; // 尾线长度
|
||||
this->m_nTailWidth = 2; // 尾线宽度
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = 0; // 最小倾角
|
||||
this->m_pl_maxInclination = 90; // 最大倾角
|
||||
this->m_flGrad1 = 10; // 可信度1
|
||||
this->m_flGrad2 = 50; // 可信度2
|
||||
//
|
||||
this->m_strUnit = "(°)";
|
||||
}
|
||||
else
|
||||
{
|
||||
QString strType = obj.value("Type").toString();
|
||||
if ("tableObject" == strType)
|
||||
{
|
||||
// 字体
|
||||
// 名称
|
||||
this->m_curveNameFont.fromString(obj["curveNameFont"].toString());
|
||||
|
||||
// 曲线选择
|
||||
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
|
||||
this->m_pl_inclinationCurve = obj["m_pl_inclinationCurve"].toString(); // 倾角曲线
|
||||
this->m_pl_GradCurve = obj["m_pl_GradCurve"].toString(); // 可信度曲线
|
||||
|
||||
//杆
|
||||
this->m_nTailLen = obj["m_nTailLen"].toDouble(); // 尾线长度
|
||||
this->m_nTailWidth = obj["m_nTailWidth"].toDouble(); // 尾线宽度
|
||||
this->m_crTail.setNamedColor(obj["m_crTail"].toString());// 尾线颜色
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = obj["m_pl_minInclination"].toDouble(); // 最小倾角
|
||||
this->m_pl_maxInclination = obj["m_pl_maxInclination"].toDouble(); // 最大倾角
|
||||
this->m_flGrad1 = obj["m_flGrad1"].toDouble(); // 可信度1
|
||||
this->m_flGrad2 = obj["m_flGrad2"].toDouble(); // 可信度2
|
||||
//
|
||||
this->m_strUnit = obj["Unit"].toString(); // 单位
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FormInfo::initProperty(QJsonObject obj)
|
||||
{
|
||||
m_vmin = obj.value("vmin").toDouble();
|
||||
|
|
@ -366,6 +533,78 @@ QJsonObject FormInfo::makeJson()
|
|||
//item属性写入slf文件,不需要此次记录
|
||||
return rootObj;
|
||||
}
|
||||
else if (m_strLineName == "FRAC_HOLE.TABLE")
|
||||
{
|
||||
//蝌蚪图
|
||||
// 字体
|
||||
rootObj["m_strUnitFont"] = this->m_strUnitFont.toString(); // 单位
|
||||
rootObj["m_pl_fontScale"] = this->m_pl_fontScale.toString(); // 刻度
|
||||
// 数据类型选择
|
||||
rootObj["m_pl_dataType"] = this->m_pl_dataType; // 数据类型
|
||||
// 曲线选择
|
||||
rootObj["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; // 方位曲线
|
||||
rootObj["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; // 倾角曲线
|
||||
rootObj["m_pl_GradCurve"] = this->m_pl_GradCurve; // 可信度曲线
|
||||
//字段选择(数据表)
|
||||
rootObj["m_rose_depth_field"] = this->m_rose_depth_field; // 深度字段
|
||||
rootObj["m_rose_azimuth_field"] = this->m_rose_azimuth_field; // 方位字段
|
||||
rootObj["m_rose_dip_field"] = this->m_rose_dip_field; // 倾角字段
|
||||
rootObj["m_rose_attribute_field"] = this->m_rose_attribute_field; // 属性字段
|
||||
//蝌蚪符号
|
||||
rootObj["m_nRadius"] = this->m_nRadius; // 圆半径
|
||||
rootObj["m_nCircleWidth"] = this->m_nCircleWidth; // 圆线宽度
|
||||
rootObj["m_nTailLen"] = this->m_nTailLen; // 尾线长度
|
||||
rootObj["m_nTailWidth"] = this->m_nTailWidth; // 尾线宽度
|
||||
rootObj["m_crCircle"] = this->m_crCircle.name(); // 圆线颜色
|
||||
rootObj["m_crTail"] = this->m_crTail.name(); // 尾线颜色
|
||||
// 显示控制
|
||||
rootObj["m_pl_minInclination"] = this->m_pl_minInclination; // 最小倾角
|
||||
rootObj["m_pl_maxInclination"] = this->m_pl_maxInclination; // 最大倾角
|
||||
rootObj["m_flGrad1"] = this->m_flGrad1; // 可信度1
|
||||
rootObj["m_flGrad2"] = this->m_flGrad2; // 可信度2
|
||||
// 显示控制(数据表)
|
||||
rootObj["m_crack_decimal_digits"] = this->m_crack_decimal_digits; // 小数位数
|
||||
// 分类
|
||||
rootObj["m_pl_highGap"] = this->m_pl_highGap; // 高导缝
|
||||
rootObj["m_pl_highReservoir"] = this->m_pl_highReservoir; // 高阻缝
|
||||
rootObj["m_pl_reticularFracture"] = this->m_pl_reticularFracture; // 网状缝
|
||||
rootObj["m_pl_inducedFracture"] = this->m_pl_inducedFracture; // 诱导缝
|
||||
rootObj["m_pl_bedLayer"] = this->m_pl_bedLayer; // 层理
|
||||
rootObj["m_pl_erosionSurface"] = this->m_pl_erosionSurface; // 侵蚀面
|
||||
rootObj["m_pl_pore"] = this->m_pl_pore; // 孔洞
|
||||
rootObj["m_pl_vesicle"] = this->m_pl_vesicle; // 气孔
|
||||
rootObj["m_pl_gravel"] = this->m_pl_gravel; // 砾石
|
||||
rootObj["m_pl_nodule"] = this->m_pl_nodule; // 结核
|
||||
rootObj["m_pl_lumps"] = this->m_pl_lumps; // 团块
|
||||
rootObj["m_pl_fault"] = this->m_pl_fault; // 断层
|
||||
rootObj["m_pl_verticalFracture"] = this->m_pl_verticalFracture; // 垂直缝
|
||||
rootObj["m_pl_custom1"] = this->m_pl_custom1; // 自定义1
|
||||
rootObj["m_pl_custom2"] = this->m_pl_custom2; // 自定义2
|
||||
return rootObj;
|
||||
}
|
||||
else if (m_strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
//杆状图
|
||||
// 字体
|
||||
rootObj["m_strUnitFont"] = this->m_strUnitFont.toString(); // 单位
|
||||
rootObj["m_pl_fontScale"] = this->m_pl_fontScale.toString(); // 刻度
|
||||
// 曲线选择
|
||||
rootObj["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; // 方位曲线
|
||||
rootObj["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; // 倾角曲线
|
||||
rootObj["m_pl_GradCurve"] = this->m_pl_GradCurve; // 可信度曲线
|
||||
//杆
|
||||
rootObj["m_nTailLen"] = this->m_nTailLen; // 尾线长度
|
||||
rootObj["m_nTailWidth"] = this->m_nTailWidth; // 尾线宽度
|
||||
rootObj["m_crTail"] = this->m_crTail.name(); // 尾线颜色
|
||||
// 显示控制
|
||||
rootObj["m_pl_minInclination"] = this->m_pl_minInclination; // 最小倾角
|
||||
rootObj["m_pl_maxInclination"] = this->m_pl_maxInclination; // 最大倾角
|
||||
rootObj["m_flGrad1"] = this->m_flGrad1; // 可信度1
|
||||
rootObj["m_flGrad2"] = this->m_flGrad2; // 可信度2
|
||||
//单位
|
||||
rootObj["Unit"] = m_strUnit;
|
||||
return rootObj;
|
||||
}
|
||||
}
|
||||
else if (m_strType == "JiegutextObject")
|
||||
{
|
||||
|
|
@ -1065,6 +1304,21 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
|||
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
|
||||
}
|
||||
|
||||
//蝌蚪图、杆状图
|
||||
if(m_strLineName == "FRAC_HOLE.TABLE" || m_strLineName=="GANZHUANG.LINE")
|
||||
{
|
||||
int nbay = rect.height() - 5;
|
||||
|
||||
// 显示刻度
|
||||
if (m_bShowScale)
|
||||
{
|
||||
drawScale_Kedou(painter, rect);
|
||||
}
|
||||
QFontMetrics fm2(m_curveUnitFont);
|
||||
QRect tRect = fm2.boundingRect(m_strUnit);
|
||||
painter.drawText(rect.width()/2- tRect.width()/2, nbay - 6, m_strUnit);
|
||||
}
|
||||
|
||||
if(m_strLineName == "深度")
|
||||
{
|
||||
QFont oldFont = painter.font();
|
||||
|
|
@ -1411,6 +1665,28 @@ void FormInfo::drawScale(QPainter& painter, const QRect& rect)
|
|||
}
|
||||
}
|
||||
|
||||
void FormInfo::drawScale_Kedou(QPainter& painter, const QRect& rect)
|
||||
{
|
||||
int nbay = rect.height() - 5;
|
||||
QVector<QStringList> vecScale;
|
||||
|
||||
vecScale << QStringList({ QString::number(m_pl_minInclination) , QString::number(m_pl_maxInclination) });
|
||||
|
||||
painter.setFont(m_curveScaleFont);
|
||||
QFontMetrics fm1(m_curveScaleFont);
|
||||
QRect textRect = fm1.boundingRect(QString::number(m_pl_minInclination, 'f', 0));
|
||||
int ntxthei = textRect.height() - 4;
|
||||
int nyy = nbay - ntxthei * vecScale.size() - 3;
|
||||
for (int i = 0; i < vecScale.size(); i++)
|
||||
{
|
||||
const QStringList& slist = vecScale.at(i);
|
||||
QRect textRect = fm1.boundingRect(slist.at(1));
|
||||
int y = nyy + (i + 1) * ntxthei;
|
||||
painter.drawText(rect.x() + 3, y, slist.at(0));
|
||||
painter.drawText(rect.width() - textRect.width() - 3, y, slist.at(1));
|
||||
}
|
||||
}
|
||||
|
||||
void FormInfo::paintClassify(QPainter &painter, int compassCenterY)
|
||||
{
|
||||
// 绘制分类
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public:
|
|||
~FormInfo();
|
||||
|
||||
void initProperty(QJsonObject obj);
|
||||
void initProperty_Kedou(QJsonObject obj);
|
||||
void initProperty_Ganzhuang(QJsonObject obj);
|
||||
|
||||
void paintClassify(QPainter &painter, int compassCenterY);
|
||||
private:
|
||||
|
|
@ -36,6 +38,7 @@ protected:
|
|||
|
||||
// 绘制刻度
|
||||
void drawScale(QPainter& painter, const QRect& rect);
|
||||
void drawScale_Kedou(QPainter& painter, const QRect& rect);
|
||||
|
||||
public slots:
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
|
|
@ -364,10 +367,16 @@ public:
|
|||
|
||||
//蝌蚪图
|
||||
QString m_pl_GradCurve = "GRAD"; // 可信度曲线
|
||||
float m_flGrad1,m_flGrad2; // 可信度
|
||||
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
||||
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
|
||||
QColor m_crTail,m_crCircle;//颜色
|
||||
float m_flGrad1 = 10; // 可信度
|
||||
float m_flGrad2 = 50; // 可信度
|
||||
float m_nRadius = 6; // 半径
|
||||
float m_nCircleWidth = 2; // 圆线宽度
|
||||
float m_nTailWidth = 2; // 尾宽度
|
||||
float m_nTailLen = 10; // 尾长
|
||||
QColor m_crCircle = qRgb(0,0,0); //颜色
|
||||
QColor m_crTail = qRgb(0,0,0); //颜色
|
||||
QColor m_crPointFill = qRgb(0,0,0);
|
||||
|
||||
public:
|
||||
void setLineWidth(double dWidth);
|
||||
double getLineWidth();
|
||||
|
|
|
|||
|
|
@ -312,6 +312,82 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
|||
}
|
||||
}
|
||||
|
||||
FormInfo* FormTrack::AddKedou(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty)
|
||||
{
|
||||
if(strLineName == "FRAC_HOLE.TABLE")
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
qDebug() << "FormTrack AddKedou";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
ui->tableWidget->setRowCount(row + 1);
|
||||
|
||||
//曲线信息栏
|
||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||
formInfo->m_strUuid = m_strUuid;
|
||||
formInfo->initProperty_Kedou(listOtherProperty);
|
||||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strUnit = strUnit;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "tableObject";
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0,0,0));
|
||||
formInfo->setBackColor(QColor(255,255,255));
|
||||
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
return formInfo;
|
||||
}
|
||||
|
||||
FormInfo* FormTrack::AddGanzhuang(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty)
|
||||
{
|
||||
if(strLineName == "GANZHUANG.LINE")
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
qDebug() << "FormTrack AddGanzhuang";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
ui->tableWidget->setRowCount(row + 1);
|
||||
|
||||
//曲线信息栏
|
||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||
formInfo->m_strUuid = m_strUuid;
|
||||
//formInfo->m_strUnit = strUnit;
|
||||
formInfo->initProperty_Ganzhuang(listOtherProperty);
|
||||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "tableObject";
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0,0,0));
|
||||
formInfo->setBackColor(QColor(255,255,255));
|
||||
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
return formInfo;
|
||||
}
|
||||
|
||||
FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj)
|
||||
{
|
||||
QString strWellName = listdt.at(1);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public:
|
|||
|
||||
public:
|
||||
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QStringList listOtherProperty={});
|
||||
FormInfo* AddKedou(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty={});
|
||||
FormInfo* AddGanzhuang(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty={});
|
||||
|
||||
FormInfo* setDrawDt(QStringList listdt, QJsonObject obj);
|
||||
|
||||
|
|
|
|||
|
|
@ -225,10 +225,16 @@ void MainWindow::initTitleBar()
|
|||
|
||||
//
|
||||
QMenu* m_dataMenu = this->menuBar()->addMenu(tr("数据管理(&D)"));
|
||||
//
|
||||
QMenu* m_resultMenu = this->menuBar()->addMenu(tr("成果输出(&R)"));
|
||||
m_dataMenu->addAction(QIcon( ::GetImagePath() + "wellog.png"), tr("&数据导入"), this, SLOT(s_ImportSingleWellLogData()));
|
||||
//
|
||||
QMenu* m_analyzeToolMenu = this->menuBar()->addMenu(tr("分析工具(&W)"));
|
||||
m_analyzeToolMenu->addAction(QIcon( ::GetImagePath() + "outcurves.png"), tr("&数据导出"), this, SLOT(s_OutWellLogRound()));
|
||||
m_analyzeToolMenu->addAction(QIcon( ::GetImagePath() + "wellsectionwindow.png"), tr("&可视解释"), this, SLOT(s_showView()));
|
||||
//
|
||||
QMenu* m_resultMenu = this->menuBar()->addMenu(tr("成果输出(&R)"));
|
||||
m_resultMenu->addAction(QIcon( ::GetImagePath() + "icon/SaveAsPicture.png"), tr("&导出长图"), this, SLOT(s_SaveAsPicture()));
|
||||
m_resultMenu->addAction(QIcon( ::GetImagePath() + "icon/ExportPDF.png"), tr("&导出PDF"), this, SLOT(s_SaveAsPdf()));
|
||||
m_resultMenu->addAction(QIcon( ::GetImagePath() + "icon/ExportSVG.png"), tr("&导出SVG"), this, SLOT(s_SaveAsSvg()));
|
||||
//
|
||||
QMenu* m_SystemToolMenu = this->menuBar()->addMenu(tr("系统工具(&T)"));
|
||||
//
|
||||
|
|
@ -257,8 +263,8 @@ void MainWindow::initToolBar()
|
|||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "openproject.png"), tr("&打开项目"), this, SLOT(s_Open()));
|
||||
ui->mainToolBar->addSeparator();//添加分隔符
|
||||
//
|
||||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "wellog.png"), tr("&数据导入"), this, SLOT(s_wellog()));
|
||||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "outcurves.png"), tr("&数据导出"), this, SLOT(s_outcurves()));
|
||||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "wellog.png"), tr("&数据导入"), this, SLOT(s_ImportSingleWellLogData()));
|
||||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "outcurves.png"), tr("&数据导出"), this, SLOT(s_OutWellLogRound()));
|
||||
ui->mainToolBar->addSeparator();//添加分隔符
|
||||
//
|
||||
ui->mainToolBar->addAction(QIcon( ::GetImagePath() + "wellsectionwindow.png"), tr("&可视解释"), this, SLOT(s_showView()));
|
||||
|
|
@ -432,6 +438,31 @@ void MainWindow::s_Open()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::s_ImportSingleWellLogData()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_ImportSingleWellLogData();
|
||||
}
|
||||
|
||||
void MainWindow::s_OutWellLogRound()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_OutWellLogRound();
|
||||
}
|
||||
|
||||
void MainWindow::s_SaveAsPicture()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_SaveAsPicture();
|
||||
}
|
||||
|
||||
void MainWindow::s_SaveAsPdf()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_SaveAsPdf();
|
||||
}
|
||||
|
||||
void MainWindow::s_SaveAsSvg()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_SaveAsSvg();
|
||||
}
|
||||
|
||||
void MainWindow::s_SaveProject()
|
||||
{
|
||||
// //加载插件显示
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ public:
|
|||
public slots:
|
||||
void s_New();
|
||||
void s_Open();
|
||||
void s_ImportSingleWellLogData();
|
||||
void s_OutWellLogRound();
|
||||
void s_SaveAsPicture();
|
||||
void s_SaveAsPdf();
|
||||
void s_SaveAsSvg();
|
||||
void s_SaveProject();
|
||||
void s_CloseProject();
|
||||
void slotExitSystem();
|
||||
|
|
|
|||
|
|
@ -306,6 +306,10 @@ void MainWindowCurve::initMainToolBar()
|
|||
connect(m_SaveAsPdfAc, &QAction::triggered, this, &MainWindowCurve::s_SaveAsPdf);
|
||||
connect(m_SaveAsSvgAc, &QAction::triggered, this, &MainWindowCurve::s_SaveAsSvg);
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_SaveAsPicture()), this, SLOT(s_SaveAsPicture()));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_SaveAsPdf()), this, SLOT(s_SaveAsPdf()));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_SaveAsSvg()), this, SLOT(s_SaveAsSvg()));
|
||||
|
||||
// connect(m_grepAc, &QAction::triggered, this, &MainWindow::s_Risize);
|
||||
// connect(m_compileAc, &QAction::triggered, this, &MainWindow::s_AddOne);
|
||||
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
||||
|
|
@ -3663,7 +3667,7 @@ void MainWindowCurve::s_NewGanZhuangTu()
|
|||
QString strSlfName = sret.at(1);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "杆状图", "ganzhuangtuObject", nW);
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "GANZHUANG.LINE", "ganzhuangtuObject", nW);
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_roseAc()
|
||||
|
|
|
|||
|
|
@ -213,6 +213,10 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_changeGuanShow(QString, QString, QString, QString, QString, QString, bool)), this, SLOT(s_changeGuanShow(QString, QString, QString, QString, QString, QString, bool)));
|
||||
//改变套管组件属性,直径
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeGuanD(QString, QString, QString, QString, QString, QString, double)), this, SLOT(s_changeGuanD(QString, QString, QString, QString, QString, QString, double)));
|
||||
//改变蝌蚪图属性
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeKedouProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeKedouProperty(QString, QString, QString, QString, QString)));
|
||||
//改变杆状图属性
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeGanzhuangProperty(QString, QString, QString, QString, QString)), this, SLOT(s_changeGanzhuangProperty(QString, QString, QString, QString, QString)));
|
||||
}
|
||||
|
||||
void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW)
|
||||
|
|
@ -11790,27 +11794,195 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value)
|
|||
|
||||
void QMyCustomPlot::Draw_Kedou()
|
||||
{
|
||||
//this->clearGraphs();
|
||||
this->clearItems();
|
||||
|
||||
//
|
||||
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
this->m_Value=NULL;
|
||||
this->m_Value2=NULL;
|
||||
this->m_Value3=NULL;
|
||||
this->m_bTableData = pInfo->m_pl_dataType;//曲线//表格
|
||||
// 曲线选择
|
||||
this->m_csCurveDDIR = pInfo->m_pl_azimuthCurve; // 方位 曲线名
|
||||
this->m_csCurveDANG = pInfo->m_pl_inclinationCurve;//倾角
|
||||
this->m_csCurveGrad = pInfo->m_pl_GradCurve; // 可信度曲线
|
||||
//字段选择(数据表)
|
||||
this->m_qsDepth = pInfo->m_rose_depth_field; // 深度字段
|
||||
this->m_qsDIR = pInfo->m_rose_azimuth_field; // 方位字段
|
||||
this->m_qsDIP = pInfo->m_rose_dip_field; // 倾角字段
|
||||
this->m_qsID = pInfo->m_rose_attribute_field; // 属性字段
|
||||
this->m_qsProperty = pInfo->m_rose_attribute_field; // 属性字段
|
||||
//蝌蚪符号
|
||||
this->m_nRadius = pInfo->m_nRadius; // 圆半径
|
||||
this->m_nCircleWidth = pInfo->m_nCircleWidth; // 圆线宽度
|
||||
this->m_nTailLen = pInfo->m_nTailLen; // 尾线长度
|
||||
this->m_nTailWidth = pInfo->m_nTailWidth; // 尾线宽度
|
||||
this->m_crCircle = pInfo->m_crCircle; // 圆线颜色
|
||||
this->m_crTail = pInfo->m_crTail; // 尾线颜色
|
||||
this->m_crPointFill=this->m_crCircle;
|
||||
//
|
||||
this->m_crGridSmall=qRgb(100,100,100);
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = pInfo->m_pl_minInclination; // 最小倾角
|
||||
this->m_pl_maxInclination = pInfo->m_pl_maxInclination; // 最大倾角
|
||||
this->m_flGrad1 = pInfo->m_flGrad1; //可信度1
|
||||
this->m_flGrad2 = pInfo->m_flGrad2; //可信度2
|
||||
|
||||
//Table dip表名
|
||||
this->m_qsTable="FRAC_HOLE.TABLE";
|
||||
this->m_iPrecision = pInfo->m_crack_decimal_digits; //小数位数
|
||||
|
||||
// 分类
|
||||
if(pInfo->m_pl_highGap)// 高导缝
|
||||
{
|
||||
m_bTypeDraw[0] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[0] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_highReservoir) // 高阻缝
|
||||
{
|
||||
m_bTypeDraw[1] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[1] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_reticularFracture) // 网状缝
|
||||
{
|
||||
m_bTypeDraw[2] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[2] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_inducedFracture) // 诱导缝
|
||||
{
|
||||
m_bTypeDraw[3] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[3] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_bedLayer) // 层理
|
||||
{
|
||||
m_bTypeDraw[4] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[4] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_erosionSurface) // 侵蚀面
|
||||
{
|
||||
m_bTypeDraw[5] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[5] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_pore) // 孔洞
|
||||
{
|
||||
m_bTypeDraw[6] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[6] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_vesicle) // 气孔
|
||||
{
|
||||
m_bTypeDraw[7] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[7] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_gravel) // 砾石
|
||||
{
|
||||
m_bTypeDraw[8] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[8] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_nodule) // 结核
|
||||
{
|
||||
m_bTypeDraw[9] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[9] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_lumps) // 团块
|
||||
{
|
||||
m_bTypeDraw[10] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[10] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_fault) // 断层
|
||||
{
|
||||
m_bTypeDraw[11] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[11] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_verticalFracture) // 垂直缝
|
||||
{
|
||||
m_bTypeDraw[12] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[12] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_custom1) // 自定义1
|
||||
{
|
||||
m_bTypeDraw[13] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[13] = false;
|
||||
}
|
||||
|
||||
if(pInfo->m_pl_custom2) // 自定义2
|
||||
{
|
||||
m_bTypeDraw[14] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bTypeDraw[14] = false;
|
||||
}
|
||||
|
||||
if (m_bTableData)
|
||||
{
|
||||
ReadFracDef_gaodaofeng();
|
||||
for (int i = 0 ; i < iFracType ; i++)
|
||||
{
|
||||
m_bTypeDraw[i] = true;
|
||||
}
|
||||
|
||||
//
|
||||
m_qsDIR="DDIR"; // 方位 曲线名
|
||||
m_qsDIP="DANG";//倾角
|
||||
m_qsDepth="DEPT";
|
||||
m_qsID = "ID";
|
||||
ReadData(m_strSlfName, m_strLineName);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
m_csCurveDDIR = "DDIR"; // 方位 曲线名
|
||||
m_csCurveDANG = "DANG";//倾角
|
||||
m_csCurveGrad = "GRAD";
|
||||
this->ReadData(m_strSlfName, m_csCurveDDIR, 0, &m_Curve);
|
||||
this->ReadData(m_strSlfName, m_csCurveDANG, 1, &m_Curve2);
|
||||
this->ReadData(m_strSlfName, m_csCurveGrad, 2, &m_Curve3);
|
||||
|
|
@ -11824,6 +11996,7 @@ void QMyCustomPlot::Draw_Kedou()
|
|||
{
|
||||
this->DrawDip_Kedou();
|
||||
}
|
||||
this->replot();
|
||||
}
|
||||
|
||||
void QMyCustomPlot::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio)
|
||||
|
|
@ -11861,18 +12034,10 @@ void QMyCustomPlot::DrawTabDip_Kedou()
|
|||
if ( nPointNum < 1 )return ;
|
||||
|
||||
dgtord=3.14159265/180.;
|
||||
//
|
||||
m_nCircleWidth = 1;
|
||||
m_nRadius = 6;
|
||||
m_crCircle = QColor(0,0,0);
|
||||
//
|
||||
m_nTailWidth = 2;
|
||||
m_nTailLen = 10;
|
||||
m_crTail = QColor(0,0,0);
|
||||
|
||||
int iMyWidth = this->axisRect(0)->width(); //setSizeConstraintRect()
|
||||
int iMyHeight = this->axisRect(0)->height(); //setSizeConstraintRect()
|
||||
qDebug() << "iMyWidth=" << QString::number(iMyWidth) << ", iMyHeight=" << QString::number(iMyHeight);
|
||||
//qDebug() << "iMyWidth=" << QString::number(iMyWidth) << ", iMyHeight=" << QString::number(iMyHeight);
|
||||
|
||||
//-----------
|
||||
int l;
|
||||
|
|
@ -11883,8 +12048,8 @@ void QMyCustomPlot::DrawTabDip_Kedou()
|
|||
int m_nScaleThinGrid=10;
|
||||
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
|
||||
//绘制网格线,注意颜色、宽度属性
|
||||
QPen pPenStraightLine(m_crTail, m_nTailWidth);
|
||||
QPen pPenStraightLineSmall(m_crGridSmall, m_nTailWidth/2);
|
||||
QPen pPenStraightLine(m_crTail, 2);
|
||||
QPen pPenStraightLineSmall(m_crGridSmall, 1);
|
||||
for(i=0;i<m_nScaleThinGrid;i++)
|
||||
{
|
||||
if ( i == 0 ) x =1;
|
||||
|
|
@ -11917,6 +12082,15 @@ void QMyCustomPlot::DrawTabDip_Kedou()
|
|||
|
||||
CalcDipWidth(9,flWidth, 1.2, 0, iMyWidth, 1.);
|
||||
|
||||
|
||||
//圆圈
|
||||
QPen pPen(m_crCircle);
|
||||
pPen.setWidth(m_nCircleWidth);
|
||||
|
||||
//尾巴
|
||||
QPen pPenTail(m_crTail);
|
||||
pPenTail.setWidth(m_nTailWidth);
|
||||
|
||||
n = m_FracDefList.count();
|
||||
for (i=0; i<nPointNum; i++)
|
||||
{
|
||||
|
|
@ -11935,13 +12109,6 @@ void QMyCustomPlot::DrawTabDip_Kedou()
|
|||
if(bDraw)
|
||||
{
|
||||
QBrush cBrush(fd.crColor);
|
||||
//圆圈
|
||||
QPen pPen(m_crCircle);
|
||||
pPen.setWidth(m_nCircleWidth);
|
||||
|
||||
//尾巴
|
||||
QPen pPenTail(m_crTail);
|
||||
pPenTail.setWidth(m_nTailWidth);
|
||||
|
||||
// 角度
|
||||
flVal = frac.DIPorS;
|
||||
|
|
@ -11998,8 +12165,8 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
|
||||
|
||||
//绘制网格线,注意颜色、宽度属性
|
||||
QPen pPenStraightLine(m_crTail, m_nTailWidth);
|
||||
QPen pPenStraightLineSmall(m_crGridSmall, m_nTailWidth/2);
|
||||
QPen pPenStraightLine(m_crGridSmall, 2);
|
||||
QPen pPenStraightLineSmall(m_crGridSmall, 1);
|
||||
for(i=0;i<m_nScaleThinGrid;i++)
|
||||
{
|
||||
if ( i == 0 ) x =1;
|
||||
|
|
@ -12030,8 +12197,16 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
}
|
||||
}
|
||||
|
||||
QPen pPen(m_crTail,m_nTailWidth);
|
||||
//圆圈
|
||||
QPen pPen(m_crCircle);
|
||||
pPen.setWidth(m_nCircleWidth);
|
||||
|
||||
//尾巴
|
||||
QPen pPenTail(m_crTail);
|
||||
pPenTail.setWidth(m_nTailWidth);
|
||||
//圆填充
|
||||
QBrush cBrushFill(m_crPointFill);
|
||||
QBrush brush2(QColor(qRgb(255,255,255)));//NULL_BRUSH
|
||||
|
||||
float flDepthScale,tempf,flVal;
|
||||
int nPointNum=0,tempi;
|
||||
|
|
@ -12069,9 +12244,33 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
continue;
|
||||
}
|
||||
|
||||
bool bFillBrush = true;
|
||||
//可信度
|
||||
if ( m_Value3!=NULL)
|
||||
{
|
||||
flVal = GetData(m_Curve3.RepCode,(char *)&m_Value3[i*m_Curve3.CodeLen]);//置信度
|
||||
if ( flVal < m_flGrad1 )
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
if ( flVal > m_flGrad2 )
|
||||
{
|
||||
bFillBrush = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bFillBrush = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bFillBrush = true;
|
||||
}
|
||||
|
||||
//
|
||||
flVal = GetData(m_Curve2.RepCode,(char *)&m_Value2[i*m_Curve2.CodeLen]);//DANG
|
||||
if ( flVal > m_flGrad2 || flVal < m_flGrad1 )
|
||||
if ( flVal > m_pl_maxInclination || flVal < m_pl_minInclination )
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
|
|
@ -12094,7 +12293,14 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
qcpItemEllipse->m_nRadius = m_nRadius;
|
||||
qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置
|
||||
qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置
|
||||
if(bFillBrush)
|
||||
{
|
||||
qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色
|
||||
}
|
||||
else
|
||||
{
|
||||
qcpItemEllipse->setBrush(brush2);//填充圆的颜色
|
||||
}
|
||||
|
||||
//方位
|
||||
flVal = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR
|
||||
|
|
@ -12103,7 +12309,7 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
QCPItemLine *qcpItemLine = new QCPItemLine(this);
|
||||
qcpItemLine->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->setPen(pPen);
|
||||
qcpItemLine->setPen(pPenTail);
|
||||
qcpItemLine->m_bCustom = true;
|
||||
qcpItemLine->m_nTailLen = m_nTailLen; //尾长
|
||||
qcpItemLine->m_nRadius = m_nRadius; //半径
|
||||
|
|
@ -12111,3 +12317,188 @@ void QMyCustomPlot::DrawDip_Kedou()
|
|||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
//改变蝌蚪图属性
|
||||
void QMyCustomPlot::s_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
//绘制蝌蚪图
|
||||
Draw_Kedou();
|
||||
}
|
||||
|
||||
//改变杆状图属性
|
||||
void QMyCustomPlot::s_changeGanzhuangProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
//绘制杆状图
|
||||
Draw_Ganzhuang();
|
||||
}
|
||||
|
||||
void QMyCustomPlot::Draw_Ganzhuang()
|
||||
{
|
||||
this->clearItems();
|
||||
|
||||
//
|
||||
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
this->m_Value=NULL;
|
||||
this->m_Value2=NULL;
|
||||
this->m_Value3=NULL;
|
||||
// 曲线选择
|
||||
this->m_csCurveDDIR = pInfo->m_pl_azimuthCurve; // 方位 曲线名
|
||||
this->m_csCurveDANG = pInfo->m_pl_inclinationCurve;//倾角
|
||||
this->m_csCurveGrad = pInfo->m_pl_GradCurve; // 可信度曲线
|
||||
//蝌蚪符号
|
||||
this->m_nTailLen = pInfo->m_nTailLen; // 尾线长度
|
||||
this->m_nTailWidth = pInfo->m_nTailWidth; // 尾线宽度
|
||||
this->m_crTail = pInfo->m_crTail; // 尾线颜色
|
||||
|
||||
// 显示控制
|
||||
this->m_pl_minInclination = pInfo->m_pl_minInclination; // 最小倾角
|
||||
this->m_pl_maxInclination = pInfo->m_pl_maxInclination; // 最大倾角
|
||||
this->m_flGrad1 = pInfo->m_flGrad1; //可信度1
|
||||
this->m_flGrad2 = pInfo->m_flGrad2; //可信度2
|
||||
|
||||
//读数据
|
||||
this->ReadData(m_strSlfName, m_csCurveDDIR, 0, &m_Curve);
|
||||
this->ReadData(m_strSlfName, m_csCurveDANG, 1, &m_Curve2);
|
||||
this->ReadData(m_strSlfName, m_csCurveGrad, 2, &m_Curve3);
|
||||
|
||||
float flWidth[50];
|
||||
int l;
|
||||
float dep;
|
||||
int m_nScaleThinGrid=10;
|
||||
float lstk=2;
|
||||
float dang,ddir;
|
||||
float dg,dy,dx;
|
||||
// 计算位置
|
||||
int iMyWidth = this->axisRect(0)->width();
|
||||
float x1 = 0;
|
||||
float x2 = iMyWidth;
|
||||
float x=0,y=0;
|
||||
int j=0,i=0,k=0;
|
||||
float flTemp=0;
|
||||
for(int i=0;i<50;i++) flWidth[i]=0;
|
||||
CalcDipWidth(m_nScaleThinGrid, flWidth, 1.2, x1, x2, 1.);
|
||||
|
||||
|
||||
QPen pPenTail(m_crTail,m_nTailWidth);
|
||||
|
||||
float flDepthScale,tempf,flVal;
|
||||
int nPointNum=0,tempi;
|
||||
QRectF rt,rtRect;
|
||||
float dgtord,dr;
|
||||
for(int i=0;i<50;i++) flWidth[i]=0;
|
||||
if(m_Value==0 || m_Value2==0)
|
||||
{
|
||||
Refurbish();
|
||||
}
|
||||
if ( m_Value==0 || m_Value2==0 )
|
||||
return ;
|
||||
|
||||
dgtord=3.14159265/180.;
|
||||
|
||||
CalcDipWidth(9, flWidth, 1.2, 0, iMyWidth, 1);
|
||||
|
||||
|
||||
while ( 1)
|
||||
{
|
||||
dep = m_SDep + k * m_Rlev;
|
||||
if ( dep >m_EDep )
|
||||
break;
|
||||
|
||||
if(dep<m_SDep)
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
i=(dep-m_Curve2.StartDepth)/m_Curve2.DepLevel+0.5;
|
||||
if(i<0)
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
//可信度
|
||||
if ( m_Value3!=NULL)
|
||||
{
|
||||
flVal = GetData(m_Curve3.RepCode,(char *)&m_Value3[i*m_Curve3.CodeLen]);//置信度
|
||||
if ( flVal < m_flGrad1 || flVal > m_flGrad2 )
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
flVal = GetData(m_Curve2.RepCode,(char *)&m_Value2[i*m_Curve2.CodeLen]);//DANG
|
||||
if ( flVal > m_pl_maxInclination || flVal < m_pl_minInclination )
|
||||
{
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
|
||||
tempi = (int)( flVal /10.);
|
||||
|
||||
tempf = 0.;
|
||||
for (j=0; j<tempi; j++)
|
||||
{
|
||||
tempf += flWidth[j];
|
||||
}
|
||||
x = (x1+x2)/2.0; //160;//= tempf + (flVal-tempi*10.)*(flWidth[j+1]/10.);
|
||||
y = -dep;//起始深度
|
||||
|
||||
//方位
|
||||
dang = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR
|
||||
dr=dang*dgtord;
|
||||
|
||||
QCPItemLine *qcpItemLine = new QCPItemLine(this);
|
||||
qcpItemLine->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->setPen(pPenTail);
|
||||
qcpItemLine->m_bCustom = true;
|
||||
qcpItemLine->m_nTailLen = m_nTailLen/2.0; //杆长
|
||||
qcpItemLine->m_nRadius = 0; //半径
|
||||
qcpItemLine->m_dr = dr;
|
||||
//
|
||||
QCPItemLine *qcpItemLine1 = new QCPItemLine(this);
|
||||
qcpItemLine1->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine1->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine1->setPen(pPenTail);
|
||||
qcpItemLine1->m_bCustom = true;
|
||||
qcpItemLine1->m_nTailLen = m_nTailLen/2.0; //杆长
|
||||
qcpItemLine1->m_nRadius = 0; //半径
|
||||
qcpItemLine1->m_dr = dr+PI;
|
||||
|
||||
k++;
|
||||
}
|
||||
this->replot();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -674,6 +674,12 @@ public slots:
|
|||
//改变套管组件属性,直径
|
||||
void s_changeGuanD(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, double newD);
|
||||
|
||||
//改变蝌蚪图属性
|
||||
void s_changeKedouProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
//改变杆状图属性
|
||||
void s_changeGanzhuangProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
public:
|
||||
//蝌蚪图重绘网格线
|
||||
bool mKedou = false;
|
||||
|
|
@ -730,7 +736,8 @@ public:
|
|||
void addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, const QPointF& p1, const QPointF& p2, const QPen& wPen);
|
||||
|
||||
//蝌蚪
|
||||
float m_LeftVal2,m_RightVal2; //最小倾角、最大倾角
|
||||
double m_pl_minInclination = 0; // 最小倾角
|
||||
double m_pl_maxInclination = 90; // 最大倾角
|
||||
float m_flGrad1,m_flGrad2; // 可信度
|
||||
int m_iPrecision; //小数位数
|
||||
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
||||
|
|
@ -744,6 +751,9 @@ public:
|
|||
|
||||
void ReadFracDef_gaodaofeng();
|
||||
|
||||
//杆状图
|
||||
void Draw_Ganzhuang();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ QtProjectWidgets::QtProjectWidgets(QWidget *parent)
|
|||
//关联信号槽,关闭项目
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_CloseProject()), this, SLOT(s_CloseProject()));
|
||||
|
||||
//关联信号槽,数据导入
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ImportSingleWellLogData()), this, SLOT(onImportSingleWellLogDataToolBar()));
|
||||
|
||||
//关联信号槽,输出数据,数据导出
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_OutWellLogRound()), this, SLOT(onOutWellLogRound()));
|
||||
|
||||
//向左侧树图,追加固井结论表格
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddGujingToTree(QString,QString,QString)), this, SLOT(s_AddGujingToTree(QString,QString,QString)));
|
||||
|
||||
|
|
@ -771,10 +777,10 @@ void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
|||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onCopyObject()));
|
||||
menu->addAction(action_New);
|
||||
|
||||
// action_New = new QAction("输出数据", treeWidget);
|
||||
// action_New->setIcon(QIcon(GetImagePath() + "icon/outcurves.png")); // 设置图标
|
||||
// connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onOutWellLogRound()));
|
||||
// menu->addAction(action_New);
|
||||
action_New = new QAction("输出数据", treeWidget);
|
||||
action_New->setIcon(QIcon(GetImagePath() + "icon/outcurves.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onOutWellLogRound()));
|
||||
menu->addAction(action_New);
|
||||
}
|
||||
//初始化参数卡-右键菜单
|
||||
void QtProjectWidgets::initParameterCardTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||
|
|
@ -1857,7 +1863,7 @@ void QtProjectWidgets::onImportFolder()
|
|||
return;
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportSingleWellLogData()
|
||||
void QtProjectWidgets::ImportSingleWellLogData(bool bToolBar)
|
||||
{
|
||||
MainWindow* pMainWindow = nullptr;
|
||||
|
||||
|
|
@ -1901,28 +1907,30 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
|||
QMessageBox::information(NULL,"无法识别的文件",listFiles[0]);
|
||||
return ;
|
||||
}
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
|
||||
QString wellname = wellItem->text(0);
|
||||
QString wellroundname = wellname;
|
||||
QString strTreeTag = wellItem->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wells") //井组
|
||||
{
|
||||
QFileInfo temDir(file_name);
|
||||
QString tempWellName=temDir.completeBaseName();
|
||||
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||
//m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||
wellname = tempWellName;
|
||||
wellroundname = wellname;
|
||||
}
|
||||
else if (strTreeTag == "wellname") //井名
|
||||
{
|
||||
QString wellname = tempWellName;
|
||||
QString wellroundname = wellname;
|
||||
|
||||
if (!bToolBar)
|
||||
{
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
|
||||
QString strTreeTag = wellItem->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellname") //井名
|
||||
{
|
||||
wellname = wellItem->text(0);
|
||||
}
|
||||
else if (strTreeTag == "wellItem") //井次
|
||||
{
|
||||
wellname = wellItem->parent()->text(0);
|
||||
wellroundname = wellItem->text(0);
|
||||
}
|
||||
}
|
||||
|
||||
CDataImport::m_prjname = g_prjname;
|
||||
ImportDataDialog *pDialog = new ImportDataDialog(NULL,wellname,wellroundname);
|
||||
QTreeWidgetItem rootItem = *ui->treeWidget->topLevelItem(0);
|
||||
|
|
@ -1934,11 +1942,20 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
|||
QString strProjectFile = strProjectFolder + g_prjname;
|
||||
strProjectFile += ".wwl";
|
||||
s_OpenProject(strProjectFile);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportSingleWellLogData()
|
||||
{
|
||||
ImportSingleWellLogData(false);
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportSingleWellLogDataToolBar()
|
||||
{
|
||||
ImportSingleWellLogData(true);
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onImportSlfTable()
|
||||
{
|
||||
// CInDefTableDlg InDefTableDlg(0);
|
||||
|
|
@ -1961,16 +1978,82 @@ void QtProjectWidgets::onImportSlfTable()
|
|||
|
||||
void QtProjectWidgets::onOutWellLogRound()
|
||||
{
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
|
||||
QString wellname = wellItem->text(0);
|
||||
QString wellroundname = wellname;
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
folderPath = folderPath + "/" + "#" + wellname + "/" + wellroundname + ".slf";
|
||||
QStringList namelist;//=GetSelWellRound();
|
||||
namelist<<folderPath;
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
int nSelSize = ui->treeWidget->selectedItems().size();// 防止没有选中时崩溃
|
||||
if (wellItem && nSelSize>0)
|
||||
{
|
||||
QString strTreeTag = wellItem->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellname") //井名
|
||||
{
|
||||
int childCount = wellItem->childCount(); // 获取子节点数量
|
||||
for (int i = 0; i < childCount; ++i)
|
||||
{
|
||||
QTreeWidgetItem *wellround = wellItem->child(i);
|
||||
QString strSlfFile = wellItem->child(i)->data(0, Qt::UserRole + 1).toString(); // 存储额外数据,项目名
|
||||
namelist<<strSlfFile;
|
||||
}
|
||||
}
|
||||
else if (strTreeTag == "wellItem") //井次
|
||||
{
|
||||
QString strSlfFile = wellItem->data(0, Qt::UserRole + 1).toString(); // 存储额外数据,项目名
|
||||
namelist<<strSlfFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
QTreeWidgetItem *parenItem = wellItem->parent();
|
||||
while(parenItem)
|
||||
{
|
||||
if (parenItem == ui->treeWidget->topLevelItem(0))
|
||||
break;
|
||||
strTreeTag = wellItem->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellItem") //井次
|
||||
{
|
||||
QString strSlfFile = wellItem->data(0, Qt::UserRole + 1).toString(); // 存储额外数据,项目名
|
||||
namelist<<strSlfFile;
|
||||
break;
|
||||
}
|
||||
parenItem = wellItem->parent();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (namelist.size()==0)
|
||||
{
|
||||
int topCount = ui->treeWidget->topLevelItemCount(); // 获取顶级节点数量
|
||||
if(topCount<1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(0);
|
||||
int childCount = item->childCount(); // 获取子节点数量
|
||||
for (int i = 0; i < childCount; ++i)
|
||||
{
|
||||
//井组,数据分析...
|
||||
QTreeWidgetItem *wellGroupItem = item->child(i);
|
||||
QString wellGroupname = wellGroupItem->text(0);
|
||||
if (wellGroupname == "井组")
|
||||
{
|
||||
int wellCount = wellGroupItem->childCount(); // 获取井节点数量
|
||||
for (int j = 0; j < wellCount; ++j)
|
||||
{
|
||||
QTreeWidgetItem *wellchild = wellGroupItem->child(j);
|
||||
int wellchildCount = wellchild->childCount(); // 获取井节点数量
|
||||
for (int k = 0; k < wellchildCount; ++k)
|
||||
{
|
||||
QString strTreeTag = wellchild->child(k)->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellItem") //井次
|
||||
{
|
||||
QString strSlfFile = wellchild->child(k)->data(0, Qt::UserRole + 1).toString(); // 存储额外数据,项目名
|
||||
namelist<<strSlfFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (namelist.size()==0)
|
||||
return;
|
||||
QStringList curvelist;//=GetSelCurve();
|
||||
CDataOutPut* moutPut=new CDataOutPut();
|
||||
if(!moutPut)return;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@ public slots:
|
|||
void onCutSlf(); //剪切井次
|
||||
void onEditWelllogRound();
|
||||
void onImportFolder(); //按目录导入测井数据
|
||||
void onImportSingleWellLogData();
|
||||
void onImportSingleWellLogData(); //数据导入
|
||||
void onImportSingleWellLogDataToolBar(); //数据导入(工具栏)
|
||||
void onImportSlfTable();
|
||||
void onOutWellLogRound();
|
||||
void onCopyObject(); //数据对象拷贝
|
||||
|
|
@ -154,6 +155,8 @@ public:
|
|||
void initParCardFolderTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||
//初始化根节点(波列目录)-右键菜单
|
||||
void initWaveFolderTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||
//数据导入
|
||||
void ImportSingleWellLogData(bool bToolBar);
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ int CSLFAsciiConvertor::ScanLogFile(char *FileName,char *Message,char **CurveNa
|
|||
char name[curve_name_len+1],temps[15];
|
||||
int i,j,num;
|
||||
// CString cs,csOutName;
|
||||
QFile InFile(FileName);
|
||||
QFile InFile(GBKToUTF8(FileName));
|
||||
if( !InFile.open(QIODevice::ReadOnly ) )return 0;
|
||||
QTextStream textstream( &InFile );
|
||||
QString str = textstream.readLine();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user