道头追加右键“刷新数据”菜单

This commit is contained in:
jiayulong 2026-07-02 09:54:31 +08:00
parent adc4e3c131
commit bfb9a0c20c
3 changed files with 20 additions and 1 deletions

View File

@ -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()
{

View File

@ -505,6 +505,8 @@ public slots:
void onShowCurve();
//删除曲线
void onDeleteCurv();
//刷新数据
void onRefreshPlot();
//表格查看
void onShowTable();

View File

@ -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")
{