#ifndef NMWXPARAMETERPROPERTY_H #define NMWXPARAMETERPROPERTY_H #include #include #include #include #include #include #include "nmSubWxs_global.h" #include "iDlgBase.h" #include "nmDataReservoir.h" #include "nmDataVerticalWell.h" #include "nmDataHorizontalWell.h" #include "nmDataVerticalFracturedWell.h" #include "nmDataHorizontalFracturedWell.h" #include "nmDataRegionMark.h" #include "nmDataFault.h" #include "nmDataFracture.h" #include "nmDataRegion.h" #include "nmWxResultParameters.h" class nmDataAttribute; class nmGUIComponentLineEdit; class nmGUIComponentComboBox; class QTreeWidget; class QTreeWidgetItem; class nmGUIComponentBase; class QPushButton; class QHBoxLayout; enum DataCategory { ReservoirCat, VerticalWellCat, VerticalFracturedWellCat, HorizontalFracturedWellCat, FaultCat, FractureCat, RegionCat, RegionMarkCat }; class NM_SUB_WXS_EXPORT nmWxParameterProperty : public iDlgBase { Q_OBJECT public: explicit nmWxParameterProperty(QWidget* mainWindow = nullptr, QWidget* parent = nullptr); ~nmWxParameterProperty(); // 静态方法,供外部调用以通知数据刷新 static void notifyUpdateTable(); private: void initComponents(); void initUI(); void loadDatas(); // 节点添加方法 void appendReservoirToTree(nmDataReservoir &reservoir); void appendWellsToTree(); void appendVerticalWellToTree(nmDataVerticalWell* well); void appendVerticalFracturedWellToTree(nmDataVerticalFracturedWell* well); void appendHorizontalFracturedWellToTree(nmDataHorizontalFracturedWell* well); void appendFaultToTree(QVector &faults); void appendFactureToTree(QVector &fractures); void appendRegionToTree(QVector ®ions); void appendRegionMarkToTree(QVector ®ionMarks); QString formatAttributeValue(const QVariant& value, const QString& unit); void addAttributeToTree(QTreeWidgetItem* parent, nmDataAttribute& attr, DataCategory category); public slots: void onWellSelected(); void onRegionSelected(); void onContourFaultSelected(); void onCalculate(); void onItemDoubleClicked(QTreeWidgetItem* item, int column); void onEditingFinished(); void onComboBoxSelectionChanged(int index); private slots: // 处理井筒储集系数按钮点击事件 void onWellboreCalculatorClicked(); private: QVBoxLayout* m_pLayout; CustomTreeWidget* m_pTreeWidget; QWidget* m_pMainWindow; QTreeWidgetItem* m_pLastEditedItem; // 记录上次双击的 item // 数据相关 QVector m_vecVerticalWells; QVector m_vecHorizontalWells; QVector m_vecVerticalFracturedWells; QVector m_vecHorizontalFracturedWells; nmDataReservoir m_reservior; QVector m_vecRegionMark; //区域标记参数 QVector m_vecDataFaults; //断层参数 QVector m_vecDataFractures; //裂缝参数 QVector m_vecDataRegions;//复合区参数 static nmWxParameterProperty* s_pCurrentInstance; // 静态指针,指向当前活动实例 // 显示井筒储集系数计算器的按钮和布局 QPushButton* m_pWellboreCalculatorButton; QHBoxLayout* m_pTopLayout; }; #endif // NMWXPARAMETERPROPERTY_H