2025-10-29 17:23:30 +08:00
|
|
|
|
#ifndef FORMDRAW_H
|
|
|
|
|
|
#define FORMDRAW_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QPainter>
|
|
|
|
|
|
#include <QPaintEvent>
|
|
|
|
|
|
#include "qmycustomplot.h"
|
|
|
|
|
|
#include "formtitle.h"
|
|
|
|
|
|
#include "formtrack.h"
|
|
|
|
|
|
#include "LogIO.h"
|
2025-11-25 17:56:20 +08:00
|
|
|
|
#include "MemRdWt.h"
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
|
|
|
2026-01-04 16:54:55 +08:00
|
|
|
|
//const int iFracType=15;
|
2025-11-25 17:56:20 +08:00
|
|
|
|
//蝌蚪图
|
|
|
|
|
|
typedef struct FRACDEF
|
|
|
|
|
|
{
|
|
|
|
|
|
int iCode; //代码
|
|
|
|
|
|
QString csName; // 名称
|
|
|
|
|
|
int iType; //形状代码(1:正弦曲线 2:连线 3:封闭区域)
|
|
|
|
|
|
QColor crColor; //颜色(红 绿 蓝)
|
|
|
|
|
|
int nLineWidth; //线宽度
|
|
|
|
|
|
int bDraw; // 是否显示
|
|
|
|
|
|
}FRAC_DEF;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct FRACTABLE
|
|
|
|
|
|
{
|
|
|
|
|
|
float DEP; //深度
|
|
|
|
|
|
float AorX;
|
|
|
|
|
|
float XETAorH;
|
|
|
|
|
|
float W;
|
|
|
|
|
|
float DIPorS; //倾角
|
|
|
|
|
|
float DIR; //方位
|
|
|
|
|
|
float ID; //裂缝代码/可信度
|
|
|
|
|
|
float NUM;
|
|
|
|
|
|
float X[16],Y[16];//X0,Y0,X1,Y1,X2,Y2,X3,Y3,X4,Y4,X5,Y5,X6,Y6,X7,Y7,X8,Y8,X9,Y9;
|
|
|
|
|
|
}FRAC_TABLE;
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class FormDraw;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class FormDraw : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit FormDraw(QWidget *parent = nullptr, QString m_strWellName="", QString strTrackName="");
|
|
|
|
|
|
~FormDraw();
|
|
|
|
|
|
|
2025-12-24 20:45:48 +08:00
|
|
|
|
void setDrawData(QStringList slist);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
private:
|
|
|
|
|
|
Ui::FormDraw *ui;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void dragEnterEvent(QDragEnterEvent* event);
|
|
|
|
|
|
void dragMoveEvent(QDragMoveEvent* event);
|
|
|
|
|
|
void dropEvent(QDropEvent* event);
|
2025-11-05 14:03:27 +08:00
|
|
|
|
//
|
|
|
|
|
|
void s_mouseWheel(QWheelEvent *event);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2025-11-13 15:23:17 +08:00
|
|
|
|
void setRowHeight(double dHight, QProgressBar *progressBar, int iSplit);
|
2026-01-23 14:53:34 +08:00
|
|
|
|
void setColWidth(int iNewWidth);
|
2025-11-13 15:23:17 +08:00
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
public:
|
2025-10-30 11:55:37 +08:00
|
|
|
|
QString m_strUuid;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
QString m_strWellName;
|
|
|
|
|
|
QString m_strTrackName;
|
|
|
|
|
|
|
2026-01-23 18:20:18 +08:00
|
|
|
|
int m_iScale=200;
|
|
|
|
|
|
double m_iY1=0;
|
|
|
|
|
|
double m_iY2=0;
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
FormTrack *m_formTrack;
|
|
|
|
|
|
|
|
|
|
|
|
QStringList m_listLineName;
|
2025-11-18 11:40:42 +08:00
|
|
|
|
QStringList m_listWaveName;
|
2025-11-25 17:56:20 +08:00
|
|
|
|
QStringList m_listTableName;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
//X坐标
|
|
|
|
|
|
float m_vmax;
|
|
|
|
|
|
float m_vmin;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
2025-10-30 11:55:37 +08:00
|
|
|
|
void initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
2025-11-06 14:43:37 +08:00
|
|
|
|
double newLeftScale=-9999, double newRightScale=-9999, QString strScaleType="线性", QColor lineColor=QColor(0,0,0), double width=1, Qt::PenStyle lineStyle=Qt::SolidLine);
|
2025-11-06 17:34:31 +08:00
|
|
|
|
void addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<double> y, QString strSlfName, QString strLineName, QString strAliasName, QString strUnit,
|
2025-11-06 14:43:37 +08:00
|
|
|
|
double newLeftScale=-9999, double newRightScale=-9999, QString strScaleType="线性", QColor lineColor=QColor(0,0,0), double width=1, Qt::PenStyle lineStyle=Qt::SolidLine);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
void setupLineStyleDemo(QMyCustomPlot *customPlot);
|
|
|
|
|
|
void setupSelectionDemo(QMyCustomPlot *customPlot);
|
|
|
|
|
|
|
2025-11-25 17:56:20 +08:00
|
|
|
|
//波列
|
2025-12-30 17:38:11 +08:00
|
|
|
|
void initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples);
|
|
|
|
|
|
void initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples);
|
2025-11-21 10:14:28 +08:00
|
|
|
|
void initWave2(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
2025-11-18 11:40:42 +08:00
|
|
|
|
|
2025-12-29 18:13:00 +08:00
|
|
|
|
//图像-3d成图
|
|
|
|
|
|
int getColorConfig(QVector <QString> &qFiles);
|
2025-12-30 17:38:11 +08:00
|
|
|
|
void DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString &strWaveName, int &_nSamples);
|
2025-12-29 18:13:00 +08:00
|
|
|
|
|
2025-11-25 17:56:20 +08:00
|
|
|
|
//表格曲线
|
|
|
|
|
|
void initTableLine(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
void ReadFracDef();
|
2025-12-01 17:13:17 +08:00
|
|
|
|
void ReadData(QString strSlfName, QString strLineName);//表格
|
|
|
|
|
|
void ReadData(QString strSlfName, QString strLineName, int iCurve, Slf_CURVE *curve);//曲线
|
|
|
|
|
|
void DrawDip(QMyCustomPlot *widget);
|
2025-12-25 15:10:14 +08:00
|
|
|
|
void DrawStck(QMyCustomPlot *widget);
|
2025-11-25 17:56:20 +08:00
|
|
|
|
void DrawTabDip(QMyCustomPlot *widget);
|
2025-11-26 11:24:46 +08:00
|
|
|
|
void CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio);
|
2025-12-01 17:13:17 +08:00
|
|
|
|
void Refurbish();
|
2025-12-26 17:53:02 +08:00
|
|
|
|
void DrawJykt(QMyCustomPlot *widget, QString strSlfName);
|
2025-12-29 18:13:00 +08:00
|
|
|
|
void DrawDenv(QMyCustomPlot *widget, QString strSlfName);
|
2025-12-26 17:53:02 +08:00
|
|
|
|
|
2025-11-25 17:56:20 +08:00
|
|
|
|
int m_PointNum;
|
|
|
|
|
|
//
|
|
|
|
|
|
int FracNum;
|
|
|
|
|
|
float *m_pflTab_Frac;
|
|
|
|
|
|
bool m_bFracIsOK;
|
|
|
|
|
|
//CString m_csUnit;
|
|
|
|
|
|
//
|
|
|
|
|
|
Slf_CURVE m_Curve,m_Curve2,m_Curve3;
|
2025-12-24 20:45:48 +08:00
|
|
|
|
char *m_Value = NULL,*m_Value2 = NULL,*m_Value3 = NULL;
|
2025-11-25 17:56:20 +08:00
|
|
|
|
// 以下变量需保存在模板里
|
|
|
|
|
|
// 绘制时,方位/倾角/可信度曲线的深度、采样间隔应该一致
|
|
|
|
|
|
//CString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad; // 方位/倾角/可信度 曲线名
|
|
|
|
|
|
float m_LeftVal2,m_RightVal2;
|
|
|
|
|
|
float m_flGrad1,m_flGrad2; // 可信度
|
2025-12-24 20:45:48 +08:00
|
|
|
|
int m_bTableData = 0;//表格或曲线
|
2025-11-25 17:56:20 +08:00
|
|
|
|
QRectF m_Rect;
|
|
|
|
|
|
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
|
|
|
|
|
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
|
2025-12-25 15:10:14 +08:00
|
|
|
|
float m_nSltk; // 杆状图长度
|
2025-11-25 17:56:20 +08:00
|
|
|
|
QColor m_crPointFill,m_crTail,m_crCircle;
|
2025-12-01 17:13:17 +08:00
|
|
|
|
QColor m_crGridSmall;
|
2025-12-24 20:45:48 +08:00
|
|
|
|
QString m_strSlfName;
|
2025-11-25 17:56:20 +08:00
|
|
|
|
//TabDip
|
|
|
|
|
|
QString m_qsWellName,m_qsTable; //
|
|
|
|
|
|
QString m_qsDepth,m_qsDIP,m_qsDIR,m_qsID,m_qsProperty; // 控制曲线
|
|
|
|
|
|
QList<FRAC_DEF> m_FracDefList;
|
|
|
|
|
|
QList<FRAC_TABLE> m_FracTabList;
|
|
|
|
|
|
bool m_bTypeDraw[iFracType];
|
|
|
|
|
|
bool m_bDrawValue;
|
|
|
|
|
|
int m_iPrecision;//小数位数
|
2025-12-01 17:13:17 +08:00
|
|
|
|
float m_SDep,m_EDep,m_Rlev;
|
|
|
|
|
|
QString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad;
|
|
|
|
|
|
float m_LeftVal; //左刻度
|
|
|
|
|
|
float m_RightVal; //右刻度
|
2025-12-04 17:55:42 +08:00
|
|
|
|
|
2025-12-26 17:53:02 +08:00
|
|
|
|
//井眼垮塌矢量图
|
|
|
|
|
|
QString m_csCurveCAL;
|
|
|
|
|
|
float m_flStep;// 增加深度间隔
|
|
|
|
|
|
float m_nCircleLineWidth;//增加圆线宽
|
|
|
|
|
|
QColor m_crLine,m_crTailLine; // 圆线颜色,尾线颜色
|
|
|
|
|
|
float m_nOffset; // 角度偏移=0,主应力方向,=90,长轴方向
|
|
|
|
|
|
|
|
|
|
|
|
//井斜方位图
|
|
|
|
|
|
QString m_csCurveAZIM, m_csCurveDEVI; // 方位/倾角/可信度 曲线名
|
|
|
|
|
|
QColor m_TailColor,m_crCirCleColor;// add m_crCirCleColor圆线颜色
|
2025-12-30 11:18:02 +08:00
|
|
|
|
QColor m_crPointFillDenv;
|
2025-12-26 17:53:02 +08:00
|
|
|
|
|
2025-12-04 17:55:42 +08:00
|
|
|
|
//文字结论
|
|
|
|
|
|
void initWords(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
|
2025-12-05 18:27:24 +08:00
|
|
|
|
//解释结论
|
|
|
|
|
|
void initResult(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromSLF_Result(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
|
2025-12-16 18:13:53 +08:00
|
|
|
|
//录井剖面
|
|
|
|
|
|
void initGeoLith(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromSLF_GeoLith(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
|
2025-12-22 18:22:45 +08:00
|
|
|
|
//井壁取心
|
|
|
|
|
|
void initSwallCore(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromSLF_SwallCore(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
|
2025-12-23 17:15:39 +08:00
|
|
|
|
//固井结论
|
|
|
|
|
|
void initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromSLF_Gujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
|
2025-12-25 15:10:14 +08:00
|
|
|
|
//岩心实验数据
|
|
|
|
|
|
void initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
2025-12-29 18:13:00 +08:00
|
|
|
|
//岩心图片数据
|
|
|
|
|
|
void initIMAGE_DATA(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
|
|
|
|
|
bool LoadFromIMAGE_SLF(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
2025-12-24 20:45:48 +08:00
|
|
|
|
//深度
|
|
|
|
|
|
void initDepth(QMyCustomPlot *widget);
|
|
|
|
|
|
//频率统计图
|
|
|
|
|
|
void initFgrq(QMyCustomPlot *widget);
|
2025-12-30 16:11:58 +08:00
|
|
|
|
//玫瑰图
|
|
|
|
|
|
void initRose(QMyCustomPlot *widget);
|
|
|
|
|
|
void addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, const QPointF& p1, const QPointF& p2, const QPen& wPen);
|
2026-01-17 22:35:34 +08:00
|
|
|
|
|
|
|
|
|
|
// DCA检测
|
|
|
|
|
|
void initDCA(QMyCustomPlot *widget);
|
|
|
|
|
|
float ComputeCurvePos(float flVal,float lsc,float rsc,float lps,float rps,int iType,float scale,float flMin=-99999,float flMax=99999);
|
2026-01-27 11:19:25 +08:00
|
|
|
|
|
|
|
|
|
|
TDTResultItem* LoadTDTResult_SLF(QString strSlfName);
|
|
|
|
|
|
void initTDT(QMyCustomPlot *widget);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
signals:
|
|
|
|
|
|
//void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void s_addLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
|
|
|
|
|
void s_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
2025-11-06 14:43:37 +08:00
|
|
|
|
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
2025-10-30 11:55:37 +08:00
|
|
|
|
|
2025-11-04 14:44:14 +08:00
|
|
|
|
void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
|
|
|
|
|
void s_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
void s_handleRectRangeChange(QCPRange newRange);
|
|
|
|
|
|
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
2025-11-18 11:40:42 +08:00
|
|
|
|
|
2025-12-25 15:10:14 +08:00
|
|
|
|
void s_addGanZuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);//杆状图
|
2025-12-26 17:53:02 +08:00
|
|
|
|
//井眼垮塌矢量图
|
|
|
|
|
|
void s_addJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
//井斜方位图
|
|
|
|
|
|
void s_addDenv(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
2025-12-29 18:13:00 +08:00
|
|
|
|
//图像 成像
|
|
|
|
|
|
void s_addDrawImage(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
2026-01-13 14:10:52 +08:00
|
|
|
|
//斜井三图一表
|
|
|
|
|
|
void s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
//裂缝
|
2026-01-04 16:54:55 +08:00
|
|
|
|
void s_addCrack(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
2026-01-07 17:39:27 +08:00
|
|
|
|
|
|
|
|
|
|
//气测/FMT/射孔/文本
|
|
|
|
|
|
void s_addJiegutext(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
|
2025-12-26 17:53:02 +08:00
|
|
|
|
|
2026-01-05 15:15:37 +08:00
|
|
|
|
//地质层位道
|
|
|
|
|
|
void s_addGeoSection(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
|
2026-01-06 16:03:55 +08:00
|
|
|
|
//沉积相
|
|
|
|
|
|
void s_addLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
|
2026-01-13 14:10:52 +08:00
|
|
|
|
//多臂井径
|
|
|
|
|
|
void s_addMCals(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
|
2026-01-07 17:39:27 +08:00
|
|
|
|
//套管组件
|
|
|
|
|
|
void s_addTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
|
|
|
|
|
|
2026-01-13 14:10:52 +08:00
|
|
|
|
//TDT
|
2026-01-27 11:19:25 +08:00
|
|
|
|
// void s_addTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
2026-01-13 14:10:52 +08:00
|
|
|
|
|
2025-11-18 11:40:42 +08:00
|
|
|
|
//
|
|
|
|
|
|
void s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
2025-11-20 09:32:51 +08:00
|
|
|
|
void s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
2025-11-25 17:56:20 +08:00
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
void s_addTableLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
|
|
|
|
|
void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // FORMDRAW_H
|