diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-07-09 10:18:18 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-07-09 10:18:18 (GMT) |
commit | e649d255bc3785c9af7c36e743ac204c8890137e (patch) | |
tree | f9aa3ef47489650e2b8d1d7ee7748698d123dfb6 /tools | |
parent | 49e66883ee4e104f9713d8e1e1b34215760a6174 (diff) | |
download | Qt-e649d255bc3785c9af7c36e743ac204c8890137e.zip Qt-e649d255bc3785c9af7c36e743ac204c8890137e.tar.gz Qt-e649d255bc3785c9af7c36e743ac204c8890137e.tar.bz2 |
Doc: Adding support for Qt Creator style
Adding a variable to the qdocconf file will now generate the docs in Creator format
Reviewed-by: Martin Smith
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/config.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 18 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.h | 1 |
3 files changed, 18 insertions, 2 deletions
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index c29becc..af58a3f 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -143,6 +143,7 @@ class Config #define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_ONLINE "online" +#define CONFIG_CREATOR "creator" #define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTENCODING "outputencoding" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c1e01d7..16b45d6 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -214,6 +214,7 @@ HtmlGenerator::HtmlGenerator() numTableRows(0), threeColumnEnumValueTable(true), offlineDocs(true), + creatorDocs(false), funcLeftParen("\\S(\\()"), myTree(0), slow(false), @@ -276,6 +277,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) project = config.getString(CONFIG_PROJECT); offlineDocs = !config.getBool(CONFIG_ONLINE); + creatorDocs = !config.getBool(CONFIG_CREATOR); projectDescription = config.getString(CONFIG_DESCRIPTION); if (projectDescription.isEmpty() && !project.isEmpty()) projectDescription = project + " Reference Documentation"; @@ -1775,9 +1777,17 @@ void HtmlGenerator::generateHeader(const QString& title, // Setting assistant configuration if (offlineDocs) { - // out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/CreatorStyle.css\" />"; // Only for Qt Creator + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/creatorStyle.css\" />"; // Only for Qt Creator out() << "</head>\n"; - out() << "<body class=\"offline narrow\">\n"; // offline for Creator and Assistant + //out() << "<body class=\"offline narrow \">\n"; // offline for Assistant + out() << "<body class=\"offline narrow creator\">\n"; // offline for Creator + } + if (creatorDocs) + { + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/creatorStyle.css\" />"; // Only for Qt Creator + out() << "</head>\n"; + //out() << "<body class=\"offline narrow \">\n"; // offline for Assistant + out() << "<body class=\"offline narrow creator\">\n"; // offline for Creator } // Setting online doc configuration else @@ -1847,6 +1857,10 @@ void HtmlGenerator::generateFooter(const Node *node) { out() << "</body>\n"; } + if (creatorDocs) + { + out() << "</body>\n"; + } else { out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 9c5be15..abfca60 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -288,6 +288,7 @@ class HtmlGenerator : public PageGenerator int numTableRows; bool threeColumnEnumValueTable; bool offlineDocs; + bool creatorDocs; QString link; QStringList sectionNumber; QRegExp funcLeftParen; |