diff options
author | Martin Smith <martin.smith@nokia.com> | 2011-03-15 13:58:06 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2011-03-15 13:58:06 (GMT) |
commit | a02369f43851932b820042448a47d024a0086bd8 (patch) | |
tree | 943cf38f3825fca4addffe192cfc5a1dbbb918fd /tools/qdoc3/ditaxmlgenerator.h | |
parent | 2b0bfcf72f145b6948d9cdfd2db6c9f2e10b5def (diff) | |
download | Qt-a02369f43851932b820042448a47d024a0086bd8.zip Qt-a02369f43851932b820042448a47d024a0086bd8.tar.gz Qt-a02369f43851932b820042448a47d024a0086bd8.tar.bz2 |
qdoc: Changed <section> structure.
There appears to be a design flaw in the DIKT language
in that it doesn't allow the <title> element to appear
inside a <bodydiv> <sectiondiv>.
Diffstat (limited to 'tools/qdoc3/ditaxmlgenerator.h')
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.h | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 3e66318..d35af76 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -438,23 +438,42 @@ class DitaXmlGenerator : public PageGenerator void addLink(const QString& href, const QStringRef& text); void writeDitaMap(); void writeStartTag(DitaTag t); + void startTitle(); void writeEndTag(DitaTag t=DT_NONE); DitaTag currentTag(); + void clearSectionNesting() { sectionNestingLevel = 0; } + int enterSection(const QString& outputclass, QString* idText=0); + int leaveSection(); + bool inSection() const { return (sectionNestingLevel > 0); } + int currentSectionNestingLevel() const { return sectionNestingLevel; } + private: - QMap<QString, QString> refMap; - QMap<QString, QString> name2guidMap; - GuidMaps guidMaps; - int codeIndent; + /* + These flags indicate which elements the generator + is currently outputting. + */ + bool inApiDesc; + bool inContents; + bool inDetailedDescription; + bool inLegaleseText; bool inLink; bool inObsoleteLink; - bool inContents; bool inSectionHeading; bool inTableHeader; bool inTableBody; - int numTableRows; - bool threeColumnEnumValueTable; + + bool noLinks; + bool obsoleteLinks; bool offlineDocs; + bool threeColumnEnumValueTable; + + int codeIndent; + int numTableRows; + int divNestingLevel; + int sectionNestingLevel; + int tableColumnCount; + QString link; QStringList sectionNumber; QRegExp funcLeftParen; @@ -473,9 +492,9 @@ class DitaXmlGenerator : public PageGenerator QStringList stylesheets; QStringList customHeadElements; const Tree* myTree; - bool obsoleteLinks; - bool noLinks; - int tableColumnCount; + QMap<QString, QString> refMap; + QMap<QString, QString> name2guidMap; + GuidMaps guidMaps; QMap<QString, NodeMap > moduleClassMap; QMap<QString, NodeMap > moduleNamespaceMap; NodeMap nonCompatClasses; @@ -494,10 +513,6 @@ class DitaXmlGenerator : public PageGenerator NewClassMaps newClassMaps; NewClassMaps newQmlClassMaps; static int id; - static bool inApiDesc; - static bool inSection; - static bool inDetailedDescription; - static bool inLegaleseText; static QString ditaTags[]; QStack<QXmlStreamWriter*> xmlWriterStack; QStack<DitaTag> tagStack; |