toolbar工具条的图文件菜单下,追加多井的“打开工程”按钮,支持加载多井json文件,按照json记录的井信息展示。
This commit is contained in:
parent
53a2891e6c
commit
b195449efb
|
|
@ -333,9 +333,9 @@ signals:
|
|||
void sig_changeMCalsProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName);
|
||||
|
||||
//关闭当前tab页,重新打开新模板
|
||||
void sig_tabCloseCurrent(QString fileFull, QString fileName);
|
||||
void sig_tabCloseCurrent(QString fileFull, QString fileName, bool bMultiProject);
|
||||
//加载视图(重新打开)
|
||||
void sig_ReOpen(QString fileFull, QString fileName);
|
||||
void sig_ReOpen(QString fileFull, QString fileName, bool bMultiProject);
|
||||
|
||||
//重新设置滚动条范围(头)
|
||||
void sig_setRangeVScrollBar2(QString strUuid);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ CustomTabWidget::CustomTabWidget(QWidget *parent)
|
|||
//关闭tab时,信号槽触发的函数
|
||||
connect(m_pTabBar, SIGNAL(tabCloseRequested(int)),this,SLOT(slot_tabClose(int)));
|
||||
//关闭当前tab页,重新打开新模板
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_tabCloseCurrent(QString, QString)), this, SLOT(slot_tabCloseCurrent(QString, QString)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_tabCloseCurrent(QString, QString, bool)), this, SLOT(slot_tabCloseCurrent(QString, QString, bool)));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ void CustomTabWidget::slot_tabClose(int index)
|
|||
}
|
||||
|
||||
//关闭
|
||||
void CustomTabWidget::slot_tabCloseCurrent(QString fileFull, QString fileName)
|
||||
void CustomTabWidget::slot_tabCloseCurrent(QString fileFull, QString fileName, bool bMultiProject)
|
||||
{
|
||||
QWidget *selectWidget = m_pStackedWidget->currentWidget();
|
||||
if (selectWidget == NULL)
|
||||
|
|
@ -260,5 +260,5 @@ void CustomTabWidget::slot_tabCloseCurrent(QString fileFull, QString fileName)
|
|||
PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//重新打开新模板
|
||||
emit CallManage::getInstance()->sig_ReOpen(fileFull, fileName);
|
||||
emit CallManage::getInstance()->sig_ReOpen(fileFull, fileName, bMultiProject);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public:
|
|||
public slots:
|
||||
void setCurrentIndex(int);
|
||||
void slot_tabClose(int index);
|
||||
void slot_tabCloseCurrent(QString fileFull, QString fileName);
|
||||
void slot_tabCloseCurrent(QString fileFull, QString fileName, bool bMultiProject);
|
||||
|
||||
signals:
|
||||
void tabIsEmpty();
|
||||
|
|
|
|||
|
|
@ -575,34 +575,38 @@ void FormDraw::displayCorePhysics(QJsonObject jsonObject)
|
|||
QString strType = jsonObject.value("Type").toString();
|
||||
QString strLineName = jsonObject.value("LineName").toString();
|
||||
|
||||
// if (jsonObject.contains("SlfName"))
|
||||
// {
|
||||
// QJsonValue value = jsonObject.value("SlfName");
|
||||
// if (value.isString()) {
|
||||
// strSlfName = value.toString();
|
||||
// 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;
|
||||
// }
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
if (jsonObject.contains("SlfName"))
|
||||
{
|
||||
QJsonValue value = jsonObject.value("SlfName");
|
||||
if (value.isString()) {
|
||||
strSlfName = value.toString();
|
||||
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 (jsonObject.contains("WellName"))
|
||||
// {
|
||||
// QJsonValue value = jsonObject.value("WellName");
|
||||
// if (value.isString()) {
|
||||
// strWellName = value.toString();
|
||||
// //qDebug() << "WellName:" << strWellName;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (jsonObject.contains("WellName"))
|
||||
{
|
||||
QJsonValue value = jsonObject.value("WellName");
|
||||
if (value.isString()) {
|
||||
strWellName = value.toString();
|
||||
//qDebug() << "WellName:" << strWellName;
|
||||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
}
|
||||
|
||||
//此处改为直接使用左侧树图的值
|
||||
listOtherProperty.append(strSlfName);
|
||||
|
|
@ -803,32 +807,41 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -888,10 +901,6 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
QStringList listOtherProperty;
|
||||
listOtherProperty.append(strAliasName);//别名
|
||||
listOtherProperty.append(lineColor.name());//名称颜色
|
||||
|
|
@ -920,32 +929,41 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1062,10 +1080,6 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
QStringList listOtherProperty;
|
||||
|
|
@ -1150,32 +1164,41 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1235,10 +1258,6 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
QStringList listOtherProperty;
|
||||
|
|
@ -1273,32 +1292,41 @@ void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1325,10 +1353,6 @@ void FormDraw::DisplayKedouAndOthers_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
//蝌蚪图、杆状、井眼垮塌矢量图、井斜方位图
|
||||
|
|
@ -1346,32 +1370,41 @@ void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1398,10 +1431,6 @@ void FormDraw::DisplayMCals_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
//多臂井径
|
||||
|
|
@ -1419,32 +1448,41 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1486,10 +1524,6 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
QStringList listOtherProperty;
|
||||
|
|
@ -1513,32 +1547,41 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1607,10 +1650,6 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
QStringList listOtherProperty;
|
||||
|
|
@ -1661,32 +1700,41 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -1849,10 +1897,6 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
QStringList listOtherProperty;
|
||||
|
|
@ -1937,32 +1981,41 @@ void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
|||
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;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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");
|
||||
|
|
@ -2005,10 +2058,6 @@ void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
QStringList listOtherProperty;
|
||||
//FormInfo高度
|
||||
listOtherProperty.append(QString::number(headHeight));
|
||||
|
|
@ -2662,32 +2711,41 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
|||
QColor frontColor(0, 0, 0);//岩性前景色
|
||||
QColor backColor(255, 255, 255);//岩性背景色
|
||||
|
||||
// if (lineObjInfo.contains("SlfName"))
|
||||
// {
|
||||
// QJsonValue value = lineObjInfo.value("SlfName");
|
||||
// if (value.isString()) {
|
||||
// strSlfName = value.toString();
|
||||
// //qDebug() << "SlfName:" << strSlfName;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + 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("TrackName"))
|
||||
// {
|
||||
// QJsonValue value = lineObjInfo.value("TrackName");
|
||||
|
|
@ -2833,10 +2891,6 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
||||
if (strLineName != "")
|
||||
{
|
||||
//此处属性注意顺序,后续使用按照顺序
|
||||
|
|
@ -2987,8 +3041,16 @@ void FormDraw::DisplayType_One(QJsonObject objInfo)
|
|||
{
|
||||
QStringList dt;
|
||||
dt << m_strUuid;
|
||||
dt << g_strWellName;
|
||||
dt << g_strSlfName;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
dt << m_strWellName;
|
||||
dt << m_strSlfName;
|
||||
}
|
||||
else{
|
||||
dt << g_strWellName;
|
||||
dt << g_strSlfName;
|
||||
}
|
||||
dt << strLineName;
|
||||
dt << strType;
|
||||
dt << QString::number(m_nTrackW);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ public:
|
|||
float m_vmax;
|
||||
float m_vmin;
|
||||
|
||||
bool m_bMultiProject = false; //多井的打开工程,使用模板的井名和slf名
|
||||
|
||||
public:
|
||||
void initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||
double newLeftScale=-9999, double newRightScale=-9999, QString strScaleType="线性", QColor lineColor=QColor(0,0,0), double width=1, Qt::PenStyle lineStyle=Qt::SolidLine, QStringList listOtherProperty={});
|
||||
|
|
|
|||
|
|
@ -304,6 +304,8 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
formDraw->m_iScale = m_iScale;
|
||||
formDraw->m_nTrackW = dW;
|
||||
formDraw->m_nObjDrawH = m_nObjDrawH;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
formDraw->m_bMultiProject = m_bMultiProject;
|
||||
|
||||
ui->tableWidget->setCellWidget(i, columnCount, formDraw);//默认用formDraw填充满
|
||||
}
|
||||
|
|
@ -587,14 +589,19 @@ void FormWell::slot_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonO
|
|||
{
|
||||
QString strWellName=g_strWellName;
|
||||
QString strTrackName="";
|
||||
// if (topObj.contains("WellName"))
|
||||
// {
|
||||
// QJsonValue value = topObj.value("WellName");
|
||||
// if (value.isString()) {
|
||||
// strWellName = value.toString();
|
||||
// qDebug() << "WellName:" << strWellName;
|
||||
// }
|
||||
// }
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
if (topObj.contains("WellName"))
|
||||
{
|
||||
QJsonValue value = topObj.value("WellName");
|
||||
if (value.isString()) {
|
||||
strWellName = value.toString();
|
||||
qDebug() << "WellName:" << strWellName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (topObj.contains("TrackName"))
|
||||
{
|
||||
QJsonValue value = topObj.value("TrackName");
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
double m_iY2=0;
|
||||
QWidget *m_parent;
|
||||
bool m_bShowTrackHead = true; //显示道头
|
||||
bool m_bMultiProject = false; //多井的打开工程,使用模板的井名和slf名
|
||||
|
||||
// 道图形
|
||||
QMap<QString, QVector<QWidget*>> m_mapFormDraw;
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
//向左侧树图,刷新新加对象
|
||||
connect(CallGlobalManage::getInstance(), SIGNAL(sig_AppendConsole(Priority, const QString)), this, SLOT(s_AppendConsole(Priority, const QString)));
|
||||
//加载视图(重新打开)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ReOpen(QString, QString)), this, SLOT(s_ReOpen(QString, QString)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ReOpen(QString, QString, bool)), this, SLOT(s_ReOpen(QString, QString, bool)));
|
||||
|
||||
ConvertorManager::GetInstance().LoadAllConvertorPlugin();
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
|
|
@ -608,13 +608,15 @@ void MainWindow::s_PluginMsg(QString msg)
|
|||
}
|
||||
|
||||
//加载视图(重新打开)
|
||||
void MainWindow::s_ReOpen(QString fileFull, QString fileName)
|
||||
void MainWindow::s_ReOpen(QString fileFull, QString fileName, bool bMultiProject)
|
||||
{
|
||||
MainWindowSplitter* mainSplitter = new MainWindowSplitter();
|
||||
mainSplitter->setSplitterWidget(m_projectWidgets);
|
||||
m_centerWidgets->addTab(mainSplitter, fileName);
|
||||
|
||||
MainWindowCurve *mainWindowCurve = mainSplitter->getMainWindowCurve();
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
mainWindowCurve->m_bMultiProject = bMultiProject;
|
||||
mainWindowCurve->Open(fileFull);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public slots:
|
|||
void s_DrawLine();
|
||||
|
||||
//加载视图(重新打开)
|
||||
void s_ReOpen(QString fileFull, QString fileName);
|
||||
void s_ReOpen(QString fileFull, QString fileName, bool bMultiProject);
|
||||
//可视解释
|
||||
void s_showView();
|
||||
//开发工具
|
||||
|
|
|
|||
|
|
@ -643,6 +643,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
QIcon templateIcon(::GetImagePath()+"WellInterp/导出模板.png");
|
||||
QIcon opentemplateIcon(::GetImagePath()+"icon/currtemplite.png");
|
||||
QIcon saveastemplateIcon(::GetImagePath()+"icon/SaveAsTemplate.png");
|
||||
QIcon openMultiProjIcon(::GetImagePath()+"WellInterp/打开.png"); //多井的打开工程,使用模板的井名和slf名
|
||||
QIcon executeDepthShiftIcon(::GetImagePath()+"icon/ExecuteDepthShift.png");
|
||||
QIcon joindepthIcon(::GetImagePath()+"icon/joindepth.png");
|
||||
QIcon ModuleOpenIcon(::GetImagePath()+"icon/ModuleOne.png");
|
||||
|
|
@ -665,6 +666,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
|
||||
m_opentemplateAc = new QAction(opentemplateIcon, "加载图文件", this);
|
||||
m_saveastemplateAc = new QAction(saveastemplateIcon, "另存为图文件", this);
|
||||
m_openMultiProjAc = new QAction(openMultiProjIcon, "打开工程", this); //多井的打开工程,使用模板的井名和slf名
|
||||
m_zoominAc = new QAction(zoominIcon, "放大", this);
|
||||
m_zoomoutAc = new QAction(zoomoutIcon, "缩小", this);
|
||||
m_SaveAsPictureAc = new QAction(SaveAsPictureIcon, "导出长图", this);
|
||||
|
|
@ -707,6 +709,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
QMenu* menuTemplate = new QMenu(this);
|
||||
menuTemplate->addAction(m_opentemplateAc); //加载图文件
|
||||
menuTemplate->addAction(m_saveastemplateAc); //另存为图文件
|
||||
menuTemplate->addAction(m_openMultiProjAc); //多井的打开工程,使用模板的井名和slf名
|
||||
templateAction->setMenu(menuTemplate);
|
||||
|
||||
//add QAction to Widget.
|
||||
|
|
@ -755,6 +758,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
||||
connect(m_opentemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Open);
|
||||
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
|
||||
connect(m_openMultiProjAc, &QAction::triggered, this, &MainWindowCurve::s_OpenMultiProj);
|
||||
|
||||
connect(m_zoominAc, &QAction::triggered, this, &MainWindowCurve::s_ZoomIn);
|
||||
connect(m_zoomoutAc, &QAction::triggered, this, &MainWindowCurve::s_ZoomOut);
|
||||
|
|
@ -2979,7 +2983,10 @@ void MainWindowCurve::loadStyle(const QString &qssFile)
|
|||
}
|
||||
|
||||
void MainWindowCurve::s_Open()
|
||||
{
|
||||
{
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
m_bMultiProject = false;
|
||||
|
||||
//---------------------------------
|
||||
//左侧树图选中井次
|
||||
//针对“加载图文件”,支持井或井次
|
||||
|
|
@ -3025,7 +3032,7 @@ void MainWindowCurve::s_Open()
|
|||
|
||||
QFileInfo fileInfo(fileFull);
|
||||
QString fileName = fileInfo.fileName(); // 获取文件名
|
||||
emit CallManage::getInstance()->sig_tabCloseCurrent(fileFull, fileName);
|
||||
emit CallManage::getInstance()->sig_tabCloseCurrent(fileFull, fileName, m_bMultiProject);
|
||||
|
||||
// //先清空
|
||||
// ui->tableWidget_2->clear();
|
||||
|
|
@ -3040,7 +3047,6 @@ void MainWindowCurve::s_Open()
|
|||
|
||||
void MainWindowCurve::s_Save()
|
||||
{
|
||||
|
||||
//Logdata
|
||||
QString folderPath;
|
||||
folderPath = GetLogdataPath();
|
||||
|
|
@ -3059,6 +3065,8 @@ void MainWindowCurve::s_Save()
|
|||
file.write(doc.toJson(QJsonDocument::Indented));
|
||||
file.close();
|
||||
qDebug() << "JSON文件写入成功!";
|
||||
//
|
||||
m_fileJson = exPortPath;
|
||||
} else {
|
||||
qWarning() << "文件打开失败:" << file.errorString();
|
||||
return;
|
||||
|
|
@ -3066,6 +3074,34 @@ void MainWindowCurve::s_Save()
|
|||
}
|
||||
}
|
||||
|
||||
//打开工程--多井的打开工程,使用模板的井名和slf名
|
||||
void MainWindowCurve::s_OpenMultiProj()
|
||||
{
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
m_bMultiProject = true;
|
||||
|
||||
//Logdata
|
||||
QString folderPath;
|
||||
folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
//folderPath = folderPath + "/multiwell.json";
|
||||
|
||||
//打开
|
||||
QString fileFull = "";
|
||||
fileFull = QFileDialog::getOpenFileName(this,
|
||||
tr("选择模板"),
|
||||
folderPath,
|
||||
tr("多井图文件(*.json)"));
|
||||
if (fileFull.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QFileInfo fileInfo(fileFull);
|
||||
QString fileName = fileInfo.fileName(); // 获取文件名
|
||||
emit CallManage::getInstance()->sig_tabCloseCurrent(fileFull, fileName, m_bMultiProject);
|
||||
}
|
||||
|
||||
bool MainWindowCurve::GetIsColorPrint()
|
||||
{
|
||||
return m_isColorPrint;
|
||||
|
|
@ -4337,6 +4373,8 @@ void MainWindowCurve::s_NewWell(QString strWellName, QString strSlfName, bool bS
|
|||
widgetWell->setWellHeader(wellH);
|
||||
//显示道头
|
||||
widgetWell->m_bShowTrackHead = bShowTrackHead;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
widgetWell->m_bMultiProject = m_bMultiProject;
|
||||
//
|
||||
ui->tableWidget_2->setCellWidget(i, columnCount, widgetWell);//默认用widgetWell填充满
|
||||
m_mapFWell.insert(strWellName, widgetWell);
|
||||
|
|
@ -5263,6 +5301,9 @@ void MainWindowCurve::Open(QString fileFull)
|
|||
QFile file(fileFull);
|
||||
if(file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
//
|
||||
m_fileJson = fileFull;
|
||||
|
||||
// 解析JSON
|
||||
QJsonDocument document = QJsonDocument::fromJson(file.readAll(), &jsonError);
|
||||
if (!document.isNull() && (jsonError.error == QJsonParseError::NoError))
|
||||
|
|
@ -5796,8 +5837,14 @@ void MainWindowCurve::DisplayWells(QJsonArray wellsArray)
|
|||
int iCount = wellsArray.size();
|
||||
if(iCount>1)
|
||||
{
|
||||
int flag = QMessageBox::warning(NULL,"提示",QString("图文件或模板中存在多个井文件,\n是否用当前选中井替换原井文件?"),QMessageBox::Yes,QMessageBox::No);
|
||||
if(flag!=QMessageBox::Yes) return;
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
}
|
||||
else{
|
||||
int flag = QMessageBox::warning(NULL,"提示",QString("图文件或模板中存在多个井文件,\n是否用当前选中井替换原井文件?"),QMessageBox::Yes,QMessageBox::No);
|
||||
if(flag!=QMessageBox::Yes) return;
|
||||
}
|
||||
}
|
||||
for(int i=0; i<iCount; i++)
|
||||
{
|
||||
|
|
@ -5845,23 +5892,31 @@ void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
|||
QString strSlfName = g_strSlfName;
|
||||
QJsonArray tracksArray;
|
||||
|
||||
// if (wellObjInfo.contains("WellName"))
|
||||
// {
|
||||
// QJsonValue value = wellObjInfo.value("WellName");
|
||||
// if (value.isString()) {
|
||||
// strWellName = value.toString();
|
||||
// qDebug() << "WellName:" << strWellName;
|
||||
// }
|
||||
// }
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
if (wellObjInfo.contains("WellName"))
|
||||
{
|
||||
QJsonValue value = wellObjInfo.value("WellName");
|
||||
if (value.isString()) {
|
||||
strWellName = value.toString();
|
||||
qDebug() << "WellName:" << strWellName;
|
||||
}
|
||||
}
|
||||
|
||||
// if (wellObjInfo.contains("SlfName"))
|
||||
// {
|
||||
// QJsonValue value = wellObjInfo.value("SlfName");
|
||||
// if (value.isString()) {
|
||||
// strSlfName = value.toString();
|
||||
// qDebug() << "strSlfName:" << strSlfName;
|
||||
// }
|
||||
// }
|
||||
if (wellObjInfo.contains("SlfName"))
|
||||
{
|
||||
QJsonValue value = wellObjInfo.value("SlfName");
|
||||
if (value.isString()) {
|
||||
strSlfName = value.toString();
|
||||
qDebug() << "strSlfName:" << strSlfName;
|
||||
}
|
||||
}
|
||||
//新建井
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
}
|
||||
|
||||
if (wellObjInfo.contains("bShowTrackHead"))
|
||||
{
|
||||
|
|
@ -5871,10 +5926,6 @@ void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
//新建井
|
||||
// QString folderPath = GetLogdataPath();
|
||||
// folderPath = folderPath + g_prjname;
|
||||
// strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
s_NewWell(strWellName, strSlfName, m_bShowTrackHead);
|
||||
|
||||
//
|
||||
|
|
@ -5961,14 +6012,19 @@ void MainWindowCurve::DisplayTrack_Top(int id, QJsonObject trackTop, QJsonObject
|
|||
//if(id>0)
|
||||
{
|
||||
QString strWellName = g_strWellName;
|
||||
// if (trackTop.contains("WellName"))
|
||||
// {
|
||||
// QJsonValue value = trackTop.value("WellName");
|
||||
// if (value.isString()) {
|
||||
// strWellName = value.toString();
|
||||
// qDebug() << "WellName:" << strWellName;
|
||||
// }
|
||||
// }
|
||||
//多井的打开工程,使用模板的井名和slf名
|
||||
if(m_bMultiProject)
|
||||
{
|
||||
if (trackTop.contains("WellName"))
|
||||
{
|
||||
QJsonValue value = trackTop.value("WellName");
|
||||
if (value.isString()) {
|
||||
strWellName = value.toString();
|
||||
qDebug() << "WellName:" << strWellName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double nW = 0;
|
||||
if (trackTop.contains("TrackW"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -142,7 +142,9 @@ public:
|
|||
void DisplayTrack_Top(int id, QJsonObject trackTop, QJsonObject trackInfo);
|
||||
|
||||
void Open(QString fileFull);//打开
|
||||
QString m_fileJson;
|
||||
|
||||
bool m_bMultiProject = false; //多井的打开工程,使用模板的井名和slf名
|
||||
public:
|
||||
//样式
|
||||
void loadStyle(const QString &qssFile);
|
||||
|
|
@ -236,6 +238,7 @@ public:
|
|||
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
|
||||
QAction* m_opentemplateAc = nullptr; //加载图文件
|
||||
QAction* m_saveastemplateAc = nullptr; //另存为图文件
|
||||
QAction* m_openMultiProjAc = nullptr; //多井的打开工程,使用模板的井名和slf名
|
||||
QAction* m_zoominAc = nullptr; //放大
|
||||
QAction* m_zoomoutAc = nullptr; //缩小
|
||||
QAction* m_SaveAsPictureAc = nullptr; //导出长图
|
||||
|
|
@ -330,6 +333,7 @@ public slots:
|
|||
void s_showHeadTable(); //显示/隐藏图头
|
||||
void s_Open(); //加载图文件
|
||||
void s_Save(); //保存图文件
|
||||
void s_OpenMultiProj(); //打开工程--多井的打开工程,使用模板的井名和slf名
|
||||
void s_SaveAsPicture(); //导出长图
|
||||
void s_SaveAsPdf(); //导出PDF
|
||||
void s_SaveAsSvg(); //导出SVG
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user