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/mGui/mSubWndAna/SubWxs/iWxOptionResCompare.h

182 lines
4.8 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.

#pragma once
#include "iDlgBase.h"
#include "iResCpSrcDesc.h"
#include "mSubWndAna_global.h"
namespace Ui {
class iWxOptionResCompare;
}
class iGuiPlot;
class iSubWndBaseAF;
class iSubWndFitting;
class iSubWnd;
class iWxBase;
class ZxDataWell;
class ZxRstUtils;
class ZxMdiSubWindow;
class M_SUB_WND_ANA_EXPORT iWxOptionResCompare : public iDlgBase
{
Q_OBJECT
public:
explicit iWxOptionResCompare(QWidget *parent = 0);
~iWxOptionResCompare();
// 设置当前打开的Wnd
void setAllMdiChildren(QVector<ZxMdiSubWindow*>& vec);
// 设置默认选中的Code从树右键触发
void setInitialCode(QStringList& list);
//
virtual void initUI();
private:
// 初始化
void initCbxs();
void initWells();
void initOthers();
void initTreeWx();
void fillCbxWnds(QComboBox* p);
// 填充
void fillCbxWells();
void fillCbxSegments(); //具体流动段
void fillCbxSeries();
// 数据
void freshTreeWx();
// 根据当前Option获取sWellCode井的成果信息
VVecVariant collectRstInfos(QVector<IxSerDes*>& vecRstSrcs, \
QString sWellCode);
// 分为三类 0已经加载 1:未保存
void _collectFromSubWnd(VVecVariant& vvecRstInfos,
QVector<IxSerDes*>& vecRstSrcs,
ZxMdiSubWindow* pSubChild,
iResCpSrcDesc::CpSrcType oMode,
QString sSeries);
// 分为三类 2:未加载
void _collectFromRstUtil(VVecVariant& vvecRstInfos,
QVector<IxSerDes*>& vecRstSrcs,
ZxRstUtils* pRstUtils);
// 暂时,从数据库ByteArray字段解析SegInfo中的部分信息
bool loadSerObjFromBa(QByteArray& v, \
IxSerDes*& pSerObj);
// 内部函数,文字转换
QString getDescOfCST(iResCpSrcDesc::CpSrcType oMode);
// 上下移动
void moveTreeWxItem(QTreeWidget* pTreeWx,
bool bUpForward,
bool bToFinal = false);
// 4+4个按钮状态函数
void freshBtnStates();
// SelAll状态
void freshSelAllState();
// Apply
void actionOnAutoApply();
bool runApply();
bool getWndSel(iSubWnd*& pSubWnd);
QString getWndName();
protected:
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
signals:
// 对比选项OK触发对比视图刷新
void sigResCompOptionChanged(QVector<IxSerDes*>&,
QVector<int>&,
bool,
iSubWnd*,
bool,
QString,
bool);
// 在刷新时,获取所有的窗体
void sigGetAllMdis(QVector<ZxMdiSubWindow*>&);
private slots:
// 井及井次
void on_cbxWellName_currentIndexChanged(const QString &arg1);
// 模型系列
void on_cbxModelSeries_currentIndexChanged(const QString &arg1);
// 流动段类型
void on_cbxSegType_currentIndexChanged(int index);
// 流动段
void on_cbxSegments_currentIndexChanged(const QString &arg1);
// 对比对象调整,主要为了刷新四个小按钮的状态
void on_treeWxWellRsts_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
void on_treeWxWellRsts_itemChanged(QTreeWidgetItem *item, int column);
// 右侧内容选项,统一
void slotCbxOptionClicked(int);
// 四个小按钮
void on_btnTop_clicked();
void on_btnUp_clicked();
void on_btnDown_clicked();
void on_btnBtm_clicked();
// 操作、应用
void on_cbxAutoApply_clicked();
void on_btnApply_clicked();
void on_btnOK_clicked();
void on_btnCancel_clicked();
void on_horizontalSlider_valueChanged(int value);
void on_cbxShowUnloaded_clicked();
void on_btnFresh_clicked();
void on_cbxSelAll_clicked();
void on_cmxWnds_currentIndexChanged(int index);
private:
private:
Ui::iWxOptionResCompare *ui;
// 控件右侧一系列CheckBox
QVector<QCheckBox*> m_vecCbxOptions;
// 所有井
QVector<ZxDataWell*> m_vecWells;
/// @brief 对比来源包括三部分
/// 1.当前新建的 ZxMdiSubWindow尚未保存
/// 2.当前加载的 ZxMdiSubWindow原先保存
/// 3.原先已经保存、但是当前尚未加载
QVector<ZxMdiSubWindow*> m_vecMdiChildren; //所有Mdi
// 这是成果来源载体,
// 可以是 SubWndFitting 也可 ZxRstUtils
// 所以取了二者父类ISerializableEx
QVector<IxSerDes*> m_vecRstSrcs;
// 这是所有Rst的描述在treewx显示的具体内容
VVecVariant m_vvecRstInfos;
// 这是默认选中的Code从树右键触发
QStringList m_listInitialCodes;
};