添加井次和井上添加更新数据菜单、添加波列曲线数据预览功能
This commit is contained in:
parent
4d51f38aae
commit
0ef7d85bf2
|
|
@ -798,28 +798,28 @@ void CDataManagger::DataStatistics(int Type,
|
|||
pDlg2->show();
|
||||
}
|
||||
}
|
||||
// //whp add 2020.4.9 for 波列曲线预览
|
||||
// void CDataManagger::DisplayWave(const QString& FileName,const QString& WaveName)
|
||||
// {
|
||||
// CLogIO *logio=new CLogIO();
|
||||
// if(!logio->Open(FileName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
// {
|
||||
// delete logio;
|
||||
// QMessageBox::warning(NULL,"提示","打开文件"+FileName+"错误");
|
||||
// return ;
|
||||
// }
|
||||
// int index=logio->OpenWave(WaveName.toStdString().c_str());
|
||||
// if(index<0){
|
||||
// delete logio;
|
||||
// return;
|
||||
// }
|
||||
// logio->CloseWave(index);
|
||||
// delete logio;
|
||||
// ShowWave *pDlg=new ShowWave();
|
||||
// pDlg->FileName=FileName,pDlg->WaveName=WaveName;
|
||||
// pDlg->init();
|
||||
// pDlg->show();
|
||||
// }
|
||||
//whp add 2020.4.9 for 波列曲线预览
|
||||
void CDataManagger::DisplayWave(const QString& FileName,const QString& WaveName)
|
||||
{
|
||||
CLogIO *logio=new CLogIO();
|
||||
if(!logio->Open(FileName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
QMessageBox::warning(NULL,"提示","打开文件"+FileName+"错误");
|
||||
return ;
|
||||
}
|
||||
int index=logio->OpenWave(WaveName.toStdString().c_str());
|
||||
if(index<0){
|
||||
delete logio;
|
||||
return;
|
||||
}
|
||||
logio->CloseWave(index);
|
||||
delete logio;
|
||||
ShowWave *pDlg=new ShowWave();
|
||||
pDlg->FileName=FileName,pDlg->WaveName=WaveName;
|
||||
pDlg->init();
|
||||
pDlg->show();
|
||||
}
|
||||
// //whp add 2020.5.12 for 常规曲线预览
|
||||
// void CDataManagger::DisplayCurve(const QString& FileName,const QString& CurveName)
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "ObjWelllog.h"
|
||||
#include "DataImport.h"
|
||||
#include "CallGlobalManage.h"
|
||||
#include "ObjWelllogWavefile.h"
|
||||
|
||||
extern QString g_prjname;
|
||||
// extern void AppendConsole(Priority priority, const QString &output);
|
||||
|
|
@ -965,6 +966,11 @@ void QtProjectWidgets::initWaveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWidg
|
|||
connect(m_action_DepthResample, SIGNAL(triggered(bool)), this, SLOT(onDepthResample(bool)));
|
||||
menu->addAction(m_action_DepthResample);
|
||||
|
||||
QAction* action_DisplayWave = new QAction("波列曲线预览", treeWidget);
|
||||
action_DisplayWave->setIcon(QIcon(GetImagePath() + "icon/AddToTrack.png"));
|
||||
connect(action_DisplayWave, SIGNAL(triggered(bool)), this, SLOT(onDisplayWave(bool)));
|
||||
menu->addAction(action_DisplayWave);
|
||||
|
||||
QAction* action_InfoEdit = new QAction("属性编辑", treeWidget);
|
||||
action_InfoEdit->setIcon(QIcon(GetImagePath() + "icon/AddToTrack.png"));
|
||||
connect(action_InfoEdit, SIGNAL(triggered()), this, SLOT(onInfoEdit()));
|
||||
|
|
@ -1065,6 +1071,11 @@ void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget
|
|||
connect(m_action_DepthResample, SIGNAL(triggered(bool)), this, SLOT(onDepthResample(bool)));
|
||||
menu->addAction(m_action_DepthResample);
|
||||
|
||||
action_New = new QAction("更新数据", treeWidget);
|
||||
action_New->setIcon(QIcon(GetImagePath() + "icon/Sheet.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(slotRefreshData()));
|
||||
menu->addAction(action_New);
|
||||
|
||||
QAction* action_ReName = new QAction("重命名", treeWidget);
|
||||
action_ReName->setIcon(QIcon(GetImagePath() + "icon/Rename.png")); // 设置图标":/image/u174.png"
|
||||
connect(action_ReName, SIGNAL(triggered()), this, SLOT(onReNameObject()));
|
||||
|
|
@ -1116,6 +1127,11 @@ void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
|||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onWelllogInformation()));
|
||||
menu->addAction(action_New);
|
||||
|
||||
action_New = new QAction("更新数据", treeWidget);
|
||||
action_New->setIcon(QIcon(GetImagePath() + "icon/Sheet.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(slotRefreshData()));
|
||||
menu->addAction(action_New);
|
||||
|
||||
QAction* action_ReName = new QAction("重命名", treeWidget);
|
||||
action_ReName->setIcon(QIcon(GetImagePath() + "icon/Rename.png")); // 设置图标":/image/u174.png"
|
||||
connect(action_ReName, SIGNAL(triggered()), this, SLOT(onReNameObject()));
|
||||
|
|
@ -1561,6 +1577,26 @@ void QtProjectWidgets::onCurve2Table(bool checked)
|
|||
}
|
||||
}
|
||||
|
||||
//波列曲线预览
|
||||
void QtProjectWidgets::onDisplayWave(bool checked)
|
||||
{
|
||||
if (ui->treeWidget->selectedItems().count()!=1)
|
||||
return;
|
||||
QTreeWidgetItem *pItem = *ui->treeWidget->selectedItems().begin();
|
||||
QString strSlfName = pItem->data(0, Qt::UserRole+1).toString();
|
||||
CObjWellLogWavefile *pround=new CObjWellLogWavefile();
|
||||
pround->SetName(pItem->text(0));
|
||||
pround->SetSlfFileName(strSlfName);
|
||||
|
||||
QString CurveName=pround->GetName();
|
||||
QString FileName=pround->GetSlfFileName();
|
||||
if (NULL==magr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
magr->DisplayWave(FileName,CurveName);
|
||||
}
|
||||
|
||||
//合成阵列曲线
|
||||
void QtProjectWidgets::onWaveCompose(bool checked)
|
||||
{
|
||||
|
|
@ -2359,6 +2395,64 @@ void QtProjectWidgets::RefreshWellRoundTree(QTreeWidgetItem *parentItem)
|
|||
}
|
||||
}
|
||||
|
||||
void QtProjectWidgets::slotRefreshData()
|
||||
{
|
||||
if (ui->treeWidget->selectedItems().count()!=1)
|
||||
return;
|
||||
QString strWellName = "";
|
||||
QString strSlfName = "";
|
||||
QTreeWidgetItem *pItem = *ui->treeWidget->selectedItems().begin();
|
||||
QString strTreeTag = pItem->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellname") //井名
|
||||
{
|
||||
strWellName = pItem->text(0);
|
||||
|
||||
}
|
||||
else if (strTreeTag == "wellItem") //井次
|
||||
{
|
||||
strWellName = pItem->parent()->text(0);
|
||||
strSlfName = pItem->data(0, Qt::UserRole+1).toString();
|
||||
}
|
||||
|
||||
QString strProjectFolder = GetProjectFolder();
|
||||
QString strProjectFile = strProjectFolder + g_prjname;
|
||||
strProjectFile += ".wwl";
|
||||
s_OpenProject(strProjectFile);
|
||||
|
||||
|
||||
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(0);
|
||||
int childCount = item->childCount(); // 获取子节点数量
|
||||
for (int i = 0; i < childCount; ++i)
|
||||
{
|
||||
//井组,数据分析...
|
||||
QTreeWidgetItem *wellGroupItem = item->child(i);
|
||||
QString wellGroupname = wellGroupItem->text(0);
|
||||
if (wellGroupname == "井组")
|
||||
{
|
||||
int wellCount = wellGroupItem->childCount(); // 获取井节点数量
|
||||
for (int j = 0; j < wellCount; ++j)
|
||||
{
|
||||
//井组,数据分析...
|
||||
QTreeWidgetItem *wellItem = wellGroupItem->child(j);
|
||||
QString wellname = wellItem->text(0);
|
||||
if(wellname==strWellName)//井
|
||||
{
|
||||
wellItem->setExpanded(true);
|
||||
int wellItemCount = wellItem->childCount(); // 获取井次数量
|
||||
for (int k = 0; k < wellItemCount; ++k)
|
||||
{
|
||||
if(strSlfName== wellItem->child(k)->data(0, Qt::UserRole+1).toString())//井次
|
||||
{
|
||||
expandAll(wellItem->child(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return /*pWell*/;
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onEditWelllogRound()
|
||||
{
|
||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public slots:
|
|||
void onDepthShift(bool checked = false); //深度移动
|
||||
void onDepthResample(bool checked = false); //深度重采样
|
||||
void onCurve2Table(bool checked = false); //转换为结论表格
|
||||
void onDisplayWave(bool checked = false); //波列曲线预览
|
||||
void onWaveCompose(bool checked = false); //合成阵列曲线
|
||||
void onCurveCompute(bool checked = false); //曲线计算
|
||||
void onInfoEdit(bool checked = false); //属性
|
||||
|
|
@ -72,6 +73,7 @@ public slots:
|
|||
|
||||
void onSlfbackup(); //备份井次
|
||||
void onCutSlf(); //剪切井次
|
||||
void slotRefreshData(); //更新数据
|
||||
void onEditWelllogRound();
|
||||
void onImportFolder(); //按目录导入测井数据
|
||||
void onImportSingleWellLogData(); //数据导入
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user