From 1ad78f5f29ef00abae4f718265fa4bc0c35b60f9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Oct 2014 10:22:45 +0200 Subject: qdoc: Prepare QDoc for the new style on qt.io The new template and CSS have some requirements that need changes in the generated .html: - Generate a new div 'sidebar' and place the TOC (if one exists) inside it, allowing the template to extend the sidebar contents dynamically. Do this for all pages except index.html. - Change the DOCTYPE declaration to be html5-compliant - Replace tags with to be html5-compliant - Add a new config variable HTML.prologue - this allows the template to insert custom html into beginning of the page, before the page title but after any navigation or table-of-contents items. - Wrap tables inside
elements. This allows for better-working CSS design for small-screen devices. - Write out extra parameters first when outputting function synopsis to have better styling. - Inject zero-width-space characters into function names to allow the browser break up long function signatures in a nice manner. - Edit the CSS for the offline style to adapt to above changes. Task-number: QTBUG-42086 Change-Id: I3075cdc11bcb07a66150388519263fd721c8002b Reviewed-by: Martin Smith --- src/tools/qdoc/htmlgenerator.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools/qdoc/htmlgenerator.h') diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index 616a989361..40360da02e 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -144,6 +144,7 @@ private: void generateTableOfContents(const Node *node, CodeMarker *marker, QList
* sections = 0); + void generateSidebar(); QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker); QString generateAllQmlMembersFile(QmlClassNode* qml_cn, CodeMarker* marker); @@ -238,6 +239,7 @@ private: QString endHeader; QString postHeader; QString postPostHeader; + QString prologue; QString footer; QString address; bool pleaseGenerateMacRef; @@ -272,6 +274,7 @@ public: #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_POSTHEADER "postheader" #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" +#define HTMLGENERATOR_PROLOGUE "prologue" #define HTMLGENERATOR_NONAVIGATIONBAR "nonavigationbar" #define HTMLGENERATOR_NOSUBDIRS "nosubdirs" #define HTMLGENERATOR_TOCDEPTH "tocdepth" -- cgit v1.2.3