You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.0 KiB
C++
104 lines
3.0 KiB
C++
#ifndef NMWXWELLBORESTORAGECALCULATOR_H
|
|
#define NMWXWELLBORESTORAGECALCULATOR_H
|
|
|
|
#include "nmSubWxs_global.h"
|
|
#include <QDialog>
|
|
|
|
class QButtonGroup;
|
|
class QRadioButton;
|
|
class QStackedWidget;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QComboBox;
|
|
class QPushButton;
|
|
class QVBoxLayout;
|
|
class QGridLayout;
|
|
class QGroupBox;
|
|
|
|
class nmWxWellboreStorageCalculatorVolume;
|
|
class nmWxWellboreStorageCalculatorTubingData;
|
|
|
|
class NM_SUB_WXS_EXPORT nmWxWellboreStorageCalculator : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit nmWxWellboreStorageCalculator(QWidget *parent = nullptr);
|
|
~nmWxWellboreStorageCalculator();
|
|
|
|
// 获取井筒储集系数的值
|
|
double getWellboreStorageValue() const;
|
|
|
|
private:
|
|
// 初始化UI界面
|
|
void initUI();
|
|
// 连接组件之间的槽函数
|
|
void initConnections();
|
|
// 根据不同的模式计算井筒储集系数
|
|
void calculateWellboreStorage(int mode);
|
|
|
|
signals:
|
|
|
|
private slots:
|
|
// 计算模式切换
|
|
void onModeChanged(int id);
|
|
// 刷新井筒储集系数的值
|
|
void onRefreshWellboreStorageClicked();
|
|
// 密闭井筒模式下计算测试体积的按钮
|
|
void onClosedChamberCalculateClicked();
|
|
// 液面变化模式下计算油管内径的按钮
|
|
void onChangingLiquidLevelCalculateClicked();
|
|
|
|
private:
|
|
// UI 控件
|
|
QButtonGroup* m_pModeButtonGroup;
|
|
QRadioButton* m_pClosedChamberRadio; // 密闭井筒模式单选按钮
|
|
QRadioButton* m_pChangingLiquidLevelRadio; // 液面变化模式单选按钮
|
|
|
|
QStackedWidget* m_pStackedWidget; // 用于切换不同模式的参数界面
|
|
|
|
// 密闭井筒模式的页面和控件
|
|
QWidget* m_pClosedChamberPage;
|
|
QLabel* m_pTestedVolumeLabel;
|
|
QLineEdit* m_pTestedVolumeEdit; // 测试体积
|
|
QComboBox* m_pTestedVolumeUnitCombo;
|
|
|
|
QLabel* m_pFluidCompressibilityLabel;
|
|
QLineEdit* m_pFluidCompressibilityEdit; // 流体压缩系数
|
|
QComboBox* m_pFluidCompressibilityUnitCombo;
|
|
|
|
// 液面变化模式的页面和控件
|
|
QWidget* m_pChangingLiquidLevelPage;
|
|
QLabel* m_pTubingIdLabel;
|
|
QLineEdit* m_pTubingIdEdit; // 油管内径
|
|
QComboBox* m_pTubingIdUnitCombo;
|
|
|
|
QLabel* m_pFluidDensityLabel;
|
|
QLineEdit* m_pFluidDensityEdit; // 流体密度
|
|
QComboBox* m_pFluidDensityUnitCombo;
|
|
|
|
// 公共部分和按钮
|
|
QLabel* m_pWellboreStorageLabel;
|
|
QLineEdit* m_pWellboreStorageEdit; // 井筒储集系数
|
|
QComboBox* m_pWellboreStorageUnitCombo;
|
|
|
|
// 按钮
|
|
QPushButton* m_pClosedChamberCalculateButton;
|
|
QPushButton* m_pChangingLiquidLevelCalculateButton;
|
|
QPushButton* m_pRefreshButton; // 刷新按钮,主要是根据当前计算模式下的参数重新算井筒储集系数
|
|
QPushButton* m_pOkButton;
|
|
QPushButton* m_pCancelButton;
|
|
|
|
// 布局管理器
|
|
QVBoxLayout* m_pMainLayout;
|
|
QGridLayout* m_pClosedChamberLayout;
|
|
QGridLayout* m_pChangingLiquidLevelLayout;
|
|
QGroupBox* m_pModeGroupBox;
|
|
|
|
// 计算测试体积对话框
|
|
nmWxWellboreStorageCalculatorVolume* m_pTestedVolumeDialog;
|
|
// 油管规格对照表
|
|
nmWxWellboreStorageCalculatorTubingData* m_pTubingDataDialog;
|
|
};
|
|
|
|
#endif // NMWXWELLBORESTORAGECALCULATOR_H
|