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.
nmWATI/Include/mGui/mGuiJob/iWxResult.h

122 lines
3.4 KiB
C

#pragma once
#include "iWxBase.h"
#include "iResultInfo.h"
#include "ZxTextEdit.h"
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:
// 传入数据,刷新
// _s 简易版
// _c详细版
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;
};