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.
nmWTAI-Platform/Include/nmNum/nmSubWxs/nmWxIncludeOtherWells.h

66 lines
1.6 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef NMWXINCLUDEOTHERWELLS_H
#define NMWXINCLUDEOTHERWELLS_H
#include "nmSubWxs_global.h"
#include <QDialog>
#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 QDialog
{
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