summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-05-19 15:53:38 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-05-19 15:54:02 (GMT)
commit90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a (patch)
treea9d08e3c58245ea12fd709250dce490c4cfd3b1f /tools/qdoc3
parent8821284ac4e55caf5fe712fca002e79220e9cf7e (diff)
downloadQt-90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a.zip
Qt-90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a.tar.gz
Qt-90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a.tar.bz2
Revert "Makes the layout of many of the areas be in aligned columns to immensely increase readability"
This was pushed accidentially. This reverts commit ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 7702628..13d52bf 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -2079,7 +2079,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela
CodeMarker *marker, CodeMarker::SynopsisStyle style)
{
if (!section.members.isEmpty()) {
- out() << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
+ 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";
int i = 0;
NodeList::ConstIterator m = section.members.begin();
@@ -2089,17 +2099,22 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela
continue;
}
- out() << "<tr><td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">";
+ if (twoColumn && i == (int) (section.members.count() + 1) / 2)
+ out() << "</ul></td><td valign=\"top\"><ul>\n";
+
+ out() << "<li><div class=\"fn\"></div>";
if (style == CodeMarker::Accessors)
out() << "<b>";
generateSynopsis(*m, relative, marker, style);
if (style == CodeMarker::Accessors)
out() << "</b>";
- out() << "</td></tr>\n";
+ out() << "</li>\n";
i++;
++m;
}
- out() << "</table>\n";
+ out() << "</ul>\n";
+ if (twoColumn)
+ out() << "</td></tr>\n</table></p>\n";
}
if (style == CodeMarker::Summary && !section.inherited.isEmpty()) {
@@ -2114,7 +2129,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 bar=2 class=\"fn\"></div>";
+ out() << "<li><div class=\"fn\"></div>";
out() << (*p).second << " ";
if ((*p).second == 1) {
out() << section.singularMember;
@@ -2410,9 +2425,7 @@ 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).unicode() == '@') {
- if (i != 0)
- html += "&nbsp;</td><td class=\"memItemRight\" valign=\"bottom\">";
+ if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
i += 2;
if (parseArg(src, linkTag, &i, n, &arg, &par1)) {
QString link = linkForNode(