|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
|
|
|
|
|
|
#include "iPlugin_global.h"
|
|
|
|
|
|
|
|
|
|
class iJobRun;
|
|
|
|
|
class iSubWnd;
|
|
|
|
|
class iSubWndBaseAF;
|
|
|
|
|
class ZxObjWmPoint;
|
|
|
|
|
class ZxTabWidget;
|
|
|
|
|
class ZxMdiSubWindow;
|
|
|
|
|
class iWxRunOptionIPR;
|
|
|
|
|
class iDockBaseWx;
|
|
|
|
|
class TreeWxMain;
|
|
|
|
|
class iWxDesign;
|
|
|
|
|
|
|
|
|
|
// 为外部引用xMainWindow主窗体部分接口而单独封装
|
|
|
|
|
// 原本想通过虚接口类实现,但由于QObject缘故,虚接口类
|
|
|
|
|
// 不便实现信号槽机制,故只能封装该类进行实现
|
|
|
|
|
class I_PLUGIN_EXPORT ZxMainWindow : public QMainWindow
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxMainWindow(QWidget* parent = 0);
|
|
|
|
|
~ZxMainWindow();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/// @brief 检验是否具有正式授权
|
|
|
|
|
/// @param bPromptLicenseDlg 在不具备授权的时候,是否弹出授权对话框
|
|
|
|
|
virtual bool checkLicensed(bool bPromptLicenseDlg = false) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 返回当前所有JobRun的数组指针
|
|
|
|
|
virtual QVector<iJobRun*>* getVecJoRunPtrs() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 返回iWxRunOptionIPR窗体指针,该函数接口为权宜之计,慎用,后续可能需要删除
|
|
|
|
|
virtual iWxRunOptionIPR* getWxIprOptionPtr() = 0;
|
|
|
|
|
|
|
|
|
|
// 左侧工区树
|
|
|
|
|
// enum DockTreeMode
|
|
|
|
|
// {
|
|
|
|
|
// DTM_Da = 0, //数据
|
|
|
|
|
// DTM_Jb = 1, //Jobs
|
|
|
|
|
// DTM_Rs = 2 //成果
|
|
|
|
|
// };
|
|
|
|
|
/// @brief 获取左侧DockWx指针
|
|
|
|
|
/// @param n (in) 0:数据树 1:Jobs树 2:成果树
|
|
|
|
|
/// @note 注1:由于宏定义及依赖关系问题,暂时用int而非enum枚举作为参数类型
|
|
|
|
|
/// 注2:对于WTAI来讲,目前Dock其实均为子类型iDockWellExplorer
|
|
|
|
|
virtual iDockBaseWx* getLeftDockWx(int n) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取左侧树型控件指针
|
|
|
|
|
/// @param n (in) 0:数据树 1:Jobs树 2:成果树
|
|
|
|
|
/// @note 注1:由于宏定义及依赖关系问题,暂时用int而非enum枚举作为参数类型
|
|
|
|
|
/// 注2:获取指针之后,可以根据需要各自转换为如下三种子类类型
|
|
|
|
|
/// TreeWxMainDa* / TreeWxMainJb* / TreeWxMainRs*
|
|
|
|
|
virtual TreeWxMain* getLeftTreeWx(int n) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 获取指定窗体Wnd对应的TabWx
|
|
|
|
|
/// @param p:某窗体
|
|
|
|
|
virtual ZxTabWidget* getTabWxOfSubWnd(iSubWnd* p) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取当前Mdi对应的TabWx
|
|
|
|
|
/// @param p:某MdiSubWindow,如果p为空,则是当前激活的
|
|
|
|
|
virtual ZxTabWidget* getTabWxOf(ZxMdiSubWindow* p = NULL) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取当前MdiChild
|
|
|
|
|
virtual ZxMdiSubWindow* getCurMdiChild() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取当前TabWidget
|
|
|
|
|
virtual ZxTabWidget* getCurTabWx() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取当前SubWnd
|
|
|
|
|
virtual iSubWnd* getCurSubWnd() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 其它方创建的DockWx,与主窗口显示Detach,通常在析构时
|
|
|
|
|
virtual bool detachOuterDockWx(iDockBaseWx* pDockWx) = 0;
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
/// @brief 主窗口创建一个新的窗体,由iWxRunOptionStd/iWxRunOptionIPR之后的窗体触发
|
|
|
|
|
/// @param p (out)待创建的指针
|
|
|
|
|
/// @note 举例:流动段选择确定之后,右键弹出,创建 下一个 流动段分析窗口
|
|
|
|
|
virtual void slotCreateNextSubWnd(iSubWndBaseAF*& p) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 激活,由iWxRunOptionStd/iWxIprRunOptio之后的窗体触发
|
|
|
|
|
/// @param p (in)待激活窗体
|
|
|
|
|
virtual void slotActivateSubWnd(iSubWnd*& p) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 当压力流量数据更改时触发,主要是PF一旦保存之后
|
|
|
|
|
/// 提供给其它相关的SubWnd一种刷新机制
|
|
|
|
|
virtual void slotCacheDataCodePF(QString sCode) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 成果保存时,申请创建RstWnd,
|
|
|
|
|
/// @param (out) b:是否已经成功创建
|
|
|
|
|
/// @note:①如果成功创建,则会同步生成RstUtils等成果必须内容
|
|
|
|
|
/// ②如果成功创建,则会把创建结果设置给SubWnd(即信号触发者)
|
|
|
|
|
virtual void slotCreateRstWndForSubWnd(bool& b) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 在外部触发,关闭或者显示左侧工区数据树(全部,所有的Dock)
|
|
|
|
|
virtual void slotLeftTreeDocksVisible(bool bVisible) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 刷新Ribbon按钮状态
|
|
|
|
|
virtual void slotFreshRnStates() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取井位图信息
|
|
|
|
|
virtual void slotGetWmInfos(QVector<ZxObjWmPoint*>&) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief Lpr点收集了,右键响应
|
|
|
|
|
virtual void slotLprPointPQ(QVector<QPointF>& vec) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取当前主窗口有多少窗口
|
|
|
|
|
virtual void slotGetAllWnds(QMap<QString, iSubWnd*>& map, ZxTabWidget* pTabWx) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 刷新井相关
|
|
|
|
|
virtual void slotFreshWellBasics() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief SubWndData表格右键删除时,触发
|
|
|
|
|
virtual void slotSwdDataDelObjs(QStringList& listKeys, QString& sTable, QString& sError) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 控制所在的MDI视图
|
|
|
|
|
virtual void slotMdiChildShow(int) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 获取所有MDI
|
|
|
|
|
virtual void slotGetAllMdis(QVector<ZxMdiSubWindow*>&) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 在SubWnd中创建Dock并且显示至主窗体之中,该Dock由SubWnd进行管理
|
|
|
|
|
/// @param pDockWx (in) Dock指针
|
|
|
|
|
/// @param areaDefault(in) 默认布局区域
|
|
|
|
|
virtual void slotAppendDock2Main(iDockBaseWx* pDockWx, \
|
|
|
|
|
Qt::DockWidgetArea areaDefault = Qt::LeftDockWidgetArea) = 0;
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// 线程控制
|
|
|
|
|
|
|
|
|
|
/// @brief 在算法执行时显示隐藏进度条相关
|
|
|
|
|
virtual void slotShowProgressAbout(bool bVisible) = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 线程暂停
|
|
|
|
|
virtual void slotThreadPause() = 0;
|
|
|
|
|
|
|
|
|
|
/// @brief 线程结束
|
|
|
|
|
virtual void slotThreadQuit() = 0;
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
};
|