添加生成数据表、分段生成数据表
This commit is contained in:
parent
25f6ba87c2
commit
245b416754
5529
logPlus/QtWindowWellSection.cpp
Normal file
5529
logPlus/QtWindowWellSection.cpp
Normal file
File diff suppressed because it is too large
Load Diff
167
logPlus/QtWindowWellSection.h
Normal file
167
logPlus/QtWindowWellSection.h
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
/**
|
||||
* @file QtWindowWellSection.h
|
||||
* @brief well section 窗口 插件,包括单井,多井窗口
|
||||
* @date 2014-5-26
|
||||
* @author: liyonggang
|
||||
*/
|
||||
#ifndef CQTWINDOWWELLSECTION__H
|
||||
#define CQTWINDOWWELLSECTION__H
|
||||
#pragma warning( push ,0)
|
||||
#include <QMainWindow>
|
||||
#include "slf.h"
|
||||
#include <QLineEdit>
|
||||
#include "BaseObject.h"
|
||||
#include "ObjWelllog.h"
|
||||
// #include "VecWindow.h"
|
||||
// #include "List_Table_Inf.h"
|
||||
// #include "WellSectionExport.h"
|
||||
// #include "ObjWellTrack.h"
|
||||
// #include "WellSectionWindowDocument.h"
|
||||
#include <QTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#pragma warning( pop)
|
||||
// BEGIN_OSGGRAPHICS_NAMESPACE
|
||||
#pragma execution_character_set("utf-8")
|
||||
#pragma warning( push ,0)
|
||||
#pragma warning( pop )
|
||||
struct LIST_TABLE_INF
|
||||
{
|
||||
int lstm;//是否每米取值,0=不,>0,指定间隔
|
||||
char m_TableName[16];
|
||||
char m_TableType[16];//输出的统计表类型
|
||||
char m_TableSpFIELD[16];//特征字段
|
||||
int SPVALNUM;
|
||||
char SPVAL[100][116];
|
||||
int IsHB;
|
||||
int Table_Field_Num;
|
||||
int m_Mode;//取值模式选择:0-每条曲线按各自给定取值方式取值,1-按给定曲线的极值点深度取值
|
||||
int m_Flag;//
|
||||
int IsFC;//层内层列表
|
||||
char m_CurveName[501];//特征曲线名
|
||||
Slf_TABLE_FIELD Table_Field[100];
|
||||
char RenName[100][116];
|
||||
BYTE Type[100];
|
||||
BYTE GetValueMode[100];
|
||||
char ZdIndex[100][116];
|
||||
char Format[100][116];
|
||||
char TableName[100][116];
|
||||
};
|
||||
|
||||
struct jiegutable_struct
|
||||
{
|
||||
int no;
|
||||
float sdep;
|
||||
float thick;
|
||||
};
|
||||
|
||||
class /*WELLSECTION_EXPORT*/ CQtWindowWellSection: public QMainWindow/* : public CVecWindow*/
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CQtWindowWellSection();
|
||||
virtual ~CQtWindowWellSection();
|
||||
void slotRemoveWell();
|
||||
// //参见CVecWindow::GetWindowConfig
|
||||
// virtual void GetWindowConfig( EWindowFlag &WindowFlag,CVecSceneManager*&pSceneManager,
|
||||
// QVector<sUIBuilder>&vUIBuilder,CBaseObject *&pDefaultShowObject,
|
||||
// QVector<QUuid> &vViewCommandID,osg::Vec4f& backgroundColor,bool bForDebugData );
|
||||
|
||||
//参见CVecWindow::InitBeforShow
|
||||
// virtual void InitBeforShow(bool bCompositeWindow);
|
||||
// virtual void AfterOpenWindow();
|
||||
// virtual void UpdateObject(eUpdateEvent e,CObjectEventParam *pEventParam =NULL,QVariant vtPropertyValue=QVariant());
|
||||
double GetDepByPos(double x,double y);
|
||||
|
||||
//窗口默认设定pick模式
|
||||
void PickFirst();
|
||||
// virtual void focusInEvent ( QFocusEvent * event);
|
||||
//virtual void focusOutEvent ( QFocusEvent * event);
|
||||
// void AddDataDrawObject(QVector<CObjWellTrack*> &welltracks,CWellSectionWindowDocument *pDoc,CObjWellTrack*pWellTrack,CObjWell *well,CBaseObject*objfromplugin);
|
||||
protected:
|
||||
/**
|
||||
* @brief 重载该函数来生成一个支持两个垂直滚动条的Viewer
|
||||
*/
|
||||
// virtual CVecViewer* CreateViewer();
|
||||
void OnListBedValue(QString m_csWellName,QString m_OGTableName);
|
||||
void CreateTattle(QString m_csWellName,QString m_OGTableName,QString OutTableName,QList<float>& sdep,QList<float>& edep);
|
||||
|
||||
public slots:
|
||||
// void slotNewDataAndDraw();//
|
||||
void slotListData(CObjWellLog *pLog);
|
||||
void slotZoneListData(CObjWellLog *pLog);
|
||||
void slotSetListTableStruct();
|
||||
// void slotSetMegCurve();
|
||||
// void slotSetOtherMegCurve();
|
||||
// void slotSetStandardMegCurve();
|
||||
|
||||
// void slotSetShiftCurve(int type);
|
||||
// void slotSetOtherShiftCurve(int type);
|
||||
// void slotSetStandardCurve(int type);
|
||||
void slotReFreshZoneListData();
|
||||
// void slotSetShiftCurve();
|
||||
// void slotSetOtherShiftCurve();
|
||||
// void slotSetStandardCurve();
|
||||
// void slotChangeAllCurves();
|
||||
// void slotMoveAllCurves();
|
||||
// void slotCardMoveCurves();
|
||||
// void slotClearShiftZonePoint();
|
||||
// void slotClearShiftZonePoint0();
|
||||
// void slotExecuteDepthShifting();
|
||||
// void slotExecuteDepthAutoComp();
|
||||
// void slotDepthMerge();
|
||||
// void slotDepthScrMerge();
|
||||
// void slotClearStandardShift();
|
||||
// void slotClearShiftCurves();
|
||||
// void slotClearShiftCurve(CObjWellLog *pLogt);
|
||||
|
||||
// void slotClearStandardMeg();
|
||||
// void slotClearMegCurves();
|
||||
// void setTablePointValue(float dep);
|
||||
|
||||
// void slotClearStandardShift(int type);
|
||||
// void slotClearShiftCurves(int type);
|
||||
// void slotSetJoinTool();
|
||||
// void slotSetShiftTool();
|
||||
// void slotRun();
|
||||
// void onCurrentLineHighLight();
|
||||
// void slotReplace();
|
||||
// void slotJieguChangeRun();
|
||||
// void slotJieguChangeOK();
|
||||
// void slotJieguReFresh();
|
||||
// void slotCardRun();
|
||||
// void slotDepthCheck();
|
||||
// void slotCardSave();
|
||||
// void slotSetDep();
|
||||
// void slotCheckCCLDepthShift();
|
||||
void onTimer();
|
||||
public:
|
||||
// double getXGeoFromOSGGlobal(CObjWellTrack*m_pWellTrack,double xOSGGlobal);
|
||||
// double getYGeoFromOSGGlobal(CObjWellTrack*m_pWellTrack,double yOSGGlobal);
|
||||
// double getYGeoNormalFromPixel(CObjWellTrack*m_pWellTrack,double y);
|
||||
// double getYOSGGlobalFromPixel(CObjWellTrack*m_pWellTrack,double y);
|
||||
// QRectF getLineRangeRectOSGGLobal(CObjWellTrack*m_pWellTrack);
|
||||
// double getXOSGGlobalFromPixel(CObjWellTrack*m_pWellTrack,double x);
|
||||
// QVector<QPointF> SetLinePoint(CWellSectionWindowDocument *pDoc,CObjWellTrack*m_pWellTrack,CurveLine *pLine,QRectF lineRangeRect);
|
||||
// virtual void UpdateHUD();
|
||||
// void updateLines(CObjWellTrack*m_pWellTrack);
|
||||
void SetCLLDepthShift();
|
||||
QTextEdit *pTDialog;
|
||||
QLineEdit *spinbox1;
|
||||
QLineEdit *spinbox2;
|
||||
QLineEdit *spinbox3;
|
||||
// QList<CObjWellLog*> m_LOGS;
|
||||
QDialogButtonBox *m_ButtonBox;
|
||||
int recordnum;
|
||||
int *record;
|
||||
float *thicks;
|
||||
struct jiegutable_struct *jiegudtat,*jiegudtatshift;
|
||||
int*pairno;
|
||||
int jiegunum;
|
||||
QTimer *m_clockTimer;
|
||||
LIST_TABLE_INF m_ListTableInf;
|
||||
void OnListTableInf(QString m_ParFileName);
|
||||
|
||||
};
|
||||
|
||||
// END_OSGGRAPHICS_NAMESPACE
|
||||
#endif // OSGCROSSPLOTWINDOW_H
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
#include "SetPageMegDlg.h"
|
||||
#include "chooseShiftCurvesDlg.h"
|
||||
#include "completertextedit.h"
|
||||
#include "QtWindowWellSection.h"
|
||||
|
||||
//主窗口,为了方便获取tab当前页
|
||||
extern MainWindow *g_mainWindow;
|
||||
|
|
@ -968,6 +969,10 @@ void MainWindowCurve::initMainToolBar()
|
|||
QIcon PrintIcon(::GetImagePath()+"icon/Print.png");
|
||||
QIcon PrintSetupIcon(::GetImagePath()+"icon/PrintPage.png");
|
||||
QIcon PrintPreviewIcon(::GetImagePath()+"icon/PrintPrev.png");
|
||||
QIcon CreateDataTableIcon(::GetImagePath()+"icon/CreateOGResult.png");
|
||||
QIcon ZONEDataTableIcon(::GetImagePath()+"icon/zonescreatetable.png");
|
||||
QIcon SetDataTableFormatIcon(::GetImagePath()+"icon/gridset.png");
|
||||
QIcon ReFreshZONEDataTableIcon(::GetImagePath()+"icon/CreateOGResult.png");
|
||||
QIcon doubleHeadIcon(::GetImagePath()+"icon/oneortwohead.png");
|
||||
QIcon crossIcon(::GetImagePath()+"icon/Cross.png");
|
||||
QIcon autorollIcon(::GetImagePath()+"icon/autoroll.png");
|
||||
|
|
@ -995,6 +1000,12 @@ void MainWindowCurve::initMainToolBar()
|
|||
m_PrintAc = new QAction(PrintIcon, "打印", this);
|
||||
m_PrintSetupAc = new QAction(PrintSetupIcon, "设置打印页", this);
|
||||
m_PrintPreviewAc = new QAction(PrintPreviewIcon, "打印预览", this);
|
||||
|
||||
m_CreateDataTable = new QAction(CreateDataTableIcon, "生成数据表", this);
|
||||
m_ZONEDataTable = new QAction(ZONEDataTableIcon, "分段生成数据表", this);
|
||||
m_SetDataTableFormat = new QAction(SetDataTableFormatIcon, "设置数据表格式", this);
|
||||
m_ReFreshZONEDataTable = new QAction(ReFreshZONEDataTableIcon, "按深度表更新数据表", this);
|
||||
|
||||
m_blackAc = new QAction(blackIcon, "黑白图", this);
|
||||
m_doubleHeadAc = new QAction(doubleHeadIcon, "单曲线头", this);
|
||||
m_executeDepthShiftAc = new QAction(executeDepthShiftIcon, "校深", this);
|
||||
|
|
@ -1028,6 +1039,15 @@ void MainWindowCurve::initMainToolBar()
|
|||
menuPrint->addAction(m_PrintPreviewAc); //打印预览
|
||||
printMenuAction->setMenu(menuPrint);
|
||||
|
||||
// 生成数据表
|
||||
QAction* CreateTableMenuAction = new QAction(CreateDataTableIcon, "生成数据表", this);
|
||||
// 创建生成数据表下拉菜单
|
||||
QMenu* menuCreateTable = new QMenu(this);
|
||||
menuCreateTable->addAction(m_CreateDataTable); //生成数据表
|
||||
menuCreateTable->addAction(m_ZONEDataTable); //分段生成数据表
|
||||
// menuCreateTable->addAction(m_SetDataTableFormat); //设置数据表格式
|
||||
// menuCreateTable->addAction(m_ReFreshZONEDataTable); //按深度表更新数据表
|
||||
CreateTableMenuAction->setMenu(menuCreateTable);
|
||||
|
||||
// 图文件
|
||||
QAction* templateAction = new QAction(templateIcon, "图文件", this);
|
||||
|
|
@ -1056,6 +1076,7 @@ void MainWindowCurve::initMainToolBar()
|
|||
// ui->mainToolBar->addAction(m_SaveAsPictureAc); //导出长图
|
||||
// ui->mainToolBar->addAction(m_SaveAsPdfAc); //导出PDF
|
||||
// ui->mainToolBar->addAction(m_SaveAsSvgAc); //导出SVG
|
||||
ui->mainToolBar->addAction(CreateTableMenuAction); //生成数据表
|
||||
ui->mainToolBar->addSeparator();
|
||||
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
|
||||
|
||||
|
|
@ -1102,6 +1123,11 @@ void MainWindowCurve::initMainToolBar()
|
|||
connect(m_PrintSetupAc, &QAction::triggered, this, &MainWindowCurve::s_PrintSetup);
|
||||
connect(m_PrintPreviewAc, &QAction::triggered, this, &MainWindowCurve::s_PrintPreview);
|
||||
|
||||
connect(m_CreateDataTable, &QAction::triggered, this, &MainWindowCurve::s_CreateDataTable);
|
||||
connect(m_ZONEDataTable, &QAction::triggered, this, &MainWindowCurve::s_ZONEDataTable);
|
||||
connect(m_SetDataTableFormat, &QAction::triggered, this, &MainWindowCurve::s_SetDataTableFormat);
|
||||
connect(m_ReFreshZONEDataTable, &QAction::triggered, this, &MainWindowCurve::s_ReFreshZONEDataTable);
|
||||
|
||||
connect(m_blackAc, &QAction::triggered, this, &MainWindowCurve::s_Black);
|
||||
connect(m_doubleHeadAc, &QAction::triggered, this, &MainWindowCurve::s_DoubleHead);
|
||||
connect(m_executeDepthShiftAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteDepthShift);
|
||||
|
|
@ -5018,6 +5044,88 @@ void MainWindowCurve::s_SaveAsSvg()
|
|||
_slotExport(aa, 4, pngName, strTmpName);
|
||||
}
|
||||
|
||||
//生成数据表
|
||||
void MainWindowCurve::s_CreateDataTable()
|
||||
{
|
||||
QString strSlfName = m_SelectTableItem.m_strSlfName;
|
||||
QString strLineName = m_SelectTableItem.m_strLineName;
|
||||
if(strSlfName.isEmpty() || strLineName.isEmpty())
|
||||
{
|
||||
QMessageBox::information(nullptr, "提示", "先选择数据表对象!");
|
||||
return;
|
||||
}
|
||||
|
||||
CMemRdWt mem;
|
||||
if(mem.Open(strSlfName.toStdString().c_str()))
|
||||
{
|
||||
int iIndex=mem.FindObjectName((char *)(strLineName.toStdString().c_str()));
|
||||
if (iIndex >= 0)
|
||||
{
|
||||
short objectType=mem.GetObjectType(iIndex);
|
||||
if(objectType <=CARD_OBJECT&&objectType!=0)
|
||||
{
|
||||
QMessageBox::information(nullptr, "提示", "先选择数据表对象!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
CObjWellLog* pLog= new CObjWellLog();
|
||||
|
||||
pLog->SetSlfFileName(strSlfName);
|
||||
pLog->SetName(strLineName);
|
||||
CQtWindowWellSection QtWindowWellSection;
|
||||
QtWindowWellSection.slotListData(pLog);
|
||||
}
|
||||
|
||||
//分段生成数据表
|
||||
void MainWindowCurve::s_ZONEDataTable()
|
||||
{
|
||||
QString strSlfName = m_SelectTableItem.m_strSlfName;
|
||||
QString strLineName = m_SelectTableItem.m_strLineName;
|
||||
if(strSlfName.isEmpty() || strLineName.isEmpty())
|
||||
{
|
||||
QMessageBox::information(nullptr, "提示", "先选择数据表对象!");
|
||||
return;
|
||||
}
|
||||
|
||||
CMemRdWt mem;
|
||||
if(mem.Open(strSlfName.toStdString().c_str()))
|
||||
{
|
||||
int iIndex=mem.FindObjectName((char *)(strLineName.toStdString().c_str()));
|
||||
if (iIndex >= 0)
|
||||
{
|
||||
short objectType=mem.GetObjectType(iIndex);
|
||||
if(objectType <=CARD_OBJECT&&objectType!=0)
|
||||
{
|
||||
QMessageBox::information(nullptr, "提示", "先选择数据表对象!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
CObjWellLog* pLog= new CObjWellLog();
|
||||
pLog->SetSlfFileName(strSlfName);
|
||||
pLog->SetName(strLineName);
|
||||
CQtWindowWellSection QtWindowWellSection;
|
||||
QtWindowWellSection.slotZoneListData(pLog);
|
||||
}
|
||||
|
||||
//设置数据表格式
|
||||
void MainWindowCurve::s_SetDataTableFormat()
|
||||
{}
|
||||
|
||||
//按深度表更新数据表
|
||||
void MainWindowCurve::s_ReFreshZONEDataTable()
|
||||
{}
|
||||
|
||||
//选择井
|
||||
void MainWindowCurve::s_selectWell()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -266,6 +266,10 @@ public:
|
|||
QAction* m_PrintAc = nullptr; //打印
|
||||
QAction* m_PrintSetupAc = nullptr; //打印设置
|
||||
QAction* m_PrintPreviewAc = nullptr; //打印预览
|
||||
QAction* m_CreateDataTable = nullptr; //生成数据表
|
||||
QAction* m_ZONEDataTable = nullptr; //分段生成数据表
|
||||
QAction* m_SetDataTableFormat = nullptr; //设置数据表格式
|
||||
QAction* m_ReFreshZONEDataTable = nullptr; //按深度表更新数据表
|
||||
QAction* m_blackAc = nullptr; //黑白图
|
||||
QAction* m_doubleHeadAc = nullptr; //单曲线头
|
||||
QAction* m_executeDepthShiftAc = nullptr; //校深
|
||||
|
|
@ -384,6 +388,10 @@ public slots:
|
|||
void s_Print(); //打印
|
||||
void s_PrintSetup(); //打印设置
|
||||
void s_PrintPreview(); //打印预览
|
||||
void s_CreateDataTable(); //生成数据表
|
||||
void s_ZONEDataTable(); //分段生成数据表
|
||||
void s_SetDataTableFormat();//设置数据表格式
|
||||
void s_ReFreshZONEDataTable();//按深度表更新数据表
|
||||
void s_Zoom(); //缩放
|
||||
void s_ZoomIn(); //放大
|
||||
void s_ZoomOut(); //缩小
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user