diff options
author | David Boddie <dboddie@trolltech.com> | 2010-04-23 12:24:23 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-04-23 12:24:23 (GMT) |
commit | 4dba5cc0085482dccfbe70d8c157e094296feed1 (patch) | |
tree | f6c9b2b527f0a3823405362ef0b90e69e9265430 /tools/qdoc3 | |
parent | 9206f0f867e39bbcfa2670a7ba71211b7384c601 (diff) | |
parent | 466d7562a40eb0c2cf72f57fce0bc5e9b0de37c2 (diff) | |
download | Qt-4dba5cc0085482dccfbe70d8c157e094296feed1.zip Qt-4dba5cc0085482dccfbe70d8c157e094296feed1.tar.gz Qt-4dba5cc0085482dccfbe70d8c157e094296feed1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index bf2f724..5c33b70 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1923,18 +1923,30 @@ void HtmlGenerator::generateTableOfContents(const Node *node, inLink = true; out() << "<div class=\"toc\">\n"; - out() << "<h3>Table of Contents</h3>\n"; + out() << "<h3>Contents</h3>\n"; sectionNumber.append("1"); - out() << "<ul class=\"level" << sectionNumber.size() << "\">\n"; + out() << "<ul>\n"; if (node->subType() == Node::Module) { if (moduleNamespaceMap.contains(node->name())) { - out() << "<li><a href=\"#" << registerRef("namespaces") << "\">Namespaces</a></li>\n"; + out() << "<li class=\"level" + << sectionNumber.size() + << "\"><a href=\"#" + << registerRef("namespaces") + << "\">Namespaces</a></li>\n"; } if (moduleClassMap.contains(node->name())) { - out() << "<li><a href=\"#" << registerRef("classes") << "\">Classes</a></li>\n"; - } - out() << "<li><a href=\"#" << registerRef("details") << "\">Detailed Description</a></li>\n"; + out() << "<li class=\"level" + << sectionNumber.size() + << "\"><a href=\"#" + << registerRef("classes") + << "\">Classes</a></li>\n"; + } + out() << "<li class=\"level" + << sectionNumber.size() + << "\"><a href=\"#" + << registerRef("details") + << "\">Detailed Description</a></li>\n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1946,14 +1958,20 @@ void HtmlGenerator::generateTableOfContents(const Node *node, QList<Section>::ConstIterator s = sections->begin(); while (s != sections->end()) { if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { - out() << "<li><a href=\"#" + out() << "<li class=\"level" + << sectionNumber.size() + << "\"><a href=\"#" << registerRef((*s).pluralMember) << "\">" << (*s).name << "</a></li>\n"; } ++s; } - out() << "<li><a href=\"#" << registerRef("details") << "\">Detailed Description</a></li>\n"; + out() << "<li class=\"level" + << sectionNumber.size() + << "\"><a href=\"#" + << registerRef("details") + << "\">Detailed Description</a></li>\n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1968,12 +1986,10 @@ void HtmlGenerator::generateTableOfContents(const Node *node, if (sectionNumber.size() < nextLevel) { do { sectionNumber.append("1"); - out() << "<ul class=\"level" << sectionNumber.size() << "\">\n"; } while (sectionNumber.size() < nextLevel); } else { while (sectionNumber.size() > nextLevel) { - out() << "</ul>\n"; sectionNumber.removeLast(); } sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); @@ -1981,19 +1997,20 @@ void HtmlGenerator::generateTableOfContents(const Node *node, int numAtoms; Text headingText = Text::sectionHeading(atom); QString s = headingText.toString(); - out() << "<li>"; + out() << "<li class=\"level" + << sectionNumber.size() + << "\">"; out() << "<a href=\"" << "#" - //<< registerRef(s) << Doc::canonicalTitle(s) << "\">"; generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms); out() << "</a></li>\n"; } while (!sectionNumber.isEmpty()) { - out() << "</ul>\n"; sectionNumber.removeLast(); } + out() << "</ul>\n"; out() << "</div>\n"; inContents = false; inLink = false; |