|
|
#pragma once
|
|
|
|
|
|
#include "iWxBase.h"
|
|
|
#include "iResultInfo.h"
|
|
|
#include "ZxTextEdit.h"
|
|
|
|
|
|
class iParameter;
|
|
|
class iGridResultUtils;
|
|
|
|
|
|
namespace Ui {
|
|
|
class iWxResult;
|
|
|
}
|
|
|
|
|
|
class M_GUI_JOB_EXPORT iWxResult : public iWxBase
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
explicit iWxResult(QWidget *parent = 0, \
|
|
|
int nVisibleTabItem = -1);
|
|
|
~iWxResult();
|
|
|
|
|
|
virtual void initSheets(); //Sheet
|
|
|
virtual void initUI();
|
|
|
|
|
|
// 序列化
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
// 这是显示的数据(详细Tab页)中的标题
|
|
|
// 而不是iWxResult本身的标题
|
|
|
void setTitle(QString s);
|
|
|
|
|
|
public:
|
|
|
|
|
|
// 返回TextEdit指针
|
|
|
QTextEdit* getTbxSimle();
|
|
|
QTextEdit* getTbxAll();
|
|
|
QTextEdit* getTbxTemp();
|
|
|
|
|
|
// 传入数据
|
|
|
void freshResults(QVector<iResultInfo>& vecResults);
|
|
|
//ZXF20240625 模型参数更新
|
|
|
void freshParams(QVector<iResultInfo>& vecResults);
|
|
|
|
|
|
// 追加式传入数据,放在Temp的Tab页
|
|
|
void freshResult_t(QStringList listInfo, bool bWarning = false);
|
|
|
void clearResult_t();
|
|
|
// _o oneTab版
|
|
|
void freshResults_o(QVector<iResultInfo>& vecResults);
|
|
|
void clearResult_o();
|
|
|
|
|
|
// 结果对比调用,非常复杂
|
|
|
void freshResults_ResCp(QStringList& listTags,
|
|
|
QVector <QVector<iResultInfo> >& vvecInfosM,
|
|
|
QVector <QVector<iResultInfo> >& vvecInfosP,
|
|
|
QVector <QVector<iResultInfo> >& vvecInfosC);
|
|
|
|
|
|
// 填表
|
|
|
void _fillTableWith(QTextTable *pTableWx, \
|
|
|
QVector <QVector<iResultInfo> >* pVVec, \
|
|
|
bool bChart);
|
|
|
QString _getRandomType(QVector <QVector<iResultInfo> >* pVVec);
|
|
|
|
|
|
// 显示隐藏Tab
|
|
|
void setTabItemVisible(int n, bool bVisible);
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void slotCustomMenu(QMenu* pMenu);
|
|
|
|
|
|
private:
|
|
|
|
|
|
// 新的方式
|
|
|
void initUI_GridRst();
|
|
|
void releaseObjs();
|
|
|
void reAdjustResultInfos(QVector<iResultInfo>& vecResults, \
|
|
|
QStringList listTypes);
|
|
|
|
|
|
// 传入数据,刷新
|
|
|
// _g grid版,新版
|
|
|
// _s 简易版
|
|
|
// _c详细版
|
|
|
void freshResults_g(QVector<iResultInfo>& vecResults);
|
|
|
void freshResults_s(QVector<iResultInfo>& vecResults);
|
|
|
void freshResults_c(QVector<iResultInfo>& vecResults);
|
|
|
|
|
|
// 解析得到类别
|
|
|
QStringList parseTypes(QVector<iResultInfo> & vec, bool bSimpleMode = false);
|
|
|
|
|
|
// 显示相关
|
|
|
void displayText(QTextCursor& cursor,
|
|
|
QString s,
|
|
|
Qt::AlignmentFlag oAln = Qt::AlignHCenter,
|
|
|
bool bBold = false,
|
|
|
bool bReturn = true,
|
|
|
bool bWarning = false);
|
|
|
QTextTable* createTableWithHeaders(QTextCursor& cursor, \
|
|
|
QStringList listTitles, \
|
|
|
bool bSimpleMode = false);
|
|
|
void displayTableHeaders(QTextTable* &pTableWx, \
|
|
|
QStringList listTitles);
|
|
|
// n = 0: s 1:c 2:o
|
|
|
void displayOneRow(QTextTable* &pTableWx, \
|
|
|
iResultInfo o, \
|
|
|
int n = 0);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
// 打印
|
|
|
void slotPrintResult_s();
|
|
|
void slotPrintResult_c();
|
|
|
void slotPrintResult_t();
|
|
|
void _printResultsOf(QTextEdit* p);
|
|
|
|
|
|
private:
|
|
|
Ui::iWxResult *ui;
|
|
|
|
|
|
// 这是显示的数据(详细Tab页)中的标题
|
|
|
// 而不是iWxResult本身的标题
|
|
|
QString m_sResTitle;
|
|
|
|
|
|
// 这是对Tab显示与隐藏的控制
|
|
|
// >0时,仅仅显示特定的Tab页
|
|
|
// <0时,所有
|
|
|
// 默认-1,所有
|
|
|
int m_nVisibleTabItem;
|
|
|
|
|
|
|
|
|
// 这是新的方式(TODO,需要增加序列化处理)
|
|
|
QVector<iParameter*> m_vecAllObjs;//需要析构
|
|
|
iGridResultUtils* m_pGridRstUtils;
|
|
|
QVBoxLayout* m_pGridRstLayout;
|
|
|
|
|
|
};
|