mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 01:35:40 +03:00
04.07.2022
This commit is contained in:
102
s1000d/Converter14/lyx.h
Normal file
102
s1000d/Converter14/lyx.h
Normal file
@@ -0,0 +1,102 @@
|
||||
#ifndef LYX_H
|
||||
#define LYX_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QMainWindow>
|
||||
#include "s1000d_manager.h"
|
||||
#include "splashform.h"
|
||||
|
||||
class LyX {
|
||||
public:
|
||||
struct tableOfContentsStruct {
|
||||
QString id, title;
|
||||
QList<tableOfContentsStruct> childs;
|
||||
} tableOfContentsRoot;
|
||||
|
||||
LyX();
|
||||
bool Import(S1000D_Manager* SM, QString fileName, SplashForm* splash);
|
||||
bool readLyXFile(QString fileName);
|
||||
void checkForOldIdent();
|
||||
void parseBlock(int _beg, int _end, QDomNode domCurLevelNode);
|
||||
void parseInset(int _beg, int _end);
|
||||
int findTagEnd(int _beg);
|
||||
int findTag(int _beg, int _end, QString startsWithName);
|
||||
void pushFlags();
|
||||
void popFlags();
|
||||
void pushLyXFileData();
|
||||
void popLyXFileData();
|
||||
void appendChapter(QString title);
|
||||
void appendSection(QString title);
|
||||
void appendSubsection(QString title);
|
||||
void fillTableOfContents(tableOfContentsStruct tocNode, QDomNode domToCNode, QString deepSpaces);
|
||||
void fillAcronymList(QDomNode domAcronymListNode);
|
||||
int parseLearningModule(QDomNode domLearnNode, int _learnBeg, int _learnMaxEnd);
|
||||
// QString questLyXtoHTML(QString answer);
|
||||
void addQuestInteraction(QDomNode domLearnNode, QString question, QStringList answers);
|
||||
QDomNode searchSVGNodeForSpanNode(QDomNode node);
|
||||
void connectRefsWithLabels();
|
||||
|
||||
QStringList lyxList;
|
||||
QStringList lyxLog;
|
||||
QString curLyXFileName; //, domContentPath;
|
||||
//QString curXmlFileName;
|
||||
QString projPath;
|
||||
QDomNode domRootNode, domTableOfContentsNode, domAcronymListNode;
|
||||
int tocItemNum, acrListItemNum;
|
||||
QString tableTitle, tableID, figureTitle, figureID;
|
||||
|
||||
S1000D_Manager* SM;
|
||||
SplashForm* splash;
|
||||
bool DBG = true;
|
||||
struct flagsStruct {
|
||||
QString align;
|
||||
bool bold, italic, underlined;
|
||||
} flags;
|
||||
QList<flagsStruct> flagsStack;
|
||||
struct acronymStruct {
|
||||
QString lyxFootnoteName, id, term, definition;
|
||||
};
|
||||
QList<acronymStruct> acronymList;
|
||||
struct labelStruct {
|
||||
int itemInd;
|
||||
QString lyxLabel, id;
|
||||
bool defined = false;
|
||||
bool used = false;
|
||||
QString nodeXPath;
|
||||
int lineNum;
|
||||
};
|
||||
QList<labelStruct> labelList;
|
||||
struct refStruct {
|
||||
int itemInd;
|
||||
QString lyxRef;
|
||||
bool labelFound;
|
||||
QString nodeXPath;
|
||||
int lineNum;
|
||||
};
|
||||
QList<refStruct> refList;
|
||||
int cntTable, cntFigure, cntPar;
|
||||
|
||||
struct cellStruct {
|
||||
int _cellBeg, _cellEnd;
|
||||
QString colname, spanname, multiCol, multiRow;
|
||||
bool topline, bottomline, leftline, rightline, checkPassed;
|
||||
bool createS1000D_entry;
|
||||
QString alignment, rotate;
|
||||
};
|
||||
|
||||
struct fileStruct {
|
||||
QString fileName;
|
||||
QStringList lyxList;
|
||||
};
|
||||
QList<fileStruct> lyxFileStack;
|
||||
QStringList internalRefList;
|
||||
|
||||
RU_Const* ru_const;
|
||||
|
||||
|
||||
int docChapter, docSection, docSubsection;//, docSubsubsection;
|
||||
int curChapterItem, curSectionItem, curSubsectionItem;
|
||||
|
||||
QList<int> lyxEmptyCnt;
|
||||
};
|
||||
#endif // LYX_H
|
||||
Reference in New Issue
Block a user