logplus/logPlus/forminfo.h

343 lines
13 KiB
C
Raw Normal View History

2025-10-29 17:23:30 +08:00
#ifndef FORMINFO_H
#define FORMINFO_H
#include <QWidget>
#include <QPainter>
#include <QPaintEvent>
//
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include "qcustomplot.h"
2025-10-29 17:23:30 +08:00
#pragma execution_character_set("utf-8")
namespace Ui {
class FormInfo;
}
2026-03-26 17:01:43 +08:00
class CDrawTvd;
2025-10-29 17:23:30 +08:00
class FormInfo : public QWidget
{
Q_OBJECT
public:
explicit FormInfo(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="", QColor lineColor=QColor(255,0,0));
~FormInfo();
void initProperty(QJsonObject obj);
2025-10-29 17:23:30 +08:00
private:
Ui::FormInfo *ui;
protected:
void paintEvent(QPaintEvent *event);
public slots:
void dragEnterEvent(QDragEnterEvent* event);
void dragMoveEvent(QDragMoveEvent* event);
void dropEvent(QDropEvent* event);
//属性
//左刻度
void s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
2025-10-29 17:23:30 +08:00
//右刻度
void s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
//刻度类型
void s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
2025-10-29 17:23:30 +08:00
//线颜色
void s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
2025-10-29 17:23:30 +08:00
//线宽
void s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
2025-10-29 17:23:30 +08:00
//线型
void s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
//绘制方式
//曲线
void s_ChangeDrawLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawLine);
//杆状
void s_ChangeDrawGan(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawGan);
//点状
void s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint);
//绘制对称曲线
void s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
//数据点 符号类型
void s_ChangePointStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QCPScatterStyle::ScatterShape pointStyle);
2026-03-18 16:16:11 +08:00
//斜井三图一表
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QObject *pTvd);
2026-03-18 16:16:11 +08:00
2025-10-29 17:23:30 +08:00
//岩性填充-不填充
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
2025-10-29 17:23:30 +08:00
//岩性填充-填充
void s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
2025-10-29 17:23:30 +08:00
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
float vMin, float vMax, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode, bool bFillNow);
2025-10-29 17:23:30 +08:00
//修改曲线选择状态 iSelect=0未知1标准曲线2主曲线3从曲线
2026-01-30 09:47:13 +08:00
void s_ChangeLineStatus(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iSelect, bool bMerge);
2025-10-29 17:23:30 +08:00
public:
2025-10-30 11:55:37 +08:00
QString m_strUuid;
2026-03-08 23:22:36 +08:00
QString m_strTrackUuid="";
2025-10-29 17:23:30 +08:00
QString m_strSlfName;
QString m_strWellName;
QString m_strTrackName;
QString m_strLineName;
2026-04-01 09:07:28 +08:00
QString m_strAliasName; //显示名称
QFont m_strAliasNameFont = QFont("微软雅黑", 10); //显示名称字体
2026-03-24 11:10:09 +08:00
QString m_strUnit = "(米)";//单位
2026-04-01 09:07:28 +08:00
QFont m_strUnitFont = QFont("微软雅黑", 8);//单位字体
2026-03-20 15:33:39 +08:00
// 头部高度
int m_headHeight = 100;
bool m_bVerticaDrawing = false; // 垂向绘制
int m_nRotationAngle = 0; // 旋转角度
int m_iSelect=0; //iSelect=0未知1标准曲线2主曲线3从曲线
2026-01-30 09:47:13 +08:00
bool m_bMerge = false;//是拼接状态,否代表校深状态。为了切换时做数据清理
QString m_strType;//类型curve, wave
2025-10-29 17:23:30 +08:00
//
double m_dWidth;//线宽
QColor m_lineColor;//颜色(曲线颜色,固井文字颜色)
Qt::PenStyle m_lineStyle;//线形
2025-10-29 17:23:30 +08:00
//X坐标
float m_vmin;//左刻度
float m_vmax;//右刻度
QString m_strScaleType;//刻度类型(线性,对数)
2026-03-08 23:22:36 +08:00
qint8 m_nLeftCross = 0; // 左跨道个数
qint8 m_nRightCross = 0; // 右跨道个数
2025-10-29 17:23:30 +08:00
QFont m_curveNameFont; // 曲线名称字体
QFont m_curveUnitFont; // 曲线单位字体
QFont m_curveScaleFont; // 曲线刻度字体
//绘制方式
bool m_bDrawLine = true; // 曲线
bool m_bDrawGan = false; // 杆状
bool m_bDrawPoint = false; // 点状
bool m_bDrawSymmetry = false; // 绘制对称曲线
QCPScatterStyle::ScatterShape m_pointStyle=QCPScatterStyle::ssCircle;//数据点,符号类型,圆,三角等
2025-10-29 17:23:30 +08:00
//岩性填充
QString m_newHeadFill;//头部图例
QString m_newTargetLine;//目标曲线
QString m_newFillType;//填充类型
QString m_newFillMode;//填充模式
2025-10-29 17:23:30 +08:00
QColor m_newColor;//填充颜色
QString m_newLithosImage = "";//岩性图片
float m_new_vMin;//其他目标曲线
float m_new_vMax;//其他目标曲线
QString m_strOtherScaleType;//其他目标曲线,刻度类型(线性,对数)
QColor m_frontColor;//岩性前景色
QColor m_backColor;//岩性背景色
2025-10-29 17:23:30 +08:00
int m_nJg;
2026-02-05 14:53:44 +08:00
int m_nDrawType; // 绘图类型
int m_nFillType; // 填充类型
bool m_bDrawDepth = false; // 绘制波深度
bool m_bDrawBase = false; // 绘制波基线
bool m_bOddEven = false; // 奇偶配色
QString m_strAmp; // 幅度刻度
float m_fMaxAmp; // 最大振幅
bool m_bShowScale; // 显示刻度
float m_fWaveBase = 0.0f; // 波列基值
int m_nWaveJg = 100; // 波形间隔
float m_fWaveHei = 1; // 波形高度
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数
int m_nSchemeIndex = 1; // 调色板参数设置-色板
// 解释结论
int m_nConclusionProportion = 50; // 结论占比%
int m_nShowPos = 0; // 显示位置(cm)
bool m_bShowLayerNo = true; // 显示层号
QFont m_layerFont; // 层号字体
float m_fLayerRotate = 0.0f; // 层号旋转
//录井剖面
bool m_bLithColor = true; // 岩性配色显示
bool m_bLithOne = true; // 单岩性显示
bool m_bShowOil = true; // 显示含油性
bool m_bCenterOil = false; // 含油性居中
bool m_bShowColor = false; // 显示颜色
bool m_bShowColorNum = false; // 绘制颜色号
double m_dOilZhan = 8; //含油占比
2026-03-16 18:09:26 +08:00
// 岩心照片
// 例区高度
int m_yxzpExampleAreaHeight;
// 标注字体
QFont m_yxzpLabelFont;
// 标注旋转
int m_yxzpLabelRotation;
// 两端绘制
bool m_yxzpTwoEndDrawing;
// 绘制颜色
bool m_yxzpDrawColor;
2026-03-19 09:44:09 +08:00
2026-03-16 18:09:26 +08:00
//气测/FMT/射孔/文本
QStringList m_FieldNameList;
2026-03-18 10:17:11 +08:00
//沉积相
bool m_bDrawFac = true; // 绘制相
bool m_bDrawPhase = true; // 绘制亚相
bool m_bDrawMFacName = true; // 微相名称
2026-03-20 18:04:15 +08:00
//套管组件
bool m_bDrawStruct_Tubing = true; //绘制结构
bool m_bDrawTubing_Tubing = true; //绘制管柱
bool m_bDrawTools_Tubing = true; //绘制工具
bool m_bDrawSPTool_Tubing = true; //标注工具
bool m_bDrawCCL_Tubing = false; //绘制接箍
float m_Oguan_Tubing = 63.5; //油管外径
float m_inD_Tubing = 121.36; //套管内径
float m_OutD_Tubing = 139.7; //套管外径
2026-03-18 16:16:11 +08:00
//斜井三图一表(井斜数据表参数)
CDrawTvd *m_pTvd;
2026-03-18 16:16:11 +08:00
2026-03-20 11:10:22 +08:00
// 深度
QColor m_sdRulerColor; // 标尺颜色
2026-03-24 09:43:05 +08:00
double m_sdInterval = 20; // 间隔
2026-03-24 11:10:09 +08:00
QFont m_sdLabelFont = QFont("微软雅黑", 10); // 标注字体
2026-03-31 15:50:27 +08:00
double m_sdRotationAngle = 90.0; // 旋转(°)
2026-03-24 09:43:05 +08:00
bool m_sdDrawStartDepth; // 绘制起点深度
bool m_sdDrawEndDepth; // 绘制终点深度
bool m_sdMeasuredDepth = true; // 斜深
bool m_sdElevationVerticalDepth = false; // 海拔垂深
bool m_sdVerticalDepth = false; // 垂深
2026-03-23 09:51:17 +08:00
int m_sdMeasuredDepthPosition = 0; // 斜深位置
int m_sdVerticalDepthPosition = 0; // 垂深位置
int m_sdElevationVerticalDepthPosition; // 海拔垂深位置
2026-03-20 11:10:22 +08:00
int m_sdMajorTickLineLength = 3; // 主刻度线长度
int m_sdMajorTickLineWidth = 1; // 主刻度线宽度
int m_sdMinorTickLineLength = 1; // 次刻度线长度
int m_sdMinorTickLineWidth = 1; // 次刻度线宽度
2026-03-26 09:17:07 +08:00
// 岩心分析
int m_cp_lineWidth = 1; // 线宽
QColor m_cp_lineColor; // 线条颜色
Qt::PenStyle m_cp_lineStyle; // 线型
2026-03-27 11:29:35 +08:00
double m_cp_leftScale = 0; // 左刻度
double m_cp_rightScale = 100; // 右刻度
2026-03-30 14:18:09 +08:00
int m_cp_scaleDivisionsOrCustom = 1; // 等分刻度数或自定序列
2026-03-27 11:29:35 +08:00
int m_cp_scaleType = 0; // 刻度类型
2026-03-30 14:18:09 +08:00
QFont m_cp_curveUnit = QFont("微软雅黑", 7); // 曲线单位
QFont m_cp_curveScale = QFont("微软雅黑", 7); // 曲线刻度
2026-03-26 09:17:07 +08:00
bool m_cp_drawAsBar = true; // 杆状
bool m_cp_leftBoundary = true; // 左界
bool m_cp_skipZeroInvalidValues = false; // 不绘零等无效值
bool m_cp_drawEnvelope = false; // 绘制包络线
bool m_cp_drawAsDot = false; // 点状
int m_cp_symbolType = 0; // 符号类型
QColor m_cp_symbolBorderColor; // 边框颜色
int m_cp_symbolSize = 3; // 大小
QColor m_cp_symbolFillColor; // 填充颜色
int m_cp_fieldName = 0; // 字段名称
2026-03-26 09:17:07 +08:00
2026-04-01 09:07:28 +08:00
// 频率统计图
// 数据
2026-04-01 18:01:52 +08:00
int m_pl_dataType = 0; // 数据类型
2026-04-01 09:07:28 +08:00
QString m_pl_azimuthCurve = "DDIR"; // 方位曲线
QString m_pl_inclinationCurve = "DANG"; // 倾角曲线
// 字体相关配置
2026-04-01 18:01:52 +08:00
QFont m_pl_fontScale = QFont("微软雅黑", 7); // 刻度字体大小
2026-04-01 09:07:28 +08:00
// 控制曲线参数
2026-04-01 18:01:52 +08:00
QString m_pl_controlCurveName = "GRAD"; // 控制曲线名
double m_pl_controlMinValue = 0; // 控制最小值
double m_pl_controlMaxValue = 100; // 控制最大值
2026-04-01 09:07:28 +08:00
// 方位频率绘图参数
2026-04-01 18:01:52 +08:00
int m_pl_sectorCount = 36; // 扇形数量
2026-04-03 14:24:10 +08:00
double m_pl_circleRadius = 50; // 圆半径(cm)
2026-04-01 18:01:52 +08:00
QColor m_pl_circleColor = Qt::black; // 圆线颜色
int m_pl_circleLineWidth = 2; // 圆线宽度
bool m_pl_isFillEnabled = true; // 是否启用填充
QColor m_pl_fillColor = Qt::black; // 填充颜色
2026-04-01 09:07:28 +08:00
// 倾角频率绘图参数
2026-04-01 18:01:52 +08:00
int m_pl_lineNumber = 9; // 线数
double m_pl_lineHeight = 2; // 统计线高度
int m_pl_lineThickness = 2; // 线粗细
QColor m_pl_lineColor = Qt::black; // 线颜色
bool m_pl_drawAnnotation = true; // 是否绘制标注
bool m_pl_drawHistogram = true; // 是否绘制直方图
2026-04-01 09:07:28 +08:00
// 基线参数
2026-04-01 18:01:52 +08:00
int m_pl_baselineWidth = 2; // 基线宽度
QColor m_pl_baselineColor = Qt::black; // 基线颜色
2026-04-01 09:07:28 +08:00
// 统计参数
2026-04-01 18:01:52 +08:00
int m_pl_statInterval = 20; // 统计间隔
double m_pl_minInclination = 0; // 最小倾角
double m_pl_maxInclination = 90; // 最大倾角
2026-04-01 09:07:28 +08:00
// 地质要素分类开关
2026-04-01 18:01:52 +08:00
bool m_pl_highGap = false; // 高导缝
bool m_pl_highReservoir = false; // 高阻缝
bool m_pl_reticularFracture = false; // 网状缝
bool m_pl_inducedFracture = false; // 诱导缝
bool m_pl_bedLayer = false; // 层理
bool m_pl_erosionSurface = false; // 侵蚀面
bool m_pl_pore = false; // 孔洞
bool m_pl_vesicle = false; // 气孔
bool m_pl_gravel = false; // 砾石
bool m_pl_nodule = false; // 结核
bool m_pl_lumps = false; // 团块
bool m_pl_fault = false; // 断层
bool m_pl_verticalFracture = false; // 垂直缝
bool m_pl_custom1 = false; // 自定义1
bool m_pl_custom2 = false; // 自定义2
2026-04-01 09:07:28 +08:00
2026-03-27 18:06:40 +08:00
int cpLineWidth() const;
void setCpLineWidth(int cpLineWidth);
2025-10-29 17:23:30 +08:00
public:
void setLineWidth(double dWidth);
double getLineWidth();
void setLineStyle(Qt::PenStyle lineStyle);
Qt::PenStyle getLineStyle();
void setVMax(float vmax);
float getVMax();
void setVMin(float vmin);
float getVMin();
void setFrontColor(QColor frontColor);
QColor getFrontColor();
void setBackColor(QColor backColor);
QColor getBackColor();
bool setInfoProperty(QString strProName, QVariant val);
int getFillTypeIndex();
2025-10-29 17:23:30 +08:00
QJsonObject makeJson();
void makeTvdJson(QJsonObject& rootObj);
2025-10-29 17:23:30 +08:00
//右键菜单响应函数
virtual void contextMenuEvent(QContextMenuEvent *event);
2025-10-29 17:23:30 +08:00
private:
QPoint startPosition;
public slots:
//曲线数据查看
void onShowCurve();
//删除曲线
void onDeleteCurv();
//表格查看
void onShowTable();
//删除表格
void onDeleteTable();
2025-10-29 17:23:30 +08:00
};
2025-10-29 17:23:30 +08:00
#endif // FORMINFO_H