#ifndef DrawTvd_H #define DrawTvd_H #include #include #include //#include "QtNodeBuilder.h" //#include "QtWellTrackNode.h" //#include "QtWellSceneManager.h" //#include "ObjWelllog.h" //#include "WellSectionConst.h" //#include "WellSheetItem.h" //#include "ObjWellLogWavefile.h" #include "ViewInfo.h" //#include "Graphics2D/palettecolor/PaiColorTableData.h" #include "DrawBase.h" //BEGIN_OSGGRAPHICS_NAMESPACE; #pragma execution_character_set("utf-8") //#define GetClassID_ObjDrawTvd() "{98EB165F-1371-4D9F-9476-E4F5C19869B7}" typedef struct BxPointMessage { int Style; int Size; QColor Color; char MiaoShu[16]; }; struct LSCX_DATA { int NO;// 序号 NONE INT 4 float DEPTH;// 深度 m FLOAT 4 float TVD ;// 垂直深度 m FLOAT 4 float DEVI ;// 井斜角 G FLOAT 4 float AZIM ;// 井斜方位 G FLOAT 4 float AZZ ;// 真方位 G FLOAT 4 float XE ;// 东西位移 m FLOAT 4 float YN ;// 南北位移 m FLOAT 4 float HOFS ;// 水平位移 m FLOAT 4 float HOAZ ;// 闭合方位 G FLOAT 4 float GLD ;// 狗腿度 NONE FLOAT 4 }; struct TVD_BXPAR { int NO;;//靶心号 float BxDep;//设计垂深 float BxFw;//设计方位 float BxWy;//设计位移 float BxBj;//靶心半径 float BBG;//靶半高 float BBK;//靶半宽 char BNAME[16]; float BxScTDep;//实测垂深 float BxXDep;//对应斜深 float BxScFw;//实测方位 float BxScWy;//实测位移 float BxJ;//靶心距 float BxCzJ;//靶垂直距离 }; struct TVD_BXINF { int BxNum; TVD_BXPAR Tvd_BxPar[10]; }; struct TABLE_ZD_INF { char name[16]; char aliasname[32];//字段别名 char unit[16];//单位 int w;//打印宽度(字符数) int num;//数据位数 int dnum;//小数位数 int mode;//对齐方式 }; struct TABLE_PAR { float Head_Height; float Rec_Height; int ZdNum;//字段个数 TABLE_ZD_INF Zd_Inf[12]; }; struct FST_PAR { float MinXes; float MaxXes; float MinYns; float MaxYns; float MinXe; float MaxXe; float MinYn; float MaxYn; }; struct CST_PAR { float MaxWys; float MaxTVD; float MinTVD; float MaxWy; float MinWy; float DepSpace; float CsAngle; }; struct LTGJT_PAR { float MaxWys; float MaxWy; float DepSpace; float PrintDepSpace; float CsAngle; }; //class CObjDrawTvd :public CObjWellLog //{ //public: // CObjDrawTvd(){}; // virtual ~CObjDrawTvd(){}; // virtual QUuid GetTypeID()const{return GetClassID_ObjDrawTvd();}; //}; class CDrawTvd:public CDrawBase { public: CDrawTvd(void); virtual ~CDrawTvd(void); virtual void ReadData(); //virtual void SaveData(); virtual void Refurbish(); virtual void InitProperty(); virtual void GetProperty(); //virtual void _Update( eUpdateEvent e,CObjectEventParam *pEventParam ); int m_PointNum; CViewInfo* objViewInfo; CViewInfo* m_pViewInfo; // 以下变量需保存在模板里 //Tvd QString m_TableName; QString m_AliasName; QString m_AliasWellName;//显示井名 bool m_IsDrawBxcs; bool m_IsDrawTable; bool m_IsDrawFst; bool m_IsDrawCst; bool m_IsDrawCst1; bool m_IsDrawCst2; bool m_IsDrawCst3; bool m_IsDrawLtgjt; LSCX_DATA *m_Lscx; int DrawTable(int y_Start, QPainter* pDC,QRectF mrt); int DrawFst(int y_Start, QPainter* pDC,QRectF mrt); int DrawCst(int y_Start, QPainter* pDC,QRectF mrt,CST_PAR CPar,int no=3); int DrawLtgjt(int y_Start, QPainter* pDC,QRectF mrt); int DrawBxcs(int y_Start, QPainter* pDC,QRectF mrt); // 4-边框,格线,轨迹线,靶心半径,靶心连线的宽度、类型和颜色 int m_FrameWidth,m_GridWidth,m_GuijiWidth,m_BxbjWidth,m_BxlxWidth; QColor m_FrameColor,m_GridColor,m_GuijiColor,m_BxbjColor,m_BxlxColor; //道头(井眼轨迹)、标题(三图一表的标题)、数据表、刻度、注释的字体属性 QFont m_HeadFont,m_TitleFont,m_TableFont,m_ScaleFont,m_NoteFont; QColor m_HeadColor,m_TitleColor,m_TableColor,m_ScaleColor,m_NoteColor; int m_FontAngle[5]; BOOL IsVert[5];//字符串方向是否垂直(1) int hFormat[5],vFormat[5];//水平、垂直对齐方式 BOOL ShowHComb,ShowVComb,ShowVertCheck;//水平、垂直对齐方式设置组件、字符串方向(垂直)设置 QFont *Font1,*Font2,*FontTable; QPen m_GuiJiPen,m_FramePen,m_GridPen,m_BxbjPen,m_BxlxPen; QString m_Title_table,m_Title_cst,m_Title_fst,m_Title_ltgj; float Xmax,Xmin,Ymax,Ymin,delt;//刻度最大最小值 float Xmaxs,Xmins,Ymaxs,Ymins;//实际最大最小值 float BxDep,BxDep2,BxBj,BxBj2,BxFw,BxFw2,BxWy,BxWy2; float xfactor,yfactor,xscale,yscale; int TableFontWidth,ScaleFontWidth,ScaleFontHeight,NoteFontWidth,NoteFontHeight; int TitleFontWidth,TitleFontHeight; float m_Width; float m_Height; float m_Bottom; float m_Left; float m_Right; float m_Top; int XCenter; int flag; TVD_BXINF Tvd_BxInf,Tvd_BxInf_Int; FST_PAR FPar; TABLE_PAR TPar; CST_PAR CPar; CST_PAR CPar_HOFF; CST_PAR CPar_XE; CST_PAR CPar_YN; LTGJT_PAR LPar; // 2013.6.8 add for 绘制靶心 BxPointMessage m_SjBxPointMessage,m_ScBxPointMessage;//设计靶心点信息,实测靶心点信息 BOOL m_FstPlotBx; BOOL m_CstPlotBx; BOOL m_LtgjtPlotBx; BOOL m_PlotBxlx; BOOL m_bPlotBhx; //绘制闭合线 //Tvd void DrawTvd(QPainter* pdc,QRectF mrt); /** * @brief 绘制曲线道头 */ virtual void DrawHead(QPainter *pPainter,QRectF rect,QRectF trect=QRectF()); /** * @brief 绘制曲线体 */ virtual void DrawClient(QPainter *pPainter,QRectF rt); virtual void DrawSidelines(QPainter *pPainter,QRectF rt); QPoint ComputeXY(float val_x,float val_y,float val_z,float angle_x,float angle_y,float angle_z,float x0,float y0,float xfac,float yfac); QFont TableFont; QFont ScaleFont; QFont NoteFont; QFont TitleFont; QList rgbList; }; //END_OSGGRAPHICS_NAMESPACE #endif // DrawTvd_H