62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include<QString>
|
|
#include "report/reportdataset.h"
|
|
|
|
|
|
#include "json.hpp"
|
|
using json = nlohmann::json;
|
|
|
|
class FileGenerate :public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
FileGenerate();
|
|
~FileGenerate();
|
|
|
|
/*读取文档模版*/
|
|
// bool getTemplate();
|
|
/*生成需求文档*/
|
|
bool generate(QString filePath, json& parameter);
|
|
|
|
/*设置数据*/
|
|
void setData();
|
|
/*清理数据*/
|
|
void clearData();
|
|
/*生成*/
|
|
bool generateFile(QString& filePath, QString fileName);
|
|
|
|
unsigned int projectId = 0; //需生成文档的项目 id
|
|
|
|
QList<QString> m_listFileName;
|
|
QHash<QString, QList<QObject*>> m_DataSets;
|
|
|
|
//封面
|
|
QList<QObject*> CoverRightItem;
|
|
QList<QObject*> ModelItem;
|
|
QList<QObject*> LogoItem;
|
|
|
|
//根模块
|
|
QList<QObject*> PackItem;
|
|
QList<QObject*> PackTable;
|
|
QList<QObject*> RootPack; //根模块名称
|
|
QList<QObject*> ChildPackItem;
|
|
QList<QObject*> ChildPackTable;
|
|
QList<QObject*> ChildPack1; //第一层子模块名称 firstChildPack
|
|
QList<QObject*> Ch_childPackItem;
|
|
QList<QObject*> Ch_childPackTable;
|
|
QList<QObject*> ChildPack2; //第二 层子模块名称 secChildPack
|
|
|
|
QList<QObject*> classGroupItem;
|
|
QList<QObject*> classname; //第一层数据类
|
|
QList<QObject*> relatTableData; //关系表
|
|
QList<QObject*> interfaceTableData; //接口表
|
|
QList<QObject*> AttTableData; //属性表数据
|
|
|
|
QList<QObject*> classGroupItem111;
|
|
QList<QObject*> classname5;
|
|
QList<QObject*> AttTableData111; //属性表数据
|
|
QList<QObject*> relatTableData111; //关系表
|
|
QList<QObject*> interfaceTableData111; //接口表
|
|
}; |