This commit is contained in:
DESKTOP-450PEFP\mainc 2026-05-12 10:00:21 +08:00
commit 848d5edd68
8 changed files with 533 additions and 56 deletions

View File

@ -140,39 +140,39 @@ void PropertyWidget::changedYxzpProperty(QtProperty *qtProperty, const QVariant
{
if("选择井曲线" == m_propertyData[qtProperty])
{
QString sFilePath = variant.value<QString>();
if(sFilePath.indexOf("@")>-1)
{
int ind=sFilePath.indexOf("@");
QString strLineName = sFilePath.left(ind);
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
QString strOldLineName = m_formInfo->m_strLineName;
QString strOldSlfName = m_formInfo->m_strSlfName;
//暂时不允许改变slf井次名称不然不在同一口井绘制
if(strOldSlfName != sFilePath)
{
QMessageBox::information(nullptr,"提示","不允许改变slf井次名称");
return;
}
//名称不变
if(strOldLineName == strLineName)
{
return;
}
// QString sFilePath = variant.value<QString>();
// if(sFilePath.indexOf("@")>-1)
// {
// int ind=sFilePath.indexOf("@");
// QString strLineName = sFilePath.left(ind);
// sFilePath=sFilePath.mid(ind+1);
// sFilePath.trimmed();
// //只支持以下名称
// if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
// {
// QString strOldLineName = m_formInfo->m_strLineName;
// QString strOldSlfName = m_formInfo->m_strSlfName;
// //暂时不允许改变slf井次名称不然不在同一口井绘制
// if(strOldSlfName != sFilePath)
// {
// QMessageBox::information(nullptr,"提示","不允许改变slf井次名称");
// return;
// }
// //名称不变
// if(strOldLineName == strLineName)
// {
// return;
// }
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
// //
// m_formInfo->m_strLineName = strLineName;
// //m_formInfo->m_strSlfName = sFilePath;
// m_formInfo->update();
//改变固井曲线名
emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
}
}
// //改变固井曲线名
// emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
// }
// }
}
else if("例区高度(cm)" == m_propertyData[qtProperty])
{
@ -720,7 +720,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
sFilePath=sFilePath.mid(ind+1);
sFilePath.trimmed();
//只支持以下名称
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
//if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
{
QString strOldLineName = m_formInfo->m_strLineName;
QString strOldSlfName = m_formInfo->m_strSlfName;
@ -3012,7 +3012,12 @@ void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOt
listPointStyle.append("和平标志");
//
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, QVariant::String);
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//曲线
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@curveObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String);
//
@ -3691,7 +3696,13 @@ void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, d
void PropertyWidget:: initGujingProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//固井
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@gujingObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
@ -3720,7 +3731,13 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//固井
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@gujingObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
@ -4159,7 +4176,13 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL
//气测/FMT/射孔/文本
void PropertyWidget::initJiegutextProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//气测/FMT/射孔/文本
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@JiegutextObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -4196,7 +4219,13 @@ void PropertyWidget::initJiegutextItemProperty(TransparentDraggableJiegutext* td
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//气测/FMT/射孔/文本
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@JiegutextObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -5828,11 +5857,19 @@ void PropertyWidget::changedDenvProperty(QString strProperty, QVariant varVal)
emit CallManage::getInstance()->sig_changeDenvProperty(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName);
}
}
//多臂井径
void PropertyWidget::initMCalsProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId());
//m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName);
//多臂井径
m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@MCalsObject");
//_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
//
_CreateVariantPropertyItem("网格图", "最小井径", formInfo->m_MinVal, QVariant::Double);

View File

