添加新建井功能、添加井次导出数据菜单
This commit is contained in:
parent
7368b3d2c8
commit
9d510e384a
|
|
@ -1039,7 +1039,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
|
||||||
if(Hd->Dep>Hd->EndDep) break;
|
if(Hd->Dep>Hd->EndDep) break;
|
||||||
//mDP.SetDepth(Hd->Dep);
|
//mDP.SetDepth(Hd->Dep);
|
||||||
}
|
}
|
||||||
QString slf=m_pMemRdWt->GetWellName().GetString();
|
QString slf=GBKToUTF8(m_pMemRdWt->GetWellName().GetString());
|
||||||
QStringList Names;
|
QStringList Names;
|
||||||
int Noo=m_pMemRdWt->GetOutCurveCount();
|
int Noo=m_pMemRdWt->GetOutCurveCount();
|
||||||
for(int i=0;i<Noo;i++)
|
for(int i=0;i<Noo;i++)
|
||||||
|
|
|
||||||
|
|
@ -845,13 +845,35 @@ void MainWindow::s_ShowTDT(QString strSlfName, QString strName)
|
||||||
{
|
{
|
||||||
if(m_centerWidgets)
|
if(m_centerWidgets)
|
||||||
{
|
{
|
||||||
WellLogTableDialogNew* pDialog = new WellLogTableDialogNew();
|
WellLogTableDialogNew* pDialog = nullptr;
|
||||||
pDialog->setName(strSlfName, strName, TDT_OBJECT);
|
for (int nIndex = m_pWellLogTableDialogNew.size() - 1; nIndex >= 0; nIndex--)
|
||||||
|
{
|
||||||
|
QPointer<WellLogTableDialogNew> pDlg = m_pWellLogTableDialogNew[nIndex];
|
||||||
|
if (pDlg.isNull())
|
||||||
|
{
|
||||||
|
m_pWellLogTableDialogNew.removeAt(nIndex);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
bool equ = pDlg->isEqual(strSlfName, strName, TDT_OBJECT);
|
||||||
|
if (equ)
|
||||||
|
{
|
||||||
|
pDialog = pDlg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!pDialog)
|
||||||
|
{
|
||||||
|
QPointer<WellLogTableDialogNew> pTmp = new WellLogTableDialogNew();
|
||||||
|
pTmp->setName(strSlfName, strName, TDT_OBJECT);
|
||||||
|
m_pWellLogTableDialogNew.append(pTmp);
|
||||||
|
pDialog = pTmp;
|
||||||
|
}
|
||||||
|
|
||||||
QString wellname;QString path;
|
QString wellname;QString path;
|
||||||
GetWellNameAndPath(strSlfName, wellname, path);
|
GetWellNameAndPath(strSlfName, wellname, path);
|
||||||
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||||
int iCount = m_centerWidgets->count();
|
// int iCount = m_centerWidgets->count();
|
||||||
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
// m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -860,17 +882,39 @@ void MainWindow::s_ShowTable(QString strSlfName, QString strName)
|
||||||
{
|
{
|
||||||
if(m_centerWidgets)
|
if(m_centerWidgets)
|
||||||
{
|
{
|
||||||
WellLogTableDialogNew* pDialog = new WellLogTableDialogNew();
|
WellLogTableDialogNew* pDialog = nullptr;
|
||||||
pDialog->setName(strSlfName, strName, TABLEE_OBJECT);
|
for (int nIndex = m_pWellLogTableDialogNew.size() - 1; nIndex >= 0; nIndex--)
|
||||||
|
{
|
||||||
|
QPointer<WellLogTableDialogNew> pDlg = m_pWellLogTableDialogNew[nIndex];
|
||||||
|
if (pDlg.isNull())
|
||||||
|
{
|
||||||
|
m_pWellLogTableDialogNew.removeAt(nIndex);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
bool equ = pDlg->isEqual(strSlfName, strName, TABLEE_OBJECT);
|
||||||
|
if (equ)
|
||||||
|
{
|
||||||
|
pDialog = pDlg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!pDialog)
|
||||||
|
{
|
||||||
|
QPointer<WellLogTableDialogNew> pTmp = new WellLogTableDialogNew();
|
||||||
|
pTmp->setName(strSlfName, strName, TABLEE_OBJECT);
|
||||||
|
m_pWellLogTableDialogNew.append(pTmp);
|
||||||
|
pDialog = pTmp;
|
||||||
|
}
|
||||||
|
|
||||||
QString wellname;QString path;
|
QString wellname;QString path;
|
||||||
GetWellNameAndPath(strSlfName, wellname, path);
|
GetWellNameAndPath(strSlfName, wellname, path);
|
||||||
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||||
int iCount = m_centerWidgets->count();
|
// int iCount = m_centerWidgets->count();
|
||||||
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
// m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//表格数据查看
|
//波列数据查看
|
||||||
void MainWindow::s_ShowWave(QString strSlfName, QString strName)
|
void MainWindow::s_ShowWave(QString strSlfName, QString strName)
|
||||||
{
|
{
|
||||||
if(m_centerWidgets)
|
if(m_centerWidgets)
|
||||||
|
|
@ -890,7 +934,6 @@ void MainWindow::s_ShowWave(QString strSlfName, QString strName)
|
||||||
pDialog = pDlg;
|
pDialog = pDlg;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!pDialog)
|
if (!pDialog)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -834,6 +834,11 @@ void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("新建井", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "well.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onAddWell()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
// action_New = new QAction("导入离散数据", treeWidget);
|
// action_New = new QAction("导入离散数据", treeWidget);
|
||||||
// action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
// action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||||
// connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
// connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
|
|
@ -1134,6 +1139,11 @@ void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onUnitConvert()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onUnitConvert()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("输出数据", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/outcurves.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onOutWellLogRound()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
QAction* action_Delete = new QAction("删除", treeWidget);
|
QAction* action_Delete = new QAction("删除", treeWidget);
|
||||||
action_Delete->setIcon(QIcon(GetImagePath() + "icon/Delete.png")); // 设置图标":/image/u174.png"
|
action_Delete->setIcon(QIcon(GetImagePath() + "icon/Delete.png")); // 设置图标":/image/u174.png"
|
||||||
connect(action_Delete, SIGNAL(triggered()), this, SLOT(onDeleteObject()));
|
connect(action_Delete, SIGNAL(triggered()), this, SLOT(onDeleteObject()));
|
||||||
|
|
@ -2484,6 +2494,24 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
||||||
ImportSingleWellLogData(false);
|
ImportSingleWellLogData(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtProjectWidgets::onAddWell()
|
||||||
|
{
|
||||||
|
CObjWell *pWell = new CObjWell();
|
||||||
|
CWellDialog *wd = new CWellDialog();
|
||||||
|
pWell->SetPrjname(g_prjname);
|
||||||
|
wd->m_DialogType=1;
|
||||||
|
wd->Init(pWell);
|
||||||
|
if(wd->exec()==QDialog::Accepted) {
|
||||||
|
QString strProjectFolder = GetProjectFolder();
|
||||||
|
QString strProjectFile = strProjectFolder + g_prjname;
|
||||||
|
strProjectFile += ".wwl";
|
||||||
|
s_OpenProject(strProjectFile);
|
||||||
|
return /*pWell*/;
|
||||||
|
}
|
||||||
|
else delete pWell;
|
||||||
|
return /*NULL*/;
|
||||||
|
}
|
||||||
|
|
||||||
void QtProjectWidgets::onImportSingleWellLogDataToolBar()
|
void QtProjectWidgets::onImportSingleWellLogDataToolBar()
|
||||||
{
|
{
|
||||||
ImportSingleWellLogData(true);
|
ImportSingleWellLogData(true);
|
||||||
|
|
@ -3073,8 +3101,7 @@ void QtProjectWidgets::s_Notice_AddObject(QString strName, QString strSlfName, Q
|
||||||
int wellItemCount = wellItem->childCount(); // 获取井次数量
|
int wellItemCount = wellItem->childCount(); // 获取井次数量
|
||||||
for (int k = 0; k < wellItemCount; ++k)
|
for (int k = 0; k < wellItemCount; ++k)
|
||||||
{
|
{
|
||||||
QString slf = wellItem->child(k)->data(0, Qt::UserRole + 1).toString();
|
if (strSlfName == wellItem->child(k)->data(0, Qt::UserRole+1).toString())
|
||||||
if (strSlfName == slf)
|
|
||||||
{
|
{
|
||||||
wellCurItem = wellItem->child(k);
|
wellCurItem = wellItem->child(k);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ public slots:
|
||||||
void onEditWelllogRound();
|
void onEditWelllogRound();
|
||||||
void onImportFolder(); //按目录导入测井数据
|
void onImportFolder(); //按目录导入测井数据
|
||||||
void onImportSingleWellLogData(); //数据导入
|
void onImportSingleWellLogData(); //数据导入
|
||||||
|
void onAddWell(); //新建井
|
||||||
void onImportSingleWellLogDataToolBar(); //数据导入(工具栏)
|
void onImportSingleWellLogDataToolBar(); //数据导入(工具栏)
|
||||||
void onImportSlfTable();
|
void onImportSlfTable();
|
||||||
void onOutWellLogRound();
|
void onOutWellLogRound();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user