diff options
author | Thomas Zander <thomas.zander@trolltech.com> | 2009-05-12 12:18:58 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2009-05-14 08:32:18 (GMT) |
commit | ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea (patch) | |
tree | d0b7890a837fdb0c39714f571f73b86222248c4d /tools/qdoc3 | |
parent | 4cfe2b57d97488b4f312ad2ec2985f619b4984b6 (diff) | |
download | Qt-ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea.zip Qt-ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea.tar.gz Qt-ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea.tar.bz2 |
Makes the layout of many of the areas be in aligned columns to immensely increase readability
Unfortunately the patch causes quite some regressions and I think some refectoring of this class
would be needed.
I didn't do that since there is no API docs, the variable naming is not very clarifying and the
code is hard to read due to it not using the coding style and mixing tabs as well as spaces.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 13d52bf..7702628 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2079,17 +2079,7 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela CodeMarker *marker, CodeMarker::SynopsisStyle style) { if (!section.members.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - twoColumn = (section.members.count() >= 16); - } else if (section.members.first()->type() == Node::Property) { - twoColumn = (section.members.count() >= 5); - } - if (twoColumn) - out() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\"" - " cellspacing=\"0\">\n" - << "<tr><td width=\"45%\" valign=\"top\">"; - out() << "<ul>\n"; + out() << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"; int i = 0; NodeList::ConstIterator m = section.members.begin(); @@ -2099,22 +2089,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela continue; } - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "</ul></td><td valign=\"top\"><ul>\n"; - - out() << "<li><div class=\"fn\"></div>"; + out() << "<tr><td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">"; if (style == CodeMarker::Accessors) out() << "<b>"; generateSynopsis(*m, relative, marker, style); if (style == CodeMarker::Accessors) out() << "</b>"; - out() << "</li>\n"; + out() << "</td></tr>\n"; i++; ++m; } - out() << "</ul>\n"; - if (twoColumn) - out() << "</td></tr>\n</table></p>\n"; + out() << "</table>\n"; } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -2129,7 +2114,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N { QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "<li><div class=\"fn\"></div>"; + out() << "<li><div bar=2 class=\"fn\"></div>"; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2425,7 +2410,9 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)" static const QString linkTag("link"); for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { + if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { + if (i != 0) + html += " </td><td class=\"memItemRight\" valign=\"bottom\">"; i += 2; if (parseArg(src, linkTag, &i, n, &arg, &par1)) { QString link = linkForNode( |