添加合成列阵曲线功能;添加动态库DataMgr向发送logPlus刷新列表消息
This commit is contained in:
parent
42b025d502
commit
404ce961f5
32
BaseFun/include/CallGlobalManage.h
Normal file
32
BaseFun/include/CallGlobalManage.h
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#ifndef CALLGLOBALMANAGE_H
|
||||||
|
#define CALLGLOBALMANAGE_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QList>
|
||||||
|
#include <QPoint>
|
||||||
|
#include <QColor>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QWheelEvent>
|
||||||
|
#include "BaseFunExport.h"
|
||||||
|
|
||||||
|
class BASEFUN_EXPORT CallGlobalManage : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
private:
|
||||||
|
explicit CallGlobalManage(QObject *parent = NULL);
|
||||||
|
~CallGlobalManage();
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CallGlobalManage* getInstance();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
// 添加对象通知strName:发送模块名字(如DataMgr) strSlfName:Slf文件名 mapObject:对象类型(如curveObject)和对象名列表(如AC、BS)
|
||||||
|
void sig_Notice_AddObject(QString strName, QString strSlfName, QMap<QString,QList<QString>> mapObject);
|
||||||
|
|
||||||
|
public:
|
||||||
|
Q_DISABLE_COPY(CallGlobalManage);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CALLGLOBALMANAGE_H
|
||||||
|
|
@ -51,6 +51,7 @@ HEADERS += \
|
||||||
../include/BaseFunExport.h \
|
../include/BaseFunExport.h \
|
||||||
../include/CStringType.h \
|
../include/CStringType.h \
|
||||||
../include/CalcMethod.h \
|
../include/CalcMethod.h \
|
||||||
|
../include/CallGlobalManage.h \
|
||||||
../include/DepthProgress.h \
|
../include/DepthProgress.h \
|
||||||
../include/LEquations.h \
|
../include/LEquations.h \
|
||||||
../include/Matrix1.h \
|
../include/Matrix1.h \
|
||||||
|
|
@ -62,6 +63,7 @@ SOURCES += \
|
||||||
BaseFun.cpp \
|
BaseFun.cpp \
|
||||||
CStringType.cpp \
|
CStringType.cpp \
|
||||||
CalcMethod.cpp \
|
CalcMethod.cpp \
|
||||||
|
CallGlobalManage.cpp \
|
||||||
DepthProgress.cpp \
|
DepthProgress.cpp \
|
||||||
LEquations.cpp \
|
LEquations.cpp \
|
||||||
Matrix1.cpp \
|
Matrix1.cpp \
|
||||||
|
|
|
||||||
17
BaseFun/src/CallGlobalManage.cpp
Normal file
17
BaseFun/src/CallGlobalManage.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#include "CallGlobalManage.h"
|
||||||
|
|
||||||
|
CallGlobalManage::CallGlobalManage(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CallGlobalManage::~CallGlobalManage()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CallGlobalManage *CallGlobalManage::getInstance()
|
||||||
|
{
|
||||||
|
static CallGlobalManage ref;
|
||||||
|
return &ref;
|
||||||
|
}
|
||||||
|
|
@ -88,12 +88,10 @@ CONFIG(debug, debug|release){
|
||||||
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
|
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
|
||||||
LIBS += -L$$PWD/../../Bin -lBaseFund
|
LIBS += -L$$PWD/../../Bin -lBaseFund
|
||||||
LIBS += -L$$PWD/../../Bin -lslfiod
|
LIBS += -L$$PWD/../../Bin -lslfiod
|
||||||
LIBS += -L$$PWD/../../Bin -lWellLogUId
|
|
||||||
LIBS += -L$$PWD/../../Bin -lWFEngined
|
LIBS += -L$$PWD/../../Bin -lWFEngined
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L$$PWD/../../BinR -lOSGDataModel
|
LIBS += -L$$PWD/../../BinR -lOSGDataModel
|
||||||
LIBS += -L$$PWD/../../BinR -lBaseFun
|
LIBS += -L$$PWD/../../BinR -lBaseFun
|
||||||
LIBS += -L$$PWD/../../BinR -lslfio
|
LIBS += -L$$PWD/../../BinR -lslfio
|
||||||
LIBS += -L$$PWD/../../BinR -lWellLogUI
|
|
||||||
LIBS += -L$$PWD/../../Bin -lWFEngine
|
LIBS += -L$$PWD/../../Bin -lWFEngine
|
||||||
}
|
}
|
||||||
|
|
|
||||||
168
DataMgr/src/AddCompCurveDlg.cpp
Normal file
168
DataMgr/src/AddCompCurveDlg.cpp
Normal file
|
|
@ -0,0 +1,168 @@
|
||||||
|
#pragma warning(push,0)
|
||||||
|
// #include "Family.h"
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include "AddCompCurveDlg.h"
|
||||||
|
#include "ui_AddCompCurve.h"
|
||||||
|
#include "CStringType.h"
|
||||||
|
#include "GeometryUtils.h"
|
||||||
|
#include <QTextStream>
|
||||||
|
#include "DataObject.h"
|
||||||
|
#pragma warning(pop)
|
||||||
|
using namespace pai::ios::welllog;
|
||||||
|
BEGIN_OSGGRAPHICS_NAMESPACE
|
||||||
|
CAddCompCurveDlg::CAddCompCurveDlg(QWidget * parent, Qt::WindowFlags flags)
|
||||||
|
: QDialog(parent,flags)
|
||||||
|
{
|
||||||
|
m_pUI = new Ui_AddCompCurve();
|
||||||
|
m_pUI->setupUi(this);
|
||||||
|
QObject::connect(m_pUI->okbtn, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||||
|
QObject::connect(m_pUI->cancelbtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
|
||||||
|
|
||||||
|
QObject::connect(m_pUI->checkBox_Curve, SIGNAL(clicked()), this, SLOT(slotCheckCurve()));
|
||||||
|
QObject::connect(m_pUI->checkBox_Wave, SIGNAL(clicked()), this, SLOT(slotCheckWave()));
|
||||||
|
QObject::connect(m_pUI->pushButton_SelAll, SIGNAL(clicked()), this, SLOT(slotSelAll()));
|
||||||
|
QObject::connect(m_pUI->pushButton_NotSelAll, SIGNAL(clicked()), this, SLOT(slotNotSelAll()));
|
||||||
|
QObject::connect(m_pUI->pushButton_ReSel, SIGNAL(clicked()), this, SLOT(slotReverseSel()));
|
||||||
|
m_pUI->tableWidgetNewCurve->setColumnCount(5);
|
||||||
|
QStringList header;
|
||||||
|
header<<" 名称"<<"起始深度"<<"终止深度"<<"采样间隔"<<"元素个数";
|
||||||
|
m_pUI->tableWidgetNewCurve->setHorizontalHeaderLabels(header);
|
||||||
|
|
||||||
|
m_pUI->tableWidgetNewCurve->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
//m_pUI->tableWidgetNewCurve->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
CurveCheck=1;WaveCheck=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAddCompCurveDlg::slotSave()
|
||||||
|
{
|
||||||
|
NewList.clear();
|
||||||
|
for(int i=0;i<m_pUI->tableWidgetNewCurve->rowCount();i++)
|
||||||
|
{
|
||||||
|
Qt::CheckState eState= m_pUI->tableWidgetNewCurve->item(i,0)->checkState();
|
||||||
|
if (eState==Qt::Unchecked)continue;
|
||||||
|
NewList.append(m_pUI->tableWidgetNewCurve->item(i,0)->text());
|
||||||
|
}
|
||||||
|
accept();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*@brief 取消槽函数
|
||||||
|
*/
|
||||||
|
void CAddCompCurveDlg::slotCancel()
|
||||||
|
{
|
||||||
|
reject ();
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::init()
|
||||||
|
{
|
||||||
|
m_pUI->checkBox_Curve->setCheckState(Qt::Checked);
|
||||||
|
m_pUI->checkBox_Wave->setCheckState(Qt::Checked);
|
||||||
|
RebrushList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAddCompCurveDlg::slotCheckCurve()
|
||||||
|
{
|
||||||
|
CurveCheck=!CurveCheck;
|
||||||
|
RebrushList();
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::slotCheckWave()
|
||||||
|
{
|
||||||
|
WaveCheck=!WaveCheck;
|
||||||
|
RebrushList();
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::slotSelAll()
|
||||||
|
{
|
||||||
|
for(int i=0;i<m_pUI->tableWidgetNewCurve->rowCount();i++)
|
||||||
|
{
|
||||||
|
if(IsExist(m_pUI->tableWidgetNewCurve->item(i,0)->text()))continue;
|
||||||
|
m_pUI->tableWidgetNewCurve->item(i,0)->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::slotNotSelAll()
|
||||||
|
{
|
||||||
|
for(int i=0;i<m_pUI->tableWidgetNewCurve->rowCount();i++)m_pUI->tableWidgetNewCurve->item(i,0)->setCheckState(Qt::Unchecked);
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::slotReverseSel()
|
||||||
|
{
|
||||||
|
for(int i=0;i<m_pUI->tableWidgetNewCurve->rowCount();i++)
|
||||||
|
{
|
||||||
|
if(IsExist(m_pUI->tableWidgetNewCurve->item(i,0)->text()))continue;
|
||||||
|
Qt::CheckState eState= m_pUI->tableWidgetNewCurve->item(i,0)->checkState();
|
||||||
|
if (eState==Qt::Checked)m_pUI->tableWidgetNewCurve->item(i,0)->setCheckState(Qt::Unchecked);
|
||||||
|
else m_pUI->tableWidgetNewCurve->item(i,0)->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool CAddCompCurveDlg::IsExist(QString Name)
|
||||||
|
{
|
||||||
|
foreach(QString name, OldList)
|
||||||
|
{
|
||||||
|
if(Name==name)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
void CAddCompCurveDlg::RebrushList()
|
||||||
|
{
|
||||||
|
m_pUI->tableWidgetNewCurve->clearContents();
|
||||||
|
CMemRdWt *mrw=new CMemRdWt();
|
||||||
|
mrw->Open(FileName.toStdString().c_str(),CSlfIO::modeRead);
|
||||||
|
int ObjectNumber=mrw->GetObjectCount();
|
||||||
|
int CurveCount=0,WaveCount=0;
|
||||||
|
m_pUI->tableWidgetNewCurve->setRowCount(ObjectNumber);
|
||||||
|
char Name[200];
|
||||||
|
int row=0;
|
||||||
|
for(int i=0;i<ObjectNumber;i++)
|
||||||
|
{
|
||||||
|
if(mrw->GetObjectStatus(i)!=OBJECT_NORMAL)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
mrw->GetObjectName(i,Name);
|
||||||
|
short Attribute,SubAttribute;
|
||||||
|
Attribute=mrw->GetObjectType(i);
|
||||||
|
if(Attribute==CURVE_OBJECT)
|
||||||
|
{
|
||||||
|
if(!CurveCheck)continue;
|
||||||
|
Slf_CURVE cInfo;
|
||||||
|
int index=mrw->OpenCurve(Name);
|
||||||
|
if(index<0)continue;
|
||||||
|
mrw->GetCurveInfo(index,&cInfo);
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,0,new QTableWidgetItem(QString(QLatin1String(cInfo.Name))));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,1,new QTableWidgetItem(QString::number(cInfo.StartDepth)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,2,new QTableWidgetItem(QString::number(cInfo.EndDepth)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,3,new QTableWidgetItem(QString::number(cInfo.DepLevel)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,4,new QTableWidgetItem("1"));
|
||||||
|
if(IsExist(QString(QLatin1String(cInfo.Name))))
|
||||||
|
{
|
||||||
|
m_pUI->tableWidgetNewCurve->item(row,0)->setFlags(Qt::NoItemFlags);
|
||||||
|
m_pUI->tableWidgetNewCurve->item(row,0)->setCheckState(Qt::Unchecked);
|
||||||
|
}
|
||||||
|
else m_pUI->tableWidgetNewCurve->item(row,0)->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
else if(Attribute==WAVE_OBJECT)
|
||||||
|
{
|
||||||
|
if(!WaveCheck)continue;
|
||||||
|
Slf_WAVE cInfo;
|
||||||
|
int index=mrw->OpenWave(Name);
|
||||||
|
if(index<0)continue;
|
||||||
|
mrw->GetWaveInfo(index,&cInfo);
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,0,new QTableWidgetItem(QString(QLatin1String(cInfo.Name))));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,1,new QTableWidgetItem(QString::number(cInfo.StartDepth)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,2,new QTableWidgetItem(QString::number(cInfo.EndDepth)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,3,new QTableWidgetItem(QString::number(cInfo.DepLevel)));
|
||||||
|
m_pUI->tableWidgetNewCurve->setItem(row,4,new QTableWidgetItem(QString::number(cInfo.TimeSamples)));
|
||||||
|
if(IsExist(QString(QLatin1String(cInfo.Name))))
|
||||||
|
{
|
||||||
|
m_pUI->tableWidgetNewCurve->item(row,0)->setFlags(Qt::NoItemFlags);
|
||||||
|
m_pUI->tableWidgetNewCurve->item(row,0)->setCheckState(Qt::Unchecked);
|
||||||
|
}
|
||||||
|
else m_pUI->tableWidgetNewCurve->item(row,0)->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
else continue;
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
delete mrw;
|
||||||
|
m_pUI->tableWidgetNewCurve->setRowCount(row);
|
||||||
|
}
|
||||||
|
END_OSGGRAPHICS_NAMESPACE
|
||||||
60
DataMgr/src/AddCompCurveDlg.h
Normal file
60
DataMgr/src/AddCompCurveDlg.h
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
|
||||||
|
#pragma warning(push,0)
|
||||||
|
#include <cassert>
|
||||||
|
#include <QDialog>
|
||||||
|
#include "ConsoleOutputWidget.h"
|
||||||
|
#include "ui_AddCompCurve.h"
|
||||||
|
#include "memrdwt.h"
|
||||||
|
#include "OSGFramework.h"
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
|
BEGIN_OSGGRAPHICS_NAMESPACE
|
||||||
|
/**
|
||||||
|
* @brief 表格选择列自定义委托
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
struct CUR_INFO
|
||||||
|
{
|
||||||
|
QString name;
|
||||||
|
QString strCurveUnit;
|
||||||
|
float sdep,edep;
|
||||||
|
float DepInterval;
|
||||||
|
QString strDepthUnit;
|
||||||
|
};*/
|
||||||
|
class CAddCompCurveDlg : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CAddCompCurveDlg(QWidget * parent=0, Qt::WindowFlags flags=0);
|
||||||
|
~CAddCompCurveDlg()
|
||||||
|
{
|
||||||
|
if(m_pUI) delete m_pUI;
|
||||||
|
}
|
||||||
|
Ui_AddCompCurve *m_pUI;
|
||||||
|
private slots:
|
||||||
|
/**
|
||||||
|
*@brief 保存槽函数
|
||||||
|
*/
|
||||||
|
void slotSave();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@brief 取消槽函数
|
||||||
|
*/
|
||||||
|
void slotCancel();
|
||||||
|
void slotCheckCurve();
|
||||||
|
void slotCheckWave();
|
||||||
|
void slotSelAll();
|
||||||
|
void slotNotSelAll();
|
||||||
|
void slotReverseSel();
|
||||||
|
public:
|
||||||
|
QString FileName;
|
||||||
|
bool CurveCheck,WaveCheck;
|
||||||
|
void init();
|
||||||
|
void RebrushList();
|
||||||
|
QStringList OldList;
|
||||||
|
QStringList NewList;
|
||||||
|
bool IsExist(QString Name);
|
||||||
|
};
|
||||||
|
|
||||||
|
END_OSGGRAPHICS_NAMESPACE;
|
||||||
|
|
@ -181,9 +181,9 @@ void CCurvePropertyEditDlg::init()
|
||||||
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
QLineEdit *lineEdit2_Sample=tab2->findChild<QLineEdit*>("lineEdit2_Sample");
|
||||||
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
QLineEdit *lineEdit2_SampleTotal=tab2->findChild<QLineEdit*>("lineEdit2_SampleTotal");
|
||||||
QComboBox *comboBox2_Type=tab2->findChild<QComboBox*>("comboBox2_Type");
|
QComboBox *comboBox2_Type=tab2->findChild<QComboBox*>("comboBox2_Type");
|
||||||
comboBox2_Type->addItem(QString::fromLocal8Bit("线性刻度"));
|
comboBox2_Type->addItem(/*QString::fromLocal8Bit*/("线性刻度"));
|
||||||
comboBox2_Type->addItem(QString::fromLocal8Bit("对数刻度"));
|
comboBox2_Type->addItem(/*QString::fromLocal8Bit*/("对数刻度"));
|
||||||
comboBox2_Type->addItem(QString::fromLocal8Bit("指数刻度"));
|
comboBox2_Type->addItem(/*QString::fromLocal8Bit*/("指数刻度"));
|
||||||
comboBox2_Type->setCurrentIndex(0);
|
comboBox2_Type->setCurrentIndex(0);
|
||||||
QObject::connect(lineEdit2_ArrayNum, SIGNAL(textChanged(const QString &)), this, SLOT(sampleChanged(const QString &)));
|
QObject::connect(lineEdit2_ArrayNum, SIGNAL(textChanged(const QString &)), this, SLOT(sampleChanged(const QString &)));
|
||||||
QObject::connect(lineEdit2_Sample, SIGNAL(textChanged(const QString &)), this, SLOT(arrayChanged(const QString &)));
|
QObject::connect(lineEdit2_Sample, SIGNAL(textChanged(const QString &)), this, SLOT(arrayChanged(const QString &)));
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#include "DataManagger.h"
|
#include "DataManagger.h"
|
||||||
#include "InDefTableDlg.h"
|
#include "InDefTableDlg.h"
|
||||||
#include "DataHelper.h"
|
#include "DataHelper.h"
|
||||||
// #include "DataImport.h"
|
#include "DataImport.h"
|
||||||
// #include "ObjWellLogTABLE.h"
|
// #include "ObjWellLogTABLE.h"
|
||||||
// #include "CreateNewCurveDlg.h"
|
// #include "CreateNewCurveDlg.h"
|
||||||
//#include "TableTBCurve.h"
|
//#include "TableTBCurve.h"
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include "Statistics2Dlg.h"
|
#include "Statistics2Dlg.h"
|
||||||
#include "CurveComputePage.h"
|
#include "CurveComputePage.h"
|
||||||
#include "CopyObjectDlg.h"
|
#include "CopyObjectDlg.h"
|
||||||
// #include "WaveComposeDlg.h"//2020.4.14 合成阵列曲线
|
#include "WaveComposeDlg.h"//2020.4.14 合成阵列曲线
|
||||||
#include "ShowWave.h"//波列曲线预览
|
#include "ShowWave.h"//波列曲线预览
|
||||||
#include "ShowCurve.h"//2020.5.12常规曲线预览
|
#include "ShowCurve.h"//2020.5.12常规曲线预览
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
|
|
@ -899,29 +899,29 @@ void CDataManagger::slotCurvePropertyGc()
|
||||||
{
|
{
|
||||||
// pai::graphics::CDataImport::ChangetoSlf(m_fileName,NULL);
|
// pai::graphics::CDataImport::ChangetoSlf(m_fileName,NULL);
|
||||||
}
|
}
|
||||||
// void CDataManagger::CurvePropertyEdit(int Type,const QString& FileName,const QString& CurveName)
|
void CDataManagger::CurvePropertyEdit(int Type,const QString& FileName,const QString& CurveName)
|
||||||
// {
|
{
|
||||||
// CCurvePropertyEditDlg *pDlg=new CCurvePropertyEditDlg();
|
CCurvePropertyEditDlg *pDlg=new CCurvePropertyEditDlg();
|
||||||
// pDlg->FileName=FileName;
|
pDlg->FileName=FileName;
|
||||||
// pDlg->CurveName=CurveName;
|
pDlg->CurveName=CurveName;
|
||||||
// pDlg->Type=Type;
|
pDlg->Type=Type;
|
||||||
// pDlg->init();
|
pDlg->init();
|
||||||
// //波列
|
//波列
|
||||||
// //if (Type == 1)
|
//if (Type == 1)
|
||||||
// {
|
{
|
||||||
// pDlg->setWindowFlags(Qt::WindowStaysOnTopHint);
|
pDlg->setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||||
// pDlg->show();
|
pDlg->show();
|
||||||
// QEventLoop loop;
|
QEventLoop loop;
|
||||||
// connect(pDlg,SIGNAL(signalsCloseed()),&loop,SLOT(quit()),Qt::UniqueConnection);
|
connect(pDlg,SIGNAL(signalsCloseed()),&loop,SLOT(quit()),Qt::UniqueConnection);
|
||||||
// loop.exec();
|
loop.exec();
|
||||||
// delete pDlg;
|
delete pDlg;
|
||||||
// pDlg=NULL;
|
pDlg=NULL;
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// pai::graphics::CDataImport::ChangetoSlf(FileName,NULL);
|
/*pai::graphics::*/CDataImport::ChangetoSlf(FileName,NULL);
|
||||||
// }
|
}
|
||||||
// //表属性编辑
|
// //表属性编辑
|
||||||
// QString CDataManagger::TableProEdit(const QString& wellname,const QString& tablename)
|
// QString CDataManagger::TableProEdit(const QString& wellname,const QString& tablename)
|
||||||
// {
|
// {
|
||||||
|
|
@ -1297,17 +1297,17 @@ QString CDataManagger::CreateNewTable(const QString& wellname)
|
||||||
// pDlg=NULL;
|
// pDlg=NULL;
|
||||||
// pai::graphics::CDataImport::ChangetoSlf(FileName,NULL);
|
// pai::graphics::CDataImport::ChangetoSlf(FileName,NULL);
|
||||||
// }
|
// }
|
||||||
// //whp add 2020.4.14 合成阵列曲线
|
//whp add 2020.4.14 合成阵列曲线
|
||||||
// QString CDataManagger::WaveCompose(const QString& FileName,const QStringList& CurveNameList)
|
QString CDataManagger::WaveCompose(const QString& FileName,const QStringList& CurveNameList)
|
||||||
// {
|
{
|
||||||
// CWaveComposeDlg *pDlg=new CWaveComposeDlg();
|
CWaveComposeDlg *pDlg=new CWaveComposeDlg();
|
||||||
// pDlg->FileName=FileName;
|
pDlg->FileName=FileName;
|
||||||
// pDlg->CurveNameList=CurveNameList;
|
pDlg->CurveNameList=CurveNameList;
|
||||||
// pDlg->init();
|
pDlg->init();
|
||||||
// pDlg->show();//exec();
|
pDlg->show();//exec();
|
||||||
// QString WaveName="";
|
QString WaveName="";
|
||||||
// return WaveName;
|
return WaveName;
|
||||||
// }
|
}
|
||||||
void CDataManagger::accept2()
|
void CDataManagger::accept2()
|
||||||
{
|
{
|
||||||
// QDialog*pd=(QDialog*)sender();
|
// QDialog*pd=(QDialog*)sender();
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ CONFIG(debug, debug|release){
|
||||||
FORMS += \
|
FORMS += \
|
||||||
CreateNewTableDlg.ui \
|
CreateNewTableDlg.ui \
|
||||||
CurveComputePage.ui \
|
CurveComputePage.ui \
|
||||||
|
UI/AddCompCurve.ui \
|
||||||
UI/AngleAdjTool.ui \
|
UI/AngleAdjTool.ui \
|
||||||
UI/CopyObject.ui \
|
UI/CopyObject.ui \
|
||||||
UI/CurveComputer.ui \
|
UI/CurveComputer.ui \
|
||||||
|
|
@ -62,6 +63,7 @@ FORMS += \
|
||||||
UI/Statistics.ui \
|
UI/Statistics.ui \
|
||||||
UI/Statistics2.ui \
|
UI/Statistics2.ui \
|
||||||
UI/TiShi.ui \
|
UI/TiShi.ui \
|
||||||
|
UI/WaveCompose.ui \
|
||||||
UI/cdialog.ui \
|
UI/cdialog.ui \
|
||||||
UI/doubleeditview.ui \
|
UI/doubleeditview.ui \
|
||||||
UI/editEnd.ui \
|
UI/editEnd.ui \
|
||||||
|
|
@ -72,6 +74,7 @@ HEADERS += \
|
||||||
../../common/geometryutils.h \
|
../../common/geometryutils.h \
|
||||||
../include/DataManagger.h \
|
../include/DataManagger.h \
|
||||||
AdaptionComboBox.h \
|
AdaptionComboBox.h \
|
||||||
|
AddCompCurveDlg.h \
|
||||||
AngleAdjTool.h \
|
AngleAdjTool.h \
|
||||||
CheckHeadView.h \
|
CheckHeadView.h \
|
||||||
CopyObjectDlg.h \
|
CopyObjectDlg.h \
|
||||||
|
|
@ -90,6 +93,7 @@ HEADERS += \
|
||||||
StatisticsDlg.h \
|
StatisticsDlg.h \
|
||||||
TiShiDlg.h\
|
TiShiDlg.h\
|
||||||
ConsoleOutputWidget.h \
|
ConsoleOutputWidget.h \
|
||||||
|
WaveComposeDlg.h \
|
||||||
cdialog.h \
|
cdialog.h \
|
||||||
dataslothelper.h \
|
dataslothelper.h \
|
||||||
deptlineedit.h \
|
deptlineedit.h \
|
||||||
|
|
@ -98,6 +102,7 @@ HEADERS += \
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
../../common/geometryutils.cpp \
|
../../common/geometryutils.cpp \
|
||||||
AdaptionComboBox.cpp \
|
AdaptionComboBox.cpp \
|
||||||
|
AddCompCurveDlg.cpp \
|
||||||
AngleAdjTool.cpp \
|
AngleAdjTool.cpp \
|
||||||
CStringType.cpp \
|
CStringType.cpp \
|
||||||
CheckHeadView.cpp \
|
CheckHeadView.cpp \
|
||||||
|
|
@ -119,6 +124,7 @@ SOURCES += \
|
||||||
StatisticsDlg.cpp \
|
StatisticsDlg.cpp \
|
||||||
TiShiDlg.cpp\
|
TiShiDlg.cpp\
|
||||||
ConsoleOutputWidget.cpp \
|
ConsoleOutputWidget.cpp \
|
||||||
|
WaveComposeDlg.cpp \
|
||||||
cdialog.cpp \
|
cdialog.cpp \
|
||||||
dataslothelper.cpp \
|
dataslothelper.cpp \
|
||||||
deptlineedit.cpp \
|
deptlineedit.cpp \
|
||||||
|
|
@ -134,6 +140,8 @@ INCLUDEPATH += ../../ConvertorManager/include
|
||||||
INCLUDEPATH += ../../OSGFramework/include
|
INCLUDEPATH += ../../OSGFramework/include
|
||||||
INCLUDEPATH += ../../OSGDataModel/include
|
INCLUDEPATH += ../../OSGDataModel/include
|
||||||
INCLUDEPATH += ../../common
|
INCLUDEPATH += ../../common
|
||||||
|
INCLUDEPATH += ../../WellLogUI/include
|
||||||
|
INCLUDEPATH += ../../ConvertorManager/include
|
||||||
INCLUDEPATH += ../../Workflow/include
|
INCLUDEPATH += ../../Workflow/include
|
||||||
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
|
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
|
||||||
INCLUDEPATH += ../../Workflow/WFEngine/Module/include
|
INCLUDEPATH += ../../Workflow/WFEngine/Module/include
|
||||||
|
|
@ -144,7 +152,9 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
|
||||||
CONFIG(debug, debug|release){
|
CONFIG(debug, debug|release){
|
||||||
LIBS += -L$$PWD/../../Bin -lBaseFund
|
LIBS += -L$$PWD/../../Bin -lBaseFund
|
||||||
LIBS += -L$$PWD/../../Bin -lslfiod
|
LIBS += -L$$PWD/../../Bin -lslfiod
|
||||||
|
LIBS += -L$$PWD/../../Bin -lConvertorManagerd
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L$$PWD/../../BinR -lBaseFun
|
LIBS += -L$$PWD/../../BinR -lBaseFun
|
||||||
LIBS += -L$$PWD/../../BinR -lslfio
|
LIBS += -L$$PWD/../../BinR -lslfio
|
||||||
|
LIBS += -L$$PWD/../../BinR -lConvertorManager
|
||||||
}
|
}
|
||||||
|
|
|
||||||
560
DataMgr/src/WaveComposeDlg.cpp
Normal file
560
DataMgr/src/WaveComposeDlg.cpp
Normal file
|
|
@ -0,0 +1,560 @@
|
||||||
|
#pragma warning(push,0)
|
||||||
|
// #include "Family.h"
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include "WaveComposeDlg.h"
|
||||||
|
#include "ui_WaveCompose.h"
|
||||||
|
#include "CStringType.h"
|
||||||
|
#include "DataHelper.h"
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QItemSelectionModel>
|
||||||
|
#include <QAbstractItemModel>
|
||||||
|
// #include "ObjProject.h"
|
||||||
|
#include "AddCompCurveDlg.h"
|
||||||
|
#include "DepthProgress.h"
|
||||||
|
#include "dataslothelper.h"
|
||||||
|
#include "DataImport.h"
|
||||||
|
#include "CallGlobalManage.h"
|
||||||
|
#pragma warning(pop)
|
||||||
|
using namespace pai::ios::welllog;
|
||||||
|
BEGIN_OSGGRAPHICS_NAMESPACE
|
||||||
|
/*extern char *DataTypea[];
|
||||||
|
extern int DataLengtha[];
|
||||||
|
|
||||||
|
extern char *Rep_STR[];
|
||||||
|
extern int RepSize[12];*/
|
||||||
|
//CWaveComposeDlg::CWaveComposeDlg(QWidget * parent, Qt::WFlags flags)
|
||||||
|
//: QWidget(parent,flags)
|
||||||
|
CWaveComposeDlg::CWaveComposeDlg(QWidget * parent, Qt::WindowFlags flags)
|
||||||
|
: QDialog(parent,flags)
|
||||||
|
{
|
||||||
|
m_pUI = new Ui_WaveCompose();
|
||||||
|
m_pUI->setupUi(this);
|
||||||
|
|
||||||
|
QObject::connect(m_pUI->pushButton_Add, SIGNAL(clicked()), this, SLOT(slotAdd()));
|
||||||
|
QObject::connect(m_pUI->pushButton_Delete, SIGNAL(clicked()), this, SLOT(slotDelete()));
|
||||||
|
QObject::connect(m_pUI->pushButton_Up, SIGNAL(clicked()), this, SLOT(slotUp()));
|
||||||
|
QObject::connect(m_pUI->pushButton_Down, SIGNAL(clicked()), this, SLOT(slotDown()));
|
||||||
|
QObject::connect(m_pUI->okbtn, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||||
|
QObject::connect(m_pUI->cancelbtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
|
||||||
|
for(int i=0;i<11;i++)m_pUI->comboBox_DataType->addItem(QLatin1String(Rep_STR[i]));
|
||||||
|
QObject::connect(m_pUI->lineEdit_ArrayNum, SIGNAL(textChanged(const QString &)), this, SLOT(arrayChanged(const QString &)));
|
||||||
|
QObject::connect(m_pUI->lineEdit_Sample, SIGNAL(textChanged(const QString &)), this, SLOT(sampleChanged(const QString &)));
|
||||||
|
//m_pUI->comboBox_DataType->setCurrentIndex(3);
|
||||||
|
m_fillColumn=5;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWaveComposeDlg::slotSave()
|
||||||
|
{
|
||||||
|
if(m_pUI->tableWidget->rowCount()<=1)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","至少需要两条或两条以上的曲线才进行合并");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
NewWaveInfo.ArrayNum=m_pUI->lineEdit_ArrayNum->text().toInt();
|
||||||
|
NewWaveInfo.SamplePoint=m_pUI->lineEdit_Sample->text().toInt();
|
||||||
|
NewWaveInfo.TimeSamples=m_pUI->lineEdit_TotalSample->text().toInt();
|
||||||
|
if(NewWaveInfo.TimeSamples<=1)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","合成结果曲线总元素个数<2,合并无意义\r\n请重新修改合并曲线二维信息!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(NewWaveInfo.ArrayNum<1||NewWaveInfo.ArrayNum>m_SampleIn)
|
||||||
|
{
|
||||||
|
if(NewWaveInfo.ArrayNum<1)NewWaveInfo.ArrayNum=1;
|
||||||
|
if(NewWaveInfo.ArrayNum>m_SampleIn)NewWaveInfo.ArrayNum=m_SampleIn;
|
||||||
|
NewWaveInfo.SamplePoint=m_SampleIn/NewWaveInfo.ArrayNum;
|
||||||
|
// NewWaveInfo.TimeSamples=NewWaveInfo.SamplePoint*NewWaveInfo.ArrayNum;
|
||||||
|
QMessageBox::warning(NULL,"提示","对不起,您所给定的输出曲线阵列信息参数不合适\r\n系统已进行自动修正\r\n请返回对话框,检查后再执行合成操作!");
|
||||||
|
m_pUI->lineEdit_ArrayNum->setText(QString::number(NewWaveInfo.ArrayNum));
|
||||||
|
m_pUI->lineEdit_Sample->setText(QString::number(NewWaveInfo.SamplePoint));
|
||||||
|
// m_pUI->lineEdit_TotalSample->setText(QString::number(NewWaveInfo.TimeSamples));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//检查输出曲线元素个数是否和输入一致
|
||||||
|
/*
|
||||||
|
if(NewWaveInfo.TimeSamples!=m_SampleIn)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","输出曲线元素个数%d和输入的元素个数%d不一致\r\n请重新输入");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
//检查输出曲线深度是否合理
|
||||||
|
NewWaveInfo.StartDepth=m_pUI->lineEdit_Sdep->text().toFloat();
|
||||||
|
NewWaveInfo.EndDepth=m_pUI->lineEdit_Edep->text().toFloat();
|
||||||
|
NewWaveInfo.DepLevel=m_pUI->lineEdit_Rlev->text().toFloat();
|
||||||
|
if(NewWaveInfo.StartDepth>=NewWaveInfo.EndDepth||NewWaveInfo.EndDepth<=0)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","输出曲线的起、止深度不合理,请重新输入");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(NewWaveInfo.DepLevel>100||NewWaveInfo.DepLevel<=0)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","输出曲线采样间隔不合理,请重新输入");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NewWaveInfo.StartTime=m_pUI->lineEdit_StartTime->text().toFloat();
|
||||||
|
NewWaveInfo.TimeLevel=m_pUI->lineEdit_TimeRlev->text().toFloat();
|
||||||
|
if(NewWaveInfo.TimeLevel<=0)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(NULL,"提示","输出曲线h=时间间隔不合理,请重新输入");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NewWaveInfo.MinValue=m_pUI->lineEdit_Min->text().toFloat();
|
||||||
|
NewWaveInfo.MaxValue=m_pUI->lineEdit_Max->text().toFloat();
|
||||||
|
NewWaveInfo.DefVal=m_pUI->lineEdit_DefVal->text().toFloat();
|
||||||
|
int m_DataType=m_pUI->comboBox_DataType->currentIndex()+1;
|
||||||
|
NewWaveInfo.RepCode=m_DataType;
|
||||||
|
NewWaveInfo.CodeLen=RepSize[m_DataType];
|
||||||
|
strcpy(NewWaveInfo.Name,m_pUI->lineEdit_CurveName->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.AliasName,m_pUI->lineEdit_CurveName_2->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.Unit,m_pUI->lineEdit_CurveUnit->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.AliasUnit,m_pUI->lineEdit_CurveUnit_2->text().toStdString().c_str());
|
||||||
|
|
||||||
|
strcpy(NewWaveInfo.DepthUnit,m_pUI->lineEdit_DepthUnit->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.DepthHZUnit,m_pUI->lineEdit_DepthUnit_2->text().toStdString().c_str());
|
||||||
|
//二维
|
||||||
|
strcpy(NewWaveInfo.TimeName,m_pUI->lineEdit_TimeName->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.TimeHZName,UTF8ToGBK(m_pUI->lineEdit_TimeName2->text()));//m_pUI->lineEdit_TimeName2->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.TimeUnit,m_pUI->lineEdit_TimeUnit->text().toStdString().c_str());
|
||||||
|
strcpy(NewWaveInfo.TimeHZUnit,UTF8ToGBK(m_pUI->lineEdit_TimeUnit2->text()));//m_pUI->lineEdit_TimeUnit2->text().toStdString().c_str());
|
||||||
|
|
||||||
|
//检查输出曲线是否存在
|
||||||
|
CMemRdWt *Slffile=new CMemRdWt();
|
||||||
|
Slffile->Open(FileName.toStdString().c_str(),CSlfIO::modeReadWrite);
|
||||||
|
int index=Slffile->FindSlfObjectIndex(NewWaveInfo.Name);
|
||||||
|
if(index>=0)
|
||||||
|
{
|
||||||
|
QString str="输出对象名"+QString(QLatin1String(NewWaveInfo.Name));
|
||||||
|
str+=+"已存在,是否覆盖原同名对象?\r\n\r\n是--覆盖原同名对象;否--重新修改合并曲线名";
|
||||||
|
int flag = QMessageBox::warning(NULL,tr("提示"),str,QMessageBox::Yes,QMessageBox::No);
|
||||||
|
if(flag != QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
delete Slffile;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
short type=Slffile->GetObjectType(index);
|
||||||
|
if(type!=WAVE_OBJECT)Slffile->DiscardObject(NewWaveInfo.Name);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Slf_WAVE info;
|
||||||
|
Slffile->GetWaveInfo(index,&info);
|
||||||
|
if(NewWaveInfo.TimeSamples!=info.TimeSamples)Slffile->DiscardObject(NewWaveInfo.Name);
|
||||||
|
if(NewWaveInfo.DepLevel!=info.DepLevel)Slffile->ChannelResamples(index,NewWaveInfo.DepLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int isResamples=0;
|
||||||
|
int TimeSamples=NewWaveInfo.SamplePoint*NewWaveInfo.ArrayNum;
|
||||||
|
if(NewWaveInfo.TimeSamples!=NewWaveInfo.ArrayNum*NewWaveInfo.SamplePoint)
|
||||||
|
{
|
||||||
|
isResamples=NewWaveInfo.SamplePoint*NewWaveInfo.ArrayNum;
|
||||||
|
NewWaveInfo.SamplePoint=NewWaveInfo.TimeSamples*NewWaveInfo.ArrayNum;
|
||||||
|
}
|
||||||
|
index=Slffile->OpenWave(&NewWaveInfo);
|
||||||
|
if(index<0)
|
||||||
|
{
|
||||||
|
delete Slffile;
|
||||||
|
AfxMessageBox("产生合并曲线失败!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
/* DepthProgress MyDepthProgress;(已加)
|
||||||
|
MyDepthProgress.CreatProgress(m_Sdep,m_Edep,"正在合并曲线");//"解编CLIS数据");
|
||||||
|
MyDepthProgress.SetDepth(m_Sdep);*/
|
||||||
|
char name[64];
|
||||||
|
int CurveNum=m_pUI->tableWidget->rowCount();
|
||||||
|
int *Index,*CurveType,*Point;
|
||||||
|
float *sdep,*edep,*rlev;
|
||||||
|
Index=new int[CurveNum];
|
||||||
|
CurveType=new int[CurveNum];
|
||||||
|
Point=new int[CurveNum];
|
||||||
|
sdep=new float[CurveNum];
|
||||||
|
edep=new float[CurveNum];
|
||||||
|
rlev=new float[CurveNum];
|
||||||
|
DepthProgress MyDepthProgress;
|
||||||
|
int proceCount=CurveNum*2+1;
|
||||||
|
MyDepthProgress.CreatProgress(0,proceCount,"正在合并曲线");
|
||||||
|
int pvalue=0;
|
||||||
|
//whp change 2018.10.15 保证读写一致
|
||||||
|
DWORD num=(NewWaveInfo.EndDepth-NewWaveInfo.StartDepth)/NewWaveInfo.DepLevel+1.5;
|
||||||
|
float *value;
|
||||||
|
value=new float[TimeSamples*num];
|
||||||
|
for( int i=0;i<CurveNum;i++)
|
||||||
|
{
|
||||||
|
sdep[i]=m_pUI->tableWidget->item(i,1)->text().toFloat();
|
||||||
|
edep[i]=m_pUI->tableWidget->item(i,2)->text().toFloat();
|
||||||
|
rlev[i]=m_pUI->tableWidget->item(i,3)->text().toFloat();
|
||||||
|
Point[i]=m_pUI->tableWidget->item(i,4)->text().toInt();
|
||||||
|
if(Point[i]==1)Index[i]=Slffile->OpenCurve(m_pUI->tableWidget->item(i,0)->text().toStdString().c_str());
|
||||||
|
else Index[i]=Slffile->OpenWave(m_pUI->tableWidget->item(i,0)->text().toStdString().c_str());
|
||||||
|
pvalue++;
|
||||||
|
MyDepthProgress.SetDepth(pvalue);
|
||||||
|
}
|
||||||
|
int pos=0;
|
||||||
|
for( int i=0;i<CurveNum;i++)
|
||||||
|
{
|
||||||
|
if(Point[i]==1)
|
||||||
|
{
|
||||||
|
if(rlev[i]==NewWaveInfo.DepLevel)
|
||||||
|
{
|
||||||
|
float *myvalue;
|
||||||
|
myvalue=new float[Point[i]*num];
|
||||||
|
Slffile->ReadCurve(Index[i],NewWaveInfo.StartDepth,num,myvalue);
|
||||||
|
for(DWORD ip=0;ip<num;ip++)
|
||||||
|
{
|
||||||
|
value[ip*TimeSamples+pos]=myvalue[ip];
|
||||||
|
}
|
||||||
|
delete []myvalue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(DWORD ip=0;ip<num;ip++)
|
||||||
|
Slffile->ReadCurve(Index[i],NewWaveInfo.StartDepth+ip*NewWaveInfo.DepLevel,1,&value[ip*NewWaveInfo.TimeSamples+pos]);
|
||||||
|
}
|
||||||
|
Slffile->CloseCurve(Index[i]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(rlev[i]==NewWaveInfo.DepLevel)
|
||||||
|
{
|
||||||
|
float *myvalue;
|
||||||
|
myvalue=new float[Point[i]*num];
|
||||||
|
Slffile->ReadWave(Index[i],NewWaveInfo.StartDepth,num,myvalue);
|
||||||
|
for(DWORD ip=0;ip<num;ip++)
|
||||||
|
{
|
||||||
|
for(int m=0;m<Point[i];m++)
|
||||||
|
{
|
||||||
|
value[ip*TimeSamples+pos+m]=myvalue[ip*Point[i]+m];
|
||||||
|
}
|
||||||
|
memcpy(&value[ip*TimeSamples+pos],&myvalue[ip*Point[i]],Point[i]*NewWaveInfo.CodeLen);
|
||||||
|
}
|
||||||
|
delete []myvalue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(DWORD ip=0;ip<num;ip++)
|
||||||
|
Slffile->ReadWave(Index[i],NewWaveInfo.StartDepth+ip*NewWaveInfo.DepLevel,1,&value[ip*TimeSamples+pos]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pos+=Point[i];
|
||||||
|
pvalue++;
|
||||||
|
MyDepthProgress.SetDepth(pvalue);
|
||||||
|
Slffile->CloseWave(Index[i]);
|
||||||
|
}
|
||||||
|
if(isResamples)
|
||||||
|
{
|
||||||
|
float *nvalue=new float[num*NewWaveInfo.TimeSamples];
|
||||||
|
for(int i=0;i<num;i++){
|
||||||
|
Resamples(&value[i*isResamples],&nvalue[i*NewWaveInfo.TimeSamples],isResamples,NewWaveInfo.TimeSamples);
|
||||||
|
}
|
||||||
|
delete value;
|
||||||
|
value=nvalue;
|
||||||
|
}
|
||||||
|
Slffile->WriteWave(index,NewWaveInfo.StartDepth,num,value);
|
||||||
|
Slffile->CloseWave(index);
|
||||||
|
delete Slffile;
|
||||||
|
pvalue++;
|
||||||
|
MyDepthProgress.SetDepth(pvalue);
|
||||||
|
delete []Index;
|
||||||
|
delete []CurveType;
|
||||||
|
delete []Point;
|
||||||
|
delete []sdep;
|
||||||
|
delete []edep;
|
||||||
|
delete []rlev;
|
||||||
|
delete []value;
|
||||||
|
QMessageBox::warning(NULL,tr("提示"),"合成阵列曲线成功!");
|
||||||
|
|
||||||
|
QMap<QString,QList<QString>> mapShowObject;
|
||||||
|
QList<QString> lisObject;
|
||||||
|
lisObject.append("");
|
||||||
|
mapShowObject.insert("TDTObject",lisObject);
|
||||||
|
emit CallGlobalManage::getInstance()->sig_Notice_AddObject("DataMgr",FileName,mapShowObject);
|
||||||
|
|
||||||
|
accept();
|
||||||
|
/*pai::graphics::*/CDataImport::ChangetoSlf(FileName,NULL);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*@brief 取消槽函数
|
||||||
|
*/
|
||||||
|
void CWaveComposeDlg::slotCancel()
|
||||||
|
{
|
||||||
|
reject ();
|
||||||
|
}
|
||||||
|
//需要罗林解决的问题:
|
||||||
|
void CWaveComposeDlg::slotAdd()
|
||||||
|
{
|
||||||
|
//添加行:添加的内容第一列被保存在QStringList nameList中,其他列内容你不用管
|
||||||
|
//1、在指定位置插入一行多行,如果没有选择插入点,追加到尾部
|
||||||
|
//2、将nameList插入到CurveNameList相应位置
|
||||||
|
CAddCompCurveDlg *dlg=new CAddCompCurveDlg();
|
||||||
|
dlg->OldList=CurveNameList;
|
||||||
|
dlg->FileName=FileName;
|
||||||
|
dlg->init();
|
||||||
|
if(dlg->exec()==QDialog::Rejected)return;
|
||||||
|
|
||||||
|
int count=m_pUI->tableWidget->rowCount();
|
||||||
|
int insertRow=dlg->NewList.count();
|
||||||
|
m_rowCount+=insertRow;
|
||||||
|
QList<QTableWidgetSelectionRange> selRange=m_pUI->tableWidget->selectedRanges();
|
||||||
|
bool isSel=selRange.size()>0;
|
||||||
|
int index=0;
|
||||||
|
int sRow=isSel?(selRange.value(0).bottomRow()+1):count+1;//m_rowCount;
|
||||||
|
|
||||||
|
if(!isSel)
|
||||||
|
{
|
||||||
|
m_pUI->tableWidget->setRowCount(insertRow+count);//m_rowCount);
|
||||||
|
index=sRow-1;
|
||||||
|
// CurveNameList.append(dlg->NewList);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
for(int i=0;i<insertRow;i++)
|
||||||
|
{
|
||||||
|
m_pUI->tableWidget->insertRow(sRow);
|
||||||
|
// CurveNameList.insert(sRow+i,dlg->NewList.at(i));
|
||||||
|
}
|
||||||
|
index=sRow;
|
||||||
|
|
||||||
|
}
|
||||||
|
QTableWidgetItem *item=NULL;
|
||||||
|
QString textValue;
|
||||||
|
for(int i=0;i<dlg->m_pUI->tableWidgetNewCurve->rowCount();i++)//for(int i=1;i<=insertRow;i++)
|
||||||
|
{
|
||||||
|
Qt::CheckState eState= dlg->m_pUI->tableWidgetNewCurve->item(i,0)->checkState();
|
||||||
|
if (eState==Qt::Unchecked)continue;
|
||||||
|
item=new QTableWidgetItem(dlg->m_pUI->tableWidgetNewCurve->item(i,0)->text());
|
||||||
|
m_pUI->tableWidget->setItem(index,0,item);
|
||||||
|
for(int j=1;j<=m_fillColumn-1;j++)
|
||||||
|
{
|
||||||
|
textValue=dlg->m_pUI->tableWidgetNewCurve->item(i,j)->text();
|
||||||
|
item=new QTableWidgetItem(textValue);
|
||||||
|
m_pUI->tableWidget->setItem(index,j,item);
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
void CWaveComposeDlg::refresh()//刷新CurveNameList和元素总数
|
||||||
|
{
|
||||||
|
CurveNameList.clear();
|
||||||
|
int h=CurveNameList.count();
|
||||||
|
int TENum=0;
|
||||||
|
for(int i=0;i<m_pUI->tableWidget->rowCount();i++)
|
||||||
|
{
|
||||||
|
CurveNameList.append(m_pUI->tableWidget->item(i,0)->text());
|
||||||
|
int ENum=m_pUI->tableWidget->item(i,4)->text().toInt();
|
||||||
|
TENum+=ENum;
|
||||||
|
m_pUI->tableWidget->setItem(i,5,new QTableWidgetItem(QString::number(TENum)));
|
||||||
|
}
|
||||||
|
h=CurveNameList.count();
|
||||||
|
h=0;
|
||||||
|
}
|
||||||
|
void CWaveComposeDlg::slotDelete()
|
||||||
|
{
|
||||||
|
//选择一行或者多行被删除,允许不连续选择,如删除1、2、3、8、10行
|
||||||
|
//实现以下功能:
|
||||||
|
//1、删除列表中的删除行
|
||||||
|
//2、从CurveNameList中删除相应项目(CurveNameList中保存的是第一列的内容)
|
||||||
|
/*QList<QTableWidgetItem *>selItem=m_pUI->tableWidget->selectedItems();
|
||||||
|
m_pUI->tableWidget->removeRow(2);
|
||||||
|
m_pUI->tableWidget->setRowCount(CurveNameList.count()-1);*/
|
||||||
|
if(m_rowCount<=1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count=m_pUI->tableWidget->rowCount();
|
||||||
|
int insertRow=m_rowCount-count;
|
||||||
|
QList<QTableWidgetSelectionRange> selRanges=m_pUI->tableWidget->selectedRanges();
|
||||||
|
bool isSel=selRanges.size()>0;
|
||||||
|
if(!isSel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int index=0;
|
||||||
|
int sRow=0;
|
||||||
|
int eRow=0;
|
||||||
|
int delCount=0;
|
||||||
|
foreach(const QTableWidgetSelectionRange &range,selRanges)
|
||||||
|
{
|
||||||
|
|
||||||
|
sRow=range.topRow();
|
||||||
|
eRow=range.bottomRow();
|
||||||
|
index=sRow-delCount;
|
||||||
|
delCount=0;
|
||||||
|
for(int r=sRow;r<=eRow;r++)
|
||||||
|
{
|
||||||
|
--m_rowCount;
|
||||||
|
delCount++;
|
||||||
|
m_pUI->tableWidget->removeRow(index);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void CWaveComposeDlg::slotUp()
|
||||||
|
{
|
||||||
|
//选择一行或者多行往前移动,允许不连续选择,如删除1、2、3、8、10行
|
||||||
|
//1、把选择的行向上移动一行,移动后被选择的行仍处于选中状态(可以继续上移,实现多步移动)
|
||||||
|
//2、CurveNameList内容随之改变
|
||||||
|
int count=m_pUI->tableWidget->rowCount();
|
||||||
|
int insertRow=m_rowCount-count;
|
||||||
|
QList<QTableWidgetSelectionRange> selRanges=m_pUI->tableWidget->selectedRanges();
|
||||||
|
bool isSel=selRanges.size()>0;
|
||||||
|
if(!isSel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DataSlotHelper::instance()->movedUp(m_pUI->tableWidget);
|
||||||
|
|
||||||
|
}
|
||||||
|
void CWaveComposeDlg::slotDown()
|
||||||
|
{
|
||||||
|
//选择一行或者多行往后移动,允许不连续选择,如删除1、2、3、8、10行
|
||||||
|
//1、把选择的行向上移动一行,移动后被选择的行仍处于选中状态(可以继续上移,实现多步移动)
|
||||||
|
//2、CurveNameList内容随之改变
|
||||||
|
int count=m_pUI->tableWidget->rowCount();
|
||||||
|
int insertRow=m_rowCount-count;
|
||||||
|
QList<QTableWidgetSelectionRange> selRanges=m_pUI->tableWidget->selectedRanges();
|
||||||
|
bool isSel=selRanges.size()>0;
|
||||||
|
if(!isSel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DataSlotHelper::instance()->movedDow(m_pUI->tableWidget);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWaveComposeDlg::sampleChanged(const QString &str)
|
||||||
|
{
|
||||||
|
int mSample=m_pUI->lineEdit_Sample->text().toInt();
|
||||||
|
if(mSample>1&&mSample<=m_SampleIn)
|
||||||
|
{
|
||||||
|
int mArrayNum=m_SampleIn/mSample;
|
||||||
|
int mSampleTotal=mSample*mArrayNum;
|
||||||
|
m_pUI->lineEdit_ArrayNum->setText(QString::number(mArrayNum));
|
||||||
|
m_pUI->lineEdit_TotalSample->setText(QString::number(mSampleTotal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void CWaveComposeDlg::arrayChanged(const QString &str)
|
||||||
|
{
|
||||||
|
int mArrayNum=m_pUI->lineEdit_ArrayNum->text().toInt();
|
||||||
|
if(mArrayNum>=1&&mArrayNum<=m_SampleIn)
|
||||||
|
{
|
||||||
|
int mSample=m_SampleIn/mArrayNum;
|
||||||
|
int mSampleTotal=mSample*mArrayNum;
|
||||||
|
m_pUI->lineEdit_Sample->setText(QString::number(mSample));
|
||||||
|
m_pUI->lineEdit_TotalSample->setText(QString::number(mSampleTotal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void CWaveComposeDlg::init()//const QString& FileName,const QStringList& CurveNameList)//int row,int col,QStringList header)
|
||||||
|
{
|
||||||
|
m_pUI->tableWidget->setColumnCount(6);
|
||||||
|
QStringList header;
|
||||||
|
header<<" 名称"<<"起始深度"<<"终止深度"<<"采样间隔"<<"元素个数"<<"累计元素个数";
|
||||||
|
m_pUI->tableWidget->setHorizontalHeaderLabels(header);
|
||||||
|
m_pUI->tableWidget->setColumnWidth(1,200);
|
||||||
|
m_pUI->tableWidget->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
//m_pUI->tableWidget->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
//m_pUI->tableWidget->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents);
|
||||||
|
// m_pUI->tableWidget->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents);
|
||||||
|
m_rowCount=CurveNameList.count();
|
||||||
|
m_pUI->tableWidget->setRowCount(CurveNameList.count());
|
||||||
|
int TENum=0;//总元素个数
|
||||||
|
CMemRdWt *logio=new CMemRdWt();
|
||||||
|
logio->Open(FileName.toStdString().c_str(),CSlfIO::modeReadWrite);
|
||||||
|
for(int i=0;i<m_rowCount;i++)
|
||||||
|
{
|
||||||
|
QString CurveName=CurveNameList[i];
|
||||||
|
m_pUI->tableWidget->setItem(i,0,new QTableWidgetItem(CurveName));
|
||||||
|
int index=logio->OpenChannel(CurveName.toStdString().c_str());
|
||||||
|
if(index<0)continue;
|
||||||
|
Slf_CHANNEL pInfo;
|
||||||
|
memset(&pInfo,0,sizeof(Slf_CHANNEL));
|
||||||
|
logio->GetChannelInfo(index,&pInfo);
|
||||||
|
float sdep=pInfo.DimInfo[0].StartVal;
|
||||||
|
float edep=pInfo.DimInfo[0].StartVal+(pInfo.DimInfo[0].Samples-1)*pInfo.DimInfo[0].Delta;
|
||||||
|
m_pUI->tableWidget->setItem(i,1,new QTableWidgetItem(QString::number(sdep)));
|
||||||
|
m_pUI->tableWidget->setItem(i,2,new QTableWidgetItem(QString::number(edep)));
|
||||||
|
m_pUI->tableWidget->setItem(i,3,new QTableWidgetItem(QString::number(pInfo.DimInfo[0].Delta)));
|
||||||
|
int ENum=pInfo.DimInfo[0].Size/pInfo.CodeLen;//元素个数
|
||||||
|
m_pUI->tableWidget->setItem(i,4,new QTableWidgetItem(QString::number(ENum)));
|
||||||
|
TENum+=ENum;
|
||||||
|
m_pUI->tableWidget->setItem(i,5,new QTableWidgetItem(QString::number(TENum)));
|
||||||
|
if(i==0)
|
||||||
|
{
|
||||||
|
m_EdepMin= edep;
|
||||||
|
m_SdepMin= sdep;
|
||||||
|
m_RlevMin= pInfo.DimInfo[0].Delta;
|
||||||
|
m_EdepMax= edep;
|
||||||
|
m_SdepMax= sdep;
|
||||||
|
m_RlevMax= pInfo.DimInfo[0].Delta;
|
||||||
|
if(ENum==1)
|
||||||
|
{
|
||||||
|
Slf_CURVE pInfo;
|
||||||
|
logio->GetCurveInfo(index,&pInfo);
|
||||||
|
memcpy(&NewWaveInfo,&pInfo,sizeof(Slf_CURVE));
|
||||||
|
NewWaveInfo.StartTime=0;
|
||||||
|
NewWaveInfo.TimeLevel=1;
|
||||||
|
NewWaveInfo.ArrayNum=1;
|
||||||
|
strcpy(NewWaveInfo.TimeUnit,"ms");
|
||||||
|
strcpy(NewWaveInfo.TimeHZUnit,"毫秒");
|
||||||
|
strcpy(NewWaveInfo.TimeName,"Time");;
|
||||||
|
strcpy(NewWaveInfo.TimeHZName,"时间");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Slf_WAVE pInfo;
|
||||||
|
logio->GetWaveInfo(index,&pInfo);
|
||||||
|
memcpy(&NewWaveInfo,&pInfo,sizeof(Slf_WAVE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(m_SdepMin>sdep)m_SdepMin=sdep;
|
||||||
|
if(m_EdepMin>edep)m_EdepMin=edep;
|
||||||
|
if(m_SdepMax<sdep)m_SdepMax=sdep;
|
||||||
|
if(m_EdepMax<edep)m_EdepMax=edep;
|
||||||
|
if(m_RlevMin>pInfo.DimInfo[0].Delta)m_RlevMin=pInfo.DimInfo[0].Delta;
|
||||||
|
if(m_RlevMax<pInfo.DimInfo[0].Delta)m_RlevMax=pInfo.DimInfo[0].Delta;
|
||||||
|
}
|
||||||
|
logio->CloseChannel(index);
|
||||||
|
}
|
||||||
|
delete logio;
|
||||||
|
m_SampleIn=TENum;
|
||||||
|
m_pUI->lineEdit_SdepMin->setText(QString::number(m_SdepMin));
|
||||||
|
m_pUI->lineEdit_SdepMax->setText(QString::number(m_SdepMax));
|
||||||
|
m_pUI->lineEdit_EdepMin->setText(QString::number(m_EdepMin));
|
||||||
|
m_pUI->lineEdit_EdepMax->setText(QString::number(m_EdepMax));
|
||||||
|
m_pUI->lineEdit_RlevMin->setText(QString::number(m_RlevMin));
|
||||||
|
m_pUI->lineEdit_RlevMax->setText(QString::number(m_RlevMax));
|
||||||
|
m_pUI->lineEdit_Sdep->setText(QString::number(m_SdepMax));
|
||||||
|
m_pUI->lineEdit_Edep->setText(QString::number(m_EdepMin));
|
||||||
|
m_pUI->lineEdit_Rlev->setText(QString::number(m_RlevMax));
|
||||||
|
m_pUI->lineEdit_CurveName->setText(CurveNameList[0]+"wave");
|
||||||
|
m_pUI->lineEdit_CurveName_2->setText(CurveNameList[0]+"wave");
|
||||||
|
m_pUI->lineEdit_CurveUnit->setText(QString(QLatin1String(NewWaveInfo.Unit)));//m
|
||||||
|
m_pUI->lineEdit_CurveUnit_2->setText(QString::fromLocal8Bit(NewWaveInfo.AliasUnit));//"米"
|
||||||
|
m_pUI->lineEdit_DepthUnit->setText(QString(QLatin1String(NewWaveInfo.DepthUnit)));//m
|
||||||
|
m_pUI->lineEdit_DepthUnit_2->setText(QString::fromLocal8Bit(NewWaveInfo.DepthHZUnit));//"米"
|
||||||
|
m_pUI->comboBox_DataType->setCurrentIndex(NewWaveInfo.RepCode-1);
|
||||||
|
m_pUI->lineEdit_Min->setText(QString::number(NewWaveInfo.MinValue));
|
||||||
|
m_pUI->lineEdit_Max->setText(QString::number(NewWaveInfo.MaxValue));
|
||||||
|
m_pUI->lineEdit_DefVal->setText(QString::number(NewWaveInfo.DefVal));
|
||||||
|
//二维
|
||||||
|
m_pUI->lineEdit_TimeName->setText(QString(QLatin1String(NewWaveInfo.TimeName)));//time
|
||||||
|
m_pUI->lineEdit_TimeName2->setText((/*QString::fromLocal8Bit*/(NewWaveInfo.TimeHZName)));//"时间"
|
||||||
|
m_pUI->lineEdit_TimeUnit->setText(QString(QLatin1String(NewWaveInfo.TimeUnit)));//ms
|
||||||
|
m_pUI->lineEdit_TimeUnit2->setText(/*QString::fromLocal8Bit*/(NewWaveInfo.TimeHZUnit));//毫秒
|
||||||
|
m_pUI->lineEdit_StartTime->setText(QString::number(NewWaveInfo.StartTime));
|
||||||
|
m_pUI->lineEdit_TimeRlev->setText(QString::number(NewWaveInfo.TimeLevel));
|
||||||
|
m_pUI->lineEdit_ArrayNum->setText("1");
|
||||||
|
m_pUI->lineEdit_Sample->setText(QString::number(TENum));
|
||||||
|
m_pUI->lineEdit_TotalSample->setText(QString::number(TENum));
|
||||||
|
m_pUI->lineEdit_TotalSampleIn->setText(QString::number(TENum));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
END_OSGGRAPHICS_NAMESPACE
|
||||||
71
DataMgr/src/WaveComposeDlg.h
Normal file
71
DataMgr/src/WaveComposeDlg.h
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
|
||||||
|
#pragma warning(push,0)
|
||||||
|
#include <cassert>
|
||||||
|
#include <QDialog>
|
||||||
|
#include "ConsoleOutputWidget.h"
|
||||||
|
#include "ui_WaveCompose.h"
|
||||||
|
#include "MemRdWt.h"
|
||||||
|
#include "OSGFramework.h"
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
|
BEGIN_OSGGRAPHICS_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 表格选择列自定义委托
|
||||||
|
*/
|
||||||
|
class CWaveComposeDlg : public QDialog//QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CWaveComposeDlg(QWidget * parent=0, Qt::WindowFlags flags=0);
|
||||||
|
~CWaveComposeDlg()
|
||||||
|
{
|
||||||
|
if(m_pUI) delete m_pUI;
|
||||||
|
}
|
||||||
|
Ui_WaveCompose *m_pUI;
|
||||||
|
void init();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
/**
|
||||||
|
*@brief 保存槽函数
|
||||||
|
*/
|
||||||
|
void slotSave();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@brief 取消槽函数
|
||||||
|
*/
|
||||||
|
void slotCancel();
|
||||||
|
void slotAdd();
|
||||||
|
void slotDelete();
|
||||||
|
void slotUp();
|
||||||
|
void slotDown();
|
||||||
|
void sampleChanged(const QString &);
|
||||||
|
void arrayChanged(const QString &);
|
||||||
|
public:
|
||||||
|
QString FileName;
|
||||||
|
QStringList CurveNameList;
|
||||||
|
float m_DefVal;
|
||||||
|
float m_EdepMin;
|
||||||
|
float m_SdepMin;
|
||||||
|
float m_RlevMin;
|
||||||
|
float m_EdepMax;
|
||||||
|
float m_SdepMax;
|
||||||
|
float m_RlevMax;
|
||||||
|
Slf_WAVE NewWaveInfo;
|
||||||
|
int m_SampleIn;
|
||||||
|
|
||||||
|
void refresh();//刷新CurveNameList和元素总数
|
||||||
|
private:
|
||||||
|
//动态表格行数
|
||||||
|
int m_rowCount;
|
||||||
|
//除第一列后要填充列数
|
||||||
|
int m_fillColumn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
END_OSGGRAPHICS_NAMESPACE;
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
#define CMYWELLLOGROUNDDIALOG_H
|
#define CMYWELLLOGROUNDDIALOG_H
|
||||||
|
|
||||||
#pragma warning( push ,0)
|
#pragma warning( push ,0)
|
||||||
#include "WellLogUI.h"
|
#include "OSGDataModel.h"
|
||||||
#include "slf.h"
|
#include "slf.h"
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#pragma warning( pop )
|
#pragma warning( pop )
|
||||||
|
|
||||||
class OSGWELLLOGUI_EXPORT MyWelllogRound
|
class OSGDATAMODEL_EXPORT MyWelllogRound
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,6 +41,7 @@ SOURCES += *.cpp \
|
||||||
../../common/geometryutils.cpp
|
../../common/geometryutils.cpp
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
../include/BaseObject.h \
|
../include/BaseObject.h \
|
||||||
|
../include/MyWelllogRound.h \
|
||||||
../include/ObjWelllog.h \
|
../include/ObjWelllog.h \
|
||||||
../include/ObjWelllogINP.h \
|
../include/ObjWelllogINP.h \
|
||||||
../include/ObjWelllogTABLE.h \
|
../include/ObjWelllogTABLE.h \
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ HEADERS += \
|
||||||
../../common/geometryutils.h \
|
../../common/geometryutils.h \
|
||||||
../CallManage/CallManage.h \
|
../CallManage/CallManage.h \
|
||||||
../include/CStringType.h \
|
../include/CStringType.h \
|
||||||
../include/MyWelllogRound.h \
|
|
||||||
../include/TxtEditorDlg.h \
|
../include/TxtEditorDlg.h \
|
||||||
../include/WellDialog.h \
|
../include/WellDialog.h \
|
||||||
../include/WellLogDialog.h \
|
../include/WellLogDialog.h \
|
||||||
|
|
@ -80,7 +79,6 @@ SOURCES += \
|
||||||
../CallManage/CallManage.cpp \
|
../CallManage/CallManage.cpp \
|
||||||
AngleAdjTool.cpp \
|
AngleAdjTool.cpp \
|
||||||
CStringType.cpp \
|
CStringType.cpp \
|
||||||
MyWelllogRound.cpp \
|
|
||||||
SmoothTool.cpp \
|
SmoothTool.cpp \
|
||||||
TipPop.cpp \
|
TipPop.cpp \
|
||||||
TxtEditorDlg.cpp \
|
TxtEditorDlg.cpp \
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#include <QWheelEvent>
|
#include <QWheelEvent>
|
||||||
#include "qcustomplot.h"
|
#include "qcustomplot.h"
|
||||||
|
|
||||||
class Q_DECL_EXPORT CallManage : public QObject
|
class CallManage : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
|
@ -27,9 +27,9 @@ DEFINES += _TIMESPEC_DEFINED
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
../CallManage/CallManage.cpp \
|
|
||||||
../common/geometryutils.cpp \
|
../common/geometryutils.cpp \
|
||||||
CStringType.cpp \
|
CStringType.cpp \
|
||||||
|
CallManage.cpp \
|
||||||
ConsoleOutputWidget.cpp \
|
ConsoleOutputWidget.cpp \
|
||||||
CurveLine.cpp \
|
CurveLine.cpp \
|
||||||
DepPairs.cpp \
|
DepPairs.cpp \
|
||||||
|
|
@ -94,9 +94,9 @@ SOURCES += \
|
||||||
wellheader.cpp
|
wellheader.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
../CallManage/CallManage.h \
|
|
||||||
../common/geometryutils.h \
|
../common/geometryutils.h \
|
||||||
CStringType.h \
|
CStringType.h \
|
||||||
|
CallManage.h \
|
||||||
ConsoleOutputWidget.h \
|
ConsoleOutputWidget.h \
|
||||||
CurveLine.h \
|
CurveLine.h \
|
||||||
DepPairs.h \
|
DepPairs.h \
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include "ObjWell.h"
|
#include "ObjWell.h"
|
||||||
#include "ObjWelllog.h"
|
#include "ObjWelllog.h"
|
||||||
#include "DataImport.h"
|
#include "DataImport.h"
|
||||||
|
#include "CallGlobalManage.h"
|
||||||
|
|
||||||
extern QString g_prjname;
|
extern QString g_prjname;
|
||||||
extern void AppendConsole(Priority priority, const QString &output);
|
extern void AppendConsole(Priority priority, const QString &output);
|
||||||
|
|
@ -67,6 +68,8 @@ QtProjectWidgets::QtProjectWidgets(QWidget *parent)
|
||||||
//向左侧树图,追加固井结论表格
|
//向左侧树图,追加固井结论表格
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddGujingToTree(QString,QString,QString)), this, SLOT(s_AddGujingToTree(QString,QString,QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddGujingToTree(QString,QString,QString)), this, SLOT(s_AddGujingToTree(QString,QString,QString)));
|
||||||
|
|
||||||
|
//向左侧树图,刷新新加对象
|
||||||
|
connect(CallGlobalManage::getInstance(), SIGNAL(sig_Notice_AddObject(QString, QString, QMap<QString,QList<QString>>)), this, SLOT(s_Notice_AddObject(QString, QString, QMap<QString,QList<QString>>)));
|
||||||
//初始化树形控件中的右键菜单
|
//初始化树形控件中的右键菜单
|
||||||
initMenu();
|
initMenu();
|
||||||
|
|
||||||
|
|
@ -855,6 +858,11 @@ void QtProjectWidgets::initCurveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWid
|
||||||
connect(m_action_DepthShift, SIGNAL(triggered(bool)), this, SLOT(onDepthShift(bool)));
|
connect(m_action_DepthShift, SIGNAL(triggered(bool)), this, SLOT(onDepthShift(bool)));
|
||||||
menu->addAction(m_action_DepthShift);
|
menu->addAction(m_action_DepthShift);
|
||||||
|
|
||||||
|
QAction* action_WaveCompose = new QAction("合成阵列曲线", treeWidget);
|
||||||
|
action_WaveCompose->setIcon(QIcon(GetImagePath() + "icon/RigidDepthShifting.png"));
|
||||||
|
connect(action_WaveCompose, SIGNAL(triggered()), this, SLOT(onWaveCompose()));
|
||||||
|
menu->addAction(action_WaveCompose);
|
||||||
|
|
||||||
QAction* action_Copy = new QAction("复制", treeWidget);
|
QAction* action_Copy = new QAction("复制", treeWidget);
|
||||||
action_Copy->setIcon(QIcon(GetImagePath() + "icon/Copy.png")); // 设置图标":/image/u174.png"
|
action_Copy->setIcon(QIcon(GetImagePath() + "icon/Copy.png")); // 设置图标":/image/u174.png"
|
||||||
connect(action_Copy, SIGNAL(triggered()), this, SLOT(onCopySelObject()));
|
connect(action_Copy, SIGNAL(triggered()), this, SLOT(onCopySelObject()));
|
||||||
|
|
@ -1221,6 +1229,72 @@ void QtProjectWidgets::onDepthShift(bool checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//合成阵列曲线
|
||||||
|
void QtProjectWidgets::onWaveCompose(bool checked)
|
||||||
|
{
|
||||||
|
QTreeWidgetItem *pWellItem = NULL;
|
||||||
|
QString strSlfName = "";
|
||||||
|
QStringList CurveNameList;
|
||||||
|
CurveNameList.clear();
|
||||||
|
foreach(QTreeWidgetItem *pItem, ui->treeWidget->selectedItems())
|
||||||
|
{
|
||||||
|
QTreeWidgetItem *parentItem = pItem->parent(); // 上层目录是曲线
|
||||||
|
if (!parentItem)
|
||||||
|
continue;
|
||||||
|
QString strTreeTag = parentItem->data(0, Qt::UserRole).toString();
|
||||||
|
if (strTreeTag != "Curve") //曲线
|
||||||
|
continue;
|
||||||
|
|
||||||
|
parentItem = pItem->parent()->parent(); // 上两层目录是井次
|
||||||
|
if (parentItem)
|
||||||
|
{
|
||||||
|
strTreeTag = parentItem->data(0, Qt::UserRole).toString();
|
||||||
|
if (strTreeTag == "wellItem") //井次
|
||||||
|
{
|
||||||
|
pWellItem = parentItem;
|
||||||
|
strSlfName = pWellItem->data(0, Qt::UserRole+1).toString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strSlfName.contains(".slf")||!pWellItem)
|
||||||
|
return;
|
||||||
|
|
||||||
|
foreach(QTreeWidgetItem *pItem, ui->treeWidget->selectedItems())
|
||||||
|
{
|
||||||
|
QTreeWidgetItem *parentItem = pItem->parent(); // 上层目录是曲线
|
||||||
|
if (!parentItem)
|
||||||
|
continue;
|
||||||
|
QString strTreeTag = parentItem->data(0, Qt::UserRole).toString();
|
||||||
|
if (strTreeTag != "Curve") //曲线
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(pWellItem == pItem->parent()->parent()) // 上两层目录是井次(同一个文件的曲线才能合并)
|
||||||
|
CurveNameList.append(pItem->text(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
CObjWellLog* pObjWellLog= new CObjWellLog();
|
||||||
|
pObjWellLog->SetSlfFileName(strSlfName);
|
||||||
|
|
||||||
|
if (NULL==magr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString WaveName="";
|
||||||
|
int mm=CurveNameList.count();
|
||||||
|
if(CurveNameList.count()>=1)WaveName=magr->WaveCompose(strSlfName,CurveNameList);
|
||||||
|
// if(WaveName=="")return;
|
||||||
|
// CObjWellLogWavefile *pwelllog=new CObjWellLogWavefile();
|
||||||
|
// pObjWellLog->GetWelllogRound()->AddChild(pwelllog);
|
||||||
|
// pwelllog->SetName(WaveName);
|
||||||
|
// pwelllog->SetSlfFileName(strSlfName);
|
||||||
|
// QTreeWidgetItem * pItem1 =this->CreateTreeItem(pwelllog);
|
||||||
|
// pItem1->setSelected(true);
|
||||||
|
// pwelllog->SetWell(pObjWellLog->GetWelllogRound()->GetWell());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void QtProjectWidgets::ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset)
|
void QtProjectWidgets::ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset)
|
||||||
{
|
{
|
||||||
//1.修改内存数据
|
//1.修改内存数据
|
||||||
|
|
@ -2459,3 +2533,14 @@ void QtProjectWidgets::s_AddGujingToTree(QString strSlfName, QString strWellName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtProjectWidgets::s_Notice_AddObject(QString strName, QString strSlfName, QMap<QString,QList<QString>> mapShowObject)
|
||||||
|
{
|
||||||
|
foreach(QTreeWidgetItem *pItem, ui->treeWidget->selectedItems())
|
||||||
|
{
|
||||||
|
QTreeWidgetItem *parentItem = pItem->parent()->parent(); // 上两层目录是井次
|
||||||
|
if (parentItem && m_strSlfName == parentItem->data(0, Qt::UserRole+1).toString())
|
||||||
|
RefreshWellRoundTree(parentItem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "ui_qtprojectwidgets.h"
|
#include "ui_qtprojectwidgets.h"
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
|
#include "DataManagger.h"
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
@ -52,6 +52,8 @@ public slots:
|
||||||
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);
|
||||||
void onDepthShift(bool checked = false); //深度移动
|
void onDepthShift(bool checked = false); //深度移动
|
||||||
|
void onWaveCompose(bool checked = false); //合成阵列曲线
|
||||||
|
|
||||||
//TDT
|
//TDT
|
||||||
void onShowTDT(bool checked = false); //数据查看
|
void onShowTDT(bool checked = false); //数据查看
|
||||||
//表格
|
//表格
|
||||||
|
|
@ -83,6 +85,9 @@ public slots:
|
||||||
//向左侧树图,追加固井结论表格
|
//向左侧树图,追加固井结论表格
|
||||||
void s_AddGujingToTree(QString strSlfName, QString strWellName, QString strLineName);
|
void s_AddGujingToTree(QString strSlfName, QString strWellName, QString strLineName);
|
||||||
|
|
||||||
|
//向左侧树图,通知有对象添加完成
|
||||||
|
void s_Notice_AddObject(QString strName, QString strSlfName, QMap<QString,QList<QString>> mapObject);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//初始化树图控件
|
//初始化树图控件
|
||||||
//void initTreeWidget(QString fullPath, QString strProjectName);
|
//void initTreeWidget(QString fullPath, QString strProjectName);
|
||||||
|
|
@ -123,6 +128,7 @@ public:
|
||||||
QString m_strCutSlfName;
|
QString m_strCutSlfName;
|
||||||
QMap<QString,QList<QString>> m_mapShowObject;// 显示Slf文件里对象名
|
QMap<QString,QList<QString>> m_mapShowObject;// 显示Slf文件里对象名
|
||||||
QMap<QString,QList<QString>> m_mapCopyObject;// 复制Slf文件里对象名
|
QMap<QString,QList<QString>> m_mapCopyObject;// 复制Slf文件里对象名
|
||||||
|
CDataManagger *magr;//
|
||||||
int m_ReFlag;
|
int m_ReFlag;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,13 @@ SUBDIRS = \
|
||||||
WFEngine \
|
WFEngine \
|
||||||
WFWidget \
|
WFWidget \
|
||||||
OSGDataModel \
|
OSGDataModel \
|
||||||
|
ConvertorManager \
|
||||||
DataMgr \
|
DataMgr \
|
||||||
OSGFramework \
|
OSGFramework \
|
||||||
WellLogModule \
|
WellLogModule \
|
||||||
WellLogUI \
|
WellLogUI \
|
||||||
ModuleConsole \
|
ModuleConsole \
|
||||||
appDllTest \
|
appDllTest \
|
||||||
ConvertorManager \
|
|
||||||
DataOutput \
|
DataOutput \
|
||||||
SLFAscIIConvertor \
|
SLFAscIIConvertor \
|
||||||
LISConvertor \
|
LISConvertor \
|
||||||
|
|
@ -36,13 +36,13 @@ WFCrystal.file = Workflow/WFCrystal/WFCrystal.pro
|
||||||
WFEngine.file = Workflow/WFEngine/WFEngine.pro
|
WFEngine.file = Workflow/WFEngine/WFEngine.pro
|
||||||
WFWidget.file = Workflow/WFWidget/src/WFWidget.pro
|
WFWidget.file = Workflow/WFWidget/src/WFWidget.pro
|
||||||
OSGDataModel.file = OSGDataModel/src/OSGDataModel.pro
|
OSGDataModel.file = OSGDataModel/src/OSGDataModel.pro
|
||||||
|
ConvertorManager.file = ConvertorManager/src/ConvertorManager.pro
|
||||||
DataMgr.file = DataMgr/src/DataMgr.pro
|
DataMgr.file = DataMgr/src/DataMgr.pro
|
||||||
OSGFramework.file = OSGFramework/src/OSGFramework.pro
|
OSGFramework.file = OSGFramework/src/OSGFramework.pro
|
||||||
WellLogModule.file = WellLogModule/src/WellLogModule.pro
|
WellLogModule.file = WellLogModule/src/WellLogModule.pro
|
||||||
WellLogUI.file = WellLogUI/src/WellLogUI.pro
|
WellLogUI.file = WellLogUI/src/WellLogUI.pro
|
||||||
ModuleConsole.file = ModuleConsole/src/ModuleConsole.pro
|
ModuleConsole.file = ModuleConsole/src/ModuleConsole.pro
|
||||||
appDllTest.file = appDllTest/src/appDllTest.pro
|
appDllTest.file = appDllTest/src/appDllTest.pro
|
||||||
ConvertorManager.file = ConvertorManager/src/ConvertorManager.pro
|
|
||||||
DataOutput.file = DataOutput/src/DataOutput.pro
|
DataOutput.file = DataOutput/src/DataOutput.pro
|
||||||
SLFAscIIConvertor.file = tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro
|
SLFAscIIConvertor.file = tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro
|
||||||
LISConvertor.file = tran/LISConvertor/src/LISConvertor.pro
|
LISConvertor.file = tran/LISConvertor/src/LISConvertor.pro
|
||||||
|
|
@ -57,13 +57,13 @@ WFCrystal.depends = Slfio
|
||||||
WFEngine.depends = WFCrystal
|
WFEngine.depends = WFCrystal
|
||||||
WFWidget.depends = WFCrystal
|
WFWidget.depends = WFCrystal
|
||||||
OSGDataModel.depends = Slfio WFCrystal
|
OSGDataModel.depends = Slfio WFCrystal
|
||||||
DataMgr.depends = Slfio BaseFun
|
ConvertorManager.depends = Slfio BaseFun OSGDataModel
|
||||||
|
DataMgr.depends = Slfio BaseFun ConvertorManager
|
||||||
OSGFramework.depends = Slfio BaseFun OSGDataModel DataMgr
|
OSGFramework.depends = Slfio BaseFun OSGDataModel DataMgr
|
||||||
WellLogModule.depends = Slfio BaseFun OSGDataModel DataMgr WFEngine
|
WellLogModule.depends = Slfio BaseFun OSGDataModel DataMgr WFEngine
|
||||||
WellLogUI.depends = Slfio BaseFun OSGDataModel DataMgr
|
WellLogUI.depends = Slfio BaseFun OSGDataModel DataMgr
|
||||||
ModuleConsole.depends = Slfio BaseFun OSGDataModel DataMgr OSGFramework WellLogUI WellLogModule WFCrystal WFEngine WFWidget
|
ModuleConsole.depends = Slfio BaseFun OSGDataModel DataMgr OSGFramework WellLogUI WellLogModule WFCrystal WFEngine WFWidget
|
||||||
appDllTest.depends = Slfio
|
appDllTest.depends = Slfio
|
||||||
ConvertorManager.depends = Slfio BaseFun OSGDataModel WellLogUI
|
|
||||||
DataOutput.depends = Slfio BaseFun ConvertorManager
|
DataOutput.depends = Slfio BaseFun ConvertorManager
|
||||||
SLFAscIIConvertor.depends = Slfio BaseFun OSGDataModel WellLogUI ConvertorManager
|
SLFAscIIConvertor.depends = Slfio BaseFun OSGDataModel WellLogUI ConvertorManager
|
||||||
LISConvertor.depends = Slfio BaseFun OSGDataModel WellLogUI ConvertorManager
|
LISConvertor.depends = Slfio BaseFun OSGDataModel WellLogUI ConvertorManager
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user