|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iSubWndBaseAF.h"
|
|
|
|
|
#include "nmSubWnd_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxObjBase;
|
|
|
|
|
class ZxObjCurve;
|
|
|
|
|
class ZxDataObject;
|
|
|
|
|
class nmGuiPlot;
|
|
|
|
|
class ZxTableView;
|
|
|
|
|
class iDockBaseWx;
|
|
|
|
|
class nmWxParaProperty;
|
|
|
|
|
class nmDataDemo;
|
|
|
|
|
class QToolBar;
|
|
|
|
|
|
|
|
|
|
class NM_SUB_WND_EXPORT nmSubWndMain : public iSubWndBaseAF
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit nmSubWndMain(QWidget *parent = 0, QString sExt = "");
|
|
|
|
|
~nmSubWndMain();
|
|
|
|
|
|
|
|
|
|
// 配置窗体
|
|
|
|
|
virtual void configWnd();
|
|
|
|
|
|
|
|
|
|
// 初始化UI
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
virtual QWidget* initUiMainWx();
|
|
|
|
|
virtual void initUiDockWxs();
|
|
|
|
|
virtual void initUiDockPtys();
|
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
// 示例:演示增加Dock并且追加至程序主窗口
|
|
|
|
|
void initUiTop();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// 窗体初始后允许数据加载及刷新
|
|
|
|
|
virtual void firstLoadAndUpdate();
|
|
|
|
|
|
|
|
|
|
// 窗体创建完毕之后的尾处理
|
|
|
|
|
virtual void finalDeals();
|
|
|
|
|
|
|
|
|
|
// 当前窗体激活时被调用
|
|
|
|
|
virtual void onActivated();
|
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
|
|
|
|
|
// 更新左右Dock数据
|
|
|
|
|
void updateDockWxs();
|
|
|
|
|
|
|
|
|
|
// 更新图形
|
|
|
|
|
void updatePlots();
|
|
|
|
|
|
|
|
|
|
/// @brief 从当前井获取压力数据
|
|
|
|
|
/// @param sType 具体类型,比如压力、流量、温度等
|
|
|
|
|
/// @param sCode 指定Code,如果不指定,则返回满足条件的第一条
|
|
|
|
|
ZxDataObject* getDataObjOf(QString sType, QString sCode = "");
|
|
|
|
|
|
|
|
|
|
// 把曲线数据刷新至表格
|
|
|
|
|
void updateTableByCurve(ZxObjCurve* pObjCurve, ZxTableView* pTableView);
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialized();
|
|
|
|
|
|
|
|
|
|
// 成果保存加载
|
|
|
|
|
virtual bool loadRss();
|
|
|
|
|
virtual bool saveRss();
|
|
|
|
|
|
|
|
|
|
// 窗体关闭之前的确认
|
|
|
|
|
virtual bool onConfirmClosing();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 绑定图形信号
|
|
|
|
|
virtual void bindChartSignals(iGuiPlot* pWxPlot);
|
|
|
|
|
|
|
|
|
|
// 重新调整工具栏
|
|
|
|
|
virtual void reAdjustToolbar(QToolBar*);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 执行命令:通常来自图形右侧/左侧的工具栏
|
|
|
|
|
virtual bool runActionOf(QString sAction);
|
|
|
|
|
|
|
|
|
|
// 执行命令:通常来自Ribbon
|
|
|
|
|
virtual bool runCmdBy(QString sName, QString sID);
|
|
|
|
|
|
|
|
|
|
/// @brief 命令是否Enabled的状态判断,通常来自Ribbon
|
|
|
|
|
/// @param b (out),true:Enabled false:disabled
|
|
|
|
|
/// @param sName (in),Cmd Name
|
|
|
|
|
/// @param nID (in),Cmd ID
|
|
|
|
|
/// @param bLicensed (in),当前是否有授权
|
|
|
|
|
/// @return 本窗体是否已经进行状态判断(即属于本窗体可执行的命令)
|
|
|
|
|
virtual bool checkCmdEnable(bool &b, \
|
|
|
|
|
QString sName, int nID, \
|
|
|
|
|
bool bLicensed);
|
|
|
|
|
|
|
|
|
|
// analyzeData setter and getter
|
|
|
|
|
nmDataDemo *analyzeData() const;
|
|
|
|
|
void setAnalyzeData(nmDataDemo *newAnalyzeData);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// Obj选择状态改变
|
|
|
|
|
void slotObjSelChanged(ZxObjBase*, bool);
|
|
|
|
|
|
|
|
|
|
// Obj数据发生了改变
|
|
|
|
|
void slotObjPtsChanged(ZxObjBase*);
|
|
|
|
|
|
|
|
|
|
// 当前窗体所有信息的保存,比如关闭时提问的保存
|
|
|
|
|
virtual bool slotSaveAll();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// 地质图导入
|
|
|
|
|
void geologicalMapImport();
|
|
|
|
|
// 地质图隐藏
|
|
|
|
|
void geologicalMapHide();
|
|
|
|
|
// 隐藏公共的Dock视图
|
|
|
|
|
void setTopDocksVisible(bool visible);
|
|
|
|
|
// 画多边形边界
|
|
|
|
|
void drawPolygonOutline();
|
|
|
|
|
// 画正方形边界
|
|
|
|
|
void drawSquareOutline();
|
|
|
|
|
// 画圆形边界
|
|
|
|
|
void drawRoundOutline();
|
|
|
|
|
// 画断层
|
|
|
|
|
void drawFault();
|
|
|
|
|
// 画井点
|
|
|
|
|
void drawWell();
|
|
|
|
|
// 画裂缝
|
|
|
|
|
void drawCrack();
|
|
|
|
|
// 画区域
|
|
|
|
|
void drawRegion();
|
|
|
|
|
// 区域标识
|
|
|
|
|
void identificationRegion();
|
|
|
|
|
// 网格生成
|
|
|
|
|
void generationMesh();
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 绘图相关
|
|
|
|
|
nmGuiPlot* m_pWxPlot;
|
|
|
|
|
|
|
|
|
|
iDockBaseWx* m_pWxDockParas; //模型参数
|
|
|
|
|
nmWxParaProperty* m_pWxParas;
|
|
|
|
|
|
|
|
|
|
iDockBaseWx* m_pWxDockData1; //表格数据样例1
|
|
|
|
|
ZxTableView* m_pTableView1;
|
|
|
|
|
|
|
|
|
|
iDockBaseWx* m_pWxDockData2; //表格数据样例2
|
|
|
|
|
ZxTableView* m_pTableView2;
|
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
// 示例:演示增加Dock并且追加至程序主窗口
|
|
|
|
|
iDockBaseWx* m_pWxDockTemp;
|
|
|
|
|
QListWidget* m_pListWxTemp;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// QDSZ
|
|
|
|
|
nmDataDemo* m_pAnalyzeData;
|
|
|
|
|
QToolBar* m_pPlotToolBar;
|
|
|
|
|
};
|