1.优化json模板加载逻辑。针对已经打开的视图上“加载图文件”按钮也做了处理。2.参照老版本逻辑处理多井的模板加载
This commit is contained in:
parent
167968f78a
commit
86a57052ef
|
|
@ -34,6 +34,10 @@ extern QString g_prjname;
|
||||||
|
|
||||||
extern int g_iSupport3D;
|
extern int g_iSupport3D;
|
||||||
|
|
||||||
|
//左侧树图选中井次
|
||||||
|
extern QString g_strSlfName;
|
||||||
|
extern QString g_strWellName;
|
||||||
|
|
||||||
// extern void AppendConsole(Priority priority, const QString &output);
|
// extern void AppendConsole(Priority priority, const QString &output);
|
||||||
|
|
||||||
//曲线绘制(多个)
|
//曲线绘制(多个)
|
||||||
|
|
@ -565,38 +569,41 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
||||||
void FormDraw::displayCorePhysics(QJsonObject jsonObject)
|
void FormDraw::displayCorePhysics(QJsonObject jsonObject)
|
||||||
{
|
{
|
||||||
QStringList listOtherProperty;
|
QStringList listOtherProperty;
|
||||||
QString strSlfName;
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName;
|
QString strWellName = g_strWellName;
|
||||||
QString strType = jsonObject.value("Type").toString();
|
QString strType = jsonObject.value("Type").toString();
|
||||||
QString strLineName = jsonObject.value("LineName").toString();
|
QString strLineName = jsonObject.value("LineName").toString();
|
||||||
|
|
||||||
if (jsonObject.contains("SlfName"))
|
// if (jsonObject.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = jsonObject.value("SlfName");
|
// QJsonValue value = jsonObject.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (jsonObject.contains("WellName"))
|
// if (jsonObject.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = jsonObject.value("WellName");
|
// QJsonValue value = jsonObject.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
QString folderPath = GetLogdataPath();
|
|
||||||
folderPath = folderPath + g_prjname;
|
// QString folderPath = GetLogdataPath();
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// folderPath = folderPath + g_prjname;
|
||||||
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
|
//此处改为直接使用左侧树图的值
|
||||||
listOtherProperty.append(strSlfName);
|
listOtherProperty.append(strSlfName);
|
||||||
|
|
||||||
// 例区高度
|
// 例区高度
|
||||||
|
|
@ -788,39 +795,39 @@ void FormDraw::displayCorePhysics(QJsonObject jsonObject)
|
||||||
|
|
||||||
void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -880,9 +887,9 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
QStringList listOtherProperty;
|
QStringList listOtherProperty;
|
||||||
listOtherProperty.append(strAliasName);//别名
|
listOtherProperty.append(strAliasName);//别名
|
||||||
|
|
@ -905,39 +912,39 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
||||||
//表格
|
//表格
|
||||||
void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1054,9 +1061,9 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1135,39 +1142,39 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
||||||
//固井结论
|
//固井结论
|
||||||
void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1227,9 +1234,9 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1258,39 +1265,39 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
||||||
//蝌蚪图
|
//蝌蚪图
|
||||||
void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1317,9 +1324,9 @@ void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1331,39 +1338,39 @@ void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
||||||
//多臂井径
|
//多臂井径
|
||||||
void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1390,9 +1397,9 @@ void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1404,39 +1411,39 @@ void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
||||||
//气测/FMT/射孔/文本
|
//气测/FMT/射孔/文本
|
||||||
void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1478,9 +1485,9 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1498,39 +1505,39 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
||||||
//沉积相
|
//沉积相
|
||||||
void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1599,9 +1606,9 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1645,40 +1652,40 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
||||||
//套管組件
|
//套管組件
|
||||||
void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strUnit = "";//单位
|
QString strUnit = "";//单位
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1841,9 +1848,9 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
@ -1922,39 +1929,39 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
QColor lineColor = QColor(0, 0, 0);//颜色
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("LineName"))
|
if (lineObjInfo.contains("LineName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = lineObjInfo.value("LineName");
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
|
@ -1997,9 +2004,9 @@ void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
QStringList listOtherProperty;
|
QStringList listOtherProperty;
|
||||||
//FormInfo高度
|
//FormInfo高度
|
||||||
|
|
@ -2626,8 +2633,8 @@ void FormDraw::GetTvdProperty(CDrawTvd *drawTvd, QJsonObject lineObjInfo)
|
||||||
|
|
||||||
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strSlfName = "";
|
QString strSlfName = g_strSlfName;
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
// QString strTrackName = "";
|
// QString strTrackName = "";
|
||||||
QString strLineName = "";
|
QString strLineName = "";
|
||||||
QString strAliasName = "";//显示名称
|
QString strAliasName = "";//显示名称
|
||||||
|
|
@ -2654,32 +2661,32 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
QColor frontColor(0, 0, 0);//岩性前景色
|
QColor frontColor(0, 0, 0);//岩性前景色
|
||||||
QColor backColor(255, 255, 255);//岩性背景色
|
QColor backColor(255, 255, 255);//岩性背景色
|
||||||
|
|
||||||
if (lineObjInfo.contains("SlfName"))
|
// if (lineObjInfo.contains("SlfName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("SlfName");
|
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strSlfName = value.toString();
|
||||||
//qDebug() << "SlfName:" << strSlfName;
|
// //qDebug() << "SlfName:" << strSlfName;
|
||||||
|
|
||||||
//
|
// //
|
||||||
QString slffilename = QString("");
|
// QString slffilename = QString("");
|
||||||
int ind = strSlfName.lastIndexOf('\\');
|
// int ind = strSlfName.lastIndexOf('\\');
|
||||||
int ind2 = strSlfName.lastIndexOf('/');
|
// int ind2 = strSlfName.lastIndexOf('/');
|
||||||
if (ind2 > ind) ind = ind2;
|
// if (ind2 > ind) ind = ind2;
|
||||||
if (ind > -1) {
|
// if (ind > -1) {
|
||||||
slffilename = strSlfName.mid(ind + 1);
|
// slffilename = strSlfName.mid(ind + 1);
|
||||||
strSlfName = slffilename;
|
// strSlfName = slffilename;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (lineObjInfo.contains("WellName"))
|
// if (lineObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = lineObjInfo.value("WellName");
|
// QJsonValue value = lineObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
//qDebug() << "WellName:" << strWellName;
|
// //qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// if (lineObjInfo.contains("TrackName"))
|
// if (lineObjInfo.contains("TrackName"))
|
||||||
// {
|
// {
|
||||||
// QJsonValue value = lineObjInfo.value("TrackName");
|
// QJsonValue value = lineObjInfo.value("TrackName");
|
||||||
|
|
@ -2825,9 +2832,9 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString folderPath = GetLogdataPath();
|
// QString folderPath = GetLogdataPath();
|
||||||
folderPath = folderPath + g_prjname;
|
// folderPath = folderPath + g_prjname;
|
||||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
if (strLineName != "")
|
if (strLineName != "")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ extern int g_iShow; //显示刻度
|
||||||
extern int g_iHeight_MyCustom;
|
extern int g_iHeight_MyCustom;
|
||||||
extern int g_WorkSpace_Height;
|
extern int g_WorkSpace_Height;
|
||||||
|
|
||||||
|
//左侧树图选中井次
|
||||||
|
extern QString g_strSlfName;
|
||||||
|
extern QString g_strWellName;
|
||||||
|
|
||||||
//井+道名
|
//井+道名
|
||||||
FormWell::FormWell(QWidget *parent, QString strWellName) :
|
FormWell::FormWell(QWidget *parent, QString strWellName) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
|
|
@ -581,16 +585,16 @@ void FormWell::s_NewTrack_No_Line(QString strUuid, QString strWellName, QString
|
||||||
|
|
||||||
void FormWell::slot_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonObject infoObj)
|
void FormWell::slot_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonObject infoObj)
|
||||||
{
|
{
|
||||||
QString strWellName="";
|
QString strWellName=g_strWellName;
|
||||||
QString strTrackName="";
|
QString strTrackName="";
|
||||||
if (topObj.contains("WellName"))
|
// if (topObj.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = topObj.value("WellName");
|
// QJsonValue value = topObj.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
qDebug() << "WellName:" << strWellName;
|
// qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (topObj.contains("TrackName"))
|
if (topObj.contains("TrackName"))
|
||||||
{
|
{
|
||||||
QJsonValue value = topObj.value("TrackName");
|
QJsonValue value = topObj.value("TrackName");
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,10 @@ int g_iSmallPrint = 0;
|
||||||
int g_iStep = 300;
|
int g_iStep = 300;
|
||||||
int g_iPageStep = 1500;
|
int g_iPageStep = 1500;
|
||||||
|
|
||||||
|
//左侧树图选中井次
|
||||||
|
QString g_strSlfName = "";
|
||||||
|
QString g_strWellName = "";
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow)
|
ui(new Ui::MainWindow)
|
||||||
|
|
@ -623,23 +627,31 @@ void MainWindow::s_showView()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString strSlfName = "";
|
|
||||||
QString strWellName = "";
|
//---------------------------------
|
||||||
|
//左侧树图选中井次
|
||||||
|
g_strSlfName = "";
|
||||||
|
g_strWellName = "";
|
||||||
QString strLeft = m_projectWidgets->getLeftTreeString();
|
QString strLeft = m_projectWidgets->getLeftTreeString();
|
||||||
if(strLeft.length() > 0)
|
if(strLeft.length() > 0)
|
||||||
{
|
{
|
||||||
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||||
if (list.size() > 3)
|
if (list.size() > 3)
|
||||||
{
|
{
|
||||||
QFileInfo finfo(list[0]);
|
g_strSlfName = list[0];
|
||||||
strSlfName = finfo.fileName();
|
g_strWellName = list[1];
|
||||||
strWellName = list[1];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(g_strSlfName=="" || g_strWellName=="")
|
||||||
|
{
|
||||||
|
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//---------------------------------
|
||||||
|
|
||||||
//Logdata
|
//Logdata
|
||||||
QString folderPath;
|
QString folderPath;
|
||||||
|
|
@ -680,8 +692,7 @@ void MainWindow::s_showView()
|
||||||
m_centerWidgets->addTab(mainSplitter, fileName);
|
m_centerWidgets->addTab(mainSplitter, fileName);
|
||||||
|
|
||||||
MainWindowCurve *mainWindowCurve = mainSplitter->getMainWindowCurve();
|
MainWindowCurve *mainWindowCurve = mainSplitter->getMainWindowCurve();
|
||||||
mainWindowCurve->m_strSlfName = strSlfName;
|
|
||||||
mainWindowCurve->m_strWellName = strWellName;
|
|
||||||
mainWindowCurve->Open(fileFull);
|
mainWindowCurve->Open(fileFull);
|
||||||
|
|
||||||
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,10 @@ extern int g_iSmallPrint;
|
||||||
|
|
||||||
int g_iLoadingJson = 0;
|
int g_iLoadingJson = 0;
|
||||||
|
|
||||||
|
//左侧树图选中井次
|
||||||
|
extern QString g_strSlfName;
|
||||||
|
extern QString g_strWellName;
|
||||||
|
|
||||||
MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindowCurve)
|
ui(new Ui::MainWindowCurve)
|
||||||
|
|
@ -2926,6 +2930,32 @@ void MainWindowCurve::loadStyle(const QString &qssFile)
|
||||||
|
|
||||||
void MainWindowCurve::s_Open()
|
void MainWindowCurve::s_Open()
|
||||||
{
|
{
|
||||||
|
//---------------------------------
|
||||||
|
//左侧树图选中井次
|
||||||
|
//针对“加载图文件”,支持井或井次
|
||||||
|
g_strSlfName = "";
|
||||||
|
g_strWellName = "";
|
||||||
|
QString strLeft = m_leftWidgets->getLeftTreeString_Import();
|
||||||
|
if(strLeft.length() > 0)
|
||||||
|
{
|
||||||
|
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||||
|
if (list.size() > 3)
|
||||||
|
{
|
||||||
|
g_strSlfName = list[0];
|
||||||
|
g_strWellName = list[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(this, "提示", "请先选中待处理井或井次!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(g_strSlfName=="" || g_strWellName=="")
|
||||||
|
{
|
||||||
|
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//---------------------------------
|
||||||
|
|
||||||
//Logdata
|
//Logdata
|
||||||
QString folderPath;
|
QString folderPath;
|
||||||
folderPath = GetLogdataPath();
|
folderPath = GetLogdataPath();
|
||||||
|
|
@ -5132,21 +5162,21 @@ void MainWindowCurve::Open(QString fileFull)
|
||||||
{
|
{
|
||||||
QJsonObject object = document.object();
|
QJsonObject object = document.object();
|
||||||
//
|
//
|
||||||
if (object.contains("prjname"))
|
// if (object.contains("prjname"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = object.value("prjname");
|
// QJsonValue value = object.value("prjname");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strPrjname = value.toString();
|
// strPrjname = value.toString();
|
||||||
qDebug() << "prjname:" << strPrjname;
|
// qDebug() << "prjname:" << strPrjname;
|
||||||
|
|
||||||
if(strPrjname != g_prjname)
|
// if(strPrjname != g_prjname)
|
||||||
{
|
// {
|
||||||
file.close();
|
// file.close();
|
||||||
qDebug() << "JSON 模板文件项目名称与当前项目不一致!";
|
// qDebug() << "JSON 模板文件项目名称与当前项目不一致!";
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//
|
//
|
||||||
if (object.contains("iScale"))
|
if (object.contains("iScale"))
|
||||||
{
|
{
|
||||||
|
|
@ -5655,6 +5685,11 @@ void MainWindowCurve::DisplayWells(QJsonArray wellsArray)
|
||||||
|
|
||||||
int id = 0;
|
int id = 0;
|
||||||
int iCount = wellsArray.size();
|
int iCount = wellsArray.size();
|
||||||
|
if(iCount>1)
|
||||||
|
{
|
||||||
|
int flag = QMessageBox::warning(NULL,"提示",QString("图文件或模板中存在多个井文件,\n是否用当前选中井替换原井文件?"),QMessageBox::Yes,QMessageBox::No);
|
||||||
|
if(flag!=QMessageBox::Yes) return;
|
||||||
|
}
|
||||||
for(int i=0; i<iCount; i++)
|
for(int i=0; i<iCount; i++)
|
||||||
{
|
{
|
||||||
QJsonValue wellValue = wellsArray[i];
|
QJsonValue wellValue = wellsArray[i];
|
||||||
|
|
@ -5697,29 +5732,27 @@ void MainWindowCurve::DisplayWells(QJsonArray wellsArray)
|
||||||
//展示其中一口井
|
//展示其中一口井
|
||||||
void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
||||||
{
|
{
|
||||||
QString strWellName = m_strWellName;
|
QString strWellName = g_strWellName;
|
||||||
QString strSlfName = m_strSlfName;
|
QString strSlfName = g_strSlfName;
|
||||||
QJsonArray tracksArray;
|
QJsonArray tracksArray;
|
||||||
if (strSlfName.length() <= 0)
|
|
||||||
{
|
|
||||||
if (wellObjInfo.contains("WellName"))
|
|
||||||
{
|
|
||||||
QJsonValue value = wellObjInfo.value("WellName");
|
|
||||||
if (value.isString()) {
|
|
||||||
strWellName = value.toString();
|
|
||||||
qDebug() << "WellName:" << strWellName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wellObjInfo.contains("SlfName"))
|
// if (wellObjInfo.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = wellObjInfo.value("SlfName");
|
// QJsonValue value = wellObjInfo.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strSlfName = value.toString();
|
// strWellName = value.toString();
|
||||||
qDebug() << "strSlfName:" << strSlfName;
|
// qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
|
// if (wellObjInfo.contains("SlfName"))
|
||||||
|
// {
|
||||||
|
// QJsonValue value = wellObjInfo.value("SlfName");
|
||||||
|
// if (value.isString()) {
|
||||||
|
// strSlfName = value.toString();
|
||||||
|
// qDebug() << "strSlfName:" << strSlfName;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (wellObjInfo.contains("bShowTrackHead"))
|
if (wellObjInfo.contains("bShowTrackHead"))
|
||||||
{
|
{
|
||||||
|
|
@ -5792,8 +5825,6 @@ void MainWindowCurve::DisplayTracks(QJsonArray tracksArray)
|
||||||
if (topVal.isObject() && infoVal.isObject()) {
|
if (topVal.isObject() && infoVal.isObject()) {
|
||||||
QJsonObject topObj = topVal.toObject();
|
QJsonObject topObj = topVal.toObject();
|
||||||
QJsonObject infoObj = infoVal.toObject();
|
QJsonObject infoObj = infoVal.toObject();
|
||||||
|
|
||||||
topObj["WellName"] = m_strWellName;
|
|
||||||
//展示其中一道
|
//展示其中一道
|
||||||
DisplayTrack_Top(id, topObj, infoObj);
|
DisplayTrack_Top(id, topObj, infoObj);
|
||||||
|
|
||||||
|
|
@ -5820,15 +5851,15 @@ void MainWindowCurve::DisplayTrack_Top(int id, QJsonObject trackTop, QJsonObject
|
||||||
s_NewTrack_No_Line(trackTop, trackInfo);//新建空白道,没有曲线
|
s_NewTrack_No_Line(trackTop, trackInfo);//新建空白道,没有曲线
|
||||||
//if(id>0)
|
//if(id>0)
|
||||||
{
|
{
|
||||||
QString strWellName = "";
|
QString strWellName = g_strWellName;
|
||||||
if (trackTop.contains("WellName"))
|
// if (trackTop.contains("WellName"))
|
||||||
{
|
// {
|
||||||
QJsonValue value = trackTop.value("WellName");
|
// QJsonValue value = trackTop.value("WellName");
|
||||||
if (value.isString()) {
|
// if (value.isString()) {
|
||||||
strWellName = value.toString();
|
// strWellName = value.toString();
|
||||||
qDebug() << "WellName:" << strWellName;
|
// qDebug() << "WellName:" << strWellName;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
double nW = 0;
|
double nW = 0;
|
||||||
if (trackTop.contains("TrackW"))
|
if (trackTop.contains("TrackW"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ public slots:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindowSplitter* m_pParentWin = NULL;
|
MainWindowSplitter* m_pParentWin = NULL;
|
||||||
QString m_strSlfName = "";
|
|
||||||
QString m_strWellName = "";
|
|
||||||
|
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
QStringList m_listWell;
|
QStringList m_listWell;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,54 @@ QString QMyTreeWidget::getCurrentItemString()
|
||||||
}
|
}
|
||||||
return sret;
|
return sret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//针对“加载图文件”,支持井或井次
|
||||||
|
QString QMyTreeWidget::getCurrentItemString_Import()
|
||||||
|
{
|
||||||
|
QString sret = "";
|
||||||
|
QTreeWidgetItem *item = currentItem();
|
||||||
|
if(!item)
|
||||||
|
return sret;
|
||||||
|
if(item->parent()==NULL)
|
||||||
|
{
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString strTreeTag = item->data(0, Qt::UserRole).toString();
|
||||||
|
if (strTreeTag == "wellItem")//井次名称
|
||||||
|
{
|
||||||
|
//曲线
|
||||||
|
QString strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
|
//井名
|
||||||
|
QString strWellName = item->text(0);
|
||||||
|
|
||||||
|
sret = strSlfName + "#@@#"+ strWellName + "#@@#" +item->text(0)+ "#@@#" + strTreeTag;
|
||||||
|
}
|
||||||
|
else if (strTreeTag == "wellname" || //井 父节点
|
||||||
|
//
|
||||||
|
strTreeTag == "Sheet" || //表格数据
|
||||||
|
strTreeTag == "ParameterCard" || //参数卡
|
||||||
|
strTreeTag == "Curve" || //曲线
|
||||||
|
strTreeTag == "Wave" || //波列数据
|
||||||
|
strTreeTag == "TDT" || //TDT
|
||||||
|
//
|
||||||
|
strTreeTag == "tableObject" ||
|
||||||
|
strTreeTag == "curveObject" ||
|
||||||
|
strTreeTag == "cardObject" ||
|
||||||
|
strTreeTag == "waveObject" ||
|
||||||
|
strTreeTag == "TDTObject")//井名称
|
||||||
|
{
|
||||||
|
//曲线
|
||||||
|
QString strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
|
//井名
|
||||||
|
QString strWellName = item->data(0, Qt::UserRole+2).toString();
|
||||||
|
|
||||||
|
sret = strSlfName + "#@@#"+ strWellName + "#@@#" +item->text(0)+ "#@@#" + strTreeTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
void QMyTreeWidget::closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint )
|
void QMyTreeWidget::closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint )
|
||||||
{
|
{
|
||||||
QTreeWidget::closeEditor(editor,hint);
|
QTreeWidget::closeEditor(editor,hint);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ public:
|
||||||
~QMyTreeWidget();
|
~QMyTreeWidget();
|
||||||
|
|
||||||
QString getCurrentItemString();
|
QString getCurrentItemString();
|
||||||
|
|
||||||
|
//针对“加载图文件”,支持井或井次
|
||||||
|
QString getCurrentItemString_Import();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void closeTreeEditor();
|
void closeTreeEditor();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,12 @@ QString QtProjectWidgets::getLeftTreeString()
|
||||||
return ui->treeWidget->getCurrentItemString();
|
return ui->treeWidget->getCurrentItemString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//针对“加载图文件”,支持井或井次
|
||||||
|
QString QtProjectWidgets::getLeftTreeString_Import()
|
||||||
|
{
|
||||||
|
return ui->treeWidget->getCurrentItemString_Import();
|
||||||
|
}
|
||||||
|
|
||||||
void QtProjectWidgets::slotButtonCancel()
|
void QtProjectWidgets::slotButtonCancel()
|
||||||
{
|
{
|
||||||
m_ReFlag=QDialogButtonBox::StandardButton::Cancel;
|
m_ReFlag=QDialogButtonBox::StandardButton::Cancel;
|
||||||
|
|
@ -415,6 +421,8 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
QTreeWidgetItem *itemSheet = new QTreeWidgetItem();
|
QTreeWidgetItem *itemSheet = new QTreeWidgetItem();
|
||||||
itemSheet->setText(0, "表格数据");
|
itemSheet->setText(0, "表格数据");
|
||||||
itemSheet->setData(0, Qt::UserRole, "Sheet"); // 存储额外数据,如ID
|
itemSheet->setData(0, Qt::UserRole, "Sheet"); // 存储额外数据,如ID
|
||||||
|
itemSheet->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemSheet->setData(0, Qt::UserRole + 2, parentWellname); // 存储额外数据,井名
|
||||||
//itemSheet->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
//itemSheet->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
||||||
//
|
//
|
||||||
QIcon iconSheet;
|
QIcon iconSheet;
|
||||||
|
|
@ -427,6 +435,8 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
QTreeWidgetItem *itemParameterCard = new QTreeWidgetItem();
|
QTreeWidgetItem *itemParameterCard = new QTreeWidgetItem();
|
||||||
itemParameterCard->setText(0, "参数卡");
|
itemParameterCard->setText(0, "参数卡");
|
||||||
itemParameterCard->setData(0, Qt::UserRole, "ParameterCard"); // 存储额外数据,如ID
|
itemParameterCard->setData(0, Qt::UserRole, "ParameterCard"); // 存储额外数据,如ID
|
||||||
|
itemParameterCard->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemParameterCard->setData(0, Qt::UserRole + 2, parentWellname); // 存储额外数据,井名
|
||||||
//itemParameterCard->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
//itemParameterCard->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
||||||
//
|
//
|
||||||
QIcon iconParameterCard;
|
QIcon iconParameterCard;
|
||||||
|
|
@ -438,6 +448,8 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
QTreeWidgetItem *itemCurve = new QTreeWidgetItem();
|
QTreeWidgetItem *itemCurve = new QTreeWidgetItem();
|
||||||
itemCurve->setText(0, "曲线");
|
itemCurve->setText(0, "曲线");
|
||||||
itemCurve->setData(0, Qt::UserRole, "Curve"); // 存储额外数据,如ID
|
itemCurve->setData(0, Qt::UserRole, "Curve"); // 存储额外数据,如ID
|
||||||
|
itemCurve->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemCurve->setData(0, Qt::UserRole + 2, parentWellname); // 存储额外数据,井名
|
||||||
//itemAddLog->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
//itemAddLog->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
||||||
//
|
//
|
||||||
QIcon iconCurve;
|
QIcon iconCurve;
|
||||||
|
|
@ -449,6 +461,8 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
QTreeWidgetItem *itemWave = new QTreeWidgetItem();
|
QTreeWidgetItem *itemWave = new QTreeWidgetItem();
|
||||||
itemWave->setText(0, "波列数据");
|
itemWave->setText(0, "波列数据");
|
||||||
itemWave->setData(0, Qt::UserRole, "Wave"); // 存储额外数据,如ID
|
itemWave->setData(0, Qt::UserRole, "Wave"); // 存储额外数据,如ID
|
||||||
|
itemWave->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemWave->setData(0, Qt::UserRole + 2, parentWellname); // 存储额外数据,井名
|
||||||
//itemWave->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
//itemWave->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
||||||
//
|
//
|
||||||
QIcon iconWave;
|
QIcon iconWave;
|
||||||
|
|
@ -460,6 +474,8 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
QTreeWidgetItem *itemTDT = new QTreeWidgetItem();
|
QTreeWidgetItem *itemTDT = new QTreeWidgetItem();
|
||||||
itemTDT->setText(0, "TDT数据");
|
itemTDT->setText(0, "TDT数据");
|
||||||
itemTDT->setData(0, Qt::UserRole, "TDT"); // 存储额外数据,如ID
|
itemTDT->setData(0, Qt::UserRole, "TDT"); // 存储额外数据,如ID
|
||||||
|
itemTDT->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemTDT->setData(0, Qt::UserRole + 2, parentWellname); // 存储额外数据,井名
|
||||||
//itemTDT->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
//itemTDT->setData(0, Qt::UserRole + 1, indexSysInfo.at(1).toString()); // 存储额外数据,如ID
|
||||||
//
|
//
|
||||||
QIcon iconWTDT;
|
QIcon iconWTDT;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ public:
|
||||||
|
|
||||||
QString getLeftTreeString();
|
QString getLeftTreeString();
|
||||||
|
|
||||||
|
//针对“加载图文件”,支持井或井次
|
||||||
|
QString getLeftTreeString_Import();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::QtProjectWidgetsClass *ui;
|
Ui::QtProjectWidgetsClass *ui;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user