summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/htmlgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/htmlgenerator.cpp')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp73
1 files changed, 42 insertions, 31 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index f6d008f..5816b8e 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -830,7 +830,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</a>" << ":</p>\n";
generateSection(nlist, 0, marker, CodeMarker::Summary);
- out() << "<br />";
+ out() << "<br/>";
++pmap;
}
}
@@ -876,7 +876,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</div>";
break;
case Atom::LineBreak:
- out() << "<br />";
+ out() << "<br/>";
break;
case Atom::Link:
{
@@ -1585,7 +1585,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
generateDetailedQmlMember(*m, fake, marker);
- out() << "<br />\n";
+ out() << "<br/>\n";
fakeSection.keywords += qMakePair((*m)->name(),
linkForNode(*m,0));
++m;
@@ -1790,27 +1790,39 @@ void HtmlGenerator::generateHeader(const QString& title,
//out() << " <title>Qt Reference Documentation</title>";
out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n";
- out() << " <!--[if IE]>\n";
- out() << " <meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
- out() << " <meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if lt IE 7]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if IE 7]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if IE 8]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n";
- out() << " <![endif]-->\n";
out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
+ out() << " <script type=\"text/javascript\"> \n";
+ out() << " $(document).ready(function () {\n";
+ out() << " $('#pageType').keyup(function () {\n";
+ out() << " var searchString = document.getElementById('pageType').value;\n";
+ out() << " if ((searchString == null) || (searchString.length < 3)) {\n";
+ out() << "removeResults();\n";
+ out() << " CheckEmptyAndLoadList();\n";
+ out() << "return;\n";
+ out() << " }\n";
+ out() << " if (this.timer) clearTimeout(this.timer);\n";
+ out() << " this.timer = setTimeout(function () {\n";
+ out() << " $.ajax({\n";
+ out() << " contentType: \"application/x-www-form-urlencoded\",\n";
+ out() << " url: 'http://' + location.host + '/nokiasearch/GetDataServlet',\n";
+ out() << " data: 'searchString='+searchString,\n";
+ out() << " dataType:'xml',\n";
+ out() << "type: 'post', \n";
+ out() << " success: function (response, textStatus) {\n";
+ out() << " removeResults();\n";
+ out() << " processNokiaData(response);\n";
+ out() << "} \n";
+ out() << " });\n";
+ out() << " }, 500);\n";
+ out() << " });\n";
+ out() << " }); \n";
+ out() << "</script>\n";
out() << "</head>\n";
if (offlineDocs)
- out() << "<body class=\"offline\">\n";
+ out() << "<body class=\"offline\" onload=\"CheckEmptyAndLoadList();\">\n";
else
- out() << "<body class=\"\">\n";
+ out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
#ifdef GENERATE_MAC_REFS
if (mainPage)
@@ -1833,18 +1845,16 @@ void HtmlGenerator::generateTitle(const QString& title,
CodeMarker *marker)
{
if (!title.isEmpty())
- out() << "<h1 class=\"title\">" << protectEnc(title);
+ out() << "<h1 class=\"title\">" << protectEnc(title) << "</h1>\n";
if (!subTitle.isEmpty()) {
- out() << "<br />";
- if (subTitleSize == SmallSubTitle)
- out() << "<span class=\"small-subtitle\">";
+ out() << "<span";
+ if (subTitleSize == SmallSubTitle)
+ out() << " class=\"small-subtitle\">";
else
- out() << "<span class=\"subtitle\">";
+ out() << " class=\"subtitle\">";
generateText(subTitle, relative, marker);
out() << "</span>\n";
}
- if (!title.isEmpty())
- out() << "</h1>\n";
}
void HtmlGenerator::generateFooter(const Node *node)
@@ -1853,9 +1863,10 @@ void HtmlGenerator::generateFooter(const Node *node)
out() << "<p>\n" << navigationLinks << "</p>\n";
out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
- << QString(address).replace("\\" + COMMAND_VERSION, myTree->version())
- << "</body>\n"
- "</html>\n";
+ << QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
+ out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
+ out() << "</body>\n";
+ out() << "</html>\n";
}
void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
@@ -1876,7 +1887,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker)
{
if (!inner->includes().isEmpty()) {
- out() << "<pre clas=\"highlightedCode\">"
+ out() << "<pre class=\"highlightedCode\">"
<< trimmedTrailing(highlightedCode(indent(codeIndent,
marker->markedUpIncludes(inner->includes())),
marker,inner))
@@ -3766,7 +3777,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
out() << "<h3 class=\"flags\">";
out() << "<a name=\"" + refForNode(node) + "\"></a>";
generateSynopsis(enume, relative, marker, CodeMarker::Detailed);
- out() << "<br />";
+ out() << "<br/>";
generateSynopsis(enume->flagsType(),
relative,
marker,