2025-10-29 17:23:30 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @file PropertyWidget.h
|
|
|
|
|
|
* @brief 统一属性服务,采用了singleton模式
|
|
|
|
|
|
* @date 2025-10-10
|
|
|
|
|
|
* @author:
|
|
|
|
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <QDockWidget>
|
2025-11-12 16:56:33 +08:00
|
|
|
|
#include <QTableWidget>
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
#include "qtpropertybrowser.h"
|
|
|
|
|
|
#include "qtvariantproperty.h"
|
|
|
|
|
|
#include "qttreepropertybrowser.h"
|
|
|
|
|
|
//file
|
|
|
|
|
|
#include "variantmanager.h"
|
|
|
|
|
|
#include "variantfactory.h"
|
2026-02-04 12:16:25 +08:00
|
|
|
|
#include "ColorSchemeComboBox.h"
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//
|
|
|
|
|
|
#include "forminfo.h"
|
2025-11-12 16:56:33 +08:00
|
|
|
|
#include "formhead.h"
|
2026-01-23 14:53:34 +08:00
|
|
|
|
#include "qmytablewidget.h"
|
2026-01-29 09:35:53 +08:00
|
|
|
|
#include "formtracktop.h"
|
2026-02-12 14:12:01 +08:00
|
|
|
|
#include "TransparentDraggableGujing.h"
|
2026-03-16 18:09:26 +08:00
|
|
|
|
#include "transparentdraggableimage.h"
|
2026-03-05 16:45:06 +08:00
|
|
|
|
#include "TransparentDraggableSwallCore.h"
|
2026-03-06 16:17:57 +08:00
|
|
|
|
#include "TransparentDraggableGeoLith.h"
|
2026-03-09 09:48:28 +08:00
|
|
|
|
#include "TransparentDraggableRect.h"
|
2026-03-09 17:50:21 +08:00
|
|
|
|
#include "TransparentDraggableLayer.h"
|
2026-03-13 16:58:02 +08:00
|
|
|
|
#include "TransparentDraggableJiegutext.h"
|
2026-03-20 18:04:15 +08:00
|
|
|
|
#include "transparentdraggableGuan.h"
|
2026-03-25 09:13:55 +08:00
|
|
|
|
#include "TransparentDraggableCorePhysics.h"
|
2026-03-10 09:10:16 +08:00
|
|
|
|
#include "TransparentGroupResult.h"
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
//当前曲线类型
|
|
|
|
|
|
#define Widget_Property "Widget_Property"
|
2026-01-23 14:53:34 +08:00
|
|
|
|
#define Well_Property "Well_Property" //井
|
|
|
|
|
|
#define Track_Property "Track_Property" //道
|
|
|
|
|
|
#define Curve_Property "Curve_Property" //曲线
|
2026-02-02 21:32:36 +08:00
|
|
|
|
#define Wave_Property "Wave_Property" //波列
|
2026-03-05 16:45:06 +08:00
|
|
|
|
#define Table_Property "Table_Property" //解释结论
|
2026-03-10 09:10:16 +08:00
|
|
|
|
#define JieshiItem_Property "JieshiItem_Property" //解释结论Item
|
|
|
|
|
|
|
2026-01-23 14:53:34 +08:00
|
|
|
|
#define Head_Property "Head_Property" //图头,单元格
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-03-05 16:45:06 +08:00
|
|
|
|
#define Gujing_Property "Gujing_Property" //固井结论
|
|
|
|
|
|
#define GujingItem_Property "GujingItem_Property" //固井item
|
|
|
|
|
|
|
2026-03-16 18:09:26 +08:00
|
|
|
|
#define Image_Property "Image_Property" // 岩心图片
|
|
|
|
|
|
#define ImageItem_Property "ImageItem_Property" // 岩心图片item
|
|
|
|
|
|
|
2026-03-25 09:13:55 +08:00
|
|
|
|
#define CORE_PHYSICS_PROPERTY "CORE_PHYSICS_PROPERTY" // 岩心分析
|
|
|
|
|
|
#define CORE_PHYSICS_ITEM_PROPERTY "CORE_PHYSICS_ITEM_PROPERTY" // 岩心分析item
|
|
|
|
|
|
|
2026-03-19 14:24:54 +08:00
|
|
|
|
#define Depth_Property "Depth_Property" // 深度
|
|
|
|
|
|
|
2026-03-05 16:45:06 +08:00
|
|
|
|
#define SwallCore_Property "SwallCore_Property" //井壁取心
|
|
|
|
|
|
#define SwallCoreItem_Property "SwallCoreItem_Property" //井壁取心item
|
2026-02-13 22:56:10 +08:00
|
|
|
|
|
2026-03-09 09:48:28 +08:00
|
|
|
|
#define GeoLith_Property "GeoLith_Property" //录井剖面
|
|
|
|
|
|
#define GeoLithItem_Property "GeoLithItem_Property" //录井剖面item
|
|
|
|
|
|
|
|
|
|
|
|
#define Text_Property "Text_Property" //文字结论
|
|
|
|
|
|
#define TextItem_Property "TextItem_Property" //文字结论item
|
2026-02-13 22:56:10 +08:00
|
|
|
|
|
2026-03-09 17:50:21 +08:00
|
|
|
|
#define Layer_Property "Layer_Property" //地质分层
|
|
|
|
|
|
#define LayerItem_Property "LayerItem_Property" //地质分层item
|
|
|
|
|
|
|
2026-03-12 15:37:33 +08:00
|
|
|
|
#define Jiegutext_Property "Jiegutext_Property" //气测/FMT/射孔/文本
|
2026-03-13 16:58:02 +08:00
|
|
|
|
#define JiegutextItem_Property "JiegutextItem_Property" //气测/FMT/射孔/文本item
|
2026-03-12 15:37:33 +08:00
|
|
|
|
|
2026-03-16 17:56:11 +08:00
|
|
|
|
#define Fac_Property "Fac_Property" //沉积相
|
|
|
|
|
|
|
2026-03-18 16:16:11 +08:00
|
|
|
|
#define Tvd_Property "Tvd_Property" //斜井三图一表
|
2026-03-16 17:56:11 +08:00
|
|
|
|
|
2026-03-18 17:55:43 +08:00
|
|
|
|
#define Tubing_Property "Tubing_Property" //套管组件
|
|
|
|
|
|
#define TubingItem_Property "TubingItem_Property" //套管组件item
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @class PropertyWidget
|
|
|
|
|
|
* @brief 统一属性服务
|
|
|
|
|
|
* @date 2025-10-10
|
|
|
|
|
|
* @author:
|
|
|
|
|
|
*/
|
|
|
|
|
|
class PropertyWidget:public QDockWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
2026-03-19 09:44:09 +08:00
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
public:
|
|
|
|
|
|
PropertyWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
|
|
|
|
|
~PropertyWidget();
|
2026-03-19 09:44:09 +08:00
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
private:
|
|
|
|
|
|
QtTreePropertyBrowser *m_pPropertyBrowser;
|
|
|
|
|
|
QtVariantPropertyManager *m_pVariantManager;
|
2026-02-04 12:16:25 +08:00
|
|
|
|
QtColorSchemeComboBoxPropertyManager * m_pColorSchemeManager;
|
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-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
|
|
|
|
|
|
|
|
|
|
QString m_strCurrentProperty;
|
|
|
|
|
|
QMap<QtProperty*, QString> m_propertyData; //属性页值
|
|
|
|
|
|
//静态属性
|
|
|
|
|
|
QMap<QString, QtProperty*> m_mapGroupItem;
|
|
|
|
|
|
|
|
|
|
|
|
//其他曲线
|
|
|
|
|
|
QStringList m_strListOtherLine;
|
|
|
|
|
|
QList<float> m_listMin;
|
|
|
|
|
|
QList<float> m_listMax;
|
2025-11-05 18:15:33 +08:00
|
|
|
|
QStringList m_strListOtherScaleType;
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-02-02 21:32:36 +08:00
|
|
|
|
FormTrackTop* m_fromTop = NULL;
|
|
|
|
|
|
FormInfo * m_formInfo = NULL;
|
2026-02-04 15:30:08 +08:00
|
|
|
|
|
|
|
|
|
|
//图头
|
2025-11-12 16:56:33 +08:00
|
|
|
|
FormHead *m_formHead;
|
|
|
|
|
|
QTableWidget *m_tableWidget;
|
|
|
|
|
|
QTableWidgetItem* m_item;
|
|
|
|
|
|
int m_iRow;
|
|
|
|
|
|
int m_iCol;
|
2026-02-04 15:30:08 +08:00
|
|
|
|
//图头, 图例宽高
|
|
|
|
|
|
double m_colWidth_Img = 1;
|
|
|
|
|
|
double m_rowHeight_Img = 1;
|
|
|
|
|
|
//图头, 行高、列宽
|
2025-11-12 16:56:33 +08:00
|
|
|
|
double m_colWidth = 1;
|
|
|
|
|
|
double m_rowHeight = 1;
|
|
|
|
|
|
|
2026-01-23 14:53:34 +08:00
|
|
|
|
//道
|
|
|
|
|
|
QMyTableWidget *m_myTableWidget;
|
|
|
|
|
|
int m_iCurrentCol;
|
|
|
|
|
|
|
2025-11-21 17:32:16 +08:00
|
|
|
|
bool m_bSelfChange=false;
|
2026-02-12 14:12:01 +08:00
|
|
|
|
|
2026-03-10 09:10:16 +08:00
|
|
|
|
TransparentGroupResult* m_tdJieshi;
|
2026-03-20 18:04:15 +08:00
|
|
|
|
//
|
2026-03-16 18:09:26 +08:00
|
|
|
|
TransparentDraggableGujing* m_tdGujing;
|
|
|
|
|
|
TransparentDraggableImage* m_tdImage;
|
2026-03-05 16:45:06 +08:00
|
|
|
|
TransparentDraggableSwallCore* m_tdSwallCore;
|
2026-03-06 16:17:57 +08:00
|
|
|
|
TransparentDraggableGeoLith* m_tdGeoLith;
|
2026-03-09 09:48:28 +08:00
|
|
|
|
TransparentDraggableRect* m_tdText;
|
2026-03-09 17:50:21 +08:00
|
|
|
|
TransparentDraggableLayer* m_tdLayer;
|
2026-03-13 16:58:02 +08:00
|
|
|
|
TransparentDraggableJiegutext* m_tdJiegutext;
|
2026-03-20 18:04:15 +08:00
|
|
|
|
TransparentDraggableGuan* m_tdGuan;
|
2026-03-25 09:13:55 +08:00
|
|
|
|
TransparentDraggableCorePhysics* m_tdCorePhysics;
|
2026-02-12 14:12:01 +08:00
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
public:
|
|
|
|
|
|
QWidget* GetPropertyWidget();
|
|
|
|
|
|
|
2026-03-12 11:48:06 +08:00
|
|
|
|
QtVariantProperty* _CreateVariantPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, int propertyType);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
void _CreateVariantPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, int propertyType, double dMin, double dMax);
|
|
|
|
|
|
void _CreateEnumPropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue, QStringList listValue);
|
|
|
|
|
|
|
2026-02-04 12:16:25 +08:00
|
|
|
|
void _CreateColorSchemePropertyItem(QString strGroup, QString strPropertyCaption, QVariant vtPropertyValue);
|
|
|
|
|
|
|
2026-02-06 09:20:35 +08:00
|
|
|
|
void InitCurrentViewInfo(bool bAll = true); //初始化属性,清空
|
2026-01-23 18:20:18 +08:00
|
|
|
|
void initWidgetProperty(QString strUuid, int iScale); //可视解释整体属性
|
2025-11-24 15:36:38 +08:00
|
|
|
|
//井
|
2026-01-23 18:20:18 +08:00
|
|
|
|
void initWellProperty(QString strUuid, QString strSlfName, QString strWellName, double iY1, double iY2);
|
2026-01-23 14:53:34 +08:00
|
|
|
|
//道
|
2026-01-29 09:35:53 +08:00
|
|
|
|
void initTrackProperty(FormTrackTop *fromTop, int iWidth, QMyTableWidget *myTableWidget, int iCurrentCol);
|
2025-11-12 16:56:33 +08:00
|
|
|
|
//曲线
|
2025-11-05 18:15:33 +08:00
|
|
|
|
void initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax, QStringList strListOtherScaleType);
|
2025-11-12 16:56:33 +08:00
|
|
|
|
//图头
|
|
|
|
|
|
void initHeadProperty(FormHead *formHead, QTableWidget *tableWidget, QTableWidgetItem* item, int row, int col);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-02-13 22:56:10 +08:00
|
|
|
|
void initTableProperty(FormInfo *formInfo);
|
2026-03-19 14:24:54 +08:00
|
|
|
|
// 深度
|
2025-12-12 20:10:30 +08:00
|
|
|
|
void initDepthProperty(FormInfo *formInfo);
|
|
|
|
|
|
|
2026-01-30 13:36:32 +08:00
|
|
|
|
void initProperty(FormInfo *formInfo);
|
2026-02-02 21:32:36 +08:00
|
|
|
|
// 玫瑰图属性
|
2026-01-30 13:36:32 +08:00
|
|
|
|
void initRoseProperty(FormInfo *formInfo);
|
2026-02-02 21:32:36 +08:00
|
|
|
|
// 波列属性
|
2026-02-06 09:20:35 +08:00
|
|
|
|
void initWaveProperty(FormInfo *formInfo, int nType = 3);
|
2026-03-06 16:17:57 +08:00
|
|
|
|
|
2026-03-10 09:10:16 +08:00
|
|
|
|
// 解释结论Item属性
|
|
|
|
|
|
void initJieshiItemProperty(TransparentGroupResult* tdJieshi, double lower, double upper, QString strResult);
|
|
|
|
|
|
|
2026-02-12 14:12:01 +08:00
|
|
|
|
// 固井结论属性
|
|
|
|
|
|
void initGujingProperty(FormInfo *formInfo);
|
|
|
|
|
|
void initGujingItemProperty(TransparentDraggableGujing* tdGujing, double lower, double upper, QString strResult);
|
2026-01-30 13:36:32 +08:00
|
|
|
|
|
2026-03-16 18:09:26 +08:00
|
|
|
|
// 岩心照片属性
|
|
|
|
|
|
void initImageProperty(FormInfo *formInfo);
|
2026-03-19 09:44:09 +08:00
|
|
|
|
void initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString strResult, double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth);
|
2026-03-16 18:09:26 +08:00
|
|
|
|
|
2026-03-27 11:29:35 +08:00
|
|
|
|
// 岩心分析属性 isItem用来判断是不是item 默认false
|
|
|
|
|
|
void initCorePhysicsProperty(FormInfo *formInfo, bool isItem = false);
|
2026-03-26 11:38:23 +08:00
|
|
|
|
void initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage);
|
2026-03-25 09:13:55 +08:00
|
|
|
|
|
2026-03-05 16:45:06 +08:00
|
|
|
|
// 井壁取心属性
|
|
|
|
|
|
void initSwallCoreProperty(FormInfo *formInfo);
|
|
|
|
|
|
void initSwallCoreItemProperty(TransparentDraggableSwallCore* tdSwallCore, double Depth, QString LithologyImage, QString OilGasImage, QString ColorImage, double Sideleft, double width, int iColor);
|
|
|
|
|
|
|
2026-03-09 09:48:28 +08:00
|
|
|
|
// 录井剖面属性
|
2026-03-06 16:17:57 +08:00
|
|
|
|
void initGeoLithProperty(FormInfo *formInfo);
|
|
|
|
|
|
void initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, const QString myLith, const QString myOil, const QString myColor);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
2026-03-09 09:48:28 +08:00
|
|
|
|
// 文字结论属性
|
|
|
|
|
|
void initTextProperty(FormInfo *formInfo);
|
|
|
|
|
|
void initTextItemProperty(TransparentDraggableRect* tdText, double lower, double upper, QString strResult);
|
|
|
|
|
|
|
2026-03-09 17:50:21 +08:00
|
|
|
|
// 地质分层属性
|
|
|
|
|
|
void initLayerProperty(FormInfo *formInfo);
|
|
|
|
|
|
void initLayerItemProperty(TransparentDraggableLayer* tdLayer, double lower, double upper, QString strResult);
|
|
|
|
|
|
|
2026-03-12 15:37:33 +08:00
|
|
|
|
//气测/FMT/射孔/文本
|
|
|
|
|
|
void initJiegutextProperty(FormInfo *formInfo);
|
2026-03-13 16:58:02 +08:00
|
|
|
|
void initJiegutextItemProperty(TransparentDraggableJiegutext* tdJiegutext, double lower, double upper);
|
|
|
|
|
|
|
2026-03-16 17:56:11 +08:00
|
|
|
|
//沉积相
|
|
|
|
|
|
void initFacProperty(FormInfo *formInfo);
|
2026-03-12 15:37:33 +08:00
|
|
|
|
|
2026-03-18 16:16:11 +08:00
|
|
|
|
// 斜井三图一表属性
|
|
|
|
|
|
void initTvdProperty(FormInfo *formInfo);
|
|
|
|
|
|
void ChangTvdProperty( QtProperty *pProperty, const QVariant &variant );
|
2026-03-18 17:55:43 +08:00
|
|
|
|
|
|
|
|
|
|
//套管组件
|
|
|
|
|
|
void initTubingProperty(FormInfo *formInfo);
|
2026-03-20 18:04:15 +08:00
|
|
|
|
void initTubingItemProperty(TransparentDraggableGuan* tdGuan, double lower, double upper, QString strResult);
|
2026-03-18 17:55:43 +08:00
|
|
|
|
|
2026-03-06 16:17:57 +08:00
|
|
|
|
void ChangFillProperty();//填充属性改变
|
2025-11-12 16:56:33 +08:00
|
|
|
|
void ChangHeadItemProperty();//图头项改变
|
|
|
|
|
|
|
2026-03-05 16:45:06 +08:00
|
|
|
|
//处理通用属性
|
|
|
|
|
|
void CommonPropertyChanged(QtProperty *pProperty, const QVariant &variant);
|
|
|
|
|
|
|
2026-03-19 14:24:54 +08:00
|
|
|
|
// 岩心照片
|
2026-03-16 18:09:26 +08:00
|
|
|
|
void changedYxzpProperty(QtProperty *pProperty, const QVariant &variant);
|
|
|
|
|
|
void changedYxzpItemProperty(QtProperty *pProperty, const QVariant &variant);
|
|
|
|
|
|
|
2026-03-19 14:24:54 +08:00
|
|
|
|
// 深度
|
2026-03-20 11:10:22 +08:00
|
|
|
|
void changedDepthProperty(QString strProName, QVariant val);
|
2026-03-26 09:17:07 +08:00
|
|
|
|
|
|
|
|
|
|
// 岩心分析
|
|
|
|
|
|
void changedCorePhysicsProperty(QtProperty *pProperty, const QVariant &variant);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
public slots:
|
2026-03-05 16:45:06 +08:00
|
|
|
|
void SlotPropertyChanged(QtProperty *property, const QVariant &variant);
|
2026-02-04 12:16:25 +08:00
|
|
|
|
void SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle);
|
2025-10-29 17:23:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern PropertyWidget* PropertyService();
|
|
|
|
|
|
|