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/iSubWndResCompare.h

171 lines
5.1 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 "iSubWnd.h"
#include "mSubWndAna_global.h"
class iGuiPlot;
class iGuiPlotEx;
class iWxOptionResCompare;
class ZxRstUtils;
class iSubWndFitting;
class iWxResult;
class iWxBase;
class iResultInfo;
class ZxMdiArea;
class ZxRstUtils;
class iDockBaseWx;
class iWxResCpOption;
class M_SUB_WND_ANA_EXPORT iSubWndResCompare : public iSubWnd
{
Q_OBJECT
public:
explicit iSubWndResCompare(QWidget *parent = 0, QString sExt = "");
~iSubWndResCompare();
// 初始化入口
virtual void initUI();
// 配置窗体
virtual void configWnd(QString sPrevInfo);
// 对比选项OK触发对比视图刷新
void runRstCpBy(QVector<IxSerDes*>& vecCpUtils, \
QVector<int>& vecContents, \
bool bSegSame, \
bool bSoleGridMode);
// 追加/删除
bool runRstCpAddBy(QVector<IxSerDes*>& vec);
bool runRstCpRemoveBy(QVector<IxSerDes*>& vec);
// 刷新对比结果视窗
void dealwithCps();
// 处理浮动窗口
void dealCpOptions();
void dealCpOptions_add(ZxRstUtils* pRst);
// 布局调整
virtual void layoutSubWnds(WndLayoutMode oWlm);
// 对于MdiArea中的窗体进行重新布局
void _layoutSubWnds();
protected:
// 初始化UI
void initMdi();
virtual void initUiDockPtys();
virtual void initUiDockWxs();
// 对比窗体创建
void initSubWxs();
QWidget* createSubWxOf(ContentCpType& o);
QWidget* createSubWxOf_Chart(ContentCpType& o);
QWidget* createSubWxOf_MP(ContentCpType& o);
QWidget* createSubWxOf_PF(ContentCpType& o);
QWidget* createSubWxOf_DataInput(ContentCpType& o);
// 执行命令通常来自Ribbon
virtual bool runCmdBy(QString sName, QString sID);
/// @brief 命令是否Enabled的状态判断通常来自Ribbon
/// @param b (out)trueEnabled falsedisabled
/// @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);
// 绘图部分处理
void dealPlots();
void dealPlots_Remove(ContentCpType o, iGuiPlot*& pWxPlot);
void dealPlots_Add(ContentCpType o, iGuiPlot*& pWxPlot);
// 解析
bool parseRst2Plot(ContentCpType o,
ZxRstUtils* pRstUtils,
iGuiPlot *pWxPlot,
int nClrIndex);
bool parseSubWnd2Plot(ContentCpType o,
iSubWndFitting* pSubWnd,
iGuiPlot *pWxPlot,
int nClrIndex);
bool orgaRstName(QString& s,
QString& sGroup,
ZxRstUtils* pRstUtils);
bool orgaSubWndName(QString& s,
QString& sGroup,
iSubWndFitting* pSubWnd);
void addCurve2Plot(ContentCpType o,
QVector<QPointF>& vec,
iGuiPlot* pWxPlot,
QString sCurveName,
int nClrIndex);
// 结果表格部分
bool dealResults(QMap<ContentCpType, QWidget*>& mapWxs);
bool organizeResults_MP(QStringList& listTags, \
QVector <QVector<iResultInfo> >& vvecInfosM, \
QVector <QVector<iResultInfo> >& vvecInfosP);
bool organizeResults_Chart(QMap<ContentCpType, QWidget*>& mapWxs, \
QVector <QVector<iResultInfo> >& vvecInfosC);
QString orgaResultTitle();
// 成果解析部分
bool parseRsts2ResultInfo(ZxRstUtils* pRstUtils,
QVector<iResultInfo>*& pVecInfosM,
QVector<iResultInfo>*& pVecInfosP);
bool parseSubWnd2ResultInfo(iSubWndFitting* pSubWnd,
QVector<iResultInfo>*& pVecInfosM,
QVector<iResultInfo>*& pVecInfosP);
public slots:
// MdiSize
void slotMdiSizeChanged();
// 在布局前对窗体顺序进行调整
void slotAdjustMdiAreaWnds(QList<QMdiSubWindow*>& listSubWnds);
// 浮动窗口选项改变
// 单个的选择状态改变
void slotCpItemChanged(QString s, IxSerDes* pRst, bool bSel);
// 整体改变
void slotCpItemsChanged(QMap<QString, IxSerDes*>& map);
// 透明度
void slotWndOpacityChanged(double d);
signals:
private:
ZxMdiArea* m_pMdiArea;
// 浮动
iDockBaseWx* m_pWxDockOption;
iWxResCpOption* m_pWxResCpOption;
// 当前参与对比的对象可能是SubWnd也可能是ZxRstUtils
QVector<IxSerDes*> m_vecCpRstFroms;
// Plot是否加载的标识
QMap<IxSerDes*, bool> m_mapLoadFlags;
// 当前参与对比的内容
QVector<ContentCpType> m_vecCpTypes;
// 临时
QMap<ContentCpType, QWidget*> m_mapWxs;
// 流动段是否一致
bool m_bSegSame;
// 是否单一表格模式
bool m_bSoleGridMode;
};