|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
|
|
#include "mSubWnd_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxDataWell;
|
|
|
|
|
class iSubWnd;
|
|
|
|
|
class iJobRun;
|
|
|
|
|
class iGuiPlot;
|
|
|
|
|
class ZxTableViewEx;
|
|
|
|
|
class M_SUB_WND_EXPORT iWxRunOption : public iDlgBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxRunOption(QWidget *parent = 0);
|
|
|
|
|
~iWxRunOption();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
virtual void initTableViews();
|
|
|
|
|
virtual void initChartView();
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
virtual void freshUI(bool bAutoRun = false);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 外界调用参数
|
|
|
|
|
void setDataWell(ZxDataWell* p);
|
|
|
|
|
void setAllJobRuns(QVector<iJobRun*>* p);
|
|
|
|
|
void setOneJobRun(iJobRun* pJobRun);
|
|
|
|
|
|
|
|
|
|
// 返回对话框选择的结果
|
|
|
|
|
virtual iJobRun* getCurSelJobRun();
|
|
|
|
|
virtual iSubWnd* getSubWndApplied();
|
|
|
|
|
virtual bool isNewIfNull();
|
|
|
|
|
virtual bool isSetJobAsCurrent();
|
|
|
|
|
virtual QString getSubWndTitle();
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
// TODO 这两个函数是为了子类应用,目前放此处有些不妥
|
|
|
|
|
void on_cbxWnds_currentIndexChanged(const QString &arg1);
|
|
|
|
|
void on_cbxNewIfNull_clicked();
|
|
|
|
|
|
|
|
|
|
virtual void slotJobRunSelectionChanged();
|
|
|
|
|
void on_cbxJobType_currentIndexChanged(const QString &arg1);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 下拉流体类型
|
|
|
|
|
virtual void OnCbxJobTypeChanged();
|
|
|
|
|
virtual bool isProperJobType(VecVariant& vec, bool bMiniFracMode = false); //筛选过滤合适的部分
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
// 从主窗体获取
|
|
|
|
|
void sigGetFitWnds(QMap<QString, iSubWnd*>& map);
|
|
|
|
|
void sigRunOptionChanged(iJobRun*, iSubWnd*, bool, bool, QString);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 窗体名称的切换
|
|
|
|
|
void changeNewWndName();
|
|
|
|
|
|
|
|
|
|
// 填充下拉
|
|
|
|
|
void fillCbxWnds(QComboBox* p);
|
|
|
|
|
virtual bool fuzzyCbxJobRuns();
|
|
|
|
|
|
|
|
|
|
// 涉及的内部处理函数
|
|
|
|
|
QVector<iJobRun*> getAllJobRuns(QString sFilterType = "");
|
|
|
|
|
QStringList getAllJobTypes(QVector<iJobRun*>& vec, bool bMiniFracMode = false);
|
|
|
|
|
QString getCurJobID();
|
|
|
|
|
iJobRun* getJobRunByID(QVector<iJobRun*>& vec, QString sID);
|
|
|
|
|
bool checkJobIdByPF(iJobRun* p);
|
|
|
|
|
QString getFluidOfCurWell();
|
|
|
|
|
void filterJobRunsByPhase(QVector<iJobRun*>& vec, iJobRun* p);
|
|
|
|
|
|
|
|
|
|
// 刷新组件
|
|
|
|
|
virtual void refreshChartInfo();
|
|
|
|
|
void refreshSmoothState();
|
|
|
|
|
void refreshThinningState();
|
|
|
|
|
|
|
|
|
|
// 刷新图形时调用
|
|
|
|
|
// 获取当前选中的Job的流体类型,油气水
|
|
|
|
|
virtual QString getCurFluidType();
|
|
|
|
|
|
|
|
|
|
// 结果处理
|
|
|
|
|
virtual bool runApply();
|
|
|
|
|
virtual bool dealwithJobRun();
|
|
|
|
|
virtual bool dealwithWndSel();
|
|
|
|
|
|
|
|
|
|
//zxf设置当前的job
|
|
|
|
|
virtual bool setCurrentJobRun();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 井
|
|
|
|
|
ZxDataWell* m_pDataWell;
|
|
|
|
|
|
|
|
|
|
// 当前所有JobRun,输入主窗口,从主窗口传入
|
|
|
|
|
QVector<iJobRun*>* m_pVecJobRuns;
|
|
|
|
|
|
|
|
|
|
// 当前
|
|
|
|
|
iJobRun* m_pJobRun;
|
|
|
|
|
|
|
|
|
|
// SubWnd
|
|
|
|
|
iSubWnd* m_pSubWnd;
|
|
|
|
|
|
|
|
|
|
// 绘图组件
|
|
|
|
|
iGuiPlot* m_pPlotWx;
|
|
|
|
|
|
|
|
|
|
// 表格组件
|
|
|
|
|
ZxTableViewEx* m_pTableViewJ;
|
|
|
|
|
|
|
|
|
|
// 下拉Job类型
|
|
|
|
|
QComboBox* m_cbxJobTypes;//ui->cbxJobType
|
|
|
|
|
|
|
|
|
|
QCheckBox* m_pCbxSetAsCurrent;
|
|
|
|
|
QCheckBox* m_pCbxNewIfNull;
|
|
|
|
|
QLineEdit* m_pTbxNewWndName;
|
|
|
|
|
|
|
|
|
|
// 下拉窗体
|
|
|
|
|
QComboBox* m_pCbxWnds;
|
|
|
|
|
|
|
|
|
|
//table中填充的信息
|
|
|
|
|
VVecVariant m_vvecInfos;
|
|
|
|
|
|
|
|
|
|
//当前job的code
|
|
|
|
|
QString m_sCurCode;
|
|
|
|
|
|
|
|
|
|
// 对于加入多相之后,只能固定JobRun,不能选择。
|
|
|
|
|
// 即在流动段右键弹出时,如果发现当前Job为多相,则固定
|
|
|
|
|
bool m_bFixJobMode;
|
|
|
|
|
bool m_bAutoFix;
|
|
|
|
|
|
|
|
|
|
// 类型标识:是否小型压裂
|
|
|
|
|
bool m_bMiniFracMode;
|
|
|
|
|
};
|