@ -26,6 +26,9 @@
#include <QToolButton>
#include <QFileDialog>
#include <QFocusEvent>
#include "selectlinedialog.h"
extern QString g_SelectLine_filePath;
FileEdit::FileEdit(QWidget *parent)
: QWidget(parent)
@ -35,6 +38,7 @@ FileEdit::FileEdit(QWidget *parent)
layout->setSpacing(0);
theLineEdit = new QLineEdit(this);
theLineEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred));
theLineEdit->setReadOnly(true);//只读
QToolButton *button = new QToolButton(this);
button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
button->setText(QLatin1String("..."));
@ -51,13 +55,43 @@ FileEdit::FileEdit(QWidget *parent)
void FileEdit::buttonClicked()
{
QString filePath = QFileDialog::getOpenFileName(this, tr("选择文件"), strFilePath, theFilter);
if (filePath.isNull())
return;
if(theFilter.contains("slf.Line"))
{
QStringList listTmp = theFilter.split("@@");
if(listTmp.size()>3)
{
QString strSlfName = listTmp[1];
QString strWellName = listTmp[2];
QString strType = listTmp[3];
// 创建对话框
SelectLineDialog *dlg = new SelectLineDialog(nullptr);
dlg->setInfo(strSlfName, strWellName, strType);
//
dlg->setAttribute(Qt::WA_DeleteOnClose);//关闭时,自动删除窗口对象
int result = dlg->exec();//模态对话框
if (result == QDialog::Accepted) {
// 处理用户点击了确定按钮的逻辑
QString filePath = g_SelectLine_filePath + "@" + strSlfName;
theLineEdit->setText(filePath);
emit filePathChanged(filePath);
}
else if (result == QDialog::Rejected) {
// 处理用户点击了取消按钮的逻辑
}
else {
// 处理其他情况的逻辑
}
}
}
else{
QString filePath = QFileDialog::getOpenFileName(this, tr("选择文件"), strFilePath, theFilter);
if (filePath.isNull())
return;
QFileInfo finfo(filePath);
theLineEdit->setText(finfo.baseName());
emit filePathChanged(filePath);
QFileInfo finfo(filePath);
theLineEdit->setText(finfo.baseName());
emit filePathChanged(filePath);
}
}
void FileEdit::focusInEvent(QFocusEvent *e)

View File

@ -83,6 +83,7 @@ SOURCES += \
qmytreewidget.cpp \
qtcommonclass.cpp \
qtprojectwidgets.cpp \
selectlinedialog.cpp \
selectwelldialog.cpp \
totalTitleBar.cpp \
transparentdraggableGuan.cpp \
@ -150,6 +151,7 @@ HEADERS += \
qmytreewidget.h \
qtcommonclass.h \
qtprojectwidgets.h \
selectlinedialog.h \
selectwelldialog.h \
totalTitleBar.h \
transparentdraggableGuan.h \
@ -177,6 +179,7 @@ FORMS += \
mainwindowsplitter.ui \
newheaddialog.ui \
qtprojectwidgets.ui \
selectlinedialog.ui \
selectwelldialog.ui
INCLUDEPATH += ../include/ \

View File

@ -5332,8 +5332,9 @@ void MainWindowCurve::s_changeScrollBar(QString strUuid)
return;
}
int iCurValue = ui->verticalScrollBar->value();
vertScrollBarChanged(iCurValue);
ui->verticalScrollBar->setValue(-m_iY2);//-m_iY2
//ui->verticalScrollBar->setValue(iCurValue+1);//-m_iY2
// int iCurValue = ui->verticalScrollBar->value();
// vertScrollBarChanged(iCurValue);
// //ui->verticalScrollBar->setValue(iCurValue+1);//-m_iY2
}

View File

