添加查看参数卡数据功能,导入数据菜单
This commit is contained in:
parent
8d555aebbe
commit
3f3b6c0575
|
|
@ -38,6 +38,7 @@ signals:
|
||||||
void sig_OpenProject(QString strName);//打开项目
|
void sig_OpenProject(QString strName);//打开项目
|
||||||
void sig_CloseProject();//关闭项目
|
void sig_CloseProject();//关闭项目
|
||||||
|
|
||||||
|
void sig_ShowParameterCard(QString strSlfName, QString strName);//参数表查看
|
||||||
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
||||||
void sig_DepthShift(QString strSlfName, QString strName, double DepthOffset);//深度移动
|
void sig_DepthShift(QString strSlfName, QString strName, double DepthOffset);//深度移动
|
||||||
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
#include "fileopenthread.h"
|
#include "fileopenthread.h"
|
||||||
|
#include "ObjWellLogINP.h"
|
||||||
|
#include "TxtEditorDlg.h"
|
||||||
|
|
||||||
//以下参数从配置文件读取
|
//以下参数从配置文件读取
|
||||||
int g_iIndex = 0;
|
int g_iIndex = 0;
|
||||||
|
|
@ -76,6 +78,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
//关联信号槽,关闭项目
|
//关联信号槽,关闭项目
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_CloseProject()), this, SLOT(s_CloseProject()));
|
connect(CallManage::getInstance(), SIGNAL(sig_CloseProject()), this, SLOT(s_CloseProject()));
|
||||||
|
|
||||||
|
//参数卡
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_ShowParameterCard(QString, QString)), this, SLOT(s_ShowParameterCard(QString, QString)));
|
||||||
//曲线
|
//曲线
|
||||||
//关联信号槽,数据查看曲线数据
|
//关联信号槽,数据查看曲线数据
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ShowCurve(QString, QString)), this, SLOT(s_ShowCurve(QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ShowCurve(QString, QString)), this, SLOT(s_ShowCurve(QString, QString)));
|
||||||
|
|
@ -494,6 +498,29 @@ void MainWindow::s_CloseProject()
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//参数卡数据查看
|
||||||
|
void MainWindow::s_ShowParameterCard(QString strSlfName, QString strName)
|
||||||
|
{
|
||||||
|
if(m_centerWidgets)
|
||||||
|
{
|
||||||
|
CObjWellLogINP * currentinp = new CObjWellLogINP();
|
||||||
|
if(!currentinp)
|
||||||
|
return;
|
||||||
|
currentinp->SetName(strName);
|
||||||
|
currentinp->SetSlfFileName(strSlfName);
|
||||||
|
currentinp->isLoad=false;
|
||||||
|
currentinp->LoadFromSLF();
|
||||||
|
TxtEditorDlg * pDialog= new TxtEditorDlg(currentinp);
|
||||||
|
pDialog->SetEditingTxt(currentinp->paramcard);
|
||||||
|
QString wellname;
|
||||||
|
QString path;
|
||||||
|
GetWellNameAndPath(strSlfName, wellname, path);
|
||||||
|
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||||
|
int iCount = m_centerWidgets->count();
|
||||||
|
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//曲线数据查看
|
//曲线数据查看
|
||||||
void MainWindow::s_ShowCurve(QString strSlfName, QString strName)
|
void MainWindow::s_ShowCurve(QString strSlfName, QString strName)
|
||||||
{
|
{
|
||||||
|
|
@ -590,8 +617,8 @@ void MainWindow::s_WelllogInformation(QString strSlfName)
|
||||||
nTableFlag =pLogio->Open_Set_Table("wellloginformation",
|
nTableFlag =pLogio->Open_Set_Table("wellloginformation",
|
||||||
TABLEE_OBJECT,
|
TABLEE_OBJECT,
|
||||||
4,
|
4,
|
||||||
// szColumnName.toLocal8Bit().data(),
|
szColumnName.toLocal8Bit().data(),
|
||||||
szColumnName.toStdString().c_str(),
|
// szColumnName.toStdString().c_str(),
|
||||||
szSize.toLocal8Bit().data(),
|
szSize.toLocal8Bit().data(),
|
||||||
szDataType.toLocal8Bit().data(),
|
szDataType.toLocal8Bit().data(),
|
||||||
szRemark.toLocal8Bit().data());
|
szRemark.toLocal8Bit().data());
|
||||||
|
|
@ -608,7 +635,7 @@ void MainWindow::s_WelllogInformation(QString strSlfName)
|
||||||
pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位
|
pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位
|
||||||
strcpy(pArr, "NONE");
|
strcpy(pArr, "NONE");
|
||||||
pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名
|
pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名
|
||||||
strcpy(pArr, "井名");
|
strcpy(pArr, QString("井名").toLocal8Bit());
|
||||||
pLogio->SetTableFieldData(nTableFlag,3,pArr,1);
|
pLogio->SetTableFieldData(nTableFlag,3,pArr,1);
|
||||||
s_ShowTable(strSlfName, "wellloginformation");
|
s_ShowTable(strSlfName, "wellloginformation");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public slots:
|
||||||
void s_showView();
|
void s_showView();
|
||||||
//开发工具
|
//开发工具
|
||||||
void s_development();
|
void s_development();
|
||||||
|
void s_ShowParameterCard(QString strSlfName, QString strName);//参数卡数据查看
|
||||||
void s_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
void s_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
||||||
void s_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
void s_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
||||||
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
||||||
|
|
|
||||||
|
|
@ -585,6 +585,9 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
//参数卡-》树图
|
//参数卡-》树图
|
||||||
QTreeWidgetItem *itemCardChild = new QTreeWidgetItem();
|
QTreeWidgetItem *itemCardChild = new QTreeWidgetItem();
|
||||||
itemCardChild->setText(0, strCurveName);
|
itemCardChild->setText(0, strCurveName);
|
||||||
|
itemCardChild->setData(0, Qt::UserRole, "cardObject"); // 存储额外数据,如ID
|
||||||
|
itemCardChild->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemCardChild->setData(0, Qt::UserRole + 2, wellname); // 存储额外数据,井名
|
||||||
itemCardChild->setIcon(0, iconParameterCard);
|
itemCardChild->setIcon(0, iconParameterCard);
|
||||||
if (0 == itemParameterCard->childCount())
|
if (0 == itemParameterCard->childCount())
|
||||||
{
|
{
|
||||||
|
|
@ -622,6 +625,13 @@ void QtProjectWidgets::initMenu()
|
||||||
_menuRoot = new QMenu(ui->treeWidget);
|
_menuRoot = new QMenu(ui->treeWidget);
|
||||||
initRootTreeMenu(_menuRoot, ui->treeWidget);
|
initRootTreeMenu(_menuRoot, ui->treeWidget);
|
||||||
|
|
||||||
|
_menuWells = new QMenu(ui->treeWidget);
|
||||||
|
initWellsTreeMenu(_menuWells, ui->treeWidget);
|
||||||
|
|
||||||
|
//参数卡对象-右键菜单
|
||||||
|
_menuCardObject = new QMenu(ui->treeWidget);
|
||||||
|
initParameterCardTreeMenu(_menuCardObject, ui->treeWidget);
|
||||||
|
|
||||||
//曲线对象-右键菜单
|
//曲线对象-右键菜单
|
||||||
_menuCurveObject = new QMenu(ui->treeWidget);
|
_menuCurveObject = new QMenu(ui->treeWidget);
|
||||||
initCurveObjectTreeMenu(_menuCurveObject, ui->treeWidget);
|
initCurveObjectTreeMenu(_menuCurveObject, ui->treeWidget);
|
||||||
|
|
@ -662,7 +672,33 @@ void QtProjectWidgets::initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
m_action_Open->setIcon(QIcon(GetImagePath() + "openproject.png")); // 设置图标
|
m_action_Open->setIcon(QIcon(GetImagePath() + "openproject.png")); // 设置图标
|
||||||
connect(m_action_Open, SIGNAL(triggered(bool)), this, SLOT(onOpenProject(bool)));
|
connect(m_action_Open, SIGNAL(triggered(bool)), this, SLOT(onOpenProject(bool)));
|
||||||
menu->addAction(m_action_Open);
|
menu->addAction(m_action_Open);
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始化根节点(项目名称)-右键菜单
|
||||||
|
void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
|
{
|
||||||
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("导入离散数据", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
//初始化参数卡-右键菜单
|
||||||
|
void QtProjectWidgets::initParameterCardTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
|
{
|
||||||
|
QAction* action_CardObject = new QAction("数据查看", treeWidget);
|
||||||
|
action_CardObject->setIcon(QIcon(GetImagePath() + "icon/Sheet.png")); // 设置图标":/image/u174.png"
|
||||||
|
connect(action_CardObject, SIGNAL(triggered(bool)), this, SLOT(onShowParameterCard(bool)));
|
||||||
|
menu->addAction(action_CardObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化曲线对象(AC、BS...)-右键菜单
|
//初始化曲线对象(AC、BS...)-右键菜单
|
||||||
|
|
@ -710,7 +746,7 @@ void QtProjectWidgets::initTableObjectTreeMenu(QMenu *menu, QTreeWidget *treeWid
|
||||||
//初始化根节点(井名称)-右键菜单
|
//初始化根节点(井名称)-右键菜单
|
||||||
void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
{
|
{
|
||||||
QAction* action_New = new QAction("导入数据", treeWidget);
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
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);
|
||||||
|
|
@ -734,7 +770,17 @@ void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget
|
||||||
//初始化根节点(井次名称)-右键菜单
|
//初始化根节点(井次名称)-右键菜单
|
||||||
void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
{
|
{
|
||||||
QAction* action_New = new QAction("编辑测井信息", treeWidget);
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("导入离散数据", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("编辑测井信息", treeWidget);
|
||||||
action_New->setIcon(QIcon(GetImagePath() + "icon/Edit.png")); // 设置图标
|
action_New->setIcon(QIcon(GetImagePath() + "icon/Edit.png")); // 设置图标
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onWelllogInformation()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onWelllogInformation()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
@ -803,7 +849,13 @@ void QtProjectWidgets::s_OpenProject(QString fileFull)
|
||||||
s_loadTreeWidget(fileFull);
|
s_loadTreeWidget(fileFull);
|
||||||
}
|
}
|
||||||
|
|
||||||
//数据查看
|
//参数表数据查看
|
||||||
|
void QtProjectWidgets::onShowParameterCard(bool checked)
|
||||||
|
{
|
||||||
|
emit CallManage::getInstance()->sig_ShowParameterCard(m_strSlfName, m_strCurveObjectName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//曲线数据查看
|
||||||
void QtProjectWidgets::onShowCurve(bool checked)
|
void QtProjectWidgets::onShowCurve(bool checked)
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strCurveObjectName);
|
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strCurveObjectName);
|
||||||
|
|
@ -1070,6 +1122,14 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
||||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||||
|
|
||||||
QString wellname = wellItem->text(0);
|
QString wellname = wellItem->text(0);
|
||||||
|
if (wellname == "井组")
|
||||||
|
{
|
||||||
|
QFileInfo temDir(file_name);
|
||||||
|
QString tempWellName=temDir.completeBaseName();
|
||||||
|
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||||
|
//m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||||
|
wellname = tempWellName;
|
||||||
|
}
|
||||||
QString wellroundname = wellname;
|
QString wellroundname = wellname;
|
||||||
ImportDataDialog *pDialog = new ImportDataDialog(NULL,wellname,wellroundname);
|
ImportDataDialog *pDialog = new ImportDataDialog(NULL,wellname,wellroundname);
|
||||||
QTreeWidgetItem rootItem = *ui->treeWidget->topLevelItem(0);
|
QTreeWidgetItem rootItem = *ui->treeWidget->topLevelItem(0);
|
||||||
|
|
@ -1130,6 +1190,11 @@ void QtProjectWidgets::onItemClicked(QTreeWidgetItem* item, int index)
|
||||||
//根节点(项目名称)-右键菜单
|
//根节点(项目名称)-右键菜单
|
||||||
popMenu = _menuRoot;
|
popMenu = _menuRoot;
|
||||||
}
|
}
|
||||||
|
else if (strTreeTag == "wells")
|
||||||
|
{
|
||||||
|
//井组-右键菜单
|
||||||
|
popMenu = _menuWells;
|
||||||
|
}
|
||||||
else if (strTreeTag == "curveObject"){
|
else if (strTreeTag == "curveObject"){
|
||||||
//曲线对象(AC、BS...)-右键菜单
|
//曲线对象(AC、BS...)-右键菜单
|
||||||
popMenu = _menuCurveObject;
|
popMenu = _menuCurveObject;
|
||||||
|
|
@ -1142,6 +1207,12 @@ void QtProjectWidgets::onItemClicked(QTreeWidgetItem* item, int index)
|
||||||
m_strCurveObjectName = item->text(0);
|
m_strCurveObjectName = item->text(0);
|
||||||
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
}
|
}
|
||||||
|
else if (strTreeTag == "cardObject"){
|
||||||
|
//参数卡对象
|
||||||
|
popMenu = _menuCardObject;
|
||||||
|
m_strCurveObjectName = item->text(0);
|
||||||
|
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
|
}
|
||||||
else if (strTreeTag == "tableObject")
|
else if (strTreeTag == "tableObject")
|
||||||
{
|
{
|
||||||
//表格对象
|
//表格对象
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ public slots:
|
||||||
//
|
//
|
||||||
void s_NewProject(); //新建项目
|
void s_NewProject(); //新建项目
|
||||||
void s_OpenProject(QString fileFull); //打开项目
|
void s_OpenProject(QString fileFull); //打开项目
|
||||||
|
//参数表
|
||||||
|
void onShowParameterCard(bool checked = false);//数据查看
|
||||||
//曲线
|
//曲线
|
||||||
void onShowCurve(bool checked = false); //数据查看
|
void onShowCurve(bool checked = false); //数据查看
|
||||||
void ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset);
|
void ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset);
|
||||||
|
|
@ -62,7 +63,9 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//右键菜单
|
//右键菜单
|
||||||
QMenu *_menuRoot;
|
QMenu *_menuRoot; //根目录
|
||||||
|
QMenu *_menuWells; //井组
|
||||||
|
QMenu *_menuCardObject; //参数卡
|
||||||
QMenu *_menuCurveObject; //曲线对象(AC、BS...)
|
QMenu *_menuCurveObject; //曲线对象(AC、BS...)
|
||||||
QMenu *_menuWaveObject; //波列对象
|
QMenu *_menuWaveObject; //波列对象
|
||||||
QMenu *_menuTableObject; //表格对象
|
QMenu *_menuTableObject; //表格对象
|
||||||
|
|
@ -92,6 +95,10 @@ public:
|
||||||
|
|
||||||
//初始化根节点(项目名称)-右键菜单
|
//初始化根节点(项目名称)-右键菜单
|
||||||
void initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
void initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
|
//井组-右键菜单
|
||||||
|
void initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
|
//初始化参数卡-右键菜单
|
||||||
|
void initParameterCardTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
//初始化曲线对象(AC、BS...)-右键菜单
|
//初始化曲线对象(AC、BS...)-右键菜单
|
||||||
void initCurveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
void initCurveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
//初始化波列对象-右键菜单
|
//初始化波列对象-右键菜单
|
||||||
|
|
|
||||||
2
编译说明.txt
2
编译说明.txt
|
|
@ -13,7 +13,7 @@ https://www.cnblogs.com/ys0103/p/4562493.html
|
||||||
10.DataMgr
|
10.DataMgr
|
||||||
11.OSGFramework
|
11.OSGFramework
|
||||||
12.WellLogModule
|
12.WellLogModule
|
||||||
13.WellLogUI--删除WellLogUI\include\PaiTableWidget.h后编译
|
13.WellLogUI
|
||||||
14.ModuleConsole
|
14.ModuleConsole
|
||||||
15.appDllTest--算法测试
|
15.appDllTest--算法测试
|
||||||
16.ConvertorManager
|
16.ConvertorManager
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user