|
|
|
|
#ifndef NMWXPARAMETERPROPERTY_H
|
|
|
|
|
#define NMWXPARAMETERPROPERTY_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include <QVector>
|
|
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include <QVector>
|
|
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
|
|
#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<nmDataFault> &faults);
|
|
|
|
|
void appendFactureToTree(QVector<nmDataFracture> &fractures);
|
|
|
|
|
void appendRegionToTree(QVector<nmDataRegion> ®ions);
|
|
|
|
|
void appendRegionMarkToTree(QVector<nmDataRegionMark> ®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<nmDataVerticalWell> m_vecVerticalWells;
|
|
|
|
|
QVector<nmDataHorizontalWell> m_vecHorizontalWells;
|
|
|
|
|
QVector<nmDataVerticalFracturedWell> m_vecVerticalFracturedWells;
|
|
|
|
|
QVector<nmDataHorizontalFracturedWell> m_vecHorizontalFracturedWells;
|
|
|
|
|
nmDataReservoir m_reservior;
|
|
|
|
|
QVector<nmDataRegionMark> m_vecRegionMark; //区域标记参数
|
|
|
|
|
QVector<nmDataFault> m_vecDataFaults; //断层参数
|
|
|
|
|
QVector<nmDataFracture> m_vecDataFractures; //裂缝参数
|
|
|
|
|
QVector<nmDataRegion> m_vecDataRegions;//复合区参数
|
|
|
|
|
|
|
|
|
|
static nmWxParameterProperty* s_pCurrentInstance; // 静态指针,指向当前活动实例
|
|
|
|
|
// 显示井筒储集系数计算器的按钮和布局
|
|
|
|
|
QPushButton* m_pWellboreCalculatorButton;
|
|
|
|
|
QHBoxLayout* m_pTopLayout;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // NMWXPARAMETERPROPERTY_H
|