ConvertorManager 适配linux
This commit is contained in:
parent
a6f7b4360e
commit
4f45702b01
|
|
@ -894,15 +894,15 @@ int dft(double *in_buffer,int *wave_len,int array_num,int eq_1,int eq_0)//int *
|
|||
// mov var_1C, 2
|
||||
var_20=1;
|
||||
var_1C=2;
|
||||
char p1[8]={0x54,0x41,0x17,0x44,0x40,0x19,0x21,0xFB};
|
||||
char p2[8]={0x66,0x81,0x15,0x1E,0x3F,0xE6,0xA0,0x9E};
|
||||
char p3[8]={0xFE,0xFA,0x39,0xEF,0x3F,0xE6,0x2E,0x42};
|
||||
char p4[8]={0xFE,0xFA,0x39,0xEF,0x3F,0xF6,0x2E,0x42};
|
||||
unsigned char p1[8]={0x54,0x41,0x17,0x44,0x40,0x19,0x21,0xFB};
|
||||
unsigned char p2[8]={0x66,0x81,0x15,0x1E,0x3F,0xE6,0xA0,0x9E};
|
||||
unsigned char p3[8]={0xFE,0xFA,0x39,0xEF,0x3F,0xE6,0x2E,0x42};
|
||||
unsigned char p4[8]={0xFE,0xFA,0x39,0xEF,0x3F,0xF6,0x2E,0x42};
|
||||
|
||||
char p10[8]={0x40,0x19,0x21,0xFB,0x54,0x41,0x17,0x44};
|
||||
char p20[8]={0x3F,0xE6,0xA0,0x9E,0x66,0x81,0x15,0x1E};
|
||||
char p30[8]={0x3F,0xE6,0x2E,0x42,0xFE,0xFA,0x39,0xEF};
|
||||
char p40[8]={0x3F,0xF6,0x2E,0x42,0xFE,0xFA,0x39,0xEF};
|
||||
unsigned char p10[8]={0x40,0x19,0x21,0xFB,0x54,0x41,0x17,0x44};
|
||||
unsigned char p20[8]={0x3F,0xE6,0xA0,0x9E,0x66,0x81,0x15,0x1E};
|
||||
unsigned char p30[8]={0x3F,0xE6,0x2E,0x42,0xFE,0xFA,0x39,0xEF};
|
||||
unsigned char p40[8]={0x3F,0xF6,0x2E,0x42,0xFE,0xFA,0x39,0xEF};
|
||||
for(int i0=0;i0<8;i0++)
|
||||
{
|
||||
p1[i0]=p10[7-i0];
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#ifdef WIN32
|
||||
#ifdef CONVERTOR_LIB
|
||||
#define CONVERTOR_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CONVERTOR_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define CONVERTOR_EXPORT
|
||||
#endif
|
||||
#include "OSGFramework.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef CONVERTOR_LIB
|
||||
#define CONVERTOR_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CONVERTOR_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define CONVERTOR_EXPORT
|
||||
#endif
|
||||
#include "OSGFramework.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,106 +1,106 @@
|
|||
/**
|
||||
* @file ConvertorManager.h
|
||||
* @brief 格式转换器管理器
|
||||
* @date 2014-7-29
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef PAI_FRAME_CONVERTORMANAGER_H__
|
||||
#define PAI_FRAME_CONVERTORMANAGER_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <QDir>
|
||||
#include <QLibrary>
|
||||
#include "QList"
|
||||
#include <QStringList>
|
||||
#include <QCoreApplication>
|
||||
#include <QChar>
|
||||
#include <QVector>
|
||||
#include "DepthProgress.h"
|
||||
#include "ConvertorExport.h"
|
||||
#include "IConvertor.h"
|
||||
#include "geometryutils.h"
|
||||
//#include "BaseObject.h"
|
||||
//#include "ObjWelllogRound.h"
|
||||
#include "ObjectIDDescription.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
class CONVERTOR_EXPORT ConvertorManager
|
||||
{
|
||||
|
||||
public:
|
||||
int all;
|
||||
~ConvertorManager();
|
||||
/**
|
||||
* @brief 获取类单一实例
|
||||
*/
|
||||
static ConvertorManager&GetInstance()
|
||||
{
|
||||
static ConvertorManager Instance;
|
||||
return Instance;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief 加载系统中的所有格式转换控制器
|
||||
* @param[in]convtorTypeName 转换器类型
|
||||
*/
|
||||
void LoadAllConvertorPlugin();
|
||||
void UnLoadAllConvertorPlugin();
|
||||
|
||||
/**
|
||||
* @brief 获取能解析指定文件的所有转换器
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<IConvertor*> 指定文件的所有转换器的vector
|
||||
*/
|
||||
|
||||
QVector<IConvertor*>GetSupportConvertors(const QString &filename,DiDepthProgress *pDepthProgress);
|
||||
|
||||
/**
|
||||
* @brief 有格式转换器能支持文件的后缀名
|
||||
* @return QVector<QString*> support filename all convertor vector
|
||||
*/
|
||||
QVector<QString>GetSupportFileExtensions();
|
||||
/**
|
||||
* @brief 获取所有的格式转换器
|
||||
* @return QVector<IConvertor*> all convertor vector
|
||||
*/
|
||||
QVector<IConvertor*>GetAllConvertors();
|
||||
|
||||
private:
|
||||
|
||||
ConvertorManager();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief 统计所有的格式转换器
|
||||
*/
|
||||
void StatisticalAllConvertors();
|
||||
|
||||
/**
|
||||
* @brief 所有的格式转换器
|
||||
*/
|
||||
QVector<IConvertor*>m_vAllConvertors;
|
||||
|
||||
/**
|
||||
* @brief 所有格式转换器能支持文件的后缀名
|
||||
*/
|
||||
QVector<QString>m_vAllSuffixFileName;
|
||||
|
||||
|
||||
/**
|
||||
* @brief 文件名支持的所有格式转换器
|
||||
*/
|
||||
QVector<IConvertor*>m_vFileNameSupportConvertor;
|
||||
QStringList m_vConvertorNames;
|
||||
};
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
using namespace pai::graphics;
|
||||
#endif
|
||||
/**
|
||||
* @file ConvertorManager.h
|
||||
* @brief 格式转换器管理器
|
||||
* @date 2014-7-29
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef PAI_FRAME_CONVERTORMANAGER_H__
|
||||
#define PAI_FRAME_CONVERTORMANAGER_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <QDir>
|
||||
#include <QLibrary>
|
||||
#include "QList"
|
||||
#include <QStringList>
|
||||
#include <QCoreApplication>
|
||||
#include <QChar>
|
||||
#include <QVector>
|
||||
#include "DepthProgress.h"
|
||||
#include "ConvertorExport.h"
|
||||
#include "IConvertor.h"
|
||||
#include "geometryutils.h"
|
||||
//#include "BaseObject.h"
|
||||
//#include "ObjWelllogRound.h"
|
||||
#include "ObjectIDDescription.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
class CONVERTOR_EXPORT ConvertorManager
|
||||
{
|
||||
|
||||
public:
|
||||
int all;
|
||||
~ConvertorManager();
|
||||
/**
|
||||
* @brief 获取类单一实例
|
||||
*/
|
||||
static ConvertorManager&GetInstance()
|
||||
{
|
||||
static ConvertorManager Instance;
|
||||
return Instance;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief 加载系统中的所有格式转换控制器
|
||||
* @param[in]convtorTypeName 转换器类型
|
||||
*/
|
||||
void LoadAllConvertorPlugin();
|
||||
void UnLoadAllConvertorPlugin();
|
||||
|
||||
/**
|
||||
* @brief 获取能解析指定文件的所有转换器
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<IConvertor*> 指定文件的所有转换器的vector
|
||||
*/
|
||||
|
||||
QVector<IConvertor*>GetSupportConvertors(const QString &filename,DiDepthProgress *pDepthProgress);
|
||||
|
||||
/**
|
||||
* @brief 有格式转换器能支持文件的后缀名
|
||||
* @return QVector<QString*> support filename all convertor vector
|
||||
*/
|
||||
QVector<QString>GetSupportFileExtensions();
|
||||
/**
|
||||
* @brief 获取所有的格式转换器
|
||||
* @return QVector<IConvertor*> all convertor vector
|
||||
*/
|
||||
QVector<IConvertor*>GetAllConvertors();
|
||||
|
||||
private:
|
||||
|
||||
ConvertorManager();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief 统计所有的格式转换器
|
||||
*/
|
||||
void StatisticalAllConvertors();
|
||||
|
||||
/**
|
||||
* @brief 所有的格式转换器
|
||||
*/
|
||||
QVector<IConvertor*>m_vAllConvertors;
|
||||
|
||||
/**
|
||||
* @brief 所有格式转换器能支持文件的后缀名
|
||||
*/
|
||||
QVector<QString>m_vAllSuffixFileName;
|
||||
|
||||
|
||||
/**
|
||||
* @brief 文件名支持的所有格式转换器
|
||||
*/
|
||||
QVector<IConvertor*>m_vFileNameSupportConvertor;
|
||||
QStringList m_vConvertorNames;
|
||||
};
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
using namespace pai::graphics;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,75 +1,75 @@
|
|||
#ifndef PAI_FRAME_COSGDataImport_H
|
||||
#define PAI_FRAME_COSGDataImport_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QFileDialog>
|
||||
// #include "OSGWindowShared.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
// #include "VecSceneManager.h"
|
||||
//#include "ConvertorManager.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "ConvertorManager.h"
|
||||
#pragma warning( pop )
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
// class QUuid;
|
||||
// class QString;
|
||||
// using namespace pai::datamodel;
|
||||
|
||||
// BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
// class ConvertorManager;
|
||||
// class CVecWindow;
|
||||
// class CTestDialog;
|
||||
// class CCompositeWindow;
|
||||
|
||||
// void /*OSGWINDOWSHARED_EXPORT*/ slotImportSingleWellLogData(CVecViewCommand &viewCommand,QUuid /*e*/,bool bShow);
|
||||
|
||||
class CONVERTOR_EXPORT CDataImport
|
||||
{
|
||||
public:
|
||||
static bool m_bImportByFolder;
|
||||
|
||||
// //把Well 加入到OSGSceneManager
|
||||
// static void AddWellNode( CVecSceneManager *pSceneManager,CObjWell *pWell,CObjWell *pWellInsertPos );
|
||||
|
||||
// //把Well log 加入到OSGSceneManager
|
||||
// static void AddWellLogNode( CVecSceneManager *pSceneManager,CObjWellLog *pWellLog,CObjWellLog *pWellLogInsertPos );
|
||||
static void ImporttoTree(QString slfFileName,CLogIO *logio,CObjWell *pWell,CObjWelllogRound* pWelllogRound,char *curvename);
|
||||
|
||||
//import well path object to project
|
||||
static QList<CObjWell *> ImportWellTrajectorys(bool IsDir);
|
||||
|
||||
//import bitmap object to project
|
||||
static void ImportBitmaps();
|
||||
|
||||
static QList<CObjWell *> CDataImport::ImportWells(QString path,QStringList &wellfs,int *pNum=NULL,bool IsTran=true);
|
||||
static QList<CObjWell *> CDataImport::ImportWells(QString path,QStringList &wellfs,char *pSuffix,int *pNum=NULL,bool IsTran=true);
|
||||
|
||||
//import core image to project
|
||||
static void ImportCoreImage();
|
||||
static void LoadLayers(QStringList &listFiles);
|
||||
|
||||
//根据well name查找或新建一Well
|
||||
static CObjWell * GetWellByName( QString strWellName );
|
||||
static void ImportConvertorWellLogFiles(QString wellname="",QString wellroundname="");
|
||||
static void ImportGeoStraData();
|
||||
static void OutPutGeoStraData();
|
||||
static void ImportWellXYCoordinate();
|
||||
static void OutPutWellXYCoordinate();
|
||||
|
||||
static int chakan(QList<CObjWell *> &wells,QString path,QStringList &wellfs,int &num,bool GetNum=false,DiDepthProgress *DepthProgress=NULL,char *pSuffix=NULL);
|
||||
static QStringList GetFileNames(const QString &caption = QString(), const QString &filter = QString(),QFileDialog::FileMode filemode=QFileDialog::ExistingFiles);
|
||||
static CObjWell *ChangetoSlf(QString wellFile,DiDepthProgress *DepthProgress=NULL);
|
||||
//whp change 2019.12.12
|
||||
static QString ConvertorWellLogFiles(ConvertorManager &pManager,QString wellname,DiDepthProgress *DepthProgress=NULL);
|
||||
static QString m_prjname;
|
||||
static int flag1;
|
||||
static int flag_check;
|
||||
static int m_flag;
|
||||
//whp add 2020.2.28 for 检查井名文件名是否存在,若存在,获取井次全路径文件名
|
||||
static QString CDataImport::GetOutName(QString wellname,QString filename);
|
||||
static CObjWell *ChangetoSlf(QString wellFile1,DiDepthProgress *pDepthProgress,bool IsTran);
|
||||
};
|
||||
|
||||
// END_OSGGRAPHICS_NAMESPACE
|
||||
#endif
|
||||
#ifndef PAI_FRAME_COSGDataImport_H
|
||||
#define PAI_FRAME_COSGDataImport_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QFileDialog>
|
||||
// #include "OSGWindowShared.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
// #include "VecSceneManager.h"
|
||||
//#include "ConvertorManager.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "ConvertorManager.h"
|
||||
#pragma warning( pop )
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
// class QUuid;
|
||||
// class QString;
|
||||
// using namespace pai::datamodel;
|
||||
|
||||
// BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
// class ConvertorManager;
|
||||
// class CVecWindow;
|
||||
// class CTestDialog;
|
||||
// class CCompositeWindow;
|
||||
|
||||
// void /*OSGWINDOWSHARED_EXPORT*/ slotImportSingleWellLogData(CVecViewCommand &viewCommand,QUuid /*e*/,bool bShow);
|
||||
|
||||
class CONVERTOR_EXPORT CDataImport
|
||||
{
|
||||
public:
|
||||
static bool m_bImportByFolder;
|
||||
|
||||
// //把Well 加入到OSGSceneManager
|
||||
// static void AddWellNode( CVecSceneManager *pSceneManager,CObjWell *pWell,CObjWell *pWellInsertPos );
|
||||
|
||||
// //把Well log 加入到OSGSceneManager
|
||||
// static void AddWellLogNode( CVecSceneManager *pSceneManager,CObjWellLog *pWellLog,CObjWellLog *pWellLogInsertPos );
|
||||
static void ImporttoTree(QString slfFileName,CLogIO *logio,CObjWell *pWell,CObjWelllogRound* pWelllogRound,char *curvename);
|
||||
|
||||
//import well path object to project
|
||||
static QList<CObjWell *> ImportWellTrajectorys(bool IsDir);
|
||||
|
||||
//import bitmap object to project
|
||||
static void ImportBitmaps();
|
||||
|
||||
static QList<CObjWell *> ImportWells(QString path,QStringList &wellfs,int *pNum=NULL,bool IsTran=true);
|
||||
static QList<CObjWell *> ImportWells(QString path,QStringList &wellfs,char *pSuffix,int *pNum=NULL,bool IsTran=true);
|
||||
|
||||
//import core image to project
|
||||
static void ImportCoreImage();
|
||||
static void LoadLayers(QStringList &listFiles);
|
||||
|
||||
//根据well name查找或新建一Well
|
||||
static CObjWell * GetWellByName( QString strWellName );
|
||||
static void ImportConvertorWellLogFiles(QString wellname="",QString wellroundname="");
|
||||
static void ImportGeoStraData();
|
||||
static void OutPutGeoStraData();
|
||||
static void ImportWellXYCoordinate();
|
||||
static void OutPutWellXYCoordinate();
|
||||
|
||||
static int chakan(QList<CObjWell *> &wells,QString path,QStringList &wellfs,int &num,bool GetNum=false,DiDepthProgress *DepthProgress=NULL,char *pSuffix=NULL);
|
||||
static QStringList GetFileNames(const QString &caption = QString(), const QString &filter = QString(),QFileDialog::FileMode filemode=QFileDialog::ExistingFiles);
|
||||
static CObjWell *ChangetoSlf(QString wellFile,DiDepthProgress *DepthProgress=NULL);
|
||||
//whp change 2019.12.12
|
||||
static QString ConvertorWellLogFiles(ConvertorManager &pManager,QString wellname,DiDepthProgress *DepthProgress=NULL);
|
||||
static QString m_prjname;
|
||||
static int flag1;
|
||||
static int flag_check;
|
||||
static int m_flag;
|
||||
//whp add 2020.2.28 for 检查井名文件名是否存在,若存在,获取井次全路径文件名
|
||||
static QString GetOutName(QString wellname,QString filename);
|
||||
static CObjWell *ChangetoSlf(QString wellFile1,DiDepthProgress *pDepthProgress,bool IsTran);
|
||||
};
|
||||
|
||||
// END_OSGGRAPHICS_NAMESPACE
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,156 +1,156 @@
|
|||
/**
|
||||
* @file IConvertor.h
|
||||
* @brief 格式解析器抽象类
|
||||
* @date 2014-7-29
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_ICONVERTOR_H__
|
||||
#define PAI_FRAME_ICONVERTOR_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <vector>
|
||||
#include <QUuid>
|
||||
|
||||
#include "ConvertorExport.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include "MyWelllogRound.h"
|
||||
#include "DepthProgress.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
struct CONVERTOR_EXPORT sConvertorKey
|
||||
{
|
||||
public:
|
||||
|
||||
sConvertorKey();
|
||||
|
||||
sConvertorKey(QUuid ConvertorTypeClassIDTmp,QString strConvertorTypeName);
|
||||
|
||||
bool operator !=( const sConvertorKey& s );
|
||||
|
||||
bool operator< ( const sConvertorKey& s ) const;
|
||||
|
||||
public:
|
||||
|
||||
QUuid m_ConvertorTypeClassID; // Convertor type ID
|
||||
QString m_strConvertorTypeName; // Convertor type name
|
||||
};
|
||||
|
||||
class CONVERTOR_EXPORT IConvertor
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
IConvertor();
|
||||
|
||||
virtual ~IConvertor();
|
||||
|
||||
public:
|
||||
/**
|
||||
* 本接口仅供测试模块使用,请勿使用
|
||||
*/
|
||||
virtual bool OnlyForTest(){return false;};
|
||||
virtual bool Init()
|
||||
{
|
||||
m_WellInfo->Init();
|
||||
m_WellLogRoundInfo->Init();
|
||||
// memset(&m_WellInfo,0,sizeof(m_WellInfo));
|
||||
// memset(&m_WellLogRoundInfo,0,sizeof(m_WellLogRoundInfo));
|
||||
return true;
|
||||
};
|
||||
/**
|
||||
* @brief 文件是否支持这种格式
|
||||
* @param[in]filename 文件名
|
||||
* @return if true support filename else not
|
||||
*/
|
||||
virtual bool IsSupport(const QString &filename)
|
||||
{
|
||||
Init();
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief 该格式解析器支持的文件后缀名
|
||||
* @return QVector<QString> this convertor support all suffix file
|
||||
*/
|
||||
virtual QVector<QString>GetSupportFileExtensions()=0;
|
||||
virtual void InitFormatSuffixName();
|
||||
QString m_thisModuleName;
|
||||
|
||||
/**
|
||||
* @brief 指定文件的解编出来的文件头内容
|
||||
* @param[in]filename 文件名
|
||||
* @return QString file content
|
||||
*/
|
||||
virtual QString GetFileContent(const QString &filename)=0;
|
||||
virtual QStringList &GetListHead(){
|
||||
return m_FileHead;
|
||||
};
|
||||
virtual void SetListHead(QStringList FileHead){
|
||||
m_FileHead=FileHead;
|
||||
};
|
||||
|
||||
virtual void SetDepthProgress(DiDepthProgress *pDepthProgress)
|
||||
{
|
||||
m_pDepthProgress=pDepthProgress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<CObjWellLog*> file contains all welllog curve
|
||||
*/
|
||||
//virtual QList<CObjWellLog*> GetWellLogList(const QString &filename)=0;
|
||||
|
||||
/**
|
||||
* @brief 获取井信息
|
||||
* @return well
|
||||
*/
|
||||
|
||||
pai::ios::welllog::Well *GetWellInfo();
|
||||
|
||||
/**
|
||||
* @brief 获取井次
|
||||
* @return WelllogRound 井次
|
||||
*/
|
||||
MyWelllogRound *GetWellLogRoundInfo();
|
||||
|
||||
static pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor>& GetFatory();
|
||||
|
||||
void SetConvertorTypeName(QString TypeName) {m_ConvertorTypeName=TypeName;};
|
||||
|
||||
QString GetConvertorTypeName(){ return m_ConvertorTypeName;}
|
||||
int m_ColumnCount;
|
||||
|
||||
protected:
|
||||
|
||||
pai::ios::welllog::Well* m_WellInfo;
|
||||
DiDepthProgress *m_pDepthProgress;
|
||||
QStringList m_FileHead;
|
||||
MyWelllogRound* m_WellLogRoundInfo;
|
||||
QString m_ConvertorTypeName;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 成图窗口插件注册宏
|
||||
*/
|
||||
#define BEGIN_REGISTER_ICONVERTOR(className) BEGIN_REGISTER(sConvertorKey,IConvertor,className)
|
||||
#define END_REGISTER_ICONVERTOR(className) END_REGISTER( sConvertorKey,IConvertor,className )
|
||||
|
||||
/**
|
||||
* @brief 格式转换器插件工厂
|
||||
*/
|
||||
typedef pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor> IConvertorFactory;
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
// using namespace pai::graphics;
|
||||
#endif
|
||||
/**
|
||||
* @file IConvertor.h
|
||||
* @brief 格式解析器抽象类
|
||||
* @date 2014-7-29
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_ICONVERTOR_H__
|
||||
#define PAI_FRAME_ICONVERTOR_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <vector>
|
||||
#include <QUuid>
|
||||
|
||||
#include "ConvertorExport.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
#include "ObjWell.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include "MyWelllogRound.h"
|
||||
#include "DepthProgress.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
struct CONVERTOR_EXPORT sConvertorKey
|
||||
{
|
||||
public:
|
||||
|
||||
sConvertorKey();
|
||||
|
||||
sConvertorKey(QUuid ConvertorTypeClassIDTmp,QString strConvertorTypeName);
|
||||
|
||||
bool operator !=( const sConvertorKey& s );
|
||||
|
||||
bool operator< ( const sConvertorKey& s ) const;
|
||||
|
||||
public:
|
||||
|
||||
QUuid m_ConvertorTypeClassID; // Convertor type ID
|
||||
QString m_strConvertorTypeName; // Convertor type name
|
||||
};
|
||||
|
||||
class CONVERTOR_EXPORT IConvertor
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
IConvertor();
|
||||
|
||||
virtual ~IConvertor();
|
||||
|
||||
public:
|
||||
/**
|
||||
* 本接口仅供测试模块使用,请勿使用
|
||||
*/
|
||||
virtual bool OnlyForTest(){return false;};
|
||||
virtual bool Init()
|
||||
{
|
||||
m_WellInfo->Init();
|
||||
m_WellLogRoundInfo->Init();
|
||||
// memset(&m_WellInfo,0,sizeof(m_WellInfo));
|
||||
// memset(&m_WellLogRoundInfo,0,sizeof(m_WellLogRoundInfo));
|
||||
return true;
|
||||
};
|
||||
/**
|
||||
* @brief 文件是否支持这种格式
|
||||
* @param[in]filename 文件名
|
||||
* @return if true support filename else not
|
||||
*/
|
||||
virtual bool IsSupport(const QString &filename)
|
||||
{
|
||||
Init();
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief 该格式解析器支持的文件后缀名
|
||||
* @return QVector<QString> this convertor support all suffix file
|
||||
*/
|
||||
virtual QVector<QString>GetSupportFileExtensions()=0;
|
||||
virtual void InitFormatSuffixName();
|
||||
QString m_thisModuleName;
|
||||
|
||||
/**
|
||||
* @brief 指定文件的解编出来的文件头内容
|
||||
* @param[in]filename 文件名
|
||||
* @return QString file content
|
||||
*/
|
||||
virtual QString GetFileContent(const QString &filename)=0;
|
||||
virtual QStringList &GetListHead(){
|
||||
return m_FileHead;
|
||||
};
|
||||
virtual void SetListHead(QStringList FileHead){
|
||||
m_FileHead=FileHead;
|
||||
};
|
||||
|
||||
virtual void SetDepthProgress(DiDepthProgress *pDepthProgress)
|
||||
{
|
||||
m_pDepthProgress=pDepthProgress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<CObjWellLog*> file contains all welllog curve
|
||||
*/
|
||||
//virtual QList<CObjWellLog*> GetWellLogList(const QString &filename)=0;
|
||||
|
||||
/**
|
||||
* @brief 获取井信息
|
||||
* @return well
|
||||
*/
|
||||
|
||||
pai::ios::welllog::Well *GetWellInfo();
|
||||
|
||||
/**
|
||||
* @brief 获取井次
|
||||
* @return WelllogRound 井次
|
||||
*/
|
||||
MyWelllogRound *GetWellLogRoundInfo();
|
||||
|
||||
static pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor>& GetFatory();
|
||||
|
||||
void SetConvertorTypeName(QString TypeName) {m_ConvertorTypeName=TypeName;};
|
||||
|
||||
QString GetConvertorTypeName(){ return m_ConvertorTypeName;}
|
||||
int m_ColumnCount;
|
||||
|
||||
protected:
|
||||
|
||||
pai::ios::welllog::Well* m_WellInfo;
|
||||
DiDepthProgress *m_pDepthProgress;
|
||||
QStringList m_FileHead;
|
||||
MyWelllogRound* m_WellLogRoundInfo;
|
||||
QString m_ConvertorTypeName;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 成图窗口插件注册宏
|
||||
*/
|
||||
#define BEGIN_REGISTER_ICONVERTOR(className) BEGIN_REGISTER(sConvertorKey,IConvertor,className)
|
||||
#define END_REGISTER_ICONVERTOR(className) END_REGISTER( sConvertorKey,IConvertor,className )
|
||||
|
||||
/**
|
||||
* @brief 格式转换器插件工厂
|
||||
*/
|
||||
typedef pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor> IConvertorFactory;
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
// using namespace pai::graphics;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,144 +1,144 @@
|
|||
/**
|
||||
* @file ImportDataDialog.h
|
||||
* @brief 测井数据导入界面
|
||||
* @date 2014-8-8
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef IMPORTDATA_H
|
||||
#define IMPORTDATA_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QDialog>
|
||||
//#include "ObjectFolder.h"
|
||||
//#include "ObjProject.h"
|
||||
#include <QItemDelegate>
|
||||
#include "ConvertorManager.h"
|
||||
#include "InterfaceWidget.h"
|
||||
#include "ConvertorExport.h"
|
||||
|
||||
//#include "ObjWell.h"
|
||||
//#include "Family.h"
|
||||
|
||||
//#include "ProjectCommand.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class ImportData ;
|
||||
}
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
//用于在表格中解析曲线类型Family
|
||||
class FamilyDelegate : public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FamilyDelegate(QObject *parent = 0): QItemDelegate(parent) { }
|
||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QComboBox *editor = new QComboBox(parent);
|
||||
// static std::vector<Family> familys;//避免多次从数据库加载
|
||||
// if(familys.size()<=0){
|
||||
// Family afa;
|
||||
// afa.GetFamily(familys);
|
||||
// }
|
||||
// for(int i=0;i<familys.size();i++)
|
||||
// {
|
||||
// editor->addItem(QString::fromStdString(familys[i].GetFamilyType()));
|
||||
// }
|
||||
return editor;
|
||||
}
|
||||
void setEditorData(QWidget *editor, const QModelIndex &index) const
|
||||
{
|
||||
QString text = index.model()->data(index, Qt::EditRole).toString();
|
||||
QComboBox *comboBox = static_cast<QComboBox*>(editor);
|
||||
int tindex = comboBox->findText(text);
|
||||
comboBox->setCurrentIndex(tindex);
|
||||
}
|
||||
void setModelData(QWidget *editor, QAbstractItemModel *model,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QComboBox *comboBox = static_cast<QComboBox*>(editor);
|
||||
QString text = comboBox->currentText();
|
||||
model->setData(index, text, Qt::EditRole);
|
||||
}
|
||||
void updateEditorGeometry(QWidget *editor,
|
||||
const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
||||
};
|
||||
class CONVERTOR_EXPORT ImportDataDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ImportDataDialog(QWidget *parent = 0,QString wellname="",QString wellroundname="");
|
||||
|
||||
~ImportDataDialog();
|
||||
QString m_CurrentWellName;
|
||||
QString m_CurrentWellRoundName;
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief 展示主界面数据
|
||||
* @param[in]ConvertorVector 所有转换器
|
||||
* @param[in]filePath 文件路径
|
||||
*/
|
||||
void DisplayFileInformationAreaData( const QVector<IConvertor*>ConvertorVector,const QString filePath);
|
||||
bool IsHaveSameCurve(int NumLog,vector<int> &OutCurveNo,vector<char*> &OutCurve);
|
||||
void SetProjectname(const QString projectname){m_projectname = projectname;}
|
||||
int CheckExistCurve(QString outputfilename,int NumLog,vector<int>& OutCurveNo,vector<char*>& OutCurve);
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief 选择区数据展示
|
||||
* @param[in]pInterface 主界面UI
|
||||
* @param[in]fileHead 表头
|
||||
* @param[in]CurverName 曲线名
|
||||
* @param[in]pConvertor 转换器
|
||||
*/
|
||||
void DisplaySelectAreaData( InterfaceWidget *pInterface,const QStringList fileHead, IConvertor *pConvertor);
|
||||
|
||||
private slots:
|
||||
|
||||
/**
|
||||
* @brief 确定按钮曲线上树信号槽
|
||||
*/
|
||||
virtual void AcceptOK();
|
||||
//whp add 2019.10.12
|
||||
void SelAll();
|
||||
void NotSelAll();
|
||||
void ReverseSel();
|
||||
private:
|
||||
|
||||
// CObjWell * GetWellBaseName(IConvertor *pConvertor,const std::string strWellName);
|
||||
|
||||
bool SelectAndDeleteWellLog(int row,/* QList<CObjWellLog*>&vOSGWellLog,*/InterfaceWidget *pCurrentInterfaceWidget, int ColumnCount,IConvertor *pConvertor);//, CBaseObject *pWellTime);
|
||||
|
||||
void InitWell(InterfaceWidget *pInterfaceWidget,IConvertor*pConvertor);
|
||||
|
||||
void InitWellLogRound(InterfaceWidget *pInterfaceWidget,IConvertor*pConvertor);
|
||||
|
||||
void UpdateWell(InterfaceWidget *pInterfaceWidget,IConvertor *pConvertor);
|
||||
|
||||
void UpdateWellLogRound(InterfaceWidget *pInterfaceWidget,IConvertor *pConvertor);
|
||||
private:
|
||||
//内部数据采用slf格式处理,尤其是wave\table类数据,需要自动生成slf文件名
|
||||
QString GenerateSlfFileName(InterfaceWidget *pCurrentInterfaceWidget);
|
||||
QVector<IConvertor*>m_vConvertorVector;
|
||||
std::map<QWidget*,InterfaceWidget*>m_TabInterWidget;
|
||||
// std::map<IConvertor*,QList<CObjWellLog*> >m_ConvertorWellLog;
|
||||
Ui::ImportData *m_pImportDataUI;
|
||||
QString m_FilePath;
|
||||
bool m_ExistSameWellName;
|
||||
bool m_ExistSameWellRoundName;
|
||||
QString m_projectname;
|
||||
};
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
using namespace pai::graphics;
|
||||
#endif // IMPORTDATA_H
|
||||
/**
|
||||
* @file ImportDataDialog.h
|
||||
* @brief 测井数据导入界面
|
||||
* @date 2014-8-8
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef IMPORTDATA_H
|
||||
#define IMPORTDATA_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QDialog>
|
||||
//#include "ObjectFolder.h"
|
||||
//#include "ObjProject.h"
|
||||
#include <QItemDelegate>
|
||||
#include "ConvertorManager.h"
|
||||
#include "InterfaceWidget.h"
|
||||
#include "ConvertorExport.h"
|
||||
|
||||
//#include "ObjWell.h"
|
||||
//#include "Family.h"
|
||||
|
||||
//#include "ProjectCommand.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class ImportData ;
|
||||
}
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
//用于在表格中解析曲线类型Family
|
||||
class FamilyDelegate : public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FamilyDelegate(QObject *parent = 0): QItemDelegate(parent) { }
|
||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QComboBox *editor = new QComboBox(parent);
|
||||
// static std::vector<Family> familys;//避免多次从数据库加载
|
||||
// if(familys.size()<=0){
|
||||
// Family afa;
|
||||
// afa.GetFamily(familys);
|
||||
// }
|
||||
// for(int i=0;i<familys.size();i++)
|
||||
// {
|
||||
// editor->addItem(QString::fromStdString(familys[i].GetFamilyType()));
|
||||
// }
|
||||
return editor;
|
||||
}
|
||||
void setEditorData(QWidget *editor, const QModelIndex &index) const
|
||||
{
|
||||
QString text = index.model()->data(index, Qt::EditRole).toString();
|
||||
QComboBox *comboBox = static_cast<QComboBox*>(editor);
|
||||
int tindex = comboBox->findText(text);
|
||||
comboBox->setCurrentIndex(tindex);
|
||||
}
|
||||
void setModelData(QWidget *editor, QAbstractItemModel *model,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QComboBox *comboBox = static_cast<QComboBox*>(editor);
|
||||
QString text = comboBox->currentText();
|
||||
model->setData(index, text, Qt::EditRole);
|
||||
}
|
||||
void updateEditorGeometry(QWidget *editor,
|
||||
const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
||||
};
|
||||
class CONVERTOR_EXPORT ImportDataDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ImportDataDialog(QWidget *parent = 0,QString wellname="",QString wellroundname="");
|
||||
|
||||
~ImportDataDialog();
|
||||
QString m_CurrentWellName;
|
||||
QString m_CurrentWellRoundName;
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief 展示主界面数据
|
||||
* @param[in]ConvertorVector 所有转换器
|
||||
* @param[in]filePath 文件路径
|
||||
*/
|
||||
void DisplayFileInformationAreaData( const QVector<IConvertor*>ConvertorVector,const QString filePath);
|
||||
bool IsHaveSameCurve(int NumLog,vector<int> &OutCurveNo,vector<char*> &OutCurve);
|
||||
void SetProjectname(const QString projectname){m_projectname = projectname;}
|
||||
int CheckExistCurve(QString outputfilename,int NumLog,vector<int>& OutCurveNo,vector<char*>& OutCurve);
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief 选择区数据展示
|
||||
* @param[in]pInterface 主界面UI
|
||||
* @param[in]fileHead 表头
|
||||
* @param[in]CurverName 曲线名
|
||||
* @param[in]pConvertor 转换器
|
||||
*/
|
||||
void DisplaySelectAreaData( InterfaceWidget *pInterface,const QStringList fileHead, IConvertor *pConvertor);
|
||||
|
||||
private slots:
|
||||
|
||||
/**
|
||||
* @brief 确定按钮曲线上树信号槽
|
||||
*/
|
||||
virtual void AcceptOK();
|
||||
//whp add 2019.10.12
|
||||
void SelAll();
|
||||
void NotSelAll();
|
||||
void ReverseSel();
|
||||
private:
|
||||
|
||||
// CObjWell * GetWellBaseName(IConvertor *pConvertor,const std::string strWellName);
|
||||
|
||||
bool SelectAndDeleteWellLog(int row,/* QList<CObjWellLog*>&vOSGWellLog,*/InterfaceWidget *pCurrentInterfaceWidget, int ColumnCount,IConvertor *pConvertor);//, CBaseObject *pWellTime);
|
||||
|
||||
void InitWell(InterfaceWidget *pInterfaceWidget,IConvertor*pConvertor);
|
||||
|
||||
void InitWellLogRound(InterfaceWidget *pInterfaceWidget,IConvertor*pConvertor);
|
||||
|
||||
void UpdateWell(InterfaceWidget *pInterfaceWidget,IConvertor *pConvertor);
|
||||
|
||||
void UpdateWellLogRound(InterfaceWidget *pInterfaceWidget,IConvertor *pConvertor);
|
||||
private:
|
||||
//内部数据采用slf格式处理,尤其是wave\table类数据,需要自动生成slf文件名
|
||||
QString GenerateSlfFileName(InterfaceWidget *pCurrentInterfaceWidget);
|
||||
QVector<IConvertor*>m_vConvertorVector;
|
||||
std::map<QWidget*,InterfaceWidget*>m_TabInterWidget;
|
||||
// std::map<IConvertor*,QList<CObjWellLog*> >m_ConvertorWellLog;
|
||||
Ui::ImportData *m_pImportDataUI;
|
||||
QString m_FilePath;
|
||||
bool m_ExistSameWellName;
|
||||
bool m_ExistSameWellRoundName;
|
||||
QString m_projectname;
|
||||
};
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
using namespace pai::graphics;
|
||||
#endif // IMPORTDATA_H
|
||||
|
|
|
|||
|
|
@ -1,187 +1,187 @@
|
|||
/**
|
||||
* @file InterIConvertor.h
|
||||
* @brief 格式解析器
|
||||
* @date 2014-10-10
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef PAI_FRAME_INTERICONVERTOR_H__
|
||||
#define PAI_FRAME_INTERICONVERTOR_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <vector>
|
||||
#include <QUuid>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include "CStringType.h"
|
||||
#include "IConvertor.h"
|
||||
#include "ConvertorExport.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
//#include "ObjWell.h"
|
||||
//#include "ObjWelllog.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "LogIO.h"
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
//曲线关键信息结构体
|
||||
struct WellCurve
|
||||
{
|
||||
int Curve_Num;
|
||||
float Curve_Step;
|
||||
float Curve_StartDepth;
|
||||
float Curver_EndDepth;
|
||||
int Curver_MaxDim;
|
||||
};
|
||||
|
||||
class CONVERTOR_EXPORT InterIConvertor:public IConvertor
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
InterIConvertor();
|
||||
|
||||
virtual ~InterIConvertor();
|
||||
|
||||
virtual bool Init();
|
||||
/**
|
||||
* @brief 文件是否支持这种格式
|
||||
* @param[in]filename 文件名
|
||||
* @return if true support filename else not
|
||||
*/
|
||||
virtual bool IsSupport(const QString &filename);
|
||||
virtual QVector<QString>GetSupportFileExtensions();
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据并初始化井和井次信息
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<CObjWellLog*> file contains all welllog curve
|
||||
*/
|
||||
|
||||
virtual QList<CObjWellLog*> GetWellLogList(const QString &filename);
|
||||
|
||||
/**
|
||||
* @brief 指定文件的解编出来的文件头内容
|
||||
* @param[in]filename 文件名
|
||||
* @return QString file content
|
||||
*/
|
||||
virtual QString GetFileContent( const QString &filename );
|
||||
/**
|
||||
*本接口是旧接口,请勿使用
|
||||
* @brief 读取文件基本信息和文件是否读取成功
|
||||
* @param[FileName]FileName 文件名
|
||||
* @param[Message]Message 文件头基本信息
|
||||
* @param[CurveName]CurveName 各个曲线名
|
||||
* @param[_Curve]_Curve 曲线结构体
|
||||
* @return int 读取曲线条数
|
||||
*/
|
||||
virtual int ScanLogFile(char *FileName,char *Message,char **CurveName,char **CurveUnit,QList<QString>&DimCurvesList){return 0;};
|
||||
|
||||
/**
|
||||
*本接口是旧接口,请勿使用
|
||||
* @brief 读取文件中曲线的属性值和深度值
|
||||
* @param[filename]filename 文件名
|
||||
* @param[Depth]Depth 井深度值
|
||||
* @param[Property]Property 曲线属性值
|
||||
* @param[vMutiDimensionProperty] 多维数据
|
||||
* @return bool 读取文件是否正确
|
||||
*/
|
||||
virtual bool Transfer(char *filename,float *&Depth,float **Property){return false;};
|
||||
/**
|
||||
* ScanDiskData 对待转换文件进行扫描,提取测井曲线元数据
|
||||
* @param FileName 待转换文件名
|
||||
* @param Message 转换中提示信息
|
||||
* @param CurveName 文件中所包含的曲线名
|
||||
* @param CurveUnit 文件中所包含的曲线单位
|
||||
* @return 返回曲线条数,如果文件格式无法识别,返回0或者-1
|
||||
*/
|
||||
virtual int ScanLogFile(char *FileName,char *Message,char **CurveName,char **CurveUnit){return 0;};
|
||||
/**
|
||||
* Tran 对文件中的测井曲线进行读取
|
||||
* @param vars 待转换文件名、x、y坐标、输出深度段 以\0分割
|
||||
* @param outfile 输出文件名
|
||||
* @param OutCurveNo 输出曲线号,-1标定该曲线不输出
|
||||
* @param OutCurve 输出曲线名
|
||||
* @param strChineseName 输出曲线别名
|
||||
* @param strUnit 输出曲线单位
|
||||
* @return 是否成功输出
|
||||
*/
|
||||
virtual bool Transfer(char *vars,char *outfile,int *OutCurveNo,char **OutCurve,char **strChineseName,char **strUnit,int dCurveNum){return false;};
|
||||
|
||||
vector<char *> &GetCurveNames()
|
||||
{
|
||||
return m_vCurverName;
|
||||
}
|
||||
|
||||
vector<char *> &GetCurveUnits()
|
||||
{
|
||||
return m_vCurverUnit;
|
||||
}
|
||||
|
||||
WellCurve & GetWellCurves()
|
||||
{
|
||||
return m_CurveData;
|
||||
}
|
||||
char * GetfileMessage()
|
||||
{
|
||||
return m_fileMessage;
|
||||
}
|
||||
public:
|
||||
QString m_TableName;
|
||||
WELL_DYNAMIC_INFO WellDynamicInfo;
|
||||
Slf_FILE_MESSAGE FILE_MESSAGE;
|
||||
WELL_STATIC_INFO WellStaticInfo;
|
||||
//private:
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的所有数据
|
||||
* @param[in]strWellLogPath curvefile path
|
||||
* @param[out]vWellLog file contains all wellog curves
|
||||
*/
|
||||
// void GetWellLogObjects( QList<CObjWellLog*> &vWellLog, QString strWellLogPath);
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据
|
||||
* @param[in]strWellLogPath curvefile path
|
||||
* @param[out]vWellLog file contains all wellog curves
|
||||
*/
|
||||
// void GetWellLogMetas( QList<CObjWellLog*> &vWellLog, QString strWellLogPath);
|
||||
/**
|
||||
* @brief 初始化井基本信息
|
||||
* @param[in]wellInfo
|
||||
* @param[in]filename
|
||||
*/
|
||||
void InitWellInfo(const QString &filename);
|
||||
|
||||
/**
|
||||
* @brief 初始化井次基本信息
|
||||
* @param[in]welllogRoundInfo
|
||||
*/
|
||||
void InitWelllogRoundInfo(QString FileName);
|
||||
|
||||
protected:
|
||||
|
||||
static QString GetfilePath(const char *FileName);
|
||||
vector<char *>m_vCurverName;
|
||||
vector<char *>m_vCurverUnit;//ww
|
||||
char *m_fileMessage;
|
||||
|
||||
WellCurve m_CurveData;
|
||||
|
||||
int m_DepthLength;
|
||||
|
||||
QList<CObjWellLog*>m_vWellLogCurve;
|
||||
|
||||
//多维曲线
|
||||
QList<QString>m_DimCurvesList;
|
||||
//多维曲线保存路径
|
||||
QString m_DimCurvefilePath;
|
||||
};
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
using namespace pai::graphics;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file InterIConvertor.h
|
||||
* @brief 格式解析器
|
||||
* @date 2014-10-10
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef PAI_FRAME_INTERICONVERTOR_H__
|
||||
#define PAI_FRAME_INTERICONVERTOR_H__
|
||||
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <vector>
|
||||
#include <QUuid>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include "CStringType.h"
|
||||
#include "IConvertor.h"
|
||||
#include "ConvertorExport.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
//#include "ObjWell.h"
|
||||
//#include "ObjWelllog.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "LogIO.h"
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
//曲线关键信息结构体
|
||||
struct WellCurve
|
||||
{
|
||||
int Curve_Num;
|
||||
float Curve_Step;
|
||||
float Curve_StartDepth;
|
||||
float Curver_EndDepth;
|
||||
int Curver_MaxDim;
|
||||
};
|
||||
|
||||
class CONVERTOR_EXPORT InterIConvertor:public IConvertor
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
InterIConvertor();
|
||||
|
||||
virtual ~InterIConvertor();
|
||||
|
||||
virtual bool Init();
|
||||
/**
|
||||
* @brief 文件是否支持这种格式
|
||||
* @param[in]filename 文件名
|
||||
* @return if true support filename else not
|
||||
*/
|
||||
virtual bool IsSupport(const QString &filename);
|
||||
virtual QVector<QString>GetSupportFileExtensions();
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据并初始化井和井次信息
|
||||
* @param[in]filename 文件名
|
||||
* @return QVector<CObjWellLog*> file contains all welllog curve
|
||||
*/
|
||||
|
||||
virtual QList<CObjWellLog*> GetWellLogList(const QString &filename);
|
||||
|
||||
/**
|
||||
* @brief 指定文件的解编出来的文件头内容
|
||||
* @param[in]filename 文件名
|
||||
* @return QString file content
|
||||
*/
|
||||
virtual QString GetFileContent( const QString &filename );
|
||||
/**
|
||||
*本接口是旧接口,请勿使用
|
||||
* @brief 读取文件基本信息和文件是否读取成功
|
||||
* @param[FileName]FileName 文件名
|
||||
* @param[Message]Message 文件头基本信息
|
||||
* @param[CurveName]CurveName 各个曲线名
|
||||
* @param[_Curve]_Curve 曲线结构体
|
||||
* @return int 读取曲线条数
|
||||
*/
|
||||
virtual int ScanLogFile(char *FileName,char *Message,char **CurveName,char **CurveUnit,QList<QString>&DimCurvesList){return 0;};
|
||||
|
||||
/**
|
||||
*本接口是旧接口,请勿使用
|
||||
* @brief 读取文件中曲线的属性值和深度值
|
||||
* @param[filename]filename 文件名
|
||||
* @param[Depth]Depth 井深度值
|
||||
* @param[Property]Property 曲线属性值
|
||||
* @param[vMutiDimensionProperty] 多维数据
|
||||
* @return bool 读取文件是否正确
|
||||
*/
|
||||
virtual bool Transfer(char *filename,float *&Depth,float **Property){return false;};
|
||||
/**
|
||||
* ScanDiskData 对待转换文件进行扫描,提取测井曲线元数据
|
||||
* @param FileName 待转换文件名
|
||||
* @param Message 转换中提示信息
|
||||
* @param CurveName 文件中所包含的曲线名
|
||||
* @param CurveUnit 文件中所包含的曲线单位
|
||||
* @return 返回曲线条数,如果文件格式无法识别,返回0或者-1
|
||||
*/
|
||||
virtual int ScanLogFile(char *FileName,char *Message,char **CurveName,char **CurveUnit){return 0;};
|
||||
/**
|
||||
* Tran 对文件中的测井曲线进行读取
|
||||
* @param vars 待转换文件名、x、y坐标、输出深度段 以\0分割
|
||||
* @param outfile 输出文件名
|
||||
* @param OutCurveNo 输出曲线号,-1标定该曲线不输出
|
||||
* @param OutCurve 输出曲线名
|
||||
* @param strChineseName 输出曲线别名
|
||||
* @param strUnit 输出曲线单位
|
||||
* @return 是否成功输出
|
||||
*/
|
||||
virtual bool Transfer(char *vars,char *outfile,int *OutCurveNo,char **OutCurve,char **strChineseName,char **strUnit,int dCurveNum){return false;};
|
||||
|
||||
vector<char *> &GetCurveNames()
|
||||
{
|
||||
return m_vCurverName;
|
||||
}
|
||||
|
||||
vector<char *> &GetCurveUnits()
|
||||
{
|
||||
return m_vCurverUnit;
|
||||
}
|
||||
|
||||
WellCurve & GetWellCurves()
|
||||
{
|
||||
return m_CurveData;
|
||||
}
|
||||
char * GetfileMessage()
|
||||
{
|
||||
return m_fileMessage;
|
||||
}
|
||||
public:
|
||||
QString m_TableName;
|
||||
WELL_DYNAMIC_INFO WellDynamicInfo;
|
||||
Slf_FILE_MESSAGE FILE_MESSAGE;
|
||||
WELL_STATIC_INFO WellStaticInfo;
|
||||
//private:
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的所有数据
|
||||
* @param[in]strWellLogPath curvefile path
|
||||
* @param[out]vWellLog file contains all wellog curves
|
||||
*/
|
||||
// void GetWellLogObjects( QList<CObjWellLog*> &vWellLog, QString strWellLogPath);
|
||||
|
||||
/**
|
||||
* @brief 指定文件的测井曲线的元数据
|
||||
* @param[in]strWellLogPath curvefile path
|
||||
* @param[out]vWellLog file contains all wellog curves
|
||||
*/
|
||||
// void GetWellLogMetas( QList<CObjWellLog*> &vWellLog, QString strWellLogPath);
|
||||
/**
|
||||
* @brief 初始化井基本信息
|
||||
* @param[in]wellInfo
|
||||
* @param[in]filename
|
||||
*/
|
||||
void InitWellInfo(const QString &filename);
|
||||
|
||||
/**
|
||||
* @brief 初始化井次基本信息
|
||||
* @param[in]welllogRoundInfo
|
||||
*/
|
||||
void InitWelllogRoundInfo(QString FileName);
|
||||
|
||||
protected:
|
||||
|
||||
static QString GetfilePath(const char *FileName);
|
||||
vector<char *>m_vCurverName;
|
||||
vector<char *>m_vCurverUnit;//ww
|
||||
char *m_fileMessage;
|
||||
|
||||
WellCurve m_CurveData;
|
||||
|
||||
int m_DepthLength;
|
||||
|
||||
QList<CObjWellLog*>m_vWellLogCurve;
|
||||
|
||||
//多维曲线
|
||||
QList<QString>m_DimCurvesList;
|
||||
//多维曲线保存路径
|
||||
QString m_DimCurvefilePath;
|
||||
};
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE
|
||||
using namespace pai::graphics;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,135 +1,135 @@
|
|||
/**
|
||||
* @file Interface.h
|
||||
* @brief convertor interface Qwidget
|
||||
* @date 2014-8-8
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef INTERFACE_H
|
||||
#define INTERFACE_H
|
||||
|
||||
#pragma warning( push ,0)
|
||||
#include <QListWidget>
|
||||
#include <QTableWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
#include <QWidget>
|
||||
#include <QDateEdit>
|
||||
#include "IConvertor.h"
|
||||
#include <QSpinBox>
|
||||
#pragma warning( pop )
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Interface;
|
||||
}
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
class InterfaceWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
friend class ImportDataDialog;
|
||||
InterfaceWidget(QWidget *parent = 0);
|
||||
|
||||
~InterfaceWidget();
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 返回数据选择区UI
|
||||
*/
|
||||
|
||||
QTableWidget*GetDataSelectAreaWidget();
|
||||
|
||||
/**
|
||||
* @brief 返回LOG曲线基本信息UI
|
||||
*/
|
||||
|
||||
//QTabWidget*GetLogInformation();
|
||||
/**
|
||||
* @brief 返回数据预览区UI
|
||||
*/
|
||||
QTextEdit *GetDataPreviewArea();
|
||||
|
||||
/**
|
||||
* @brief 返回确定按钮UI
|
||||
*/
|
||||
|
||||
QPushButton*GetOK();
|
||||
|
||||
/**
|
||||
* @brief 返回取消按钮UI
|
||||
*/
|
||||
QPushButton *GetCancel();
|
||||
|
||||
//井信息
|
||||
QLineEdit * GetWellNameLineEdit();
|
||||
QLineEdit * GetWellCompanyNameLineEdit();
|
||||
QLineEdit * GetWellAreaNameLineEdit();
|
||||
QLineEdit * GetWellCodeLineEdit();
|
||||
QLineEdit * GetXCodeLineEdit();
|
||||
QLineEdit * GetYCodeLineEdit();
|
||||
QComboBox * GetWellTypeComboBox();
|
||||
QLineEdit * GetAslLineEdit();
|
||||
QLineEdit * GetBslLineEdit();
|
||||
QDateEdit * GerSDrillDateEdit();
|
||||
QDateEdit * GerEDrillDateEdit();
|
||||
QDateEdit * GerCompleteDateEdit();
|
||||
QLineEdit * GetCWMethodLineEdit();
|
||||
QLineEdit * GetBit1ProgLineEdit();
|
||||
QLineEdit * GetBit2ProgLineEdit();
|
||||
QLineEdit * GetBit3ProgLineEdit();
|
||||
QLineEdit * GetBit4ProgLineEdit();
|
||||
QLineEdit * GetBit5ProgLineEdit();
|
||||
QLineEdit * GetCas1ProgLineEdit();
|
||||
QLineEdit * GetCas2ProgLineEdit();
|
||||
QLineEdit * GetCas3ProgLineEdit();
|
||||
QLineEdit * GetCas4ProgLineEdit();
|
||||
QLineEdit * GetCas5ProgLineEdit();
|
||||
QLineEdit * GetCas1ShotLineEdit();
|
||||
QLineEdit * GetCas2ShotLineEdit();
|
||||
QLineEdit * GetSC1SDepLineEdit();
|
||||
QLineEdit * GetSC1EDepLineEdit();
|
||||
QLineEdit * GetSC2SDepLineEdit();
|
||||
QLineEdit * GetSC2EDepLineEdit();
|
||||
|
||||
//井次信息
|
||||
QLineEdit * GetCompanyNameLineEdit();
|
||||
QLineEdit * GetTeamLineEdit();
|
||||
QLineEdit * GetOperatorLineEdit();
|
||||
QDateEdit * GerDateEdit();
|
||||
QComboBox * GetSerialComboBox();
|
||||
QComboBox * GetItemComboBox();
|
||||
QLineEdit * GetProfileLineEdit();
|
||||
QComboBox *GetMudTypeComboBox();
|
||||
QLineEdit * GetMudViscosityLineEdit();
|
||||
QLineEdit * GetWaterLossLineEdit();
|
||||
QLineEdit * GetDensityLineEdit();
|
||||
QLineEdit * GetResiLineEdit();
|
||||
QLineEdit * GetTempLineEdit();
|
||||
QLineEdit * GetINTLogLineEdit();
|
||||
QLineEdit * GetTempBotLineEdit();
|
||||
QLineEdit * GetNITINTLineEdit();
|
||||
QLineEdit * GetIntProgLineEdit();
|
||||
QLineEdit * GetInteDressLineEdit();
|
||||
QLineEdit * GetAuditLineEdit();
|
||||
QTextEdit * GetRemarkTextEdit();
|
||||
QLineEdit * GetWellRoundNameLineEdit();
|
||||
QLineEdit * GetEditBottomDepth();
|
||||
QLineEdit * GetEditTopDepth();
|
||||
QLineEdit * GetEditFileSDepth();
|
||||
QLineEdit * GetEditFileEDepth();
|
||||
|
||||
IConvertor* m_pConvertor;
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
private:
|
||||
|
||||
Ui::Interface *m_pInterfaceUI;
|
||||
};
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
using namespace pai::graphics;
|
||||
|
||||
#endif // INTERFACE_H
|
||||
/**
|
||||
* @file Interface.h
|
||||
* @brief convertor interface Qwidget
|
||||
* @date 2014-8-8
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
#ifndef INTERFACE_H
|
||||
#define INTERFACE_H
|
||||
|
||||
#pragma warning( push ,0)
|
||||
#include <QListWidget>
|
||||
#include <QTableWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
#include <QWidget>
|
||||
#include <QDateEdit>
|
||||
#include "IConvertor.h"
|
||||
#include <QSpinBox>
|
||||
#pragma warning( pop )
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Interface;
|
||||
}
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
class InterfaceWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
friend class ImportDataDialog;
|
||||
InterfaceWidget(QWidget *parent = 0);
|
||||
|
||||
~InterfaceWidget();
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 返回数据选择区UI
|
||||
*/
|
||||
|
||||
QTableWidget*GetDataSelectAreaWidget();
|
||||
|
||||
/**
|
||||
* @brief 返回LOG曲线基本信息UI
|
||||
*/
|
||||
|
||||
//QTabWidget*GetLogInformation();
|
||||
/**
|
||||
* @brief 返回数据预览区UI
|
||||
*/
|
||||
QTextEdit *GetDataPreviewArea();
|
||||
|
||||
/**
|
||||
* @brief 返回确定按钮UI
|
||||
*/
|
||||
|
||||
QPushButton*GetOK();
|
||||
|
||||
/**
|
||||
* @brief 返回取消按钮UI
|
||||
*/
|
||||
QPushButton *GetCancel();
|
||||
|
||||
//井信息
|
||||
QLineEdit * GetWellNameLineEdit();
|
||||
QLineEdit * GetWellCompanyNameLineEdit();
|
||||
QLineEdit * GetWellAreaNameLineEdit();
|
||||
QLineEdit * GetWellCodeLineEdit();
|
||||
QLineEdit * GetXCodeLineEdit();
|
||||
QLineEdit * GetYCodeLineEdit();
|
||||
QComboBox * GetWellTypeComboBox();
|
||||
QLineEdit * GetAslLineEdit();
|
||||
QLineEdit * GetBslLineEdit();
|
||||
QDateEdit * GerSDrillDateEdit();
|
||||
QDateEdit * GerEDrillDateEdit();
|
||||
QDateEdit * GerCompleteDateEdit();
|
||||
QLineEdit * GetCWMethodLineEdit();
|
||||
QLineEdit * GetBit1ProgLineEdit();
|
||||
QLineEdit * GetBit2ProgLineEdit();
|
||||
QLineEdit * GetBit3ProgLineEdit();
|
||||
QLineEdit * GetBit4ProgLineEdit();
|
||||
QLineEdit * GetBit5ProgLineEdit();
|
||||
QLineEdit * GetCas1ProgLineEdit();
|
||||
QLineEdit * GetCas2ProgLineEdit();
|
||||
QLineEdit * GetCas3ProgLineEdit();
|
||||
QLineEdit * GetCas4ProgLineEdit();
|
||||
QLineEdit * GetCas5ProgLineEdit();
|
||||
QLineEdit * GetCas1ShotLineEdit();
|
||||
QLineEdit * GetCas2ShotLineEdit();
|
||||
QLineEdit * GetSC1SDepLineEdit();
|
||||
QLineEdit * GetSC1EDepLineEdit();
|
||||
QLineEdit * GetSC2SDepLineEdit();
|
||||
QLineEdit * GetSC2EDepLineEdit();
|
||||
|
||||
//井次信息
|
||||
QLineEdit * GetCompanyNameLineEdit();
|
||||
QLineEdit * GetTeamLineEdit();
|
||||
QLineEdit * GetOperatorLineEdit();
|
||||
QDateEdit * GerDateEdit();
|
||||
QComboBox * GetSerialComboBox();
|
||||
QComboBox * GetItemComboBox();
|
||||
QLineEdit * GetProfileLineEdit();
|
||||
QComboBox *GetMudTypeComboBox();
|
||||
QLineEdit * GetMudViscosityLineEdit();
|
||||
QLineEdit * GetWaterLossLineEdit();
|
||||
QLineEdit * GetDensityLineEdit();
|
||||
QLineEdit * GetResiLineEdit();
|
||||
QLineEdit * GetTempLineEdit();
|
||||
QLineEdit * GetINTLogLineEdit();
|
||||
QLineEdit * GetTempBotLineEdit();
|
||||
QLineEdit * GetNITINTLineEdit();
|
||||
QLineEdit * GetIntProgLineEdit();
|
||||
QLineEdit * GetInteDressLineEdit();
|
||||
QLineEdit * GetAuditLineEdit();
|
||||
QTextEdit * GetRemarkTextEdit();
|
||||
QLineEdit * GetWellRoundNameLineEdit();
|
||||
QLineEdit * GetEditBottomDepth();
|
||||
QLineEdit * GetEditTopDepth();
|
||||
QLineEdit * GetEditFileSDepth();
|
||||
QLineEdit * GetEditFileEDepth();
|
||||
|
||||
IConvertor* m_pConvertor;
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
private:
|
||||
|
||||
Ui::Interface *m_pInterfaceUI;
|
||||
};
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
using namespace pai::graphics;
|
||||
|
||||
#endif // INTERFACE_H
|
||||
|
|
|
|||
|
|
@ -1,77 +1,77 @@
|
|||
#pragma once
|
||||
#include "MemRdWt.h"
|
||||
//#include "BaseFun.h"
|
||||
#include "geometryutils.h"
|
||||
#include "ConvertorExport.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QTextStream>
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
//#include <QMap>
|
||||
/*struct INFORMATION
|
||||
{
|
||||
char Name[80];
|
||||
int index;
|
||||
};*/
|
||||
//whp add 2020.7.10 for 数据表自动匹配和转换
|
||||
/*struct DEFAULTTABLE
|
||||
{
|
||||
QString TableName;
|
||||
int ZdNum;
|
||||
Slf_TABLE_FIELD *tinfo;
|
||||
};*/
|
||||
struct DEFAULTTABLE
|
||||
{
|
||||
public:
|
||||
QString TableName;
|
||||
QString TableAliasName;
|
||||
int ZdNum;
|
||||
Slf_OBJECT_FIELD tinfo[50];//*tinfo;
|
||||
QString menuinfo[50];
|
||||
QString toName[50];
|
||||
};
|
||||
//whp add 2020.7.10 for 数据表自动匹配和转换
|
||||
struct ZdInf
|
||||
{
|
||||
QString OutZd,InZd,ZdType,ZdLen,ZdAlias;
|
||||
};
|
||||
struct TRANTABLEINF
|
||||
{
|
||||
QString OutName,InName,AliasName;
|
||||
int ZdNum;
|
||||
ZdInf *tinfo;
|
||||
//输入字段名列表,如果没有字段运算,应该就是tinfo.InZd集合
|
||||
//如果有字段运算(如BTMDEP-THICK,EDEP-SDEP),则需要提取字段名,集合到InNameList中
|
||||
QStringList InNameList;
|
||||
};
|
||||
struct OUTINF
|
||||
{
|
||||
char OutName[64];//slf字段名
|
||||
int CodeType,CodeLen,Pos;
|
||||
int CodeType2,CodeLen2,Pos2;
|
||||
char InName1[64],InName2[64];//wis字段名
|
||||
QString Sep;
|
||||
};
|
||||
class CONVERTOR_EXPORT WisTableTran
|
||||
{
|
||||
public:
|
||||
WisTableTran();
|
||||
~WisTableTran();
|
||||
int m_TranNum;//用户定义的需要匹配和转换的表数
|
||||
TRANTABLEINF *m_TTI;//m_TranTableInf;//用户定义的需要匹配和转换的表信息
|
||||
DEFAULTTABLE *WisDefTable;
|
||||
DEFAULTTABLE *SlfDefTable;
|
||||
void GetTTI(TRANTABLEINF &m_TTI,QStringList temp);
|
||||
DEFAULTTABLE SetTableInf(QString TableName,QString TableHzName,int num,QStringList ZdName,QStringList HzName,QStringList ZdUnit,QStringList ZdType,QStringList ZdLen,QStringList ZdRes,QString*);
|
||||
bool GetTranTableInf();
|
||||
bool HaveTranTable(QString wistype="");//QStringList TableList);
|
||||
int GetTranTableNo(QString TableName,int fieldNum,Slf_TABLE_FIELD* tableFieldInfo,bool IsS2W);
|
||||
OUTINF *outinf;
|
||||
void GetOutInf(int TranTable);
|
||||
bool ReadDefTable(DEFAULTTABLE *&table,QString table_inf);
|
||||
//void InitDefauleTable(QString fileName,DEFAULTTABLE *DefauleTable);
|
||||
void InitDefauleTable(bool isWis);
|
||||
};
|
||||
#pragma once
|
||||
#include "MemRdWt.h"
|
||||
//#include "BaseFun.h"
|
||||
#include "geometryutils.h"
|
||||
#include "ConvertorExport.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QTextStream>
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
//#include <QMap>
|
||||
/*struct INFORMATION
|
||||
{
|
||||
char Name[80];
|
||||
int index;
|
||||
};*/
|
||||
//whp add 2020.7.10 for 数据表自动匹配和转换
|
||||
/*struct DEFAULTTABLE
|
||||
{
|
||||
QString TableName;
|
||||
int ZdNum;
|
||||
Slf_TABLE_FIELD *tinfo;
|
||||
};*/
|
||||
struct DEFAULTTABLE
|
||||
{
|
||||
public:
|
||||
QString TableName;
|
||||
QString TableAliasName;
|
||||
int ZdNum;
|
||||
Slf_OBJECT_FIELD tinfo[50];//*tinfo;
|
||||
QString menuinfo[50];
|
||||
QString toName[50];
|
||||
};
|
||||
//whp add 2020.7.10 for 数据表自动匹配和转换
|
||||
struct ZdInf
|
||||
{
|
||||
QString OutZd,InZd,ZdType,ZdLen,ZdAlias;
|
||||
};
|
||||
struct TRANTABLEINF
|
||||
{
|
||||
QString OutName,InName,AliasName;
|
||||
int ZdNum;
|
||||
ZdInf *tinfo;
|
||||
//输入字段名列表,如果没有字段运算,应该就是tinfo.InZd集合
|
||||
//如果有字段运算(如BTMDEP-THICK,EDEP-SDEP),则需要提取字段名,集合到InNameList中
|
||||
QStringList InNameList;
|
||||
};
|
||||
struct OUTINF
|
||||
{
|
||||
char OutName[64];//slf字段名
|
||||
int CodeType,CodeLen,Pos;
|
||||
int CodeType2,CodeLen2,Pos2;
|
||||
char InName1[64],InName2[64];//wis字段名
|
||||
QString Sep;
|
||||
};
|
||||
class CONVERTOR_EXPORT WisTableTran
|
||||
{
|
||||
public:
|
||||
WisTableTran();
|
||||
~WisTableTran();
|
||||
int m_TranNum;//用户定义的需要匹配和转换的表数
|
||||
TRANTABLEINF *m_TTI;//m_TranTableInf;//用户定义的需要匹配和转换的表信息
|
||||
DEFAULTTABLE *WisDefTable;
|
||||
DEFAULTTABLE *SlfDefTable;
|
||||
void GetTTI(TRANTABLEINF &m_TTI,QStringList temp);
|
||||
DEFAULTTABLE SetTableInf(QString TableName,QString TableHzName,int num,QStringList ZdName,QStringList HzName,QStringList ZdUnit,QStringList ZdType,QStringList ZdLen,QStringList ZdRes,QString*);
|
||||
bool GetTranTableInf();
|
||||
bool HaveTranTable(QString wistype="");//QStringList TableList);
|
||||
int GetTranTableNo(QString TableName,int fieldNum,Slf_TABLE_FIELD* tableFieldInfo,bool IsS2W);
|
||||
OUTINF *outinf;
|
||||
void GetOutInf(int TranTable);
|
||||
bool ReadDefTable(DEFAULTTABLE *&table,QString table_inf);
|
||||
//void InitDefauleTable(QString fileName,DEFAULTTABLE *DefauleTable);
|
||||
void InitDefauleTable(bool isWis);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,326 +1,326 @@
|
|||
#include "CStringType.h"
|
||||
#include <QLabel>
|
||||
char *m_temp=NULL;
|
||||
CString::CString(const char *str)
|
||||
{
|
||||
m_temp=NULL;
|
||||
if(str==NULL)
|
||||
m_data ="";
|
||||
else
|
||||
m_data=QString::fromLocal8Bit(str);
|
||||
}
|
||||
CString::CString(const QString str)
|
||||
{
|
||||
m_temp=NULL;
|
||||
if(str==NULL)
|
||||
m_data ="";
|
||||
else
|
||||
m_data=str;
|
||||
}
|
||||
|
||||
CString::~CString()
|
||||
{
|
||||
if(m_temp) delete m_temp;
|
||||
m_temp=NULL;
|
||||
};
|
||||
void CString::Empty()
|
||||
{
|
||||
m_data ="";
|
||||
}
|
||||
|
||||
CString::CString(const CString &other)
|
||||
{
|
||||
m_temp=NULL;
|
||||
m_data=other.m_data;
|
||||
}
|
||||
int CString::GetLength()const
|
||||
{
|
||||
return m_data.length();
|
||||
}
|
||||
int CString::Find(char *str)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
return dataStr.find(str);
|
||||
}
|
||||
int CString::Find(CString &another)
|
||||
{
|
||||
return m_data.toStdString().find(another.m_data.toStdString());
|
||||
}
|
||||
int CString::Find(char str)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
return dataStr.find(str);
|
||||
}
|
||||
/*
|
||||
|
||||
*/
|
||||
int CString::Find(char str[],int start)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
int npos=dataStr.find(str);
|
||||
if(npos==-1)
|
||||
return -1;
|
||||
if(npos<start)
|
||||
return -1;
|
||||
return dataStr.find(str);
|
||||
}
|
||||
int CString::ReverseFind(char ch)
|
||||
{
|
||||
int index=m_data.lastIndexOf(ch);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
int CString::Insert(int pos ,const CString Sctr)
|
||||
{
|
||||
m_data.insert(pos,Sctr.m_data);
|
||||
return m_data.length();
|
||||
}
|
||||
|
||||
int CString::Replace(const char *Src,const char *Dest)
|
||||
{
|
||||
int length=((std::string)Src).length();
|
||||
QString srcStr=QString::fromLocal8Bit(Src);
|
||||
QString destStr=QString::fromLocal8Bit(Dest);
|
||||
m_data.replace(srcStr,destStr);
|
||||
return length;
|
||||
}
|
||||
void CString::Delete(int fromIndex,int length)
|
||||
{
|
||||
m_data=m_data.remove(fromIndex,length);
|
||||
}
|
||||
CString & CString::TrimLeft()
|
||||
{
|
||||
std::string findStr=" ";
|
||||
std::string tempstr=m_data.toStdString();
|
||||
QString temp=m_data;
|
||||
vector<char>StrVector;
|
||||
int left=0;
|
||||
for (int i=0;i<tempstr.length();i++)
|
||||
{
|
||||
if(tempstr.at(i)==findStr.at(0)) {
|
||||
left++;
|
||||
continue;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
m_data=temp.mid(left);
|
||||
return *this;
|
||||
}
|
||||
CString & CString::MakeUpper()
|
||||
{
|
||||
m_data=m_data.toUpper();
|
||||
return *this;
|
||||
}
|
||||
CString& CString::MakeLower()
|
||||
{
|
||||
m_data=m_data.toLower();
|
||||
return *this;
|
||||
}
|
||||
CString & CString::TrimRight()
|
||||
{
|
||||
std::string findStr=" ";
|
||||
std::string tempstr=m_data.toStdString();
|
||||
QString temp=m_data;
|
||||
int flag=0;
|
||||
for (int i=tempstr.length()-1;i>-1;i--)
|
||||
{
|
||||
if(tempstr[i]==findStr.at(0)) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
flag=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_data=temp.left(flag+1);
|
||||
return *this;
|
||||
}
|
||||
bool CString::operator==(const char* other )
|
||||
{
|
||||
QString srcStr=QString::fromLocal8Bit(other);
|
||||
if(this->m_data==srcStr)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool CString::operator!=(const char* other )
|
||||
{
|
||||
QString srcStr=QString::fromLocal8Bit(other);
|
||||
if(this->m_data!=srcStr)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
char CString::operator[](int i)
|
||||
{
|
||||
char ch=GetChar(i);
|
||||
return ch;
|
||||
}
|
||||
CString CString::Right(int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
if (count>m_data.length())
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
int length=m_data.length();
|
||||
QString temp=m_data;
|
||||
QString lastdata=temp.remove(0,length-count);
|
||||
CString RightStr(lastdata);
|
||||
return RightStr;
|
||||
}
|
||||
CString CString::Mid(int pos,int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
QString temp=m_data.mid(pos,count);
|
||||
CString mstr(temp);
|
||||
return mstr;
|
||||
}
|
||||
CString CString::Mid(int pos)const
|
||||
{
|
||||
QString temp=m_data.mid(pos);
|
||||
CString mstr(temp);
|
||||
return mstr;
|
||||
}
|
||||
|
||||
CString CString::Left(int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
if (count>m_data.length())
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
int length=m_data.length();
|
||||
QString temp=m_data;
|
||||
QString lastdata=temp.remove(count,length-count);
|
||||
CString leftStr(lastdata);
|
||||
return leftStr;
|
||||
}
|
||||
|
||||
CString CString::operator + (const CString& SrcStr)
|
||||
{
|
||||
CString str;
|
||||
str.m_data=m_data+SrcStr.m_data;
|
||||
return str;
|
||||
}
|
||||
/*
|
||||
CString CString::operator = (const QString& SrcStr)
|
||||
{
|
||||
CString str;
|
||||
str.m_data=SrcStr;
|
||||
return str;
|
||||
}
|
||||
*/
|
||||
CString CString::operator += (CString& SrcStr)
|
||||
{
|
||||
m_data = m_data+SrcStr.m_data ;
|
||||
return *this;
|
||||
}
|
||||
CString CString::operator += (const CString& SrcStr)
|
||||
{
|
||||
m_data = m_data+SrcStr.m_data ;
|
||||
return *this;
|
||||
}
|
||||
bool CString::operator!=(const CString& other )
|
||||
{
|
||||
return m_data!=other.m_data;
|
||||
}
|
||||
bool CString::operator==(const CString& other )
|
||||
{
|
||||
return m_data==other.m_data;
|
||||
}
|
||||
|
||||
void CString::Alloc(int len)
|
||||
{
|
||||
}
|
||||
char* CString::GetString() const
|
||||
{
|
||||
int length=((string)(m_data.toLocal8Bit().data())).length();
|
||||
if(m_temp) delete m_temp;
|
||||
m_temp=new char[length+1];
|
||||
// Alloc(length);
|
||||
strcpy(m_temp,m_data.toLocal8Bit().data());
|
||||
return m_temp;
|
||||
}
|
||||
char CString::GetChar(int n)
|
||||
{
|
||||
return GetString()[n];
|
||||
}
|
||||
char CString::GetAt(int n)
|
||||
{
|
||||
return GetChar(n);
|
||||
}
|
||||
|
||||
void CString::Format(const char *format,...)
|
||||
{
|
||||
//char *str=GetString();
|
||||
va_list args;
|
||||
va_start(args,format);
|
||||
m_data.vsprintf(format,args);
|
||||
char *buf=new char[2*strlen(m_data.toStdString().c_str())+1];
|
||||
vsprintf(buf,format,args);
|
||||
m_data=buf;
|
||||
delete buf;
|
||||
va_end(args);
|
||||
}
|
||||
//void ShowMessage(QString mess)
|
||||
//{
|
||||
// QDialog dialog(NULL);
|
||||
// dialog.setModal(false);
|
||||
// Qt::WindowFlags flags = dialog.windowFlags();
|
||||
// flags |= Qt::WindowStaysOnTopHint;
|
||||
// flags &= ~Qt::WindowContextHelpButtonHint;
|
||||
// dialog.setWindowFlags(flags);
|
||||
// dialog.setWindowTitle("提示");
|
||||
// QFormLayout form(&dialog);
|
||||
// QLabel edit(&dialog);
|
||||
// form.addRow(&edit);
|
||||
// edit.setText(mess);
|
||||
//// QDialogButtonBox buttonBox(QDialogButtonBox::Yes,Qt::Horizontal, &dialog);
|
||||
//// form.addRow(&buttonBox);
|
||||
//// if(buttonBox.button(QDialogButtonBox::Yes)) buttonBox.button(QDialogButtonBox::Yes)->setText("退出");
|
||||
//// QObject::connect(buttonBox.button(QDialogButtonBox::Yes), SIGNAL(clicked()), NULL, SLOT(reject()));
|
||||
// dialog.show();
|
||||
// dialog.exec();
|
||||
//}
|
||||
//int AfxMessageBox(CString str)
|
||||
//{
|
||||
// QDialog dialog(NULL);
|
||||
// dialog.setModal(false);
|
||||
// Qt::WindowFlags flags = dialog.windowFlags();
|
||||
// flags |= Qt::WindowStaysOnTopHint;
|
||||
// flags &= ~Qt::WindowContextHelpButtonHint;
|
||||
// dialog.setWindowFlags(flags);
|
||||
// dialog.setWindowTitle("提示");
|
||||
// QFormLayout form(&dialog);
|
||||
// form.addWidget(new QLabel(str.GetString()));
|
||||
//// dialog.show();
|
||||
// if (dialog.exec() == QDialog::Accepted) {
|
||||
// // Do something here
|
||||
// }
|
||||
//// return MessageBox(NULL,"提示",str.GetString(),NULL );
|
||||
//// QString cstr=str.GetString();
|
||||
//// QMessageBox msgBox;
|
||||
//// msgBox.setText(cstr);
|
||||
//// return msgBox.exec();
|
||||
// return 1;
|
||||
//}
|
||||
|
||||
//int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType)
|
||||
//{
|
||||
// if (!parent)
|
||||
// {
|
||||
// char *tempName=lpCaption;
|
||||
// QString addStr=QString::fromLocal8Bit(tempName);
|
||||
// return QMessageBox::information(NULL,lpText,addStr,QMessageBox::Ok);
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
#include "CStringType.h"
|
||||
#include <QLabel>
|
||||
char *m_temp=NULL;
|
||||
CString::CString(const char *str)
|
||||
{
|
||||
m_temp=NULL;
|
||||
if(str==NULL)
|
||||
m_data ="";
|
||||
else
|
||||
m_data=QString::fromLocal8Bit(str);
|
||||
}
|
||||
CString::CString(const QString str)
|
||||
{
|
||||
m_temp=NULL;
|
||||
if(str==NULL)
|
||||
m_data ="";
|
||||
else
|
||||
m_data=str;
|
||||
}
|
||||
|
||||
CString::~CString()
|
||||
{
|
||||
if(m_temp) delete m_temp;
|
||||
m_temp=NULL;
|
||||
};
|
||||
void CString::Empty()
|
||||
{
|
||||
m_data ="";
|
||||
}
|
||||
|
||||
CString::CString(const CString &other)
|
||||
{
|
||||
m_temp=NULL;
|
||||
m_data=other.m_data;
|
||||
}
|
||||
int CString::GetLength()const
|
||||
{
|
||||
return m_data.length();
|
||||
}
|
||||
int CString::Find(char *str)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
return dataStr.find(str);
|
||||
}
|
||||
int CString::Find(CString &another)
|
||||
{
|
||||
return m_data.toStdString().find(another.m_data.toStdString());
|
||||
}
|
||||
int CString::Find(char str)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
return dataStr.find(str);
|
||||
}
|
||||
/*
|
||||
|
||||
*/
|
||||
int CString::Find(char str[],int start)
|
||||
{
|
||||
std::string dataStr=m_data.toStdString();
|
||||
int npos=dataStr.find(str);
|
||||
if(npos==-1)
|
||||
return -1;
|
||||
if(npos<start)
|
||||
return -1;
|
||||
return dataStr.find(str);
|
||||
}
|
||||
int CString::ReverseFind(char ch)
|
||||
{
|
||||
int index=m_data.lastIndexOf(ch);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
int CString::Insert(int pos ,const CString Sctr)
|
||||
{
|
||||
m_data.insert(pos,Sctr.m_data);
|
||||
return m_data.length();
|
||||
}
|
||||
|
||||
int CString::Replace(const char *Src,const char *Dest)
|
||||
{
|
||||
int length=((std::string)Src).length();
|
||||
QString srcStr=QString::fromLocal8Bit(Src);
|
||||
QString destStr=QString::fromLocal8Bit(Dest);
|
||||
m_data.replace(srcStr,destStr);
|
||||
return length;
|
||||
}
|
||||
void CString::Delete(int fromIndex,int length)
|
||||
{
|
||||
m_data=m_data.remove(fromIndex,length);
|
||||
}
|
||||
CString & CString::TrimLeft()
|
||||
{
|
||||
std::string findStr=" ";
|
||||
std::string tempstr=m_data.toStdString();
|
||||
QString temp=m_data;
|
||||
vector<char>StrVector;
|
||||
int left=0;
|
||||
for (int i=0;i<tempstr.length();i++)
|
||||
{
|
||||
if(tempstr.at(i)==findStr.at(0)) {
|
||||
left++;
|
||||
continue;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
m_data=temp.mid(left);
|
||||
return *this;
|
||||
}
|
||||
CString & CString::MakeUpper()
|
||||
{
|
||||
m_data=m_data.toUpper();
|
||||
return *this;
|
||||
}
|
||||
CString& CString::MakeLower()
|
||||
{
|
||||
m_data=m_data.toLower();
|
||||
return *this;
|
||||
}
|
||||
CString & CString::TrimRight()
|
||||
{
|
||||
std::string findStr=" ";
|
||||
std::string tempstr=m_data.toStdString();
|
||||
QString temp=m_data;
|
||||
int flag=0;
|
||||
for (int i=tempstr.length()-1;i>-1;i--)
|
||||
{
|
||||
if(tempstr[i]==findStr.at(0)) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
flag=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_data=temp.left(flag+1);
|
||||
return *this;
|
||||
}
|
||||
bool CString::operator==(const char* other )
|
||||
{
|
||||
QString srcStr=QString::fromLocal8Bit(other);
|
||||
if(this->m_data==srcStr)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool CString::operator!=(const char* other )
|
||||
{
|
||||
QString srcStr=QString::fromLocal8Bit(other);
|
||||
if(this->m_data!=srcStr)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
char CString::operator[](int i)
|
||||
{
|
||||
char ch=GetChar(i);
|
||||
return ch;
|
||||
}
|
||||
CString CString::Right(int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
if (count>m_data.length())
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
int length=m_data.length();
|
||||
QString temp=m_data;
|
||||
QString lastdata=temp.remove(0,length-count);
|
||||
CString RightStr(lastdata);
|
||||
return RightStr;
|
||||
}
|
||||
CString CString::Mid(int pos,int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
QString temp=m_data.mid(pos,count);
|
||||
CString mstr(temp);
|
||||
return mstr;
|
||||
}
|
||||
CString CString::Mid(int pos)const
|
||||
{
|
||||
QString temp=m_data.mid(pos);
|
||||
CString mstr(temp);
|
||||
return mstr;
|
||||
}
|
||||
|
||||
CString CString::Left(int count)const
|
||||
{
|
||||
if (count<0)
|
||||
{
|
||||
count=0;
|
||||
}
|
||||
if (count>m_data.length())
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
int length=m_data.length();
|
||||
QString temp=m_data;
|
||||
QString lastdata=temp.remove(count,length-count);
|
||||
CString leftStr(lastdata);
|
||||
return leftStr;
|
||||
}
|
||||
|
||||
CString CString::operator + (const CString& SrcStr)
|
||||
{
|
||||
CString str;
|
||||
str.m_data=m_data+SrcStr.m_data;
|
||||
return str;
|
||||
}
|
||||
/*
|
||||
CString CString::operator = (const QString& SrcStr)
|
||||
{
|
||||
CString str;
|
||||
str.m_data=SrcStr;
|
||||
return str;
|
||||
}
|
||||
*/
|
||||
CString CString::operator += (CString& SrcStr)
|
||||
{
|
||||
m_data = m_data+SrcStr.m_data ;
|
||||
return *this;
|
||||
}
|
||||
CString CString::operator += (const CString& SrcStr)
|
||||
{
|
||||
m_data = m_data+SrcStr.m_data ;
|
||||
return *this;
|
||||
}
|
||||
bool CString::operator!=(const CString& other )
|
||||
{
|
||||
return m_data!=other.m_data;
|
||||
}
|
||||
bool CString::operator==(const CString& other )
|
||||
{
|
||||
return m_data==other.m_data;
|
||||
}
|
||||
|
||||
void CString::Alloc(int len)
|
||||
{
|
||||
}
|
||||
char* CString::GetString() const
|
||||
{
|
||||
int length=((string)(m_data.toLocal8Bit().data())).length();
|
||||
if(m_temp) delete m_temp;
|
||||
m_temp=new char[length+1];
|
||||
// Alloc(length);
|
||||
strcpy(m_temp,m_data.toLocal8Bit().data());
|
||||
return m_temp;
|
||||
}
|
||||
char CString::GetChar(int n)
|
||||
{
|
||||
return GetString()[n];
|
||||
}
|
||||
char CString::GetAt(int n)
|
||||
{
|
||||
return GetChar(n);
|
||||
}
|
||||
|
||||
void CString::Format(const char *format,...)
|
||||
{
|
||||
//char *str=GetString();
|
||||
va_list args;
|
||||
va_start(args,format);
|
||||
m_data.vsprintf(format,args);
|
||||
char *buf=new char[2*strlen(m_data.toStdString().c_str())+1];
|
||||
vsprintf(buf,format,args);
|
||||
m_data=buf;
|
||||
delete buf;
|
||||
va_end(args);
|
||||
}
|
||||
//void ShowMessage(QString mess)
|
||||
//{
|
||||
// QDialog dialog(NULL);
|
||||
// dialog.setModal(false);
|
||||
// Qt::WindowFlags flags = dialog.windowFlags();
|
||||
// flags |= Qt::WindowStaysOnTopHint;
|
||||
// flags &= ~Qt::WindowContextHelpButtonHint;
|
||||
// dialog.setWindowFlags(flags);
|
||||
// dialog.setWindowTitle("提示");
|
||||
// QFormLayout form(&dialog);
|
||||
// QLabel edit(&dialog);
|
||||
// form.addRow(&edit);
|
||||
// edit.setText(mess);
|
||||
//// QDialogButtonBox buttonBox(QDialogButtonBox::Yes,Qt::Horizontal, &dialog);
|
||||
//// form.addRow(&buttonBox);
|
||||
//// if(buttonBox.button(QDialogButtonBox::Yes)) buttonBox.button(QDialogButtonBox::Yes)->setText("退出");
|
||||
//// QObject::connect(buttonBox.button(QDialogButtonBox::Yes), SIGNAL(clicked()), NULL, SLOT(reject()));
|
||||
// dialog.show();
|
||||
// dialog.exec();
|
||||
//}
|
||||
//int AfxMessageBox(CString str)
|
||||
//{
|
||||
// QDialog dialog(NULL);
|
||||
// dialog.setModal(false);
|
||||
// Qt::WindowFlags flags = dialog.windowFlags();
|
||||
// flags |= Qt::WindowStaysOnTopHint;
|
||||
// flags &= ~Qt::WindowContextHelpButtonHint;
|
||||
// dialog.setWindowFlags(flags);
|
||||
// dialog.setWindowTitle("提示");
|
||||
// QFormLayout form(&dialog);
|
||||
// form.addWidget(new QLabel(str.GetString()));
|
||||
//// dialog.show();
|
||||
// if (dialog.exec() == QDialog::Accepted) {
|
||||
// // Do something here
|
||||
// }
|
||||
//// return MessageBox(NULL,"提示",str.GetString(),NULL );
|
||||
//// QString cstr=str.GetString();
|
||||
//// QMessageBox msgBox;
|
||||
//// msgBox.setText(cstr);
|
||||
//// return msgBox.exec();
|
||||
// return 1;
|
||||
//}
|
||||
|
||||
//int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType)
|
||||
//{
|
||||
// if (!parent)
|
||||
// {
|
||||
// char *tempName=lpCaption;
|
||||
// QString addStr=QString::fromLocal8Bit(tempName);
|
||||
// return QMessageBox::information(NULL,lpText,addStr,QMessageBox::Ok);
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -1,169 +1,169 @@
|
|||
/**
|
||||
* @file CStringTyle.h
|
||||
* @brief CString数据自定义、井以及井次结构体
|
||||
* @date 2014-10-10
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_CSTRING_H__
|
||||
#define PAI_FRAME_CSTRING_H__
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <QString>
|
||||
#include <QMessageBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QDialog>
|
||||
#include <QFormLayout>
|
||||
#include <QTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFormLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <limits.h>
|
||||
#pragma warning( push ,0)
|
||||
//#include "BaseFunExport.h"
|
||||
#pragma warning( pop )
|
||||
//#ifdef MessageBox
|
||||
//#define MessageBox MessageBox
|
||||
//#endif
|
||||
#define MAX_PATH 1024
|
||||
//#define _MAX_PATH 1024
|
||||
#define MaxCurve 1024
|
||||
#define curve_name_len 256
|
||||
#define curve_unit_len 256
|
||||
#define MIN_RANK rank_char
|
||||
#define MAX_RANK rank_longlong
|
||||
|
||||
#define INTMAX_RANK rank_longlong
|
||||
#define SIZE_T_RANK rank_long
|
||||
#define PTRDIFF_T_RANK rank_long
|
||||
#define MB_OK QMessageBox::Ok
|
||||
typedef unsigned short WORD;
|
||||
#ifdef WIN32
|
||||
typedef unsigned long DWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *HANDLE;
|
||||
#else
|
||||
typedef unsigned int DWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *HANDLE;
|
||||
typedef unsigned char byte;
|
||||
typedef bool BOOL;
|
||||
#endif
|
||||
typedef unsigned char BYTE;
|
||||
typedef char* LPSTR;
|
||||
typedef void* LPVOID;
|
||||
|
||||
class CString;
|
||||
typedef QList<CString> CStringList;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
//#define REPR_INT 1
|
||||
//#define REPR_SHORT 2
|
||||
//#define REPR_LONG 3
|
||||
//#define REPR_FLOAT 4
|
||||
//#define REPR_DOUBLE 5
|
||||
//#define REPR_STRING 6
|
||||
//#define REPR_CHAR 7
|
||||
//#define REPR_UCHAR 8
|
||||
//#define REPR_USHORT 9
|
||||
//#define REPR_UINT 10
|
||||
//#define REPR_ULONG 11
|
||||
//class BASEFUN_EXPORT CString;
|
||||
|
||||
//构建CString
|
||||
class CString
|
||||
{
|
||||
public:
|
||||
CString(const char *str = nullptr);
|
||||
CString(const QString str);
|
||||
CString(const CString &other);
|
||||
~CString();
|
||||
|
||||
int GetLength()const;
|
||||
int Find(char *str);
|
||||
int Find(char str);
|
||||
int Find(CString &another);
|
||||
int Find(char str[],int start);
|
||||
int ReverseFind(char ch);
|
||||
int Insert(int pos ,const CString Sctr);
|
||||
int Replace(const char *Src,const char *Dest);
|
||||
CString & TrimLeft();
|
||||
CString & MakeUpper();
|
||||
CString& MakeLower();
|
||||
CString & TrimRight();
|
||||
bool operator==(const char* other );
|
||||
bool operator!=(const char* other );
|
||||
bool operator==(const CString& other );
|
||||
bool operator!=(const CString& other );
|
||||
char operator[](int i);
|
||||
CString Right(int count)const;
|
||||
CString Left(int count)const;
|
||||
// CString operator = (const QString& SrcStr) ;
|
||||
CString operator + (const CString& SrcStr) ;
|
||||
CString operator += (CString& SrcStr) ;
|
||||
CString operator += (const CString& SrcStr) ;
|
||||
char* GetString()const;
|
||||
char GetChar(int n);
|
||||
char GetAt(int n);
|
||||
CString Mid(int pos,int count)const;
|
||||
CString Mid(int pos)const;
|
||||
void Format(const char *format,...);
|
||||
void Delete(int fromIndex,int length);
|
||||
// const char *m_temp;
|
||||
void Alloc(int len);
|
||||
void Empty();
|
||||
private:
|
||||
QString m_data;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum flags {
|
||||
FL_SPLAT0 = 0x00,/* Drop the value, do not assign */
|
||||
|
||||
FL_SPLAT = 0x01,/* Drop the value, do not assign */
|
||||
FL_INV = 0x02,/* Character-set with inverse */
|
||||
FL_WIDTH = 0x04,/* Field width specified */
|
||||
FL_MINUS = 0x08,/* Negative number */
|
||||
|
||||
};
|
||||
|
||||
enum ranks {
|
||||
|
||||
rank_char = -2,
|
||||
rank_short = -1,
|
||||
rank_int = 0,
|
||||
rank_long = 1,
|
||||
rank_longlong = 2,
|
||||
rank_ptr = INT_MAX/* Special value used for pointers */
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum bail {
|
||||
|
||||
bail_none = 0,/* No error condition */
|
||||
bail_eof,/* Hit EOF */
|
||||
bail_err/* Conversion mismatch */
|
||||
|
||||
};
|
||||
//int AfxMessageBox(CString str);
|
||||
//int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
|
||||
//void ShowMessage(QString mess);
|
||||
|
||||
//构建AfxMessageBox()函数
|
||||
//extern int BASEFUN_EXPORT AfxMessageBox(CString str);
|
||||
//extern int BASEFUN_EXPORT MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
|
||||
// using namespace pai::graphics;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file CStringTyle.h
|
||||
* @brief CString数据自定义、井以及井次结构体
|
||||
* @date 2014-10-10
|
||||
* @author: ZhouWenfei
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_CSTRING_H__
|
||||
#define PAI_FRAME_CSTRING_H__
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <QString>
|
||||
#include <QMessageBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QDialog>
|
||||
#include <QFormLayout>
|
||||
#include <QTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFormLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <limits.h>
|
||||
#pragma warning( push ,0)
|
||||
//#include "BaseFunExport.h"
|
||||
#pragma warning( pop )
|
||||
//#ifdef MessageBox
|
||||
//#define MessageBox MessageBox
|
||||
//#endif
|
||||
#define MAX_PATH 1024
|
||||
//#define _MAX_PATH 1024
|
||||
#define MaxCurve 1024
|
||||
#define curve_name_len 256
|
||||
#define curve_unit_len 256
|
||||
#define MIN_RANK rank_char
|
||||
#define MAX_RANK rank_longlong
|
||||
|
||||
#define INTMAX_RANK rank_longlong
|
||||
#define SIZE_T_RANK rank_long
|
||||
#define PTRDIFF_T_RANK rank_long
|
||||
#define MB_OK QMessageBox::Ok
|
||||
typedef unsigned short WORD;
|
||||
#ifdef WIN32
|
||||
typedef unsigned long DWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *HANDLE;
|
||||
#else
|
||||
typedef unsigned int DWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *HANDLE;
|
||||
typedef unsigned char byte;
|
||||
typedef bool BOOL;
|
||||
#endif
|
||||
typedef unsigned char BYTE;
|
||||
typedef char* LPSTR;
|
||||
typedef void* LPVOID;
|
||||
|
||||
class CString;
|
||||
typedef QList<CString> CStringList;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
//#define REPR_INT 1
|
||||
//#define REPR_SHORT 2
|
||||
//#define REPR_LONG 3
|
||||
//#define REPR_FLOAT 4
|
||||
//#define REPR_DOUBLE 5
|
||||
//#define REPR_STRING 6
|
||||
//#define REPR_CHAR 7
|
||||
//#define REPR_UCHAR 8
|
||||
//#define REPR_USHORT 9
|
||||
//#define REPR_UINT 10
|
||||
//#define REPR_ULONG 11
|
||||
//class BASEFUN_EXPORT CString;
|
||||
|
||||
//构建CString
|
||||
class CString
|
||||
{
|
||||
public:
|
||||
CString(const char *str = nullptr);
|
||||
CString(const QString str);
|
||||
CString(const CString &other);
|
||||
~CString();
|
||||
|
||||
int GetLength()const;
|
||||
int Find(char *str);
|
||||
int Find(char str);
|
||||
int Find(CString &another);
|
||||
int Find(char str[],int start);
|
||||
int ReverseFind(char ch);
|
||||
int Insert(int pos ,const CString Sctr);
|
||||
int Replace(const char *Src,const char *Dest);
|
||||
CString & TrimLeft();
|
||||
CString & MakeUpper();
|
||||
CString& MakeLower();
|
||||
CString & TrimRight();
|
||||
bool operator==(const char* other );
|
||||
bool operator!=(const char* other );
|
||||
bool operator==(const CString& other );
|
||||
bool operator!=(const CString& other );
|
||||
char operator[](int i);
|
||||
CString Right(int count)const;
|
||||
CString Left(int count)const;
|
||||
// CString operator = (const QString& SrcStr) ;
|
||||
CString operator + (const CString& SrcStr) ;
|
||||
CString operator += (CString& SrcStr) ;
|
||||
CString operator += (const CString& SrcStr) ;
|
||||
char* GetString()const;
|
||||
char GetChar(int n);
|
||||
char GetAt(int n);
|
||||
CString Mid(int pos,int count)const;
|
||||
CString Mid(int pos)const;
|
||||
void Format(const char *format,...);
|
||||
void Delete(int fromIndex,int length);
|
||||
// const char *m_temp;
|
||||
void Alloc(int len);
|
||||
void Empty();
|
||||
private:
|
||||
QString m_data;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum flags {
|
||||
FL_SPLAT0 = 0x00,/* Drop the value, do not assign */
|
||||
|
||||
FL_SPLAT = 0x01,/* Drop the value, do not assign */
|
||||
FL_INV = 0x02,/* Character-set with inverse */
|
||||
FL_WIDTH = 0x04,/* Field width specified */
|
||||
FL_MINUS = 0x08,/* Negative number */
|
||||
|
||||
};
|
||||
|
||||
enum ranks {
|
||||
|
||||
rank_char = -2,
|
||||
rank_short = -1,
|
||||
rank_int = 0,
|
||||
rank_long = 1,
|
||||
rank_longlong = 2,
|
||||
rank_ptr = INT_MAX/* Special value used for pointers */
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum bail {
|
||||
|
||||
bail_none = 0,/* No error condition */
|
||||
bail_eof,/* Hit EOF */
|
||||
bail_err/* Conversion mismatch */
|
||||
|
||||
};
|
||||
//int AfxMessageBox(CString str);
|
||||
//int MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
|
||||
//void ShowMessage(QString mess);
|
||||
|
||||
//构建AfxMessageBox()函数
|
||||
//extern int BASEFUN_EXPORT AfxMessageBox(CString str);
|
||||
//extern int BASEFUN_EXPORT MessageBox(QWidget *parent,char lpText[128],char*lpCaption, int UINTuType);
|
||||
// using namespace pai::graphics;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,165 +1,165 @@
|
|||
#include "ConvertorManager.h"
|
||||
//#include "ConsoleOutputWidget.h"
|
||||
#include <QObject>
|
||||
//#include "Geometry.h"
|
||||
//#include "Log.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
// #include "SLFAsciiConvertor.h"
|
||||
//void OSGFRAMEWORK_EXPORT AppendConsole(pai::log::Priority priority,const QString &output);
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
//CONST QString FORMAT_NOT_SUPPORT=QObject::tr("该文件编译器不支持,文件格式错误!");
|
||||
ConvertorManager::ConvertorManager()
|
||||
{
|
||||
all=0;
|
||||
}
|
||||
|
||||
ConvertorManager::~ConvertorManager()
|
||||
{
|
||||
qDeleteAll(m_vAllConvertors.begin(),m_vAllConvertors.end());
|
||||
m_vAllConvertors.clear();
|
||||
}
|
||||
|
||||
void ConvertorManager::LoadAllConvertorPlugin()
|
||||
{
|
||||
// //AppendConsole(pai::log::PAI_INFO,QObject::tr("格式转换模块加载中..."));
|
||||
m_vConvertorNames=pai::datamodel::LoadAllPlugin("convertor");
|
||||
StatisticalAllConvertors();
|
||||
// //AppendConsole(pai::log::PAI_INFO,QObject::tr("格式转换模块加载完成"));
|
||||
}
|
||||
void ConvertorManager::UnLoadAllConvertorPlugin()
|
||||
{
|
||||
qDeleteAll(m_vAllConvertors.begin(),m_vAllConvertors.end());
|
||||
m_vAllConvertors.clear();
|
||||
}
|
||||
|
||||
QVector<IConvertor*> ConvertorManager::GetSupportConvertors( const QString &filename,DiDepthProgress *pDepthProgress)
|
||||
{
|
||||
m_vFileNameSupportConvertor.clear();
|
||||
bool isInvalid=IsInvalidString(filename);
|
||||
if(isInvalid) return m_vFileNameSupportConvertor;
|
||||
QFileInfo currentfile(filename);
|
||||
QVector<IConvertor*>::iterator it=m_vAllConvertors.begin();
|
||||
for (;it!=m_vAllConvertors.end();it++)
|
||||
{
|
||||
(*it)->Init();
|
||||
//第一步判断是否满足后缀过滤的要求
|
||||
QVector<QString> supportedFileExt=(*it)->GetSupportFileExtensions();
|
||||
bool fileExtIsOk=false;
|
||||
for(int i=0;i<supportedFileExt.size();i++)
|
||||
{
|
||||
QStringList s1=supportedFileExt[i].split(';');
|
||||
for(int j=0;j<s1.size();j++) {
|
||||
int k=s1[j].indexOf('*');
|
||||
if(k>-1) {
|
||||
int flag=0;
|
||||
QString sx=currentfile.suffix().toUpper();
|
||||
QString s1j=s1[j].toUpper();
|
||||
if(sx.size()>=s1j.size()) {
|
||||
for(int n=0;n<k;n++) {
|
||||
if(sx.at(n)!=s1j.at(n)) {
|
||||
flag=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//change end
|
||||
if(!flag) {
|
||||
fileExtIsOk=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(currentfile.suffix().toUpper()==s1[j].toUpper())
|
||||
{
|
||||
fileExtIsOk=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!fileExtIsOk) continue ;
|
||||
//第二步判断该文件是否可以解编
|
||||
(*it)->SetDepthProgress(pDepthProgress);
|
||||
bool bSupport=(*it)->IsSupport(filename);
|
||||
(*it)->SetDepthProgress(0);
|
||||
if (!bSupport) continue ;
|
||||
m_vFileNameSupportConvertor.push_back(*it);
|
||||
}
|
||||
if (m_vFileNameSupportConvertor.isEmpty()&&isInvalid)
|
||||
{
|
||||
if(all==0||all==QMessageBox::No||all==QMessageBox::Yes)
|
||||
{
|
||||
all=QMessageBox::information(NULL,filename,"没有合适的转换模块!是否强制转换?",QMessageBox::Yes|QMessageBox::No|QMessageBox::NoAll|QMessageBox::YesAll);
|
||||
}
|
||||
if(all==QMessageBox::NoAll||all==QMessageBox::No) return m_vFileNameSupportConvertor;
|
||||
it=m_vAllConvertors.begin();
|
||||
for (;it!=m_vAllConvertors.end();it++)
|
||||
{
|
||||
//第一步判断是否满足后缀过滤的要求
|
||||
bool bSupport=(*it)->IsSupport(filename);
|
||||
if (!bSupport)continue ;
|
||||
m_vFileNameSupportConvertor.push_back(*it);
|
||||
break;
|
||||
}
|
||||
if (m_vFileNameSupportConvertor.isEmpty()) {
|
||||
// AppendConsole(pai::log::PAI_WARN,QObject::tr("该文件解编器不支持,文件格式错误!"));
|
||||
QMessageBox::about(NULL, QObject::tr("警告"), QObject::tr("该文件解编器不支持,文件格式错误!"));
|
||||
}
|
||||
}
|
||||
return m_vFileNameSupportConvertor;
|
||||
}
|
||||
|
||||
QVector<QString>ConvertorManager::GetSupportFileExtensions()
|
||||
{
|
||||
if(m_vAllSuffixFileName.size()) return m_vAllSuffixFileName;
|
||||
else {
|
||||
QVector<IConvertor*>::iterator itor=m_vAllConvertors.begin();
|
||||
int j=0;
|
||||
for (;itor!=m_vAllConvertors.end();itor++)
|
||||
{
|
||||
QVector<QString>vSupportFileExtensionsConvertor=(*itor)->GetSupportFileExtensions();
|
||||
for (int i=0;i<vSupportFileExtensionsConvertor.size();i++)
|
||||
{
|
||||
QVector<QString>::iterator itor=std::find(m_vAllSuffixFileName.begin(),m_vAllSuffixFileName.end(),vSupportFileExtensionsConvertor[i]);
|
||||
if (itor==m_vAllSuffixFileName.end())//没有重复
|
||||
{
|
||||
m_vAllSuffixFileName.push_back(vSupportFileExtensionsConvertor[i]);
|
||||
}
|
||||
}
|
||||
j++;
|
||||
}
|
||||
return m_vAllSuffixFileName;
|
||||
}
|
||||
}
|
||||
|
||||
QVector<IConvertor*>ConvertorManager::GetAllConvertors()
|
||||
{
|
||||
return m_vAllConvertors;
|
||||
}
|
||||
void ConvertorManager::StatisticalAllConvertors()
|
||||
{
|
||||
m_vAllConvertors.clear();
|
||||
std::map<sConvertorKey,IConvertorFactory::pCreateObjectFunction>&mapConvertorType=IConvertor::GetFatory().m_map;
|
||||
{
|
||||
std::map<sConvertorKey,IConvertorFactory::pCreateObjectFunction>::iterator it=mapConvertorType.begin();
|
||||
for (;it!=mapConvertorType.end();++it)
|
||||
{
|
||||
IConvertor*pConvertor=IConvertor::GetFatory().CreateObject(it->first);
|
||||
if(!pConvertor) {
|
||||
continue ;
|
||||
}
|
||||
pConvertor->SetConvertorTypeName(it->first.m_strConvertorTypeName);
|
||||
// AppendConsole(pai::log::PAI_INFO,("格式转换模块加载完成:"+it->first.m_strConvertorTypeName));
|
||||
m_vAllConvertors.push_back(pConvertor);
|
||||
}
|
||||
}
|
||||
// sConvertorKey convertorKey(/*GetSLFAsciiConvertorTypeID()*/"{BB64AD58-A7F7-4AF7-956F-518372C298D2}","SLFAscii Well Log Convertor");
|
||||
// CSLFAsciiConvertor* pSLFAConvertor= new CSLFAsciiConvertor();
|
||||
// IConvertor* pConvertor= dynamic_cast<IConvertor*>(pSLFAConvertor);
|
||||
// if(!pConvertor) {
|
||||
// return;
|
||||
// }
|
||||
// pConvertor->SetConvertorTypeName(convertorKey.m_strConvertorTypeName);
|
||||
// m_vAllConvertors.push_back(pConvertor);
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
#include "ConvertorManager.h"
|
||||
//#include "ConsoleOutputWidget.h"
|
||||
#include <QObject>
|
||||
//#include "Geometry.h"
|
||||
//#include "Log.h"
|
||||
#include "ObjectGenralFactory.h"
|
||||
// #include "SLFAsciiConvertor.h"
|
||||
//void OSGFRAMEWORK_EXPORT AppendConsole(pai::log::Priority priority,const QString &output);
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
//CONST QString FORMAT_NOT_SUPPORT=QObject::tr("该文件编译器不支持,文件格式错误!");
|
||||
ConvertorManager::ConvertorManager()
|
||||
{
|
||||
all=0;
|
||||
}
|
||||
|
||||
ConvertorManager::~ConvertorManager()
|
||||
{
|
||||
qDeleteAll(m_vAllConvertors.begin(),m_vAllConvertors.end());
|
||||
m_vAllConvertors.clear();
|
||||
}
|
||||
|
||||
void ConvertorManager::LoadAllConvertorPlugin()
|
||||
{
|
||||
// //AppendConsole(pai::log::PAI_INFO,QObject::tr("格式转换模块加载中..."));
|
||||
m_vConvertorNames=pai::datamodel::LoadAllPlugin("convertor");
|
||||
StatisticalAllConvertors();
|
||||
// //AppendConsole(pai::log::PAI_INFO,QObject::tr("格式转换模块加载完成"));
|
||||
}
|
||||
void ConvertorManager::UnLoadAllConvertorPlugin()
|
||||
{
|
||||
qDeleteAll(m_vAllConvertors.begin(),m_vAllConvertors.end());
|
||||
m_vAllConvertors.clear();
|
||||
}
|
||||
|
||||
QVector<IConvertor*> ConvertorManager::GetSupportConvertors( const QString &filename,DiDepthProgress *pDepthProgress)
|
||||
{
|
||||
m_vFileNameSupportConvertor.clear();
|
||||
bool isInvalid=IsInvalidString(filename);
|
||||
if(isInvalid) return m_vFileNameSupportConvertor;
|
||||
QFileInfo currentfile(filename);
|
||||
QVector<IConvertor*>::iterator it=m_vAllConvertors.begin();
|
||||
for (;it!=m_vAllConvertors.end();it++)
|
||||
{
|
||||
(*it)->Init();
|
||||
//第一步判断是否满足后缀过滤的要求
|
||||
QVector<QString> supportedFileExt=(*it)->GetSupportFileExtensions();
|
||||
bool fileExtIsOk=false;
|
||||
for(int i=0;i<supportedFileExt.size();i++)
|
||||
{
|
||||
QStringList s1=supportedFileExt[i].split(';');
|
||||
for(int j=0;j<s1.size();j++) {
|
||||
int k=s1[j].indexOf('*');
|
||||
if(k>-1) {
|
||||
int flag=0;
|
||||
QString sx=currentfile.suffix().toUpper();
|
||||
QString s1j=s1[j].toUpper();
|
||||
if(sx.size()>=s1j.size()) {
|
||||
for(int n=0;n<k;n++) {
|
||||
if(sx.at(n)!=s1j.at(n)) {
|
||||
flag=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//change end
|
||||
if(!flag) {
|
||||
fileExtIsOk=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(currentfile.suffix().toUpper()==s1[j].toUpper())
|
||||
{
|
||||
fileExtIsOk=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!fileExtIsOk) continue ;
|
||||
//第二步判断该文件是否可以解编
|
||||
(*it)->SetDepthProgress(pDepthProgress);
|
||||
bool bSupport=(*it)->IsSupport(filename);
|
||||
(*it)->SetDepthProgress(0);
|
||||
if (!bSupport) continue ;
|
||||
m_vFileNameSupportConvertor.push_back(*it);
|
||||
}
|
||||
if (m_vFileNameSupportConvertor.isEmpty()&&isInvalid)
|
||||
{
|
||||
if(all==0||all==QMessageBox::No||all==QMessageBox::Yes)
|
||||
{
|
||||
all=QMessageBox::information(NULL,filename,"没有合适的转换模块!是否强制转换?",QMessageBox::Yes|QMessageBox::No|QMessageBox::NoAll|QMessageBox::YesAll);
|
||||
}
|
||||
if(all==QMessageBox::NoAll||all==QMessageBox::No) return m_vFileNameSupportConvertor;
|
||||
it=m_vAllConvertors.begin();
|
||||
for (;it!=m_vAllConvertors.end();it++)
|
||||
{
|
||||
//第一步判断是否满足后缀过滤的要求
|
||||
bool bSupport=(*it)->IsSupport(filename);
|
||||
if (!bSupport)continue ;
|
||||
m_vFileNameSupportConvertor.push_back(*it);
|
||||
break;
|
||||
}
|
||||
if (m_vFileNameSupportConvertor.isEmpty()) {
|
||||
// AppendConsole(pai::log::PAI_WARN,QObject::tr("该文件解编器不支持,文件格式错误!"));
|
||||
QMessageBox::about(NULL, QObject::tr("警告"), QObject::tr("该文件解编器不支持,文件格式错误!"));
|
||||
}
|
||||
}
|
||||
return m_vFileNameSupportConvertor;
|
||||
}
|
||||
|
||||
QVector<QString>ConvertorManager::GetSupportFileExtensions()
|
||||
{
|
||||
if(m_vAllSuffixFileName.size()) return m_vAllSuffixFileName;
|
||||
else {
|
||||
QVector<IConvertor*>::iterator itor=m_vAllConvertors.begin();
|
||||
int j=0;
|
||||
for (;itor!=m_vAllConvertors.end();itor++)
|
||||
{
|
||||
QVector<QString>vSupportFileExtensionsConvertor=(*itor)->GetSupportFileExtensions();
|
||||
for (int i=0;i<vSupportFileExtensionsConvertor.size();i++)
|
||||
{
|
||||
QVector<QString>::iterator itor=std::find(m_vAllSuffixFileName.begin(),m_vAllSuffixFileName.end(),vSupportFileExtensionsConvertor[i]);
|
||||
if (itor==m_vAllSuffixFileName.end())//没有重复
|
||||
{
|
||||
m_vAllSuffixFileName.push_back(vSupportFileExtensionsConvertor[i]);
|
||||
}
|
||||
}
|
||||
j++;
|
||||
}
|
||||
return m_vAllSuffixFileName;
|
||||
}
|
||||
}
|
||||
|
||||
QVector<IConvertor*>ConvertorManager::GetAllConvertors()
|
||||
{
|
||||
return m_vAllConvertors;
|
||||
}
|
||||
void ConvertorManager::StatisticalAllConvertors()
|
||||
{
|
||||
m_vAllConvertors.clear();
|
||||
std::map<sConvertorKey,IConvertorFactory::pCreateObjectFunction>&mapConvertorType=IConvertor::GetFatory().m_map;
|
||||
{
|
||||
std::map<sConvertorKey,IConvertorFactory::pCreateObjectFunction>::iterator it=mapConvertorType.begin();
|
||||
for (;it!=mapConvertorType.end();++it)
|
||||
{
|
||||
IConvertor*pConvertor=IConvertor::GetFatory().CreateObject(it->first);
|
||||
if(!pConvertor) {
|
||||
continue ;
|
||||
}
|
||||
pConvertor->SetConvertorTypeName(it->first.m_strConvertorTypeName);
|
||||
// AppendConsole(pai::log::PAI_INFO,("格式转换模块加载完成:"+it->first.m_strConvertorTypeName));
|
||||
m_vAllConvertors.push_back(pConvertor);
|
||||
}
|
||||
}
|
||||
// sConvertorKey convertorKey(/*GetSLFAsciiConvertorTypeID()*/"{BB64AD58-A7F7-4AF7-956F-518372C298D2}","SLFAscii Well Log Convertor");
|
||||
// CSLFAsciiConvertor* pSLFAConvertor= new CSLFAsciiConvertor();
|
||||
// IConvertor* pConvertor= dynamic_cast<IConvertor*>(pSLFAConvertor);
|
||||
// if(!pConvertor) {
|
||||
// return;
|
||||
// }
|
||||
// pConvertor->SetConvertorTypeName(convertorKey.m_strConvertorTypeName);
|
||||
// m_vAllConvertors.push_back(pConvertor);
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
|
|
|
|||
|
|
@ -1,97 +1,99 @@
|
|||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2024-07-11T18:44:51
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui widgets
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = ConvertorManager
|
||||
TEMPLATE = lib
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
DEFINES += _WINDOWS
|
||||
DEFINES += CONVERTOR_LIB
|
||||
DEFINES += _TIMESPEC_DEFINED
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
CONFIG += console \
|
||||
# static \
|
||||
c++11 \
|
||||
shared\
|
||||
dll
|
||||
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
DESTDIR = $$PWD/../../Bin
|
||||
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
|
||||
} else {
|
||||
DESTDIR = $$PWD/../../BinR
|
||||
TARGET = $$join(TARGET,,,)
|
||||
}
|
||||
|
||||
|
||||
FORMS += \
|
||||
importdata.ui \
|
||||
importdataDialog.ui \
|
||||
interface.ui \
|
||||
interfaceWidget.ui \
|
||||
tishidialog.ui
|
||||
|
||||
HEADERS += \
|
||||
../../common/geometryutils.h \
|
||||
../include/ConvertorExport.h \
|
||||
../include/ConvertorManager.h \
|
||||
../include/DataImport.h \
|
||||
../include/IConvertor.h \
|
||||
../include/ImportdataDialog.h \
|
||||
../include/InterfaceWidget.h \
|
||||
../include/WisTableTran.h \
|
||||
tishidialog.h
|
||||
|
||||
SOURCES += *.cpp \
|
||||
../../common/geometryutils.cpp
|
||||
INCLUDEPATH += $(OSGHOME)/include \
|
||||
../include \
|
||||
../../OSGParts/include \
|
||||
../../OSGFramework/include \
|
||||
../../OSGWindowShared/include \
|
||||
../../OSGDataModel/include\
|
||||
../../BaseFun/include\
|
||||
./GeneratedFiles
|
||||
|
||||
INCLUDEPATH += ../../common
|
||||
INCLUDEPATH += ../../Slfio/include
|
||||
INCLUDEPATH += ../../WellLogUI/include
|
||||
INCLUDEPATH += ../../BaseFun/include
|
||||
INCLUDEPATH += ../../Workflow/include
|
||||
INCLUDEPATH += ../../Workflow/WFCrystal/SysUtility/utils/include
|
||||
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
|
||||
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
|
||||
LIBS += -L$$PWD/../../Bin -lBaseFund
|
||||
LIBS += -L$$PWD/../../Bin -lslfiod
|
||||
LIBS += -L$$PWD/../../Bin -lWFEngined
|
||||
} else {
|
||||
LIBS += -L$$PWD/../../BinR -lOSGDataModel
|
||||
LIBS += -L$$PWD/../../BinR -lBaseFun
|
||||
LIBS += -L$$PWD/../../BinR -lslfio
|
||||
LIBS += -L$$PWD/../../Bin -lWFEngine
|
||||
}
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2024-07-11T18:44:51
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui widgets
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = ConvertorManager
|
||||
TEMPLATE = lib
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
DEFINES += _WINDOWS
|
||||
DEFINES += CONVERTOR_LIB
|
||||
DEFINES += _TIMESPEC_DEFINED
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
CONFIG += console \
|
||||
# static \
|
||||
c++11 \
|
||||
shared\
|
||||
dll
|
||||
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
DESTDIR = $$PWD/../../Bin
|
||||
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
|
||||
} else {
|
||||
DESTDIR = $$PWD/../../BinR
|
||||
TARGET = $$join(TARGET,,,)
|
||||
}
|
||||
|
||||
|
||||
FORMS += \
|
||||
importdata.ui \
|
||||
importdataDialog.ui \
|
||||
interface.ui \
|
||||
interfaceWidget.ui \
|
||||
tishidialog.ui
|
||||
|
||||
HEADERS += \
|
||||
../../common/geometryutils.h \
|
||||
../include/ConvertorExport.h \
|
||||
../include/ConvertorManager.h \
|
||||
../include/DataImport.h \
|
||||
../include/IConvertor.h \
|
||||
../include/ImportdataDialog.h \
|
||||
../include/InterfaceWidget.h \
|
||||
../include/WisTableTran.h \
|
||||
tishidialog.h
|
||||
|
||||
SOURCES += *.cpp \
|
||||
../../common/geometryutils.cpp
|
||||
INCLUDEPATH += $(OSGHOME)/include \
|
||||
../include \
|
||||
../../OSGParts/include \
|
||||
../../OSGFramework/include \
|
||||
../../OSGWindowShared/include \
|
||||
../../OSGDataModel/include\
|
||||
../../BaseFun/include\
|
||||
./GeneratedFiles
|
||||
|
||||
INCLUDEPATH += ../../common
|
||||
INCLUDEPATH += ../../Slfio/include
|
||||
INCLUDEPATH += ../../WellLogUI/include
|
||||
INCLUDEPATH += ../../BaseFun/include
|
||||
win32 {
|
||||
INCLUDEPATH += ../../Workflow/include
|
||||
}
|
||||
INCLUDEPATH += ../../Workflow/WFCrystal/SysUtility/utils/include
|
||||
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
|
||||
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
LIBS += -L$$PWD/../../Bin -lOSGDataModeld
|
||||
LIBS += -L$$PWD/../../Bin -lBaseFund
|
||||
LIBS += -L$$PWD/../../Bin -lslfiod
|
||||
LIBS += -L$$PWD/../../Bin -lWFEngined
|
||||
} else {
|
||||
LIBS += -L$$PWD/../../BinR -lOSGDataModel
|
||||
LIBS += -L$$PWD/../../BinR -lBaseFun
|
||||
LIBS += -L$$PWD/../../BinR -lslfio
|
||||
LIBS += -L$$PWD/../../Bin -lWFEngine
|
||||
}
|
||||
|
|
|
|||
227
ConvertorManager/src/ConvertorManager.pro.user
Normal file
227
ConvertorManager/src/ConvertorManager.pro.user
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 16.0.1, 2026-03-16T17:37:53. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{b6aced14-228a-4a04-b357-4d18ec1a3aad}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoDetect">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">10</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.13.0 MSVC2017 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.13.0 MSVC2017 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b0d37dc0-4759-4799-8369-0bb44b3e17ec}</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\ALogplus\logplus\build\ConvertorManager_Qt_5_13_0_msvc2017_64-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">E:/ALogplus/logplus/build/ConvertorManager_Qt_5_13_0_msvc2017_64-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\ALogplus\logplus\build\ConvertorManager_Qt_5_13_0_msvc2017_64-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">E:/ALogplus/logplus/build/ConvertorManager_Qt_5_13_0_msvc2017_64-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,62 +1,62 @@
|
|||
#include "IConvertor.h"
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
sConvertorKey::sConvertorKey()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
sConvertorKey::sConvertorKey( QUuid ConvertorTypeClassIDTmp ,QString strConvertorTypeName)
|
||||
{
|
||||
m_ConvertorTypeClassID = ConvertorTypeClassIDTmp;
|
||||
m_strConvertorTypeName= strConvertorTypeName;
|
||||
}
|
||||
|
||||
bool sConvertorKey::operator !=( const sConvertorKey& s )
|
||||
{
|
||||
return m_ConvertorTypeClassID != s.m_ConvertorTypeClassID ;
|
||||
}
|
||||
|
||||
bool sConvertorKey::operator< ( const sConvertorKey& s ) const
|
||||
{
|
||||
return m_ConvertorTypeClassID < s.m_ConvertorTypeClassID;
|
||||
|
||||
}
|
||||
|
||||
IConvertor::IConvertor():m_ConvertorTypeName("")
|
||||
{
|
||||
m_WellLogRoundInfo=new MyWelllogRound();
|
||||
m_WellInfo=new Well();
|
||||
m_pDepthProgress=NULL;
|
||||
m_ColumnCount=0;
|
||||
}
|
||||
|
||||
|
||||
IConvertor::~IConvertor()
|
||||
{
|
||||
delete m_WellLogRoundInfo;
|
||||
delete m_WellInfo;
|
||||
}
|
||||
void IConvertor::InitFormatSuffixName()
|
||||
{
|
||||
}
|
||||
MyWelllogRound * IConvertor::GetWellLogRoundInfo()
|
||||
{
|
||||
|
||||
return m_WellLogRoundInfo;
|
||||
|
||||
}
|
||||
|
||||
pai::ios::welllog::Well *IConvertor::GetWellInfo()
|
||||
{
|
||||
return m_WellInfo;
|
||||
|
||||
}
|
||||
|
||||
pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor>& IConvertor::GetFatory()
|
||||
{
|
||||
static pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor> fatory;
|
||||
|
||||
return fatory;
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
#include "IConvertor.h"
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
sConvertorKey::sConvertorKey()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
sConvertorKey::sConvertorKey( QUuid ConvertorTypeClassIDTmp ,QString strConvertorTypeName)
|
||||
{
|
||||
m_ConvertorTypeClassID = ConvertorTypeClassIDTmp;
|
||||
m_strConvertorTypeName= strConvertorTypeName;
|
||||
}
|
||||
|
||||
bool sConvertorKey::operator !=( const sConvertorKey& s )
|
||||
{
|
||||
return m_ConvertorTypeClassID != s.m_ConvertorTypeClassID ;
|
||||
}
|
||||
|
||||
bool sConvertorKey::operator< ( const sConvertorKey& s ) const
|
||||
{
|
||||
return m_ConvertorTypeClassID < s.m_ConvertorTypeClassID;
|
||||
|
||||
}
|
||||
|
||||
IConvertor::IConvertor():m_ConvertorTypeName("")
|
||||
{
|
||||
m_WellLogRoundInfo=new MyWelllogRound();
|
||||
m_WellInfo=new Well();
|
||||
m_pDepthProgress=NULL;
|
||||
m_ColumnCount=0;
|
||||
}
|
||||
|
||||
|
||||
IConvertor::~IConvertor()
|
||||
{
|
||||
delete m_WellLogRoundInfo;
|
||||
delete m_WellInfo;
|
||||
}
|
||||
void IConvertor::InitFormatSuffixName()
|
||||
{
|
||||
}
|
||||
MyWelllogRound * IConvertor::GetWellLogRoundInfo()
|
||||
{
|
||||
|
||||
return m_WellLogRoundInfo;
|
||||
|
||||
}
|
||||
|
||||
pai::ios::welllog::Well *IConvertor::GetWellInfo()
|
||||
{
|
||||
return m_WellInfo;
|
||||
|
||||
}
|
||||
|
||||
pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor>& IConvertor::GetFatory()
|
||||
{
|
||||
static pai::datamodel::CObjectGenralFactory<sConvertorKey,IConvertor> fatory;
|
||||
|
||||
return fatory;
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,320 +1,320 @@
|
|||
#include <QSettings>
|
||||
#include "InterIConvertor.h"
|
||||
#include "MemRdWt.h"
|
||||
#include "CStringType.h"
|
||||
//#include "ObjWelllogWavefile.h"
|
||||
#include "BaseFun.h"
|
||||
#include "geometryutils.h"
|
||||
#include <QTextCodec>
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
InterIConvertor::InterIConvertor():IConvertor(),m_fileMessage(NULL),
|
||||
m_DepthLength(0),
|
||||
m_DimCurvefilePath("")
|
||||
{
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
memset(&FILE_MESSAGE,0,sizeof(Slf_FILE_MESSAGE));
|
||||
memset(&WellStaticInfo,0,sizeof(WELL_STATIC_INFO));
|
||||
m_vCurverName.resize(MaxCurve);
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
m_vCurverName[i]=new char[curve_name_len];
|
||||
memset(m_vCurverName[i],0,curve_name_len);
|
||||
}
|
||||
////ww
|
||||
m_vCurverUnit.resize(MaxCurve);
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
m_vCurverUnit[i]=new char[curve_unit_len];
|
||||
memset(m_vCurverUnit[i],0,curve_unit_len);
|
||||
}
|
||||
////
|
||||
m_fileMessage=new char[MaxCurve*1000];
|
||||
memset(m_fileMessage,0,MaxCurve*1000);
|
||||
memset(&WellDynamicInfo,0,sizeof(WellDynamicInfo));
|
||||
memset(&FILE_MESSAGE,0,sizeof(FILE_MESSAGE));
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
m_pDepthProgress=NULL;
|
||||
}
|
||||
|
||||
InterIConvertor::~InterIConvertor()
|
||||
{
|
||||
vector<char*>::iterator itor=m_vCurverName.begin();
|
||||
for (;itor!=m_vCurverName.end();)
|
||||
{
|
||||
itor=m_vCurverName.erase(itor);
|
||||
}
|
||||
m_vCurverName.clear();
|
||||
///////ww
|
||||
itor=m_vCurverUnit.begin();
|
||||
for (;itor!=m_vCurverUnit.end();)
|
||||
{
|
||||
itor=m_vCurverUnit.erase(itor);
|
||||
}
|
||||
m_vCurverUnit.clear();
|
||||
///////
|
||||
if (m_fileMessage)
|
||||
{
|
||||
delete[]m_fileMessage;
|
||||
m_fileMessage=NULL;
|
||||
}
|
||||
}
|
||||
//////////////////
|
||||
///
|
||||
//用户配置文件后缀 dll文件同名的.cfg文件
|
||||
// example :aa.dll =>aa.cfg
|
||||
//
|
||||
QVector<QString> InterIConvertor::GetSupportFileExtensions()
|
||||
{
|
||||
QVector<QString>exts;
|
||||
if(!m_thisModuleName.isEmpty())
|
||||
{
|
||||
char *name=new char[1000];
|
||||
// D:\LogPlus\bin\
|
||||
GetBinDir(name);
|
||||
QString path=m_thisModuleName;
|
||||
path=name;
|
||||
path+="/convertor/";
|
||||
path+=m_thisModuleName;
|
||||
path+=".cfg";
|
||||
FILE *fp=fopen(path.toStdString().c_str(),"rt");
|
||||
if(fp)
|
||||
{
|
||||
while(!feof(fp))
|
||||
{
|
||||
memset(name,0,1000);
|
||||
fread(name,1000,1,fp);
|
||||
QString line=name;
|
||||
line.replace(","," ");
|
||||
line.replace("\t"," ");
|
||||
line.replace("\r"," ");
|
||||
line.replace("\n"," ");
|
||||
QStringList strs=line.split(" ");
|
||||
strs.removeAll("");
|
||||
foreach(QString str,strs)exts.push_back(str);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
delete name;
|
||||
}
|
||||
return exts;
|
||||
}
|
||||
|
||||
QString InterIConvertor::GetFileContent( const QString &filename )
|
||||
{
|
||||
if(strlen(m_fileMessage)) {
|
||||
return m_fileMessage;
|
||||
}
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return "";
|
||||
QString lineString("");
|
||||
//读取文件前50行
|
||||
for (int row=0;row<50;row++)
|
||||
{
|
||||
lineString += "\n"+file.readLine();
|
||||
}
|
||||
return lineString;
|
||||
}
|
||||
bool InterIConvertor::Init()
|
||||
{
|
||||
m_TableName="";
|
||||
IConvertor::Init();
|
||||
memset(&FILE_MESSAGE,0,sizeof(FILE_MESSAGE));
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
//whp add 2019.8.1 for 初始化井静态信息
|
||||
memset(&WellStaticInfo,0,sizeof(WELL_STATIC_INFO));
|
||||
m_DimCurvesList.clear();
|
||||
if(m_fileMessage) m_fileMessage[0]=0;
|
||||
////ww
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
memset(m_vCurverName[i],0,curve_name_len);
|
||||
}
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
memset(m_vCurverUnit[i],0,curve_unit_len);
|
||||
}
|
||||
memset(&m_CurveData,0,sizeof(m_CurveData));
|
||||
return true;
|
||||
}
|
||||
bool InterIConvertor::IsSupport( const QString &filename )
|
||||
{
|
||||
IConvertor::IsSupport(filename);
|
||||
string tempStr=filename.toStdString();
|
||||
char *filePath=const_cast<char*>(tempStr.c_str());
|
||||
// QString strCh(filePath); // 汉字路径转换
|
||||
int Value= ScanLogFile(UTF8ToGBK(filePath).data()/*strCh.toLocal8Bit().data()*/,m_fileMessage,&m_vCurverName[0],&m_vCurverUnit[0]);
|
||||
m_CurveData.Curve_Num=Value;
|
||||
if(Value<=0) return 0;//ww
|
||||
return Value;
|
||||
}
|
||||
|
||||
QList<CObjWellLog*> pai::graphics::InterIConvertor::GetWellLogList( const QString &filename )
|
||||
{
|
||||
m_vWellLogCurve.clear();
|
||||
if(m_CurveData.Curve_Num<=0) return m_vWellLogCurve;
|
||||
// GetWellLogMetas( m_vWellLogCurve, filename );
|
||||
InitWelllogRoundInfo(filename);
|
||||
if(WellStaticInfo.XCoor)FILE_MESSAGE.Xcoor=WellStaticInfo.XCoor;
|
||||
if(WellStaticInfo.YCoor)FILE_MESSAGE.Ycoor=WellStaticInfo.YCoor;
|
||||
memmove(FILE_MESSAGE.Item,WellStaticInfo.MethodCWell,sizeof(FILE_MESSAGE.Item));
|
||||
if(*WellStaticInfo.WellName&&*WellStaticInfo.WellName!=' ')memmove(FILE_MESSAGE.WellName,WellStaticInfo.WellName,sizeof(FILE_MESSAGE.WellName));
|
||||
if(*WellStaticInfo.AreaName&&*WellStaticInfo.AreaName!=' ')memmove(FILE_MESSAGE.AreaName,WellStaticInfo.AreaName,sizeof(FILE_MESSAGE.AreaName));
|
||||
if(*WellStaticInfo.OilCompanyName&&*WellStaticInfo.OilCompanyName!=' ')memmove(FILE_MESSAGE.OilCompanyName,WellStaticInfo.OilCompanyName,sizeof(FILE_MESSAGE.OilCompanyName));
|
||||
if(WellStaticInfo.As1)FILE_MESSAGE.Altitude=WellStaticInfo.As1;
|
||||
if(WellStaticInfo.Bs1)FILE_MESSAGE.Kelly=WellStaticInfo.Bs1;
|
||||
if(strlen(WellStaticInfo.EndDrillDate))FILE_MESSAGE.EndDrillDate=StringToTime(WellStaticInfo.EndDrillDate);
|
||||
if(strlen(WellStaticInfo.StartDrillDate))FILE_MESSAGE.StartDrillDate=StringToTime(WellStaticInfo.StartDrillDate);
|
||||
if(WellStaticInfo.Sc1Edep)FILE_MESSAGE.StartDepth=WellStaticInfo.Sc1Edep;
|
||||
if(WellStaticInfo.Sc2sdep)FILE_MESSAGE.EndDepth=WellStaticInfo.Sc2sdep;
|
||||
if(*(float*)&WellStaticInfo.Remark[0])memmove(&FILE_MESSAGE.X0,&WellStaticInfo.Remark[0],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[4])memmove(&FILE_MESSAGE.Y0,&WellStaticInfo.Remark[4],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[8])memmove(&FILE_MESSAGE.TVD,&WellStaticInfo.Remark[8],4);//whp 2019.7.30 该语句会把解编模块扫描得到的TVD数据清空
|
||||
//已在ASCII模块中做了相应的处理,不知道别的模块中还有没有
|
||||
if(strlen(WellDynamicInfo.LogCompanyName))memmove(FILE_MESSAGE.LogCompanyName,WellDynamicInfo.LogCompanyName,sizeof(FILE_MESSAGE.LogCompanyName));
|
||||
if(strlen(WellDynamicInfo.Operator))memmove(FILE_MESSAGE.Operator,WellDynamicInfo.Operator,sizeof(FILE_MESSAGE.Operator));
|
||||
if(strlen(WellDynamicInfo.Item))memmove(FILE_MESSAGE.LoggingTeam,WellDynamicInfo.Item,sizeof(FILE_MESSAGE.LoggingTeam));
|
||||
if(strlen(WellDynamicInfo.Date))FILE_MESSAGE.LoggingDate=StringToTime(WellDynamicInfo.Date);
|
||||
//add end
|
||||
InitWellInfo(filename);
|
||||
return m_vWellLogCurve;
|
||||
}
|
||||
|
||||
|
||||
QString InterIConvertor::GetfilePath(const char *FileName)
|
||||
{
|
||||
QFileInfo fileInfo(QString::fromLocal8Bit(FileName));
|
||||
QDir dir(::GetImagePath());
|
||||
dir.cdUp();
|
||||
QString tempPath=dir.absolutePath()+"/"+fileInfo.completeBaseName()+".slf";
|
||||
|
||||
return tempPath;
|
||||
}
|
||||
// void InterIConvertor::GetWellLogMetas( QList<CObjWellLog*> &vWellLog, QString strWellLogPath)
|
||||
// {
|
||||
// //||m_CurveData.Curve_Step==0.0
|
||||
// if(m_CurveData.Curve_Num<=0) return;//ww
|
||||
// for( long j = 0 ; j<m_CurveData.Curve_Num;++j )
|
||||
// {
|
||||
// CObjWellLog *pWelllog = new CObjWellLog();
|
||||
// QString curveName=QString::fromLocal8Bit(m_vCurverName[j] );
|
||||
// pWelllog->SetName(curveName);
|
||||
// pWelllog->SetAliasName(curveName);
|
||||
// QString curveUnit=QString::fromLocal8Bit(m_vCurverUnit[j] );//ww
|
||||
// pWelllog->GetLogCurve().SetUnit(curveUnit.toStdString());
|
||||
// vWellLog.push_back(pWelllog);
|
||||
// }
|
||||
|
||||
// }
|
||||
// void InterIConvertor::GetWellLogObjects( QList<CObjWellLog*> &vWellLog, QString strWellLogPath)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
void InterIConvertor::InitWelllogRoundInfo(QString FileName)
|
||||
{
|
||||
//char LogRange[24],IntRange[24];char Section[16] SetAudit;
|
||||
if(WellDynamicInfo.MudViscosity)m_WellLogRoundInfo->SetMudViscosity(WellDynamicInfo.MudViscosity);
|
||||
else if(FILE_MESSAGE.Mud_Viscosity[0]) m_WellLogRoundInfo->SetMudViscosity(FILE_MESSAGE.Mud_Viscosity[0]);
|
||||
QString LogCompanyName=WellDynamicInfo.LogCompanyName;
|
||||
LogCompanyName=LogCompanyName.trimmed();
|
||||
if(LogCompanyName.length()) m_WellLogRoundInfo->SetCompanyName(WellDynamicInfo.LogCompanyName);
|
||||
else m_WellLogRoundInfo->SetCompanyName(FILE_MESSAGE.LogCompanyName);
|
||||
if(strlen(WellDynamicInfo.Date)) m_WellLogRoundInfo->SetDate(WellDynamicInfo.Date);
|
||||
else {
|
||||
QString str=ctime((time_t *)&FILE_MESSAGE.LoggingDate);
|
||||
m_WellLogRoundInfo->SetDate(str.toStdString());
|
||||
}
|
||||
if(WellDynamicInfo.TempBot)m_WellLogRoundInfo->SetTempBot(WellDynamicInfo.TempBot);
|
||||
else m_WellLogRoundInfo->SetTempBot(FILE_MESSAGE.Well_Bottom_Temperature);
|
||||
if(WellDynamicInfo.WaterLoss) m_WellLogRoundInfo->SetWaterLoss(WellDynamicInfo.WaterLoss);
|
||||
else m_WellLogRoundInfo->SetWaterLoss(FILE_MESSAGE.WaterLoss);
|
||||
if(WellDynamicInfo.MudDensity) m_WellLogRoundInfo->SetDensity(WellDynamicInfo.MudDensity);
|
||||
else m_WellLogRoundInfo->SetDensity(FILE_MESSAGE.Mud_Density[0]);
|
||||
|
||||
if(WellDynamicInfo.MudResi)m_WellLogRoundInfo->SetResi(WellDynamicInfo.MudResi);
|
||||
else m_WellLogRoundInfo->SetResi(FILE_MESSAGE.Mud_Resistivity[0]);
|
||||
if(WellDynamicInfo.MudTemp)m_WellLogRoundInfo->SetTemp(WellDynamicInfo.MudTemp);
|
||||
else m_WellLogRoundInfo->SetTemp(FILE_MESSAGE.Mud_Temp);
|
||||
if(WellDynamicInfo.MudType) m_WellLogRoundInfo->SetMudType(WellDynamicInfo.MudType);
|
||||
else m_WellLogRoundInfo->SetMudType(FILE_MESSAGE.Mud_Property);
|
||||
m_WellLogRoundInfo->SetIntProg(WellDynamicInfo.IntProg);
|
||||
m_WellLogRoundInfo->SetInteDress(WellDynamicInfo.IntDress);
|
||||
m_WellLogRoundInfo->SetRemark(WellDynamicInfo.Remark);
|
||||
if(strlen(WellDynamicInfo.Operator))m_WellLogRoundInfo->SetOperator(WellDynamicInfo.Operator);
|
||||
else m_WellLogRoundInfo->SetOperator(FILE_MESSAGE.Operator);
|
||||
if(strlen(WellDynamicInfo.Serial)) m_WellLogRoundInfo->SetSerial(WellDynamicInfo.Serial);
|
||||
else m_WellLogRoundInfo->SetSerial(FILE_MESSAGE.YqType);
|
||||
if(strlen(WellDynamicInfo.Item))m_WellLogRoundInfo->SetItem(WellDynamicInfo.Item);
|
||||
else m_WellLogRoundInfo->SetItem(FILE_MESSAGE.Item);
|
||||
m_WellLogRoundInfo->SetINTLog(WellDynamicInfo.LogRange);
|
||||
|
||||
int len=strlen(m_fileMessage);
|
||||
char *p=m_fileMessage;
|
||||
p+=len+1;
|
||||
float sdep,edep;
|
||||
len=strlen(p);
|
||||
QString tempWellName;
|
||||
if(len>1&&len<20)
|
||||
{
|
||||
sscanf(p,"%f",&sdep);
|
||||
p+=strlen(p)+1;
|
||||
sscanf(p,"%f",&edep);
|
||||
p+=strlen(p)+1;
|
||||
tempWellName=p;
|
||||
}
|
||||
else
|
||||
{//解编模块中没有压回深度信息
|
||||
sdep=0;
|
||||
edep=0;
|
||||
tempWellName="";
|
||||
}
|
||||
|
||||
m_WellLogRoundInfo->SetTopDepth(sdep);
|
||||
m_WellLogRoundInfo->SetBottomDepth(edep);
|
||||
|
||||
QFileInfo temDir(FileName);
|
||||
if(tempWellName=="") tempWellName=temDir.completeBaseName();
|
||||
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||
m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||
}
|
||||
|
||||
void InterIConvertor::InitWellInfo(const QString &filename)
|
||||
{
|
||||
if(*FILE_MESSAGE.WellName)m_WellLogRoundInfo->SetWellName(FILE_MESSAGE.WellName);//whp add 2020.7.15
|
||||
if(*FILE_MESSAGE.AreaName)m_WellLogRoundInfo->SetAreaName(FILE_MESSAGE.AreaName);
|
||||
if(*FILE_MESSAGE.OilCompanyName)m_WellLogRoundInfo->SetOilCompanyName(FILE_MESSAGE.OilCompanyName);
|
||||
if(*FILE_MESSAGE.LogCompanyName)m_WellLogRoundInfo->SetCompanyName(FILE_MESSAGE.LogCompanyName);
|
||||
if(FILE_MESSAGE.Xcoor)m_WellLogRoundInfo->SetXCode(FILE_MESSAGE.Xcoor);
|
||||
if(FILE_MESSAGE.Ycoor)m_WellLogRoundInfo->SetYCode(FILE_MESSAGE.Ycoor);
|
||||
if(FILE_MESSAGE.Altitude)m_WellLogRoundInfo->SetAsl(FILE_MESSAGE.Altitude);
|
||||
if(FILE_MESSAGE.Kelly)m_WellLogRoundInfo->SetBsl(FILE_MESSAGE.Kelly);
|
||||
if(FILE_MESSAGE.X0)m_WellLogRoundInfo->SetXOffset(FILE_MESSAGE.X0);
|
||||
if(FILE_MESSAGE.Y0)m_WellLogRoundInfo->SetYOffset(FILE_MESSAGE.Y0);
|
||||
if(FILE_MESSAGE.TVD)m_WellLogRoundInfo->SetTVD0(FILE_MESSAGE.TVD);
|
||||
QString temp = ::GetConfPath()+"data.ini";
|
||||
QSettings settings(temp,QSettings::IniFormat,0);
|
||||
settings.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
QStringList serials=settings.value("wellType",0).toStringList();
|
||||
int i=serials.indexOf(FILE_MESSAGE.WellType);
|
||||
if(i<0) i=0;
|
||||
m_WellLogRoundInfo->SetWellType(i);
|
||||
//
|
||||
if(m_WellLogRoundInfo->GetName()=="")//whp add 2019.8.1
|
||||
{//???加此句是否合适?如果有文件名,就不再赋值,如JPH-307_core.txt中# WELL FILE: FILEJPH-307
|
||||
string wellName=string(FILE_MESSAGE.WellName);
|
||||
if (wellName=="")
|
||||
{
|
||||
QFileInfo temDir(filename);
|
||||
QString tempWellName=temDir.completeBaseName();
|
||||
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||
m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_WellLogRoundInfo->SetName(FILE_MESSAGE.WellName);
|
||||
}
|
||||
}
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
#include <QSettings>
|
||||
#include "InterIConvertor.h"
|
||||
#include "MemRdWt.h"
|
||||
#include "CStringType.h"
|
||||
//#include "ObjWelllogWavefile.h"
|
||||
#include "BaseFun.h"
|
||||
#include "geometryutils.h"
|
||||
#include <QTextCodec>
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
InterIConvertor::InterIConvertor():IConvertor(),m_fileMessage(NULL),
|
||||
m_DepthLength(0),
|
||||
m_DimCurvefilePath("")
|
||||
{
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
memset(&FILE_MESSAGE,0,sizeof(Slf_FILE_MESSAGE));
|
||||
memset(&WellStaticInfo,0,sizeof(WELL_STATIC_INFO));
|
||||
m_vCurverName.resize(MaxCurve);
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
m_vCurverName[i]=new char[curve_name_len];
|
||||
memset(m_vCurverName[i],0,curve_name_len);
|
||||
}
|
||||
////ww
|
||||
m_vCurverUnit.resize(MaxCurve);
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
m_vCurverUnit[i]=new char[curve_unit_len];
|
||||
memset(m_vCurverUnit[i],0,curve_unit_len);
|
||||
}
|
||||
////
|
||||
m_fileMessage=new char[MaxCurve*1000];
|
||||
memset(m_fileMessage,0,MaxCurve*1000);
|
||||
memset(&WellDynamicInfo,0,sizeof(WellDynamicInfo));
|
||||
memset(&FILE_MESSAGE,0,sizeof(FILE_MESSAGE));
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
m_pDepthProgress=NULL;
|
||||
}
|
||||
|
||||
InterIConvertor::~InterIConvertor()
|
||||
{
|
||||
vector<char*>::iterator itor=m_vCurverName.begin();
|
||||
for (;itor!=m_vCurverName.end();)
|
||||
{
|
||||
itor=m_vCurverName.erase(itor);
|
||||
}
|
||||
m_vCurverName.clear();
|
||||
///////ww
|
||||
itor=m_vCurverUnit.begin();
|
||||
for (;itor!=m_vCurverUnit.end();)
|
||||
{
|
||||
itor=m_vCurverUnit.erase(itor);
|
||||
}
|
||||
m_vCurverUnit.clear();
|
||||
///////
|
||||
if (m_fileMessage)
|
||||
{
|
||||
delete[]m_fileMessage;
|
||||
m_fileMessage=NULL;
|
||||
}
|
||||
}
|
||||
//////////////////
|
||||
///
|
||||
//用户配置文件后缀 dll文件同名的.cfg文件
|
||||
// example :aa.dll =>aa.cfg
|
||||
//
|
||||
QVector<QString> InterIConvertor::GetSupportFileExtensions()
|
||||
{
|
||||
QVector<QString>exts;
|
||||
if(!m_thisModuleName.isEmpty())
|
||||
{
|
||||
char *name=new char[1000];
|
||||
// D:\LogPlus\bin\
|
||||
GetBinDir(name);
|
||||
QString path=m_thisModuleName;
|
||||
path=name;
|
||||
path+="/convertor/";
|
||||
path+=m_thisModuleName;
|
||||
path+=".cfg";
|
||||
FILE *fp=fopen(path.toStdString().c_str(),"rt");
|
||||
if(fp)
|
||||
{
|
||||
while(!feof(fp))
|
||||
{
|
||||
memset(name,0,1000);
|
||||
fread(name,1000,1,fp);
|
||||
QString line=name;
|
||||
line.replace(","," ");
|
||||
line.replace("\t"," ");
|
||||
line.replace("\r"," ");
|
||||
line.replace("\n"," ");
|
||||
QStringList strs=line.split(" ");
|
||||
strs.removeAll("");
|
||||
foreach(QString str,strs)exts.push_back(str);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
delete name;
|
||||
}
|
||||
return exts;
|
||||
}
|
||||
|
||||
QString InterIConvertor::GetFileContent( const QString &filename )
|
||||
{
|
||||
if(strlen(m_fileMessage)) {
|
||||
return m_fileMessage;
|
||||
}
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return "";
|
||||
QString lineString("");
|
||||
//读取文件前50行
|
||||
for (int row=0;row<50;row++)
|
||||
{
|
||||
lineString += "\n"+file.readLine();
|
||||
}
|
||||
return lineString;
|
||||
}
|
||||
bool InterIConvertor::Init()
|
||||
{
|
||||
m_TableName="";
|
||||
IConvertor::Init();
|
||||
memset(&FILE_MESSAGE,0,sizeof(FILE_MESSAGE));
|
||||
memset(&WellDynamicInfo,0,sizeof(WELL_DYNAMIC_INFO));
|
||||
//whp add 2019.8.1 for 初始化井静态信息
|
||||
memset(&WellStaticInfo,0,sizeof(WELL_STATIC_INFO));
|
||||
m_DimCurvesList.clear();
|
||||
if(m_fileMessage) m_fileMessage[0]=0;
|
||||
////ww
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
memset(m_vCurverName[i],0,curve_name_len);
|
||||
}
|
||||
for (int i=0;i<MaxCurve;i++)
|
||||
{
|
||||
memset(m_vCurverUnit[i],0,curve_unit_len);
|
||||
}
|
||||
memset(&m_CurveData,0,sizeof(m_CurveData));
|
||||
return true;
|
||||
}
|
||||
bool InterIConvertor::IsSupport( const QString &filename )
|
||||
{
|
||||
IConvertor::IsSupport(filename);
|
||||
string tempStr=filename.toStdString();
|
||||
char *filePath=const_cast<char*>(tempStr.c_str());
|
||||
// QString strCh(filePath); // 汉字路径转换
|
||||
int Value= ScanLogFile(UTF8ToGBK(filePath).data()/*strCh.toLocal8Bit().data()*/,m_fileMessage,&m_vCurverName[0],&m_vCurverUnit[0]);
|
||||
m_CurveData.Curve_Num=Value;
|
||||
if(Value<=0) return 0;//ww
|
||||
return Value;
|
||||
}
|
||||
|
||||
QList<CObjWellLog*> pai::graphics::InterIConvertor::GetWellLogList( const QString &filename )
|
||||
{
|
||||
m_vWellLogCurve.clear();
|
||||
if(m_CurveData.Curve_Num<=0) return m_vWellLogCurve;
|
||||
// GetWellLogMetas( m_vWellLogCurve, filename );
|
||||
InitWelllogRoundInfo(filename);
|
||||
if(WellStaticInfo.XCoor)FILE_MESSAGE.Xcoor=WellStaticInfo.XCoor;
|
||||
if(WellStaticInfo.YCoor)FILE_MESSAGE.Ycoor=WellStaticInfo.YCoor;
|
||||
memmove(FILE_MESSAGE.Item,WellStaticInfo.MethodCWell,sizeof(FILE_MESSAGE.Item));
|
||||
if(*WellStaticInfo.WellName&&*WellStaticInfo.WellName!=' ')memmove(FILE_MESSAGE.WellName,WellStaticInfo.WellName,sizeof(FILE_MESSAGE.WellName));
|
||||
if(*WellStaticInfo.AreaName&&*WellStaticInfo.AreaName!=' ')memmove(FILE_MESSAGE.AreaName,WellStaticInfo.AreaName,sizeof(FILE_MESSAGE.AreaName));
|
||||
if(*WellStaticInfo.OilCompanyName&&*WellStaticInfo.OilCompanyName!=' ')memmove(FILE_MESSAGE.OilCompanyName,WellStaticInfo.OilCompanyName,sizeof(FILE_MESSAGE.OilCompanyName));
|
||||
if(WellStaticInfo.As1)FILE_MESSAGE.Altitude=WellStaticInfo.As1;
|
||||
if(WellStaticInfo.Bs1)FILE_MESSAGE.Kelly=WellStaticInfo.Bs1;
|
||||
if(strlen(WellStaticInfo.EndDrillDate))FILE_MESSAGE.EndDrillDate=StringToTime(WellStaticInfo.EndDrillDate);
|
||||
if(strlen(WellStaticInfo.StartDrillDate))FILE_MESSAGE.StartDrillDate=StringToTime(WellStaticInfo.StartDrillDate);
|
||||
if(WellStaticInfo.Sc1Edep)FILE_MESSAGE.StartDepth=WellStaticInfo.Sc1Edep;
|
||||
if(WellStaticInfo.Sc2sdep)FILE_MESSAGE.EndDepth=WellStaticInfo.Sc2sdep;
|
||||
if(*(float*)&WellStaticInfo.Remark[0])memmove(&FILE_MESSAGE.X0,&WellStaticInfo.Remark[0],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[4])memmove(&FILE_MESSAGE.Y0,&WellStaticInfo.Remark[4],4);
|
||||
if(*(float*)&WellStaticInfo.Remark[8])memmove(&FILE_MESSAGE.TVD,&WellStaticInfo.Remark[8],4);//whp 2019.7.30 该语句会把解编模块扫描得到的TVD数据清空
|
||||
//已在ASCII模块中做了相应的处理,不知道别的模块中还有没有
|
||||
if(strlen(WellDynamicInfo.LogCompanyName))memmove(FILE_MESSAGE.LogCompanyName,WellDynamicInfo.LogCompanyName,sizeof(FILE_MESSAGE.LogCompanyName));
|
||||
if(strlen(WellDynamicInfo.Operator))memmove(FILE_MESSAGE.Operator,WellDynamicInfo.Operator,sizeof(FILE_MESSAGE.Operator));
|
||||
if(strlen(WellDynamicInfo.Item))memmove(FILE_MESSAGE.LoggingTeam,WellDynamicInfo.Item,sizeof(FILE_MESSAGE.LoggingTeam));
|
||||
if(strlen(WellDynamicInfo.Date))FILE_MESSAGE.LoggingDate=StringToTime(WellDynamicInfo.Date);
|
||||
//add end
|
||||
InitWellInfo(filename);
|
||||
return m_vWellLogCurve;
|
||||
}
|
||||
|
||||
|
||||
QString InterIConvertor::GetfilePath(const char *FileName)
|
||||
{
|
||||
QFileInfo fileInfo(QString::fromLocal8Bit(FileName));
|
||||
QDir dir(::GetImagePath());
|
||||
dir.cdUp();
|
||||
QString tempPath=dir.absolutePath()+"/"+fileInfo.completeBaseName()+".slf";
|
||||
|
||||
return tempPath;
|
||||
}
|
||||
// void InterIConvertor::GetWellLogMetas( QList<CObjWellLog*> &vWellLog, QString strWellLogPath)
|
||||
// {
|
||||
// //||m_CurveData.Curve_Step==0.0
|
||||
// if(m_CurveData.Curve_Num<=0) return;//ww
|
||||
// for( long j = 0 ; j<m_CurveData.Curve_Num;++j )
|
||||
// {
|
||||
// CObjWellLog *pWelllog = new CObjWellLog();
|
||||
// QString curveName=QString::fromLocal8Bit(m_vCurverName[j] );
|
||||
// pWelllog->SetName(curveName);
|
||||
// pWelllog->SetAliasName(curveName);
|
||||
// QString curveUnit=QString::fromLocal8Bit(m_vCurverUnit[j] );//ww
|
||||
// pWelllog->GetLogCurve().SetUnit(curveUnit.toStdString());
|
||||
// vWellLog.push_back(pWelllog);
|
||||
// }
|
||||
|
||||
// }
|
||||
// void InterIConvertor::GetWellLogObjects( QList<CObjWellLog*> &vWellLog, QString strWellLogPath)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
void InterIConvertor::InitWelllogRoundInfo(QString FileName)
|
||||
{
|
||||
//char LogRange[24],IntRange[24];char Section[16] SetAudit;
|
||||
if(WellDynamicInfo.MudViscosity)m_WellLogRoundInfo->SetMudViscosity(WellDynamicInfo.MudViscosity);
|
||||
else if(FILE_MESSAGE.Mud_Viscosity[0]) m_WellLogRoundInfo->SetMudViscosity(FILE_MESSAGE.Mud_Viscosity[0]);
|
||||
QString LogCompanyName=WellDynamicInfo.LogCompanyName;
|
||||
LogCompanyName=LogCompanyName.trimmed();
|
||||
if(LogCompanyName.length()) m_WellLogRoundInfo->SetCompanyName(WellDynamicInfo.LogCompanyName);
|
||||
else m_WellLogRoundInfo->SetCompanyName(FILE_MESSAGE.LogCompanyName);
|
||||
if(strlen(WellDynamicInfo.Date)) m_WellLogRoundInfo->SetDate(WellDynamicInfo.Date);
|
||||
else {
|
||||
QString str=ctime((time_t *)&FILE_MESSAGE.LoggingDate);
|
||||
m_WellLogRoundInfo->SetDate(str.toStdString());
|
||||
}
|
||||
if(WellDynamicInfo.TempBot)m_WellLogRoundInfo->SetTempBot(WellDynamicInfo.TempBot);
|
||||
else m_WellLogRoundInfo->SetTempBot(FILE_MESSAGE.Well_Bottom_Temperature);
|
||||
if(WellDynamicInfo.WaterLoss) m_WellLogRoundInfo->SetWaterLoss(WellDynamicInfo.WaterLoss);
|
||||
else m_WellLogRoundInfo->SetWaterLoss(FILE_MESSAGE.WaterLoss);
|
||||
if(WellDynamicInfo.MudDensity) m_WellLogRoundInfo->SetDensity(WellDynamicInfo.MudDensity);
|
||||
else m_WellLogRoundInfo->SetDensity(FILE_MESSAGE.Mud_Density[0]);
|
||||
|
||||
if(WellDynamicInfo.MudResi)m_WellLogRoundInfo->SetResi(WellDynamicInfo.MudResi);
|
||||
else m_WellLogRoundInfo->SetResi(FILE_MESSAGE.Mud_Resistivity[0]);
|
||||
if(WellDynamicInfo.MudTemp)m_WellLogRoundInfo->SetTemp(WellDynamicInfo.MudTemp);
|
||||
else m_WellLogRoundInfo->SetTemp(FILE_MESSAGE.Mud_Temp);
|
||||
if(WellDynamicInfo.MudType) m_WellLogRoundInfo->SetMudType(WellDynamicInfo.MudType);
|
||||
else m_WellLogRoundInfo->SetMudType(FILE_MESSAGE.Mud_Property);
|
||||
m_WellLogRoundInfo->SetIntProg(WellDynamicInfo.IntProg);
|
||||
m_WellLogRoundInfo->SetInteDress(WellDynamicInfo.IntDress);
|
||||
m_WellLogRoundInfo->SetRemark(WellDynamicInfo.Remark);
|
||||
if(strlen(WellDynamicInfo.Operator))m_WellLogRoundInfo->SetOperator(WellDynamicInfo.Operator);
|
||||
else m_WellLogRoundInfo->SetOperator(FILE_MESSAGE.Operator);
|
||||
if(strlen(WellDynamicInfo.Serial)) m_WellLogRoundInfo->SetSerial(WellDynamicInfo.Serial);
|
||||
else m_WellLogRoundInfo->SetSerial(FILE_MESSAGE.YqType);
|
||||
if(strlen(WellDynamicInfo.Item))m_WellLogRoundInfo->SetItem(WellDynamicInfo.Item);
|
||||
else m_WellLogRoundInfo->SetItem(FILE_MESSAGE.Item);
|
||||
m_WellLogRoundInfo->SetINTLog(WellDynamicInfo.LogRange);
|
||||
|
||||
int len=strlen(m_fileMessage);
|
||||
char *p=m_fileMessage;
|
||||
p+=len+1;
|
||||
float sdep,edep;
|
||||
len=strlen(p);
|
||||
QString tempWellName;
|
||||
if(len>1&&len<20)
|
||||
{
|
||||
sscanf(p,"%f",&sdep);
|
||||
p+=strlen(p)+1;
|
||||
sscanf(p,"%f",&edep);
|
||||
p+=strlen(p)+1;
|
||||
tempWellName=p;
|
||||
}
|
||||
else
|
||||
{//解编模块中没有压回深度信息
|
||||
sdep=0;
|
||||
edep=0;
|
||||
tempWellName="";
|
||||
}
|
||||
|
||||
m_WellLogRoundInfo->SetTopDepth(sdep);
|
||||
m_WellLogRoundInfo->SetBottomDepth(edep);
|
||||
|
||||
QFileInfo temDir(FileName);
|
||||
if(tempWellName=="") tempWellName=temDir.completeBaseName();
|
||||
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||
m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||
}
|
||||
|
||||
void InterIConvertor::InitWellInfo(const QString &filename)
|
||||
{
|
||||
if(*FILE_MESSAGE.WellName)m_WellLogRoundInfo->SetWellName(FILE_MESSAGE.WellName);//whp add 2020.7.15
|
||||
if(*FILE_MESSAGE.AreaName)m_WellLogRoundInfo->SetAreaName(FILE_MESSAGE.AreaName);
|
||||
if(*FILE_MESSAGE.OilCompanyName)m_WellLogRoundInfo->SetOilCompanyName(FILE_MESSAGE.OilCompanyName);
|
||||
if(*FILE_MESSAGE.LogCompanyName)m_WellLogRoundInfo->SetCompanyName(FILE_MESSAGE.LogCompanyName);
|
||||
if(FILE_MESSAGE.Xcoor)m_WellLogRoundInfo->SetXCode(FILE_MESSAGE.Xcoor);
|
||||
if(FILE_MESSAGE.Ycoor)m_WellLogRoundInfo->SetYCode(FILE_MESSAGE.Ycoor);
|
||||
if(FILE_MESSAGE.Altitude)m_WellLogRoundInfo->SetAsl(FILE_MESSAGE.Altitude);
|
||||
if(FILE_MESSAGE.Kelly)m_WellLogRoundInfo->SetBsl(FILE_MESSAGE.Kelly);
|
||||
if(FILE_MESSAGE.X0)m_WellLogRoundInfo->SetXOffset(FILE_MESSAGE.X0);
|
||||
if(FILE_MESSAGE.Y0)m_WellLogRoundInfo->SetYOffset(FILE_MESSAGE.Y0);
|
||||
if(FILE_MESSAGE.TVD)m_WellLogRoundInfo->SetTVD0(FILE_MESSAGE.TVD);
|
||||
QString temp = ::GetConfPath()+"data.ini";
|
||||
QSettings settings(temp,QSettings::IniFormat,0);
|
||||
settings.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
QStringList serials=settings.value("wellType",0).toStringList();
|
||||
int i=serials.indexOf(FILE_MESSAGE.WellType);
|
||||
if(i<0) i=0;
|
||||
m_WellLogRoundInfo->SetWellType(i);
|
||||
//
|
||||
if(m_WellLogRoundInfo->GetName()=="")//whp add 2019.8.1
|
||||
{//???加此句是否合适?如果有文件名,就不再赋值,如JPH-307_core.txt中# WELL FILE: FILEJPH-307
|
||||
string wellName=string(FILE_MESSAGE.WellName);
|
||||
if (wellName=="")
|
||||
{
|
||||
QFileInfo temDir(filename);
|
||||
QString tempWellName=temDir.completeBaseName();
|
||||
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||
m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_WellLogRoundInfo->SetName(FILE_MESSAGE.WellName);
|
||||
}
|
||||
}
|
||||
}
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
|
|
|
|||
|
|
@ -1,318 +1,318 @@
|
|||
#include "InterfaceWidget.h"
|
||||
#include "ui_interfaceWidget.h"
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
InterfaceWidget::InterfaceWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_pInterfaceUI=new Ui::Interface();
|
||||
m_pInterfaceUI->setupUi(this);
|
||||
//m_pInterfaceUI->splitter->setMouseTracking(true);
|
||||
//m_pInterfaceUI->tableWidget->horizontalHeader()
|
||||
//m_pInterfaceUI->tableWidget->setFont(QFont("宋体"));
|
||||
//m_pInterfaceUI->tabWidget->setTabText(1,"井信息");
|
||||
//m_pInterfaceUI->tabWidget->setTabText(0,"测井信息");
|
||||
|
||||
m_pInterfaceUI->widget_2->setVisible(false);
|
||||
//m_pInterfaceUI->tableWidget->setHorizontalScrollBarPolicy()
|
||||
m_pInterfaceUI->tableWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
}
|
||||
|
||||
void InterfaceWidget::showEvent(QShowEvent * pEvent)
|
||||
{
|
||||
QWidget::showEvent(pEvent);
|
||||
|
||||
|
||||
//m_pInterfaceUI->textEdit->setFixedWidth(width()-580);
|
||||
|
||||
}
|
||||
|
||||
InterfaceWidget::~InterfaceWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTableWidget* InterfaceWidget::GetDataSelectAreaWidget()
|
||||
{
|
||||
return m_pInterfaceUI->tableWidget;
|
||||
}
|
||||
|
||||
/*QTabWidget* InterfaceWidget::GetLogInformation()
|
||||
{
|
||||
return m_pInterfaceUI->tabWidget;
|
||||
}*/
|
||||
|
||||
QTextEdit* InterfaceWidget::GetDataPreviewArea()
|
||||
{
|
||||
return m_pInterfaceUI->textEdit;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetXCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_30;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetMudViscosityLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_25;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetMudTypeComboBox()
|
||||
{
|
||||
|
||||
return m_pInterfaceUI->comboBox_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCompanyNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_27;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTeamLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_28;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetOperatorLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_11;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_2;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetSerialComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_4;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetItemComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_5;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetProfileLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_12;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWaterLossLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_8;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetDensityLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_24;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetResiLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_7;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTempLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_5;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetINTLogLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_6;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTempBotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_23;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetNITINTLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetIntProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_4;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetInteDressLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_3;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetAuditLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit;
|
||||
}
|
||||
|
||||
QTextEdit * InterfaceWidget::GetRemarkTextEdit()
|
||||
{
|
||||
return m_pInterfaceUI->textEdit_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellRoundNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_10;
|
||||
}
|
||||
/////////////////
|
||||
QLineEdit * InterfaceWidget::GetWellCompanyNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_26;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_9;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellAreaNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_29;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_19;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetYCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_18;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetWellTypeComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_6;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetAslLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_16;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetBslLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_17;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerSDrillDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit;
|
||||
}
|
||||
QDateEdit * InterfaceWidget::GerEDrillDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_3;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerCompleteDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_4;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCWMethodLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_14;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit1ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_37;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit2ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_36;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit3ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_34;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit4ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_35;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit5ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_33;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas1ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_41;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas2ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_42;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas3ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_40;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas4ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_39;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas5ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_38;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas1ShotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_15;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas2ShotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_22;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC1SDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_21;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC1EDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_31;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC2SDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_20;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC2EDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_32;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditTopDepth()
|
||||
{
|
||||
return m_pInterfaceUI->edtTopDepth;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditBottomDepth()
|
||||
{
|
||||
return m_pInterfaceUI->edtBottomDepth;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditFileSDepth()
|
||||
{
|
||||
return m_pInterfaceUI->filestdepedit;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditFileEDepth()
|
||||
{
|
||||
return m_pInterfaceUI->fileendepedit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
#include "InterfaceWidget.h"
|
||||
#include "ui_interfaceWidget.h"
|
||||
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
||||
InterfaceWidget::InterfaceWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_pInterfaceUI=new Ui::Interface();
|
||||
m_pInterfaceUI->setupUi(this);
|
||||
//m_pInterfaceUI->splitter->setMouseTracking(true);
|
||||
//m_pInterfaceUI->tableWidget->horizontalHeader()
|
||||
//m_pInterfaceUI->tableWidget->setFont(QFont("宋体"));
|
||||
//m_pInterfaceUI->tabWidget->setTabText(1,"井信息");
|
||||
//m_pInterfaceUI->tabWidget->setTabText(0,"测井信息");
|
||||
|
||||
m_pInterfaceUI->widget_2->setVisible(false);
|
||||
//m_pInterfaceUI->tableWidget->setHorizontalScrollBarPolicy()
|
||||
m_pInterfaceUI->tableWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
}
|
||||
|
||||
void InterfaceWidget::showEvent(QShowEvent * pEvent)
|
||||
{
|
||||
QWidget::showEvent(pEvent);
|
||||
|
||||
|
||||
//m_pInterfaceUI->textEdit->setFixedWidth(width()-580);
|
||||
|
||||
}
|
||||
|
||||
InterfaceWidget::~InterfaceWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTableWidget* InterfaceWidget::GetDataSelectAreaWidget()
|
||||
{
|
||||
return m_pInterfaceUI->tableWidget;
|
||||
}
|
||||
|
||||
/*QTabWidget* InterfaceWidget::GetLogInformation()
|
||||
{
|
||||
return m_pInterfaceUI->tabWidget;
|
||||
}*/
|
||||
|
||||
QTextEdit* InterfaceWidget::GetDataPreviewArea()
|
||||
{
|
||||
return m_pInterfaceUI->textEdit;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetXCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_30;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetMudViscosityLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_25;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetMudTypeComboBox()
|
||||
{
|
||||
|
||||
return m_pInterfaceUI->comboBox_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCompanyNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_27;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTeamLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_28;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetOperatorLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_11;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_2;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetSerialComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_4;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetItemComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_5;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetProfileLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_12;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWaterLossLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_8;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetDensityLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_24;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetResiLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_7;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTempLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_5;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetINTLogLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_6;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetTempBotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_23;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetNITINTLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetIntProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_4;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetInteDressLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_3;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetAuditLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit;
|
||||
}
|
||||
|
||||
QTextEdit * InterfaceWidget::GetRemarkTextEdit()
|
||||
{
|
||||
return m_pInterfaceUI->textEdit_2;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellRoundNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_10;
|
||||
}
|
||||
/////////////////
|
||||
QLineEdit * InterfaceWidget::GetWellCompanyNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_26;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_9;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellAreaNameLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_29;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetWellCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_19;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetYCodeLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_18;
|
||||
}
|
||||
|
||||
QComboBox * InterfaceWidget::GetWellTypeComboBox()
|
||||
{
|
||||
return m_pInterfaceUI->comboBox_6;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetAslLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_16;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetBslLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_17;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerSDrillDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit;
|
||||
}
|
||||
QDateEdit * InterfaceWidget::GerEDrillDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_3;
|
||||
}
|
||||
|
||||
QDateEdit * InterfaceWidget::GerCompleteDateEdit()
|
||||
{
|
||||
return m_pInterfaceUI->dateEdit_4;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCWMethodLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_14;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit1ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_37;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit2ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_36;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit3ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_34;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit4ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_35;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetBit5ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_33;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas1ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_41;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas2ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_42;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas3ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_40;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas4ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_39;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas5ProgLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_38;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas1ShotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_15;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetCas2ShotLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_22;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC1SDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_21;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC1EDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_31;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC2SDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_20;
|
||||
}
|
||||
|
||||
QLineEdit * InterfaceWidget::GetSC2EDepLineEdit()
|
||||
{
|
||||
return m_pInterfaceUI->lineEdit_32;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditTopDepth()
|
||||
{
|
||||
return m_pInterfaceUI->edtTopDepth;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditBottomDepth()
|
||||
{
|
||||
return m_pInterfaceUI->edtBottomDepth;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditFileSDepth()
|
||||
{
|
||||
return m_pInterfaceUI->filestdepedit;
|
||||
}
|
||||
QLineEdit * InterfaceWidget::GetEditFileEDepth()
|
||||
{
|
||||
return m_pInterfaceUI->fileendepedit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
END_OSGGRAPHICS_NAMESPACE;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,53 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImportData</class>
|
||||
<widget class="QDialog" name="ImportData">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>766</width>
|
||||
<height>721</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ImportData</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tab_1</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImportData</class>
|
||||
<widget class="QDialog" name="ImportData">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>766</width>
|
||||
<height>721</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ImportData</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tab_1</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -1,200 +1,200 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImportData</class>
|
||||
<widget class="QDialog" name="ImportData">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1129</width>
|
||||
<height>827</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ImportData</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin" stdset="0">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="10,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Tab_1</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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="pushButton_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全不选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>反选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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="pushButton_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
<italic>false</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImportData</class>
|
||||
<widget class="QDialog" name="ImportData">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1129</width>
|
||||
<height>827</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ImportData</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin" stdset="0">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="10,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Tab_1</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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="pushButton_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全不选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>反选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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="pushButton_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>新宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
<italic>false</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -1,241 +1,241 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Interface</class>
|
||||
<widget class="QWidget" name="Interface">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>784</width>
|
||||
<height>727</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Interface</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,4,3,0">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="4,1,9,1,4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据预览区</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测井基本信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>数据选择区</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="text">
|
||||
<string>反选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<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="pushButton_3">
|
||||
<property name="text">
|
||||
<string>全选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<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="pushButton_4">
|
||||
<property name="text">
|
||||
<string>全不选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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="pushButton_2">
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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="pushButton">
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Interface</class>
|
||||
<widget class="QWidget" name="Interface">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>784</width>
|
||||
<height>727</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Interface</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,4,3,0">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="4,1,9,1,4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据预览区</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测井基本信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>华文宋体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>数据选择区</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="text">
|
||||
<string>反选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<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="pushButton_3">
|
||||
<property name="text">
|
||||
<string>全选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<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="pushButton_4">
|
||||
<property name="text">
|
||||
<string>全不选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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="pushButton_2">
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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="pushButton">
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,55 +1,55 @@
|
|||
#include "tishidialog.h"
|
||||
|
||||
TiShiDialog::TiShiDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
m_pUI.setupUi(this);
|
||||
QObject::connect(m_pUI.pushButtonTH, SIGNAL(clicked()), this, SLOT(slotTH()));
|
||||
QObject::connect(m_pUI.pushButtonHB, SIGNAL(clicked()), this, SLOT(slotHB()));
|
||||
QObject::connect(m_pUI.pushButtonLC, SIGNAL(clicked()), this, SLOT(slotLC()));
|
||||
QObject::connect(m_pUI.pushButtonTG, SIGNAL(clicked()), this, SLOT(slotTG()));
|
||||
QObject::connect(m_pUI.checkBox, SIGNAL(clicked()), this, SLOT(slotCheck()));
|
||||
check=0;
|
||||
m_pUI.checkBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
void TiShiDialog::slotCheck()
|
||||
{
|
||||
if(m_pUI.checkBox->checkState()==Qt::Unchecked)check=0;
|
||||
else check=1;
|
||||
}
|
||||
TiShiDialog::~TiShiDialog()
|
||||
{
|
||||
|
||||
}
|
||||
void TiShiDialog::slotTH()
|
||||
{
|
||||
flag=1;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotHB()
|
||||
{
|
||||
flag=2;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotLC()
|
||||
{
|
||||
flag=3;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotTG()
|
||||
{
|
||||
flag=0;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::init(std::vector<char*> OutCurve,QString qss)
|
||||
{
|
||||
for(int i=0;i<OutCurve.size();i++)
|
||||
{
|
||||
m_pUI.textEdit_2->append(QString(OutCurve[i]));
|
||||
}
|
||||
m_pUI.label->setText(qss+"井次中下列数据已存在");
|
||||
#include "tishidialog.h"
|
||||
|
||||
TiShiDialog::TiShiDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
m_pUI.setupUi(this);
|
||||
QObject::connect(m_pUI.pushButtonTH, SIGNAL(clicked()), this, SLOT(slotTH()));
|
||||
QObject::connect(m_pUI.pushButtonHB, SIGNAL(clicked()), this, SLOT(slotHB()));
|
||||
QObject::connect(m_pUI.pushButtonLC, SIGNAL(clicked()), this, SLOT(slotLC()));
|
||||
QObject::connect(m_pUI.pushButtonTG, SIGNAL(clicked()), this, SLOT(slotTG()));
|
||||
QObject::connect(m_pUI.checkBox, SIGNAL(clicked()), this, SLOT(slotCheck()));
|
||||
check=0;
|
||||
m_pUI.checkBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
void TiShiDialog::slotCheck()
|
||||
{
|
||||
if(m_pUI.checkBox->checkState()==Qt::Unchecked)check=0;
|
||||
else check=1;
|
||||
}
|
||||
TiShiDialog::~TiShiDialog()
|
||||
{
|
||||
|
||||
}
|
||||
void TiShiDialog::slotTH()
|
||||
{
|
||||
flag=1;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotHB()
|
||||
{
|
||||
flag=2;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotLC()
|
||||
{
|
||||
flag=3;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::slotTG()
|
||||
{
|
||||
flag=0;
|
||||
accept();
|
||||
return ;
|
||||
}
|
||||
void TiShiDialog::init(std::vector<char*> OutCurve,QString qss)
|
||||
{
|
||||
for(int i=0;i<OutCurve.size();i++)
|
||||
{
|
||||
m_pUI.textEdit_2->append(QString(OutCurve[i]));
|
||||
}
|
||||
m_pUI.label->setText(qss+"井次中下列数据已存在");
|
||||
}
|
||||
|
|
@ -1,28 +1,28 @@
|
|||
#ifndef TISHIDIALOG_H
|
||||
#define TISHIDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_tishidialog.h"
|
||||
#include <vector>
|
||||
#pragma execution_character_set("utf-8")
|
||||
class TiShiDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TiShiDialog(QWidget *parent = 0);
|
||||
~TiShiDialog();
|
||||
void init(std::vector<char*> OutCurve,QString);
|
||||
int flag;
|
||||
int check;
|
||||
private:
|
||||
Ui::TiShiDialog m_pUI;
|
||||
private slots:
|
||||
void slotTH();
|
||||
void slotHB();
|
||||
void slotLC();
|
||||
void slotTG();
|
||||
void slotCheck();
|
||||
};
|
||||
|
||||
#endif // TISHIDIALOG_H
|
||||
#ifndef TISHIDIALOG_H
|
||||
#define TISHIDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_tishidialog.h"
|
||||
#include <vector>
|
||||
#pragma execution_character_set("utf-8")
|
||||
class TiShiDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TiShiDialog(QWidget *parent = 0);
|
||||
~TiShiDialog();
|
||||
void init(std::vector<char*> OutCurve,QString);
|
||||
int flag;
|
||||
int check;
|
||||
private:
|
||||
Ui::TiShiDialog m_pUI;
|
||||
private slots:
|
||||
void slotTH();
|
||||
void slotHB();
|
||||
void slotLC();
|
||||
void slotTG();
|
||||
void slotCheck();
|
||||
};
|
||||
|
||||
#endif // TISHIDIALOG_H
|
||||
|
|
|
|||
|
|
@ -1,180 +1,180 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TiShiDialog</class>
|
||||
<widget class="QDialog" name="TiShiDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>382</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TiShiDialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>当前井次中下列数据已存在</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>后面所有井均执行此操作</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTH">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>替换</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonHB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>合并</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonLC">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>另存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTG">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>跳过</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TiShiDialog</class>
|
||||
<widget class="QDialog" name="TiShiDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>382</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TiShiDialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>当前井次中下列数据已存在</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>后面所有井均执行此操作</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTH">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>替换</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonHB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>合并</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonLC">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>另存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonTG">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>跳过</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <QPainter>
|
||||
#include "LogIO.h"
|
||||
#include "MemRdWt.h"
|
||||
#include <QDebug>
|
||||
|
||||
float mLineWidth=0.75;
|
||||
QString OilField;
|
||||
|
|
@ -150,6 +151,7 @@ QString GetProjectFolder()
|
|||
{
|
||||
index = index1;
|
||||
}
|
||||
|
||||
//
|
||||
QString strProjectDir;
|
||||
strProjectDir = applicationDirPath.mid(0,index+1) + "project/";
|
||||
|
|
@ -159,7 +161,6 @@ QString GetProjectFolder()
|
|||
{
|
||||
dir.mkdir(strProjectDir);
|
||||
}
|
||||
|
||||
return strProjectDir ;
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +177,7 @@ QString GetLogdataPath()
|
|||
}
|
||||
//
|
||||
QString strImagePath;
|
||||
strImagePath = applicationDirPath.mid(0,index+1) + "Logdata/";
|
||||
strImagePath = applicationDirPath.mid(0,index+1) + "LogData/";
|
||||
//
|
||||
QDir dir(strImagePath);
|
||||
if( !dir.exists( strImagePath ) )
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user