|
|
|
|
|
#ifndef NMWXINCLUDEOTHERWELLS_H
|
|
|
|
|
|
#define NMWXINCLUDEOTHERWELLS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "nmSubWxs_global.h"
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
|
|
|
#include <QTableWidget>
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
#include <QHeaderView>
|
|
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
|
|
|
|
// 定义行数据结构体
|
|
|
|
|
|
struct WellDataRow {
|
|
|
|
|
|
QString sName; // Name列
|
|
|
|
|
|
bool bIsIncluded; // Included列(复选框状态)
|
|
|
|
|
|
QString sOilProd; // Oil production列
|
|
|
|
|
|
QString sGasProd; // Gas production列
|
|
|
|
|
|
QString sWaterProd; // Water production列
|
|
|
|
|
|
QString sPressure; // Pressure列
|
|
|
|
|
|
|
|
|
|
|
|
// 检查是否有有效数据
|
|
|
|
|
|
bool hasValidData() const {
|
|
|
|
|
|
return sOilProd != "None" || sGasProd != "None" ||
|
|
|
|
|
|
sWaterProd != "None" || sPressure != "None";
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class NM_SUB_WXS_EXPORT nmWxIncludeOtherWells : public iDlgBase
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit nmWxIncludeOtherWells(QWidget* pParent = nullptr);
|
|
|
|
|
|
~nmWxIncludeOtherWells();
|
|
|
|
|
|
|
|
|
|
|
|
// 获取所有井数据
|
|
|
|
|
|
QVector<WellDataRow> getWellData() const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void initUI();
|
|
|
|
|
|
void setupTable();
|
|
|
|
|
|
void setupButtons();
|
|
|
|
|
|
void setupLayouts();
|
|
|
|
|
|
void setupConnections();
|
|
|
|
|
|
|
|
|
|
|
|
// 添加行数据到表格
|
|
|
|
|
|
void addWellDataToTable(const WellDataRow& data, int row);
|
|
|
|
|
|
|
|
|
|
|
|
// 更新复选框状态
|
|
|
|
|
|
//void updateCheckBoxState(int row);
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void onItemClicked(QTableWidgetItem* item);
|
|
|
|
|
|
void onCheckBoxStateChanged(int state);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
QTableWidget* m_pTableWidget;
|
|
|
|
|
|
QPushButton* m_pOkButton;
|
|
|
|
|
|
QPushButton* m_pCancelButton;
|
|
|
|
|
|
QHBoxLayout* m_pButtonLayout;
|
|
|
|
|
|
QVBoxLayout* m_pMainLayout;
|
|
|
|
|
|
|
|
|
|
|
|
QVector<WellDataRow> m_wellData; // 存储所有井数据
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // NMWXINCLUDEOTHERWELLS_H
|