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.
66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
#ifndef NMWXWELLBORESTORAGECALCULATORVOLUME_H
|
|
#define NMWXWELLBORESTORAGECALCULATORVOLUME_H
|
|
|
|
#include "nmSubWxs_global.h"
|
|
#include <QDialog>
|
|
|
|
class QTableWidget;
|
|
class QPushButton;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QComboBox;
|
|
|
|
// 根据井筒高度和内径计算测试井筒体积
|
|
class NM_SUB_WXS_EXPORT nmWxWellboreStorageCalculatorVolume : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit nmWxWellboreStorageCalculatorVolume(QWidget *parent = nullptr);
|
|
~nmWxWellboreStorageCalculatorVolume();
|
|
|
|
// 获取计算得到的体积
|
|
double getCalculatedVolume() const;
|
|
|
|
private:
|
|
// 初始化UI界面
|
|
void initUI();
|
|
// 初始化信号和槽连接
|
|
void initConnections();
|
|
// 计算体积
|
|
void calculateVolume();
|
|
|
|
signals:
|
|
|
|
private slots:
|
|
// 添加
|
|
void onAddClicked();
|
|
// 插入
|
|
void onInsertClicked();
|
|
// 删除
|
|
void onDeleteClicked();
|
|
// 刷新按钮被点击
|
|
void onRefreshClicked();
|
|
|
|
private:
|
|
// UI 控件
|
|
QTableWidget* m_pTableWidget; // 显示高度和内径的表格
|
|
QPushButton* m_pAddButton; // 添加行按钮
|
|
QPushButton* m_pInsertButton; // 插入行按钮
|
|
QPushButton* m_pDeleteButton; // 删除行按钮
|
|
|
|
// 用于表头的下拉框,用于选择单位
|
|
QComboBox* m_pHeightUnitCombo; // 高度单位下拉框
|
|
QComboBox* m_pIDUnitCombo; // 内径单位下拉框
|
|
|
|
QLabel* m_pVolumeLabel; // "Volume:" 标签
|
|
QLineEdit* m_pVolumeEdit; // 显示体积的编辑框
|
|
QComboBox* m_pVolumeUnitCombo; // 体积单位下拉框
|
|
QPushButton* m_pRefreshButton; // 刷新计算按钮
|
|
|
|
QPushButton* m_pOkButton; // 确定按钮
|
|
QPushButton* m_pCancelButton; // 取消按钮
|
|
|
|
};
|
|
|
|
#endif // NMWXWELLBORESTORAGECALCULATORVOLUME_H
|