固井结论,支持记录到模板json文件
This commit is contained in:
parent
ef3683af4c
commit
61692a81b4
|
|
@ -277,11 +277,30 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
||||||
if (value.isObject()) {
|
if (value.isObject()) {
|
||||||
QJsonObject lineObjInfo = value.toObject();
|
QJsonObject lineObjInfo = value.toObject();
|
||||||
|
|
||||||
|
QString strType = lineObjInfo.value("Type").toString();
|
||||||
|
|
||||||
//展示其中一条曲线
|
//展示其中一条曲线
|
||||||
if (lineObjInfo.value("Type").toString() == "curveObject")
|
if (strType == "curveObject")
|
||||||
{
|
{
|
||||||
DisplayLine_One(lineObjInfo);
|
DisplayLine_One(lineObjInfo);
|
||||||
}
|
}
|
||||||
|
else if (strType == "tableObject")
|
||||||
|
{
|
||||||
|
QString strLineName = "";
|
||||||
|
if (lineObjInfo.contains("LineName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strLineName = value.toString();
|
||||||
|
//qDebug() << "LineName:" << strLineName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||||
|
{
|
||||||
|
//固井结论
|
||||||
|
DisplayType_Gujing(lineObjInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayType_One(lineObjInfo);
|
DisplayType_One(lineObjInfo);
|
||||||
|
|
@ -292,6 +311,88 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//固井结论
|
||||||
|
void FormDraw::DisplayType_Gujing(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColor"))
|
||||||
|
{
|
||||||
|
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString folderPath = GetLogdataPath();
|
||||||
|
folderPath = folderPath + g_prjname;
|
||||||
|
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
|
if (strLineName != "")
|
||||||
|
{
|
||||||
|
QStringList listOtherProperty;
|
||||||
|
listOtherProperty.append(strAliasName);//固井别名
|
||||||
|
listOtherProperty.append(lineColor.name());//固井名称颜色
|
||||||
|
listOtherProperty.append(curveNameFont.toString());//固井名称字体
|
||||||
|
//固井结论
|
||||||
|
this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = "";
|
||||||
|
|
@ -300,6 +401,7 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QString strUnit = "";//单位
|
QString strUnit = "";//单位
|
||||||
|
QFont curveNameFont("微软雅黑", 10); // 曲线名称字体
|
||||||
//
|
//
|
||||||
double newLeftScale = 0;//左刻度
|
double newLeftScale = 0;//左刻度
|
||||||
double newRightScale = 500;//右刻度
|
double newRightScale = 500;//右刻度
|
||||||
|
|
@ -379,6 +481,15 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
//qDebug() << "strUnit:" << strUnit;
|
//qDebug() << "strUnit:" << strUnit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//字体
|
||||||
|
if (lineObjInfo.contains("curveNameFont"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("curveNameFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
curveNameFont.fromString(value.toString());
|
||||||
|
//qDebug() << "strUnit:" << strUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (lineObjInfo.contains("vmin"))
|
if (lineObjInfo.contains("vmin"))
|
||||||
{
|
{
|
||||||
|
|
@ -436,6 +547,7 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
QStringList listOtherProperty;
|
QStringList listOtherProperty;
|
||||||
listOtherProperty.append(strAliasName);
|
listOtherProperty.append(strAliasName);
|
||||||
listOtherProperty.append(strUnit);
|
listOtherProperty.append(strUnit);
|
||||||
|
listOtherProperty.append(curveNameFont.toString());//曲线名称字体
|
||||||
//新建曲线
|
//新建曲线
|
||||||
s_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName,
|
s_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName,
|
||||||
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty);
|
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty);
|
||||||
|
|
@ -574,7 +686,7 @@ void FormDraw::paintEvent(QPaintEvent*)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QStringList listOtherProperty)
|
||||||
{
|
{
|
||||||
if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
if (strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
||||||
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
||||||
|
|
@ -642,7 +754,17 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
|
||||||
else if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
else if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||||
{
|
{
|
||||||
//固井结论
|
//固井结论
|
||||||
initGujing(curv, strSlfName, strLineName);
|
if(listOtherProperty.size()>=3)
|
||||||
|
{
|
||||||
|
QString strAliasName = listOtherProperty[0];
|
||||||
|
QColor newlineColor=QColor(0,0,0);
|
||||||
|
newlineColor.setNamedColor(listOtherProperty[1]);
|
||||||
|
initGujing(curv, strSlfName, strLineName, strAliasName, newlineColor, listOtherProperty);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
initGujing(curv, strSlfName, strLineName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (strLineName == "CORE_PHYSICS")
|
else if (strLineName == "CORE_PHYSICS")
|
||||||
{
|
{
|
||||||
|
|
@ -4006,7 +4128,7 @@ bool FormDraw::LoadFromSLF_SwallCore(QMyCustomPlot *widget, QString strSlfName,
|
||||||
}
|
}
|
||||||
|
|
||||||
//固井结论
|
//固井结论
|
||||||
void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName)
|
void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName, QColor newlineColor, QStringList listOtherProperty)
|
||||||
{
|
{
|
||||||
int iMyWidth = widget->axisRect(0)->width();
|
int iMyWidth = widget->axisRect(0)->width();
|
||||||
float vmax = iMyWidth;
|
float vmax = iMyWidth;
|
||||||
|
|
@ -4029,7 +4151,6 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
|
||||||
widget->xAxis = yAxis;
|
widget->xAxis = yAxis;
|
||||||
widget->yAxis = xAxis;
|
widget->yAxis = xAxis;
|
||||||
|
|
||||||
|
|
||||||
m_LeftVal = 0;
|
m_LeftVal = 0;
|
||||||
m_RightVal = 90;
|
m_RightVal = 90;
|
||||||
//隐藏刻度
|
//隐藏刻度
|
||||||
|
|
@ -4040,13 +4161,18 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
|
||||||
//
|
//
|
||||||
widget->LoadFromSLF_Gujing(strSlfName, strLineName);
|
widget->LoadFromSLF_Gujing(strSlfName, strLineName);
|
||||||
|
|
||||||
QString strAliasName = "固井结论";
|
//QString strAliasName = "固井结论";
|
||||||
|
//QColor newlineColor=QColor(0,0,0);
|
||||||
|
if(listOtherProperty.size()>=3)
|
||||||
|
{
|
||||||
|
strAliasName = listOtherProperty[0];
|
||||||
|
newlineColor.setNamedColor(listOtherProperty[1]);
|
||||||
|
}
|
||||||
QString strUnit = "";
|
QString strUnit = "";
|
||||||
QColor newlineColor=QColor(0,0,0);
|
|
||||||
double width=2;
|
double width=2;
|
||||||
QString strScaleType = "";
|
QString strScaleType = "";
|
||||||
//道-对象
|
//道-对象
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject");
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject", listOtherProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public:
|
||||||
void DisplayLines(QJsonArray linesArray);
|
void DisplayLines(QJsonArray linesArray);
|
||||||
void DisplayLine_One(QJsonObject lineObjInfo);
|
void DisplayLine_One(QJsonObject lineObjInfo);
|
||||||
void DisplayType_One(QJsonObject objInfo);
|
void DisplayType_One(QJsonObject objInfo);
|
||||||
|
void DisplayType_Gujing(QJsonObject lineObjInfo);//固井结论
|
||||||
private:
|
private:
|
||||||
Ui::FormDraw *ui;
|
Ui::FormDraw *ui;
|
||||||
|
|
||||||
|
|
@ -64,7 +65,7 @@ protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
QMyCustomPlot* addTableLine(QString strUuid, QString strSlfName, QString strWellName,
|
QMyCustomPlot* addTableLine(QString strUuid, QString strSlfName, QString strWellName,
|
||||||
QString strTrackName, QString strLineName);
|
QString strTrackName, QString strLineName, QStringList listOtherProperty={});
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void dragEnterEvent(QDragEnterEvent* event);
|
void dragEnterEvent(QDragEnterEvent* event);
|
||||||
|
|
@ -188,7 +189,7 @@ public:
|
||||||
bool LoadFromSLF_SwallCore(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
bool LoadFromSLF_SwallCore(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||||
|
|
||||||
//固井结论
|
//固井结论
|
||||||
void initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
void initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName, QString strAliasName = "固井结论", QColor newlineColor=QColor(0,0,0), QStringList listOtherProperty={});
|
||||||
|
|
||||||
//岩心实验数据
|
//岩心实验数据
|
||||||
void initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
void initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,23 @@ QJsonObject FormInfo::makeJson()
|
||||||
// rootObj["TrackName"] = m_strTrackName;
|
// rootObj["TrackName"] = m_strTrackName;
|
||||||
rootObj["LineName"] = m_strLineName;
|
rootObj["LineName"] = m_strLineName;
|
||||||
rootObj["AliasName"] = m_strAliasName;
|
rootObj["AliasName"] = m_strAliasName;
|
||||||
|
|
||||||
|
if (m_strType == "tableObject")
|
||||||
|
{
|
||||||
|
if (m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT")
|
||||||
|
{
|
||||||
|
//固井结论
|
||||||
|
rootObj["Type"] = m_strType;
|
||||||
|
rootObj["curveNameFont"] = m_curveNameFont.toString();
|
||||||
|
rootObj["lineColor"] = m_lineColor.name();
|
||||||
|
//item属性写入slf文件,不需要此次记录
|
||||||
|
return rootObj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rootObj["Unit"] = m_strUnit;
|
rootObj["Unit"] = m_strUnit;
|
||||||
rootObj["Type"] = m_strType;
|
rootObj["Type"] = m_strType;
|
||||||
|
rootObj["curveNameFont"] = m_curveNameFont.toString();
|
||||||
rootObj["lineColor"] = m_lineColor.name();
|
rootObj["lineColor"] = m_lineColor.name();
|
||||||
rootObj["Width"] = m_dWidth;
|
rootObj["Width"] = m_dWidth;
|
||||||
rootObj["lineStyle"] = m_lineStyle;
|
rootObj["lineStyle"] = m_lineStyle;
|
||||||
|
|
|
||||||
|
|
@ -85,16 +85,16 @@ public:
|
||||||
QString m_strType;//类型:curve, wave
|
QString m_strType;//类型:curve, wave
|
||||||
//
|
//
|
||||||
double m_dWidth;//线宽
|
double m_dWidth;//线宽
|
||||||
QColor m_lineColor;//颜色
|
QColor m_lineColor;//颜色(曲线颜色,固井文字颜色)
|
||||||
Qt::PenStyle m_lineStyle;//线形
|
Qt::PenStyle m_lineStyle;//线形
|
||||||
//X坐标
|
//X坐标
|
||||||
float m_vmin;//左刻度
|
float m_vmin;//左刻度
|
||||||
float m_vmax;//右刻度
|
float m_vmax;//右刻度
|
||||||
QString m_strScaleType;//刻度类型(线性,对数)
|
QString m_strScaleType;//刻度类型(线性,对数)
|
||||||
|
|
||||||
QFont m_curveNameFont; // 曲线名称
|
QFont m_curveNameFont; // 曲线名称字体
|
||||||
QFont m_curveUnitFont; // 曲线单位
|
QFont m_curveUnitFont; // 曲线单位字体
|
||||||
QFont m_curveScaleFont; // 曲线刻度
|
QFont m_curveScaleFont; // 曲线刻度字体
|
||||||
|
|
||||||
//绘制方式
|
//绘制方式
|
||||||
bool m_bDrawLine = true; // 曲线
|
bool m_bDrawLine = true; // 曲线
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
||||||
this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
//波列
|
//波列
|
||||||
connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)),
|
||||||
this, SLOT(s_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
this, SLOT(s_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)));
|
||||||
|
|
||||||
// 深度
|
// 深度
|
||||||
connect(this, SIGNAL(sig_AddDepth(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
connect(this, SIGNAL(sig_AddDepth(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||||
|
|
@ -169,7 +169,7 @@ FormTrack::~FormTrack()
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
void FormTrack::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)
|
void FormTrack::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)
|
||||||
{
|
{
|
||||||
qDebug()<< "Add";
|
qDebug()<< "Add";
|
||||||
|
|
||||||
|
|
@ -184,7 +184,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
||||||
else if(strType=="tableObject")
|
else if(strType=="tableObject")
|
||||||
{
|
{
|
||||||
//新建表格曲线
|
//新建表格曲线
|
||||||
emit sig_AddTableLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
emit sig_AddTableLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty);
|
||||||
}
|
}
|
||||||
else if(strType=="depthObject")
|
else if(strType=="depthObject")
|
||||||
{
|
{
|
||||||
|
|
@ -451,7 +451,7 @@ void FormTrack::s_addWave(QString strSlfName, QString strWellName, QString strTr
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty)
|
||||||
{
|
{
|
||||||
if(strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
if(strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
||||||
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
||||||
|
|
@ -487,6 +487,16 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
|
||||||
formInfo->setVMin(vmin);
|
formInfo->setVMin(vmin);
|
||||||
formInfo->setFrontColor(QColor(0,0,0));
|
formInfo->setFrontColor(QColor(0,0,0));
|
||||||
formInfo->setBackColor(QColor(255,255,255));
|
formInfo->setBackColor(QColor(255,255,255));
|
||||||
|
if(strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||||
|
{
|
||||||
|
//固井结论
|
||||||
|
if(listOtherProperty.size()>=3)
|
||||||
|
{
|
||||||
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
|
curveNameFont.fromString(listOtherProperty[2]);
|
||||||
|
formInfo->m_curveNameFont = curveNameFont;
|
||||||
|
}
|
||||||
|
}
|
||||||
//设置高度
|
//设置高度
|
||||||
ui->tableWidget->setRowHeight(row, 100);
|
ui->tableWidget->setRowHeight(row, 100);
|
||||||
//单元格委托
|
//单元格委托
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public:
|
||||||
//NoLRBorderDelegate *m_delegate;
|
//NoLRBorderDelegate *m_delegate;
|
||||||
|
|
||||||
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);
|
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* setDrawDt(QStringList listdt, QJsonObject obj);
|
FormInfo* setDrawDt(QStringList listdt, QJsonObject obj);
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
void sig_AddWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void sig_AddWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
void sig_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void sig_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||||
|
|
||||||
void sig_AddDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void sig_AddDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
void sig_AddGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void sig_AddGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
|
@ -92,7 +92,7 @@ public slots:
|
||||||
|
|
||||||
void s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
|
||||||
void s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||||
void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
|
|
||||||
|
|
@ -2594,6 +2594,19 @@ void QMyCustomPlot::ChangeDrawMethod(QString strUuid, QString strSlfName, QStrin
|
||||||
//曲线
|
//曲线
|
||||||
void QMyCustomPlot::s_ChangeDrawLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawLine)
|
void QMyCustomPlot::s_ChangeDrawLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawLine)
|
||||||
{
|
{
|
||||||
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName &&
|
||||||
|
m_strLineName == strLineName)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
m_bDrawLine = bDrawLine;
|
m_bDrawLine = bDrawLine;
|
||||||
//绘制方式
|
//绘制方式
|
||||||
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
|
@ -2602,6 +2615,19 @@ void QMyCustomPlot::s_ChangeDrawLine(QString strUuid, QString strSlfName, QStrin
|
||||||
//杆状
|
//杆状
|
||||||
void QMyCustomPlot::s_ChangeDrawGan(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawGan)
|
void QMyCustomPlot::s_ChangeDrawGan(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawGan)
|
||||||
{
|
{
|
||||||
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName &&
|
||||||
|
m_strLineName == strLineName)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
m_bDrawGan = bDrawGan;
|
m_bDrawGan = bDrawGan;
|
||||||
//绘制方式
|
//绘制方式
|
||||||
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
|
@ -2610,6 +2636,19 @@ void QMyCustomPlot::s_ChangeDrawGan(QString strUuid, QString strSlfName, QString
|
||||||
//点状
|
//点状
|
||||||
void QMyCustomPlot::s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint)
|
void QMyCustomPlot::s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint)
|
||||||
{
|
{
|
||||||
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName &&
|
||||||
|
m_strLineName == strLineName)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
m_bDrawPoint = bDrawPoint;
|
m_bDrawPoint = bDrawPoint;
|
||||||
//绘制方式
|
//绘制方式
|
||||||
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
ChangeDrawMethod(strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
|
@ -2618,7 +2657,78 @@ void QMyCustomPlot::s_ChangeDrawPoint(QString strUuid, QString strSlfName, QStri
|
||||||
//绘制对称曲线
|
//绘制对称曲线
|
||||||
void QMyCustomPlot::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry)
|
void QMyCustomPlot::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry)
|
||||||
{
|
{
|
||||||
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName &&
|
||||||
|
m_strLineName == strLineName)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
m_bDrawSymmetry = bDrawSymmetry;
|
m_bDrawSymmetry = bDrawSymmetry;
|
||||||
|
|
||||||
|
if(m_bDrawSymmetry)//绘制对称线
|
||||||
|
{
|
||||||
|
|
||||||
|
//graph(duichen)
|
||||||
|
QVector<double> x, y;
|
||||||
|
|
||||||
|
CLogIO *logio=new CLogIO();
|
||||||
|
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||||
|
int index=logio->OpenCurve(strLineName.toStdString().c_str());
|
||||||
|
if(index<0)
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Slf_CURVE curveinfo;
|
||||||
|
float *val;
|
||||||
|
float sdep,edep,rlev;
|
||||||
|
float vmax,vmin;
|
||||||
|
//
|
||||||
|
logio->GetCurveInfo(index,&curveinfo);
|
||||||
|
sdep=curveinfo.StartDepth;
|
||||||
|
edep=curveinfo.EndDepth;
|
||||||
|
rlev=curveinfo.DepLevel;
|
||||||
|
//
|
||||||
|
int count=(curveinfo.EndDepth-curveinfo.StartDepth)/curveinfo.DepLevel+1.5;
|
||||||
|
val=new float[count];
|
||||||
|
logio->ReadCurve(index,curveinfo.StartDepth,count,&val[0]);
|
||||||
|
logio->CloseCurve(index);
|
||||||
|
delete logio;
|
||||||
|
|
||||||
|
|
||||||
|
for(int i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
x.append(-(sdep+ rlev*i));
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
|
{
|
||||||
|
y.append(log(m_iX1)+log(m_iX2)-log(val[i]));
|
||||||
|
}
|
||||||
|
else //if(m_strScaleType=="线性")
|
||||||
|
{
|
||||||
|
y.append(m_iX1+m_iX2-val[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
this->yAxis2->setRange(m_iY1, m_iY2);
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
|
{
|
||||||
|
this->xAxis2->setRange(log(m_iX1), log(m_iX2));
|
||||||
|
}
|
||||||
|
else //if(m_strScaleType=="线性")
|
||||||
|
{
|
||||||
|
this->xAxis2->setRange(m_iX1, m_iX2);
|
||||||
|
}
|
||||||
|
this->addGraph(yAxis2, xAxis2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
|
|
@ -2681,6 +2791,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
this->removeGraph(1);
|
this->removeGraph(1);
|
||||||
}
|
}
|
||||||
//graph(1)
|
//graph(1)
|
||||||
|
QCPGraph *graph_Fill=nullptr;
|
||||||
QVector<double> x, y;
|
QVector<double> x, y;
|
||||||
|
|
||||||
if(newTargetLine=="左界道")
|
if(newTargetLine=="左界道")
|
||||||
|
|
@ -2692,7 +2803,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
y.append(m_iX1);
|
y.append(m_iX1);
|
||||||
|
|
||||||
//
|
//
|
||||||
this->addGraph();
|
graph_Fill=this->addGraph();
|
||||||
}
|
}
|
||||||
else if(newTargetLine=="右界道")
|
else if(newTargetLine=="右界道")
|
||||||
{
|
{
|
||||||
|
|
@ -2703,7 +2814,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
y.append(m_iX2);
|
y.append(m_iX2);
|
||||||
|
|
||||||
//
|
//
|
||||||
this->addGraph();
|
graph_Fill=this->addGraph();
|
||||||
}
|
}
|
||||||
else if(newTargetLine=="对称线")
|
else if(newTargetLine=="对称线")
|
||||||
{
|
{
|
||||||
|
|
@ -2755,7 +2866,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
this->xAxis2->setRange(m_iX1, m_iX2);
|
this->xAxis2->setRange(m_iX1, m_iX2);
|
||||||
}
|
}
|
||||||
this->addGraph(yAxis2, xAxis2);
|
graph_Fill=this->addGraph(yAxis2, xAxis2);
|
||||||
}
|
}
|
||||||
else//其他曲线
|
else//其他曲线
|
||||||
{
|
{
|
||||||
|
|
@ -2776,7 +2887,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//读取基线信息
|
//读取基线信息
|
||||||
int indexBaseCurv = logio->OpenCurve(strLineName.toStdString().c_str());
|
int indexBaseCurv = logio->OpenCurve(strLineName.toStdString().c_str());
|
||||||
if(indexBaseCurv < 0) {
|
if(indexBaseCurv < 0) {
|
||||||
this->addGraph();//空曲线
|
graph_Fill=this->addGraph();//空曲线
|
||||||
delete logio;
|
delete logio;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2785,7 +2896,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
||||||
if(index<0)
|
if(index<0)
|
||||||
{
|
{
|
||||||
this->addGraph();//空曲线
|
graph_Fill=this->addGraph();//空曲线
|
||||||
delete logio;
|
delete logio;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2924,7 +3035,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//
|
//
|
||||||
this->yAxis2->setRange(m_iY1, m_iY2);
|
this->yAxis2->setRange(m_iY1, m_iY2);
|
||||||
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
||||||
this->addGraph(yAxis2, xAxis2);
|
graph_Fill=this->addGraph(yAxis2, xAxis2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2945,7 +3056,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//读取基线信息
|
//读取基线信息
|
||||||
int indexBaseCurv = logio->OpenCurve(strLineName.toStdString().c_str());
|
int indexBaseCurv = logio->OpenCurve(strLineName.toStdString().c_str());
|
||||||
if(indexBaseCurv < 0) {
|
if(indexBaseCurv < 0) {
|
||||||
this->addGraph();//空曲线
|
graph_Fill=this->addGraph();//空曲线
|
||||||
delete logio;
|
delete logio;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2954,7 +3065,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
||||||
if(index<0)
|
if(index<0)
|
||||||
{
|
{
|
||||||
this->addGraph();//空曲线
|
graph_Fill=this->addGraph();//空曲线
|
||||||
delete logio;
|
delete logio;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -3093,7 +3204,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//
|
//
|
||||||
this->yAxis2->setRange(m_iY1, m_iY2);
|
this->yAxis2->setRange(m_iY1, m_iY2);
|
||||||
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
||||||
this->addGraph(yAxis2, xAxis2);
|
graph_Fill=this->addGraph(yAxis2, xAxis2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3105,7 +3216,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
int index=logio->OpenCurve(newTargetLine.toStdString().c_str());
|
||||||
if(index<0)
|
if(index<0)
|
||||||
{
|
{
|
||||||
this->addGraph();
|
graph_Fill=this->addGraph();
|
||||||
|
|
||||||
delete logio;
|
delete logio;
|
||||||
}
|
}
|
||||||
|
|
@ -3149,17 +3260,25 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
}
|
}
|
||||||
this->yAxis2->setRange(m_iY1, m_iY2);
|
this->yAxis2->setRange(m_iY1, m_iY2);
|
||||||
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
this->xAxis2->setRange(vMin_Tmp, vMax_Tmp);
|
||||||
this->addGraph(yAxis2, xAxis2);
|
graph_Fill=this->addGraph(yAxis2, xAxis2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(graph_Fill)
|
||||||
|
{
|
||||||
|
graph_Fill->setData(x, y);
|
||||||
|
graph_Fill->setLineStyle(graph(0)->lineStyle());//曲线
|
||||||
|
graph_Fill->setScatterStyle(graph(0)->scatterStyle());
|
||||||
|
//graph_Fill->setPen(QColor(255, 255, 255));
|
||||||
|
graph_Fill->setPen(QColor(0, 0, 0));//(graph(0)->pen());
|
||||||
|
}
|
||||||
|
|
||||||
this->graph(1)->setData(x, y);
|
// this->graph(1)->setData(x, y);
|
||||||
graph(1)->setLineStyle(graph(0)->lineStyle());//曲线
|
// graph(1)->setLineStyle(graph(0)->lineStyle());//曲线
|
||||||
graph(1)->setScatterStyle(graph(0)->scatterStyle());
|
// graph(1)->setScatterStyle(graph(0)->scatterStyle());
|
||||||
//graph(1)->setPen(QColor(255, 255, 255));
|
// //graph(1)->setPen(QColor(255, 255, 255));
|
||||||
graph(1)->setPen(QColor(0, 0, 0));//(graph(0)->pen());
|
// graph(1)->setPen(QColor(0, 0, 0));//(graph(0)->pen());
|
||||||
|
|
||||||
//
|
//
|
||||||
if(newFillType == "岩性模式")
|
if(newFillType == "岩性模式")
|
||||||
|
|
@ -3192,7 +3311,11 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
graph(0)->setChannelFillGraph( this->graph(1));
|
|
||||||
|
if(graph_Fill)
|
||||||
|
{
|
||||||
|
graph(0)->setChannelFillGraph( graph_Fill);//this->graph()
|
||||||
|
}
|
||||||
//
|
//
|
||||||
replot();
|
replot();
|
||||||
//update();
|
//update();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user