@ -4972,10 +4972,19 @@ void QMyCustomPlot::RefreshItems_Gujing()
pDraggableRect->deleteRect();
}
//重新加载
LoadFromSLF_Gujing(m_strSlfName, m_strLineName);
//属性清空
PropertyService()->InitCurrentViewInfo();
//只支持以下名称
if (m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT")
{
//重新加载
LoadFromSLF_Gujing(m_strSlfName, m_strLineName);
//属性清空
PropertyService()->InitCurrentViewInfo();
}
else
{
replot();
return;
}
}
//合并结论
@ -5054,7 +5063,8 @@ void QMyCustomPlot::MegResult_Gujing()
//加载固井slf数据
bool QMyCustomPlot::LoadFromSLF_Gujing(QString strSlfName, QString strLineName)
{
{
//
CMemRdWt *logio=new CMemRdWt();
if(!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
{
@ -5751,20 +5761,49 @@ void QMyCustomPlot::s_ReloadPlot(QString strUuid, QString strSlfName, QString st
if(m_strSlfName == strSlfName &&
m_strLineName == strLineName)
{
}
else
{
return;
}
if(strLineName == "")
{
//先清空
m_x.clear();
m_y.clear();
m_showX.clear();
m_showX = m_x;
m_showY.clear();
m_showY = m_y;
graph(0)->data()->clear();
//graph(0)->setData(m_x, m_y);
replot(); //刷新曲线
return;
}
//读取slf
CLogIO *logio=new CLogIO();
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
//
int index=logio->OpenCurve(strLineName.toStdString().c_str());
if(index<0) {
delete logio;
delete logio;
//先清空
m_x.clear();
m_y.clear();
m_showX.clear();
m_showX = m_x;
m_showY.clear();
m_showY = m_y;
graph(0)->data()->clear();
//graph(0)->setData(m_x, m_y);
replot(); //刷新曲线
return;
}
@ -8059,7 +8098,12 @@ void QMyCustomPlot::s_changeJiegutextTitle(QString strUuid, QString strSlfName,
//重新加载
//QString strAliasName = "气测-FMT-射孔-文本";
LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
bool bRet = LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
if(!bRet)
{
replot();
}
//属性清空(LoadFromSLF_Jiegutext内部调用)
//PropertyService()->InitCurrentViewInfo();
}
@ -8862,6 +8906,11 @@ void QMyCustomPlot::AddItem_Layer(QStringList lists)
bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, QString strAliasName)
{
if(csCurve == "")
{
return false;
}
Slf_TxtPOS *m_pResult=NULL;
CMemRdWt *logio=new CMemRdWt();
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
@ -9345,7 +9394,11 @@ void QMyCustomPlot::RefreshItems_Jiegutext()
//
QString strAliasName = pInfo->m_strAliasName;
//加载
this->LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
bool bRet = this->LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
if(!bRet)
{
replot();
}
//属性清空(LoadFromSLF_Jiegutext内部调用)
//PropertyService()->InitCurrentViewInfo();
}
@ -12729,6 +12782,7 @@ void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double val
double dDelta = value; //- upper
double dPercent = dDelta / (low-upper);
//move(0, -(dPercent*geoRect.height()));
setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
if ("DrawImageObject" == m_strType)
@ -13793,6 +13847,11 @@ void QMyCustomPlot::Draw_MCals(QString strLineName, QString strNewLineName)
//多臂井径
m_strLineName = pInfo->m_strLineName; //"FCA2";
if(m_strLineName == "")
{
return;
}
CDrawNrad *drawNrad = new CDrawNrad(this);
//属性
drawNrad->m_LeftVal = pInfo->m_MinVal;//最小井径

View File

@ -0,0 +1,243 @@
#include "selectlinedialog.h"
#include "ui_selectlinedialog.h"
#include <QFile>
#include <QDebug>
#include <QTextStream>
#include "LogIO.h"
QString g_SelectLine_filePath = "";
SelectLineDialog::SelectLineDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SelectLineDialog)
{
ui->setupUi(this);
loadStyle(":/qrc/qss/flatgray.css");
g_SelectLine_filePath = "";
//
connect(ui->ok, SIGNAL(clicked()), this, SLOT(slotOkClicked()));
connect(ui->cancel, SIGNAL(clicked()), this, SLOT(slotCancelClicked()));
}
SelectLineDialog::~SelectLineDialog()
{
delete ui;
}
void SelectLineDialog::loadStyle(const QString &qssFile)
{
//加载样式表
QString qss;
QFile file(qssFile);
if (file.open(QFile::ReadOnly)) {
//用QTextStream读取样式文件不用区分文件编码 带bom也行
QStringList list;
QTextStream in(&file);
//in.setCodec("utf-8");
while (!in.atEnd()) {
QString line;
in >> line;
list << line;
}
file.close();
qss = list.join("\n");
QString paletteColor = qss.mid(20, 7);
this->setPalette(QPalette(paletteColor));
//用时主要在下面这句
this->setStyleSheet(qss);
}
}
void SelectLineDialog::setInfo(QString fileFull, QString strWellName, QString strType)
{
CLogIO * logio=new CLogIO();
if(!logio->Open(fileFull.toStdString().c_str(),CSlfIO::modeRead))
{
delete logio;
QString aa=fileFull+"文件打开失败,请检查!";
qDebug() << aa;
//AppendConsole(pai::log::PAI_ERROR,aa);
return;
}
else
{
Slf_FILE_MESSAGE mssage;
logio->GetFileMessage(mssage);
if(strWellName != QString(QString::fromLocal8Bit(mssage.WellName)))
{
delete logio;
return;
}
char* curvename=new char[65];
curvename[64]='\0';
char* aliasname=new char[65];
aliasname[64]='\0';
//
int nSlfCount = logio->GetObjectCount();
for(int i = 0; i< nSlfCount; i++)
{
logio->GetObjectName(i,curvename,NULL,aliasname);
if(!logio->IsObject(i)) {
logio->DiscardObject(i);
continue;
};
if(logio->GetObjectStatus(i)!=OBJECT_NORMAL)
{
continue;
}
short curvetype=logio->GetObjectType(i);
//
short Attribute=0,SubAttribute=0;
logio->GetObjectAttribute(i,&Attribute,&SubAttribute);
QString strCurveName = QString::fromLocal8Bit(curvename);
if(curvetype>CARD_OBJECT || 0 == curvetype)
{
qDebug() << "strCurveName: " << strCurveName;
//表格数据
if (strCurveName == "GUJING1_RESULT" || strCurveName == "GUJING2_RESULT" || strCurveName == "GUJING3_RESULT")
{
//固井
if(strType=="gujingObject")
{
//下拉列表
ui->comboBox->addItem(strCurveName);
}
}
else
{
//气测/FMT/射孔/文本(去掉固井曲线)
if(strType=="JiegutextObject")
{
//下拉列表
ui->comboBox->addItem(strCurveName);
}
}
}
else if(CURVE_OBJECT == curvetype)
{
//曲线
if(strType!="curveObject")
{
continue;
}
//判断曲线有效性
Slf_CURVE acurveinfo;
logio->GetCurveInfo(i,&acurveinfo);
if(acurveinfo.DepLevel!=0&&(acurveinfo.EndDepth-acurveinfo.StartDepth>0))
{
if(acurveinfo.MaxValue==acurveinfo.MinValue||acurveinfo.MaxValue==-99999||acurveinfo.MaxValue==-9999||acurveinfo.MinValue==999999||acurveinfo.MinValue==999999||acurveinfo.MinValue==99999||acurveinfo.MinValue==99999||acurveinfo.MinValue==-9999){
int curveindex=logio->OpenSlfTable(i,-1);
if(curveindex>-1)
{
MyDataTypeEnum vVdl;
DWORD count=(acurveinfo.EndDepth-acurveinfo.StartDepth)/acurveinfo.DepLevel+1.5;
DWORD len=count*acurveinfo.CodeLen;
acurveinfo.MinValue=99999999;
acurveinfo.MaxValue=-99999999;
if(acurveinfo.CodeLen==8) acurveinfo.MinValue=99999999;
vVdl.vchar=new char[len];
len=logio->ReadCurve(curveindex, acurveinfo.StartDepth,count,(void *)vVdl.vchar);
if(!len) {
QString cs;
char buf[1000];
sprintf(buf,"%s %f-%f",acurveinfo.Name,acurveinfo.StartDepth,acurveinfo.EndDepth);
cs=buf;
int flag = QMessageBox::warning(NULL,"提示",QString(cs+"\n曲线信息异常!删除该曲线可能需要较长时间,建议复制正常曲线等信息到新文件,然后删除此文件。是否此时直接将该曲线删除?"),QMessageBox::Yes,QMessageBox::No);
if(flag==QMessageBox::Yes) logio->DiscardObject(i);
delete vVdl.vchar;
continue;
}
for(int kk=0;kk<count;kk=kk+10)
{
float buf[200];
buf[0]=0;
float temp=logio->GetData(acurveinfo.RepCode,&vVdl.vchar[kk*acurveinfo.CodeLen],buf);
#ifdef WIN32
if(_isnan(temp)||!_finite(temp)) continue;
#else
if(__isnan(temp)||!__finite(temp)) continue;
#endif // WIN32
if(acurveinfo.MaxValue<temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MaxValue=temp;
if(acurveinfo.MinValue>temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MinValue=temp;
}
logio->SetCurveInfo(curveindex,&acurveinfo);
delete vVdl.vchar;
}
}
}
else if(acurveinfo.DepLevel==0||acurveinfo.StartDepth<-100000||acurveinfo.StartDepth>100000)
{
QString cs;
char buf[1000];
sprintf(buf,"%s %f-%f",acurveinfo.Name,acurveinfo.StartDepth,acurveinfo.EndDepth);
cs=buf;
int flag = QMessageBox::warning(NULL,"提示",QString(cs+"\n曲线信息异常!删除该曲线可能需要较长时间,建议复制正常曲线等信息到新文件,然后删除此文件。是否此时直接将该曲线删除?"),QMessageBox::Yes,QMessageBox::No);
if(flag==QMessageBox::Yes) logio->DiscardObject(i);
continue;
}
//下拉列表
ui->comboBox->addItem(strCurveName);
}
else if(CARD_OBJECT == curvetype)
{
//参数卡-》树图
}
else if(WAVE_OBJECT == curvetype)
{
//波列
//多臂井径
if(strType=="MCalsObject")
{
//下拉列表
ui->comboBox->addItem(strCurveName);
}
}
else if(TDT_OBJECT == curvetype)
{
//TDT-》树图
}
}
delete []curvename;
delete []aliasname;
delete logio;
//delete []pEntry;
}
}
//
void SelectLineDialog::slotOkClicked()
{
// g_SelectWellIndex = ui->comboBox->currentIndex();
QString strLine = ui->comboBox->currentText();
if(strLine=="")
{
return;
}
g_SelectLine_filePath = strLine;
//关闭
accept(); // 让 QDialog::exec() 返回 QDialog::Accepted
//QDialog::close();
}
//
void SelectLineDialog::slotCancelClicked()
{
reject(); // 让 QDialog::exec() 返回 QDialog::Rejected
//QDialog::close();
}

View File

@ -0,0 +1,30 @@
#ifndef SELECTLINEDIALOG_H
#define SELECTLINEDIALOG_H
#include <QDialog>
namespace Ui {
class SelectLineDialog;
}
class SelectLineDialog : public QDialog
{
Q_OBJECT
public:
explicit SelectLineDialog(QWidget *parent = nullptr);
~SelectLineDialog();
private:
Ui::SelectLineDialog *ui;
public:
void loadStyle(const QString &qssFile);
void setInfo(QString strSlf, QString strWellName, QString strType);
public slots:
void slotOkClicked();
void slotCancelClicked();
};
#endif // SELECTLINEDIALOG_H

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SelectLineDialog</class>
<widget class="QDialog" name="SelectLineDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>选择井曲线</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>选择井曲线:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="ok">
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancel">
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>