diff --git a/logPlus/CallManage.h b/logPlus/CallManage.h index d8b5235..bd9e2cd 100644 --- a/logPlus/CallManage.h +++ b/logPlus/CallManage.h @@ -280,6 +280,8 @@ signals: //Plot重新加载数据 void sig_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName); + //刷新当前井的所有数据 + void sig_Refresh_All(QString strUuid, QString strSlfName, QString strWellName); //编辑曲线,框选拉伸/压缩 void sig_EShiftDepth(QString strSlfName, QString strLineName, int count, QList left_Low_List, QList right_Hight_List); diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 47df0a1..531faaa 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -293,6 +293,7 @@ void MainWindowCurve::initMainToolBar() { QSize toolIconSize(18, 18); ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小 +// ui->mainToolBar->setStyleSheet("QToolButton:checked { background-color: red; }"); QIcon selectWellIcon(::GetImagePath()+"icon/WellTops.png"); QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png"); @@ -309,20 +310,6 @@ void MainWindowCurve::initMainToolBar() QIcon loadIcon(":/image/export.png"); //Main工具栏 - QAction* m_selectWellAc = nullptr; //选择井 - QAction* m_fixwellsectionHeaderAc = nullptr; //锁头 - QAction* m_currtempliteAc = nullptr; //加载图文件 - QAction* m_saveastemplateAc = nullptr; //另存为图文件 - QAction* m_executeDepthShiftAc = nullptr; //校深 - QAction* m_joindepthAc = nullptr; //拼接 - QAction* m_ModuleOpenAc = nullptr; //处理方法 - QAction* m_SaveAsPictureAc = nullptr; //导出长图 - QAction* m_SaveAsPdfAc = nullptr; //导出PDF - QAction* m_SaveAsSvgAc = nullptr; //导出SVG -// QAction* m_runAc = nullptr;// -// QAction* m_debugAc = nullptr; // -// QAction* m_loadAc = nullptr; //加载 - m_selectWellAc = new QAction(selectWellIcon, "选择井", this); m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this); m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this); @@ -350,11 +337,15 @@ void MainWindowCurve::initMainToolBar() ui->mainToolBar->addAction(m_SaveAsPictureAc);//导出长图 ui->mainToolBar->addAction(m_SaveAsPdfAc);//导出PDF ui->mainToolBar->addAction(m_SaveAsSvgAc);//导出SVG - // ui->mainToolBar->addAction(m_debugAc); // ui->mainToolBar->addAction(m_loadAc); //ui->mainToolBar->addAction(m_openAc); + // 设置为可选中 +// m_fixwellsectionHeaderAc->setCheckable(true); +// m_executeDepthShiftAc->setCheckable(true); // 设置为可选中 +// m_joindepthAc->setCheckable(true); // 设置为可选中 + connect(m_selectWellAc, &QAction::triggered, this, &MainWindowCurve::s_selectWell); connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable); connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite); @@ -5189,10 +5180,47 @@ void MainWindowCurve::slotContextMenu(QPoint pos) { QMenu menu(ui->tableWidget_2); menu.addAction(QIcon(::GetImagePath() + "antialiasing.png"), "删除当前测井图", this, &MainWindowCurve::slotDeleteSelectWell); + menu.addAction(QIcon(::GetImagePath() + "icon/CopyCoreTxt.png"), "刷新当前测井数据", this, &MainWindowCurve::slotRefreshWell); menu.exec(ui->tableWidget_2->mapToGlobal(pos)); } } +//刷新当前井的所有数据 +void MainWindowCurve::slotRefreshWell() +{ + int colCount = ui->tableWidget_2->columnCount(); + + //当前列 + int column = ui->tableWidget_2->currentColumn();//列编号从0开始 + if(column<0) + { + //当前没有选中井 + QMessageBox::warning(this, "提示", "当前没有选中井", "确定"); + return; + } + + if(column%2==0) + { + } + else + { + //空白列 + QMessageBox::warning(this, "提示", "当前没有选中井", "确定"); + return; + } + + //当前行 + QStringList sret = this->getSelectWell_New(); + if (sret.length() <= 0) + return; + QString strWellName = sret.at(0); + //直接从选中的井获取,data记录slf路径 + QString strSlfName = sret.at(1); + + //刷新当前井的所有数据 + emit CallManage::getInstance()->sig_Refresh_All(m_strUuid, strSlfName, strWellName); +} + void MainWindowCurve::slotDeleteSelectWell() { int colCount = ui->tableWidget_2->columnCount(); diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 84aacef..5c0a415 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -182,6 +182,22 @@ public slots: //右键菜单响应函数 void slotContextMenu(QPoint pos); void slotDeleteSelectWell(); + void slotRefreshWell();//刷新井数据 + +public: + QAction* m_selectWellAc = nullptr; //选择井 + QAction* m_fixwellsectionHeaderAc = nullptr; //锁头 + QAction* m_currtempliteAc = nullptr; //加载图文件 + QAction* m_saveastemplateAc = nullptr; //另存为图文件 + QAction* m_executeDepthShiftAc = nullptr; //校深 + QAction* m_joindepthAc = nullptr; //拼接 + QAction* m_ModuleOpenAc = nullptr; //处理方法 + QAction* m_SaveAsPictureAc = nullptr; //导出长图 + QAction* m_SaveAsPdfAc = nullptr; //导出PDF + QAction* m_SaveAsSvgAc = nullptr; //导出SVG +// QAction* m_runAc = nullptr;// +// QAction* m_debugAc = nullptr; // +// QAction* m_loadAc = nullptr; //加载 public slots: void s_NewWell(QString strWellName, QString strSlfName);//新建井 diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index ac9bcd9..48caeaf 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -195,6 +195,10 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel //Plot重新加载数据 connect(CallManage::getInstance(), SIGNAL(sig_ReloadPlot(QString, QString, QString)), this, SLOT(s_ReloadPlot(QString, QString, QString))); + + //刷新当前井的所有数据 + connect(CallManage::getInstance(), SIGNAL(sig_Refresh_All(QString, QString, QString)), this, SLOT(s_Refresh_All(QString, QString, QString))); + // 深度属性修改 connect(CallManage::getInstance(), SIGNAL(sig_changeDepthProperty(QVariantList)), this, SLOT(s_changeDepthProperty(QVariantList))); @@ -5895,6 +5899,95 @@ void QMyCustomPlot::s_ReloadPlot(QString strUuid, QString strSlfName, QString st replot(QCustomPlot::rpQueuedReplot); //刷新曲线 } +//刷新当前井的所有数据 +void QMyCustomPlot::s_Refresh_All(QString strUuid, QString strSlfName, QString strWellName) +{ + if(m_strUuid == strUuid && + m_strSlfName == strSlfName && + m_strWellName == strWellName) + { + + } + else + { + return; + } + + //曲线 + if(m_addRandomGraph && m_strLineName != "CORE_PHYSICS") + { + s_ReloadPlot(m_strUuid, m_strSlfName, m_strLineName); + } + + if (m_strLineName == "SWALL_CORE") + { + //井壁取心 + RefreshItems_SWallCore(); + } + else if (m_strLineName == "GEO_LITH") + { + //录井剖面 + RefreshItems_GeoLith(); + } + else if (m_strLineName == "WORDS_RELUST") + { + //岩性描述,文字结论 + RefreshItems_Text(); + } + else if (m_strLineName == "LAYER_DATA") + { + //地质分层 + RefreshItems_Layer(); + } + else if (m_strLineName == "RESULT") + { + // 解释结论 + RefreshItems_Layer(); + } + else if (m_strLineName == "IMAGE_DATA") + { + //岩心图片 + refreshItemsImage(); + } + else if (m_strLineName == "CORE_PHYSICS") + { + // 岩心分析 + refreshCorePhysics(); + } + + // + FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); + if (pInfo == NULL) + { + return; + } + QString strType = pInfo->m_strType; + if (strType == "JiegutextObject") + { + //气测/FMT/射孔/文本 + RefreshItems_Jiegutext(); + } + else if (strType == "gujingObject") + { + //固井 + RefreshItems_Gujing(); + } + else if (strType == "LogfaceObject") + { + //沉积相 + } + else if (strType == "TubingstringObject") + { + //套管组件 + RefreshItems_Tubing(); + } + else if (strType == "CrackObject") + { + // 裂缝 + } + +} + void QMyCustomPlot::s_changeDrawProperty(QVariantList vlist) { QString strUuid = vlist.at(0).toString(); diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index d158ca6..340c222 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -667,6 +667,9 @@ public slots: //Plot重新加载数据 void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName); + //刷新当前井的所有数据 + void s_Refresh_All(QString strUuid, QString strSlfName, QString strWellName); + void s_changeDrawProperty(QVariantList vlist); // 深度 void s_changeDepthProperty(QVariantList vlist);