diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index 69bede3..5f671e6 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -3089,6 +3089,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowCurve); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteCurv); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="tableObject") @@ -3096,6 +3097,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="waveObject") @@ -3103,6 +3105,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowWave); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteWave); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="JiegutextObject") @@ -3111,6 +3114,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="gujingObject") @@ -3119,6 +3123,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="LogfaceObject") @@ -3127,6 +3132,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="TubingstringObject") @@ -3135,6 +3141,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="ganzhuangtuObject" || m_strType=="JyktObject" ||m_strType=="DenvObject") @@ -3142,6 +3149,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) //杆状图、井眼垮塌矢量图、井斜方位图 QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="MCalsObject") @@ -3150,6 +3158,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowWave); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteWave); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } else if(m_strType=="CrackObject") @@ -3158,6 +3167,7 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.addAction(QIcon(::GetImagePath() + "icon/load.png"), "刷新数据", this, &FormInfo::onRefreshPlot); menu.exec(event->globalPos()); } } @@ -3182,6 +3192,13 @@ void FormInfo::onDeleteCurv() emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } +//刷新数据 +void FormInfo::onRefreshPlot() +{ + //Plot重新加载数据 + emit CallManage::getInstance()->sig_ReloadPlot(m_strUuid, m_strSlfName, m_strLineName); +} + //表格查看 void FormInfo::onShowTable() { diff --git a/logPlus/forminfo.h b/logPlus/forminfo.h index 6638e35..5a6709c 100644 --- a/logPlus/forminfo.h +++ b/logPlus/forminfo.h @@ -505,6 +505,8 @@ public slots: void onShowCurve(); //删除曲线 void onDeleteCurv(); + //刷新数据 + void onRefreshPlot(); //表格查看 void onShowTable(); diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 37f7567..d3593eb 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -5350,7 +5350,7 @@ void QMyCustomPlot::s_Refresh_All(QString strUuid, QString strSlfName, QString s else if (m_strLineName == "RESULT") { // 解释结论 - RefreshItems_Layer(); + //RefreshItems_Layer(); } else if (m_strLineName == "IMAGE_DATA") {