summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-04-27 08:43:52 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-04-27 08:43:52 (GMT)
commit6749edd4c6f647c4963793183a452bb1ae769c1c (patch)
tree4ae9e70dd775925274ee771cd5babfee3ad1c6c3 /tools/qdoc3
parent27f96458ba40dcbf5db4df0b0e553ca5799a13c4 (diff)
downloadQt-6749edd4c6f647c4963793183a452bb1ae769c1c.zip
Qt-6749edd4c6f647c4963793183a452bb1ae769c1c.tar.gz
Qt-6749edd4c6f647c4963793183a452bb1ae769c1c.tar.bz2
qdoc: Removed MacRefs for Xcode documentation stuff.
Also added the infrastructure for generating breadcrumbs.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp39
-rw-r--r--tools/qdoc3/htmlgenerator.h9
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf5
3 files changed, 50 insertions, 3 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 6b7d350..01dc26c 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -259,6 +259,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
postHeader = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_POSTHEADER);
+ postPostHeader = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ HTMLGENERATOR_POSTPOSTHEADER);
footer = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_FOOTER);
@@ -1697,6 +1700,27 @@ QString HtmlGenerator::fileExtension(const Node * /* node */) const
</head>
#endif
+void HtmlGenerator::generateBreadCrumbs(const QString& title,
+ const Node *node,
+ CodeMarker *marker)
+{
+ if (node->type() == Node::Class) {
+ }
+ else if (node->type() == Node::Fake) {
+ if (node->subType() == Node::Module) {
+ }
+ else if (node->subType() == Node::Page) {
+ }
+ else if (node->subType() == Node::QmlClass) {
+ }
+ else if (node->subType() == Node::Example) {
+ }
+ }
+ else if (node->type() == Node::Namespace) {
+ }
+}
+
+
void HtmlGenerator::generateHeader(const QString& title,
const Node *node,
CodeMarker *marker,
@@ -1748,9 +1772,13 @@ void HtmlGenerator::generateHeader(const QString& title,
else
out() << "<body class=\"\">\n";
+#ifdef GENERATE_MAC_REFS
if (mainPage)
generateMacRef(node, marker);
+#endif
out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
#if 0 // Removed for new docf format. MWS
if (node && !node->links().empty())
@@ -3687,10 +3715,14 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
{
const EnumNode *enume;
+#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
+#endif
if (node->type() == Node::Enum
&& (enume = static_cast<const EnumNode *>(node))->flagsType()) {
+#ifdef GENERATE_MAC_REFS
generateMacRef(enume->flagsType(), marker);
+#endif
out() << "<h3 class=\"flags\">";
out() << "<a name=\"" + refForNode(node) + "\"></a>";
generateSynopsis(enume, relative, marker, CodeMarker::Detailed);
@@ -4204,6 +4236,10 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker)
}
}
+#ifdef GENERATE_MAC_REFS
+/*
+ No longer valid.
+ */
void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker)
{
if (!pleaseGenerateMacRef || marker == 0)
@@ -4213,6 +4249,7 @@ void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker)
foreach (const QString &macRef, macRefs)
out() << "<a name=\"" << "//apple_ref/" << macRef << "\"></a>\n";
}
+#endif
void HtmlGenerator::beginLink(const QString &link,
const Node *node,
@@ -4314,7 +4351,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
CodeMarker *marker)
{
const QmlPropertyNode* qpn = 0;
+#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
+#endif
out() << "<div class=\"qmlitem\">";
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 2a365e9..68e620e 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -131,6 +131,9 @@ class HtmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker,
const Atom *atom = 0);
+ void generateBreadCrumbs(const QString& title,
+ const Node *node,
+ CodeMarker *marker);
void generateHeader(const QString& title, const Node *node = 0,
CodeMarker *marker = 0, bool mainPage = true);
void generateTitle(const QString& title,
@@ -262,7 +265,9 @@ class HtmlGenerator : public PageGenerator
virtual void generateIndex(const QString &fileBase,
const QString &url,
const QString &title);
+#ifdef GENERATE_MAC_REFS
void generateMacRef(const Node *node, CodeMarker *marker);
+#endif
void beginLink(const QString &link,
const Node *node,
const Node *relative,
@@ -303,6 +308,7 @@ class HtmlGenerator : public PageGenerator
QRegExp funcLeftParen;
QString style;
QString postHeader;
+ QString postPostHeader;
QString footer;
QString address;
bool pleaseGenerateMacRef;
@@ -337,8 +343,9 @@ class HtmlGenerator : public PageGenerator
#define HTMLGENERATOR_ADDRESS "address"
#define HTMLGENERATOR_FOOTER "footer"
-#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
+#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
+#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
#define HTMLGENERATOR_STYLE "style"
#define HTMLGENERATOR_STYLESHEETS "stylesheets"
#define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements"
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 158aef3..ba0783e 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -87,8 +87,9 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"breadcrumb toolblock\">\n" \
" <ul>\n" \
" <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n" \
- " </ul>\n" \
+ " <!-- Bread crumbs goes here -->\n"
+
+HTML.postpostheader = " </ul>\n" \
" </div>\n" \
" <div class=\"toolbuttons toolblock\">\n" \
" <ul>\n" \