toc;
if (node->doc().hasTableOfContents())
toc = node->doc().tableOfContents();
- if (toc.isEmpty() && !sections && !node->isModule())
- return;
-
- //turn off table of contents if HTML.tocdepth is set to 0
- if (tocDepth == 0)
+ if (tocDepth == 0 || (toc.isEmpty() && !sections && !node->isModule())) {
+ generateSidebar();
return;
+ }
QStringList sectionNumber;
int detailsBase = 0;
@@ -2190,6 +2193,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
inContents_ = true;
inLink_ = true;
+ out() << "\n";
inContents_ = false;
inLink_ = false;
}
+/*!
+ Outputs a placeholder div where the style can add customized sidebar content.
+ */
+void HtmlGenerator::generateSidebar() {
+ out() << "\n";
+}
+
QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
CodeMarker *marker)
{
@@ -2307,6 +2322,7 @@ QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
beginSubPage(inner, fileName);
QString title = "List of All Members for " + inner->name();
generateHeader(title, inner, marker);
+ generateSidebar();
generateTitle(title, Text(), SmallSubTitle, inner, marker);
out() << "This is the complete list of members for ";
generateFullName(inner, 0);
@@ -2338,6 +2354,7 @@ QString HtmlGenerator::generateAllQmlMembersFile(QmlClassNode* qml_cn, CodeMarke
beginSubPage(qml_cn, fileName);
QString title = "List of All Members for " + qml_cn->name();
generateHeader(title, qml_cn, marker);
+ generateSidebar();
generateTitle(title, Text(), SmallSubTitle, qml_cn, marker);
out() << "
This is the complete list of members for ";
generateFullName(qml_cn, 0);
@@ -2422,6 +2439,7 @@ QString HtmlGenerator::generateLowStatusMemberFile(InnerNode *inner,
beginSubPage(inner, fileName);
generateHeader(title, inner, marker);
+ generateSidebar();
generateTitle(title, Text(), SmallSubTitle, inner, marker);
if (status == CodeMarker::Compat) {
@@ -2498,6 +2516,7 @@ QString HtmlGenerator::generateQmlMemberFile(QmlClassNode* qcn,
beginSubPage(qcn, fileName);
generateHeader(title, qcn, marker);
+ generateSidebar();
generateTitle(title, Text(), SmallSubTitle, qcn, marker);
out() << "
The following members of QML type "
@@ -2615,7 +2634,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
}
if (allInternal)
return;
- out() << "\n";
+ out() << "\n";
int row = 0;
NodeList nodes = nm.values();
foreach (const Node* node, nodes) {
@@ -2651,7 +2670,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
}
out() << "\n";
}
- out() << "
\n";
+ out() << "
\n";
}
/*!
@@ -2902,8 +2921,8 @@ void HtmlGenerator::generateQmlItem(const Node *node,
if (summary)
marked.replace("@name>", "b>");
- marked.replace("<@extra>", "");
- marked.replace("@extra>", "");
+ marked.replace("<@extra>", "");
+ marked.replace("@extra>", "
");
if (summary) {
marked.remove("<@type>");
@@ -3027,11 +3046,11 @@ void HtmlGenerator::generateSection(const NodeList& nl,
alignNames = false;
}
if (alignNames) {
- out() << "\n";
+ out() << "\n";
}
else {
if (twoColumn)
- out() << "\n"
+ out() << "\n"
<< "";
out() << "\n";
}
@@ -3062,11 +3081,11 @@ void HtmlGenerator::generateSection(const NodeList& nl,
++m;
}
if (alignNames)
- out() << " |
\n";
+ out() << "
\n";
else {
out() << "\n";
if (twoColumn)
- out() << "\n
\n";
+ out() << "\n
\n";
}
}
}
@@ -3088,11 +3107,11 @@ void HtmlGenerator::generateSectionList(const Section& section,
alignNames = false;
}
if (alignNames) {
- out() << "\n";
+ out() << "\n";
}
else {
if (twoColumn)
- out() << "\n"
+ out() << "\n"
<< "";
out() << "\n";
}
@@ -3128,11 +3147,11 @@ void HtmlGenerator::generateSectionList(const Section& section,
++m;
}
if (alignNames)
- out() << " |
\n";
+ out() << "
\n";
else {
out() << "\n";
if (twoColumn)
- out() << "\n
\n";
+ out() << "\n
\n";
}
}
@@ -3196,8 +3215,8 @@ void HtmlGenerator::generateSynopsis(const Node *node,
extraRegExp.setMinimal(true);
marked.remove(extraRegExp);
} else {
- marked.replace("<@extra>", "");
- marked.replace("@extra>", "");
+ marked.replace("<@extra>", "");
+ marked.replace("@extra>", "
");
}
if (style != CodeMarker::Detailed) {
@@ -4058,7 +4077,7 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
const QmlPropertyGroupNode* qpgn = static_cast(node);
NodeList::ConstIterator p = qpgn->childNodes().constBegin();
out() << "";
- out() << "
";
+ out() << "";
QString heading = qpgn->name() + " group";
out() << "";
@@ -4083,13 +4102,13 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
}
++p;
}
- out() << "
";
+ out() << "
";
out() << "";
}
else if (node->type() == Node::QmlProperty) {
qpn = static_cast(node);
out() << "";
- out() << "
";
+ out() << "";
out() << "";
out() << "";
out() << "";
@@ -4103,43 +4122,43 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
out() << "default";
generateQmlItem(qpn, relative, marker, false);
out() << " |
";
- out() << "
";
+ out() << "
";
out() << "";
}
else if (node->type() == Node::QmlSignal) {
const FunctionNode* qsn = static_cast(node);
out() << "";
- out() << "
";
+ out() << "";
out() << "";
out() << "";
out() << "";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
out() << " |
";
- out() << "
";
+ out() << "
";
out() << "";
}
else if (node->type() == Node::QmlSignalHandler) {
const FunctionNode* qshn = static_cast(node);
out() << "";
- out() << "
";
+ out() << "";
out() << "";
out() << "";
out() << "";
generateSynopsis(qshn,relative,marker,CodeMarker::Detailed,false);
out() << " |
";
- out() << "
";
+ out() << "
";
out() << "";
}
else if (node->type() == Node::QmlMethod) {
const FunctionNode* qmn = static_cast(node);
out() << "";
- out() << "
";
+ out() << "";
out() << "";
out() << "";
out() << "";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
out() << " |
";
- out() << "
";
+ out() << "
";
out() << "";
}
out() << "";
diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h
index 616a9893614..40360da02ef 100644
--- a/src/tools/qdoc/htmlgenerator.h
+++ b/src/tools/qdoc/htmlgenerator.h
@@ -144,6 +144,7 @@ private:
void generateTableOfContents(const Node *node,
CodeMarker *marker,
QList* sections = 0);
+ void generateSidebar();
QString generateListOfAllMemberFile(const InnerNode *inner,
CodeMarker *marker);
QString generateAllQmlMembersFile(QmlClassNode* qml_cn, CodeMarker* marker);
@@ -238,6 +239,7 @@ private:
QString endHeader;
QString postHeader;
QString postPostHeader;
+ QString prologue;
QString footer;
QString address;
bool pleaseGenerateMacRef;
@@ -272,6 +274,7 @@ public:
#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
+#define HTMLGENERATOR_PROLOGUE "prologue"
#define HTMLGENERATOR_NONAVIGATIONBAR "nonavigationbar"
#define HTMLGENERATOR_NOSUBDIRS "nosubdirs"
#define HTMLGENERATOR_TOCDEPTH "tocdepth"