数据对象拷贝和井上的深度重采样
This commit is contained in:
parent
4c9f63169d
commit
06c77bf2e1
|
|
@ -732,6 +732,18 @@ void QtProjectWidgets::expandAll(QTreeWidgetItem* item) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtProjectWidgets::showAllItems(QTreeWidgetItem* item) {
|
||||||
|
if (item) {
|
||||||
|
// 设置当前项为可见
|
||||||
|
item->setHidden(false);
|
||||||
|
|
||||||
|
// 递归处理所有子项
|
||||||
|
for (int i = 0; i < item->childCount(); ++i) {
|
||||||
|
showAllItems(item->child(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//初始化树形控件中的右键菜单
|
//初始化树形控件中的右键菜单
|
||||||
void QtProjectWidgets::initMenu()
|
void QtProjectWidgets::initMenu()
|
||||||
{
|
{
|
||||||
|
|
@ -1027,11 +1039,21 @@ void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("数据对象拷贝", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/Correction.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onCopyObject()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
action_New = new QAction("编辑井基本信息", treeWidget);
|
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(onEditWelllogRound()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onEditWelllogRound()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
m_action_DepthResample = new QAction("深度重采样", treeWidget);
|
||||||
|
m_action_DepthResample->setIcon(QIcon(GetImagePath() + "icon/AddToTrack.png")); // 设置图标
|
||||||
|
connect(m_action_DepthResample, SIGNAL(triggered(bool)), this, SLOT(onDepthResample(bool)));
|
||||||
|
menu->addAction(m_action_DepthResample);
|
||||||
|
|
||||||
QAction* action_ReName = new QAction("重命名", treeWidget);
|
QAction* action_ReName = new QAction("重命名", treeWidget);
|
||||||
action_ReName->setIcon(QIcon(GetImagePath() + "icon/Rename.png")); // 设置图标":/image/u174.png"
|
action_ReName->setIcon(QIcon(GetImagePath() + "icon/Rename.png")); // 设置图标":/image/u174.png"
|
||||||
connect(action_ReName, SIGNAL(triggered()), this, SLOT(onReNameObject()));
|
connect(action_ReName, SIGNAL(triggered()), this, SLOT(onReNameObject()));
|
||||||
|
|
@ -1063,6 +1085,11 @@ void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("数据对象拷贝", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/Correction.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onCopyObject()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
action_New = new QAction("备份", treeWidget);
|
action_New = new QAction("备份", treeWidget);
|
||||||
action_New->setIcon(QIcon(GetImagePath() + "icon/Copy.png")); // 设置图标
|
action_New->setIcon(QIcon(GetImagePath() + "icon/Copy.png")); // 设置图标
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onSlfbackup()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onSlfbackup()));
|
||||||
|
|
@ -2583,9 +2610,21 @@ void QtProjectWidgets::onCopyObject()
|
||||||
// //whp change 2020.3.9 for 统一离散数据入口
|
// //whp change 2020.3.9 for 统一离散数据入口
|
||||||
// magr->CopyObject(CurItemType,WellName,WellFileName);
|
// magr->CopyObject(CurItemType,WellName,WellFileName);
|
||||||
|
|
||||||
|
QTreeWidgetItem *pItem = *ui->treeWidget->selectedItems().begin();
|
||||||
|
QString strTreeTag = pItem->data(0, Qt::UserRole).toString();
|
||||||
|
QString WellName="",WellFileName="";
|
||||||
|
if (strTreeTag == "wellname") //井名
|
||||||
|
{
|
||||||
|
WellName = pItem->text(0);
|
||||||
|
}
|
||||||
|
else if (strTreeTag == "wellItem") //井次
|
||||||
|
{
|
||||||
|
WellName = pItem->parent()->text(0);
|
||||||
|
WellFileName = pItem->data(0, Qt::UserRole+1).toString();
|
||||||
|
}
|
||||||
|
|
||||||
CDataManagger* magr=new CDataManagger();
|
CDataManagger* magr=new CDataManagger();
|
||||||
int CurItemType=0;
|
int CurItemType=0;
|
||||||
QString WellFileName="",WellName="";
|
|
||||||
int nCount = m_qmapWellFiles.count();
|
int nCount = m_qmapWellFiles.count();
|
||||||
magr->SetWellFiles(m_qmapWellFiles);
|
magr->SetWellFiles(m_qmapWellFiles);
|
||||||
magr->CopyObject(CurItemType,WellName,WellFileName);
|
magr->CopyObject(CurItemType,WellName,WellFileName);
|
||||||
|
|
@ -2602,6 +2641,7 @@ void QtProjectWidgets::on_textChanged(const QString &text)
|
||||||
{
|
{
|
||||||
bool bHidden = !text.isEmpty();
|
bool bHidden = !text.isEmpty();
|
||||||
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(0);
|
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(0);
|
||||||
|
showAllItems(item);
|
||||||
int childCount = item->childCount(); // 获取子节点数量
|
int childCount = item->childCount(); // 获取子节点数量
|
||||||
for (int i = 0; i < childCount; ++i)
|
for (int i = 0; i < childCount; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ public:
|
||||||
void loadWellTree(QTreeWidgetItem *parent, QString fileFull, QString parentWellname);
|
void loadWellTree(QTreeWidgetItem *parent, QString fileFull, QString parentWellname);
|
||||||
|
|
||||||
void expandAll(QTreeWidgetItem* item);
|
void expandAll(QTreeWidgetItem* item);
|
||||||
|
void showAllItems(QTreeWidgetItem* item);
|
||||||
|
|
||||||
//初始化树形控件中的右键菜单
|
//初始化树形控件中的右键菜单
|
||||||
void initMenu();
|
void initMenu();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user