Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
# Conflicts: # logPlus/formwell.cpp
This commit is contained in:
commit
b081097aa4
|
|
@ -1039,7 +1039,7 @@ UINT PELibraryModule::ProcessDLL1(LPVOID pPram,float sdep,float edep)//只用公
|
|||
if(Hd->Dep>Hd->EndDep) break;
|
||||
//mDP.SetDepth(Hd->Dep);
|
||||
}
|
||||
QString slf=m_pMemRdWt->GetWellName().GetString();
|
||||
QString slf=GBKToUTF8(m_pMemRdWt->GetWellName().GetString());
|
||||
QStringList Names;
|
||||
int Noo=m_pMemRdWt->GetOutCurveCount();
|
||||
for(int i=0;i<Noo;i++)
|
||||
|
|
@ -1116,7 +1116,7 @@ UINT PELibraryModule::ProcessDLL2(LPVOID pPram,float sdep,float edep)//自控模
|
|||
cs="处理完毕!";
|
||||
flag=1;
|
||||
}
|
||||
QString slf=GBKToUTF8(m_pMemRdWt->GetWellName().GetString());
|
||||
QString slf=GBKToUTF8(m_pMemRdWt->GetWellName().GetString());
|
||||
QStringList Names;
|
||||
Names.clear();
|
||||
int Noo=m_pMemRdWt->GetOutCurveCount();
|
||||
|
|
|
|||
|
|
@ -1353,8 +1353,7 @@ void FormWell::onSectionResized(int logicalIndex, int oldSize, int newSize)
|
|||
{
|
||||
if(newSize!=0)
|
||||
{
|
||||
m_pMainWinCurve->SetScrollBar_Geometry();
|
||||
m_pMainWinCurve->vertScrollBarChanged_Head(0);
|
||||
m_pMainWinCurve->SetScrollBar_Geometry_ByHand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -845,13 +845,35 @@ void MainWindow::s_ShowTDT(QString strSlfName, QString strName)
|
|||
{
|
||||
if(m_centerWidgets)
|
||||
{
|
||||
WellLogTableDialogNew* pDialog = new WellLogTableDialogNew();
|
||||
pDialog->setName(strSlfName, strName, TDT_OBJECT);
|
||||
WellLogTableDialogNew* pDialog = nullptr;
|
||||
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;
|
||||
GetWellNameAndPath(strSlfName, wellname, path);
|
||||
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||
int iCount = m_centerWidgets->count();
|
||||
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||
// int iCount = m_centerWidgets->count();
|
||||
// m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -860,17 +882,39 @@ void MainWindow::s_ShowTable(QString strSlfName, QString strName)
|
|||
{
|
||||
if(m_centerWidgets)
|
||||
{
|
||||
WellLogTableDialogNew* pDialog = new WellLogTableDialogNew();
|
||||
pDialog->setName(strSlfName, strName, TABLEE_OBJECT);
|
||||
WellLogTableDialogNew* pDialog = nullptr;
|
||||
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;
|
||||
GetWellNameAndPath(strSlfName, wellname, path);
|
||||
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||
int iCount = m_centerWidgets->count();
|
||||
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||
// int iCount = m_centerWidgets->count();
|
||||
// m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||
}
|
||||
}
|
||||
|
||||
//表格数据查看
|
||||
//波列数据查看
|
||||
void MainWindow::s_ShowWave(QString strSlfName, QString strName)
|
||||
{
|
||||
if(m_centerWidgets)
|
||||
|
|
@ -890,7 +934,6 @@ void MainWindow::s_ShowWave(QString strSlfName, QString strName)
|
|||
pDialog = pDlg;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!pDialog)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -355,6 +355,85 @@ void MainWindowCurve::resizeWindow()
|
|||
//update();
|
||||
}
|
||||
|
||||
//手动设置2个滚动条位置
|
||||
void MainWindowCurve::SetScrollBar_Geometry_ByHand()
|
||||
{
|
||||
QRect rect2 = ui->centralwidget->geometry();
|
||||
int left, top, right, bottom;
|
||||
if (ui->centralwidget->layout())
|
||||
{
|
||||
ui->centralwidget->layout()->getContentsMargins(&left, &top, &right, &bottom);
|
||||
}
|
||||
//可视区域高度
|
||||
int iScreenHeight = rect2.height()- top -bottom;
|
||||
|
||||
//锁头
|
||||
if(m_fixwellsectionHeaderAc->isChecked())
|
||||
{
|
||||
//获取井well前2行的高度
|
||||
//int iTableSize_Head = 100 + m_nObjLayerH;
|
||||
int iTableSize_Head = 0;
|
||||
getTableSize_Head(iTableSize_Head);
|
||||
int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (5) + iTableSize_Head -1;
|
||||
|
||||
QRect geoRect2 = ui->verticalScrollBar_2->geometry();
|
||||
ui->verticalScrollBar_2->setGeometry(geoRect2.x(), geoRect2.y(), geoRect2.width(), iTableWellTrack_height);
|
||||
//
|
||||
QRect geoRect = ui->verticalScrollBar->geometry();
|
||||
ui->verticalScrollBar->setGeometry(geoRect.x(), geoRect2.y()+iTableWellTrack_height+2, geoRect.width(), iScreenHeight-iTableWellTrack_height-2);
|
||||
|
||||
//自定义滚动条(头)
|
||||
int iTableSize_Head_Biggest = 0;
|
||||
int iTableSize_Head1 = 0;
|
||||
int iTableSize_Head2 = 0;
|
||||
getTableSize_Head_Biggest(iTableSize_Head_Biggest, iTableSize_Head1, iTableSize_Head2);
|
||||
m_iTableSize_Head2 = iTableSize_Head2;
|
||||
m_nObjLayerH = m_iTableSize_Head2;
|
||||
|
||||
ui->verticalScrollBar_2->setRange(0, iTableSize_Head_Biggest - iTableSize_Head);
|
||||
ui->verticalScrollBar_2->setValue(0);
|
||||
|
||||
//重置滚动条范围值setRange---------------------
|
||||
//可视区域高度
|
||||
iScreenHeight = 0;
|
||||
//锁头
|
||||
if(m_fixwellsectionHeaderAc->isChecked())
|
||||
{
|
||||
iScreenHeight = (double)(rect2.height()-10- top -bottom - iTableWellTrack_height)/g_dPixelPerCm * m_iScale;
|
||||
}
|
||||
else{
|
||||
iScreenHeight = (double)(rect2.height()-10- top -bottom - 4)/g_dPixelPerCm * m_iScale;
|
||||
}
|
||||
//下方滚动条高度
|
||||
int iHScrollBarHeight = 0;
|
||||
if(!ui->tableWidget_2->horizontalScrollBar()->isVisible())
|
||||
{
|
||||
iHScrollBarHeight = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
iHScrollBarHeight = ui->tableWidget_2->horizontalScrollBar()->height()/g_dPixelPerCm * m_iScale;
|
||||
}
|
||||
ui->verticalScrollBar->setRange(-m_iY2*100, -m_iY1*100 - iScreenHeight + iHScrollBarHeight);
|
||||
ui->verticalScrollBar->setValue(-m_iY2*100);
|
||||
|
||||
//道头部滚动条归0
|
||||
vertScrollBarChanged_Head(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->verticalScrollBar_2->setValue(0);
|
||||
|
||||
//替换为高度0,不然居中处理失效
|
||||
QRect geoRect2 = ui->verticalScrollBar_2->geometry();
|
||||
ui->verticalScrollBar_2->setGeometry(geoRect2.x(), geoRect2.y(), geoRect2.width(), 0);
|
||||
//
|
||||
QRect geoRect = ui->verticalScrollBar->geometry();
|
||||
ui->verticalScrollBar->setGeometry(geoRect.x(), geoRect2.y(), geoRect.width(), iScreenHeight);
|
||||
//ui->verticalScrollBar->setGeometry(geoRect.x(), geoRect2.y(), geoRect.width(), geoRect.height()+geoRect2.height());
|
||||
}
|
||||
}
|
||||
|
||||
//2个滚动条位置
|
||||
void MainWindowCurve::SetScrollBar_Geometry()
|
||||
{
|
||||
|
|
@ -3770,6 +3849,8 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
|||
m_PreviewPrintAc->setChecked(true);
|
||||
//切换回锁头模式
|
||||
m_fixwellsectionHeaderAc->setChecked(true);
|
||||
//锁头
|
||||
s_showHeadTable();
|
||||
|
||||
//全部显示道头,方便抓拍道头
|
||||
ShowTableHead_All();
|
||||
|
|
@ -4492,6 +4573,7 @@ void MainWindowCurve::s_showHeadTable()
|
|||
{
|
||||
//恢复原始数据,不然容易造成道头过大
|
||||
m_iTableSize_Head2 = 104;
|
||||
m_nObjLayerH = m_iTableSize_Head2;
|
||||
|
||||
//显示道头/对象头
|
||||
ShowTableHead();
|
||||
|
|
|
|||
|
|
@ -152,6 +152,8 @@ public:
|
|||
void SetNo();
|
||||
//2个滚动条位置
|
||||
void SetScrollBar_Geometry();
|
||||
//手动设置2个滚动条位置
|
||||
void SetScrollBar_Geometry_ByHand();
|
||||
|
||||
public:
|
||||
//展示所有井
|
||||
|
|
|
|||
|
|
@ -834,6 +834,11 @@ void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
|||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||
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->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||
// 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()));
|
||||
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);
|
||||
action_Delete->setIcon(QIcon(GetImagePath() + "icon/Delete.png")); // 设置图标":/image/u174.png"
|
||||
connect(action_Delete, SIGNAL(triggered()), this, SLOT(onDeleteObject()));
|
||||
|
|
@ -2484,6 +2494,24 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
|||
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()
|
||||
{
|
||||
ImportSingleWellLogData(true);
|
||||
|
|
@ -3073,8 +3101,7 @@ void QtProjectWidgets::s_Notice_AddObject(QString strName, QString strSlfName, Q
|
|||
int wellItemCount = wellItem->childCount(); // 获取井次数量
|
||||
for (int k = 0; k < wellItemCount; ++k)
|
||||
{
|
||||
QString slf = wellItem->child(k)->data(0, Qt::UserRole + 1).toString();
|
||||
if (strSlfName == slf)
|
||||
if (strSlfName == wellItem->child(k)->data(0, Qt::UserRole+1).toString())
|
||||
{
|
||||
wellCurItem = wellItem->child(k);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public slots:
|
|||
void onEditWelllogRound();
|
||||
void onImportFolder(); //按目录导入测井数据
|
||||
void onImportSingleWellLogData(); //数据导入
|
||||
void onAddWell(); //新建井
|
||||
void onImportSingleWellLogDataToolBar(); //数据导入(工具栏)
|
||||
void onImportSlfTable();
|
||||
void onOutWellLogRound();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user