From e6589006ce57734f25c1ac44434457d5e523fdf0 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 10 Mar 2011 09:25:47 +0100 Subject: qdoc: Added and elements. --- tools/qdoc3/ditaxmlgenerator.cpp | 32 +++++++++++++++++++++++--------- tools/qdoc3/node.cpp | 16 ++++++++++++++++ tools/qdoc3/node.h | 6 ++++++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 6ea371c..2c02892 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -5540,7 +5540,7 @@ void DitaXmlGenerator::writeDitaMap() \o * \o \o * - \o + \o * \o \o \o @@ -5550,19 +5550,19 @@ void DitaXmlGenerator::writeDitaMap() \o \o * \o - \o + \o * \o - \o - \o + \o * + \o * \o * - \o + \o * \o \o \o \o \o - \o - \o + \o * + \o * \endlist \node * means the tag has been used. @@ -5575,13 +5575,27 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker) return; writeStartTag(DT_prolog); - writeStartTag(DT_author); QString author = inner->author(); + writeStartTag(DT_author); if (author.isEmpty()) author = "Qt Development Frameworks"; xmlWriter().writeCharacters(author); writeEndTag(); // - + + QString publisher = inner->publisher(); + writeStartTag(DT_publisher); + if (publisher.isEmpty()) + publisher = "Nokia"; + xmlWriter().writeCharacters(publisher); + writeEndTag(); // + + QString permissions = inner->permissions(); + writeStartTag(DT_permissions); + if (permissions.isEmpty()) + permissions = "all"; + xmlWriter().writeAttribute("view",permissions); + writeEndTag(); // + writeStartTag(DT_metadata); writeStartTag(DT_category); QString category = "Page"; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 161c87a..3b1f280 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -779,6 +779,22 @@ void InnerNode::removeChild(Node *child) Sets the \a author. */ +/*! \fn QString InnerNode::publisher() const + Returns the publisher. + */ + +/*! \fn void InnerNode::setPublisher(const QString& publisher) + Sets the \a publisher. + */ + +/*! \fn QString InnerNode::permissions() const + Returns the permissions. + */ + +/*! \fn void InnerNode::setPermissions(const QString& permissions) + Sets the \a permissions. + */ + /*! Find the module (QtCore, QtGui, etc.) to which the class belongs. We do this by obtaining the full path to the header file's location diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 3869e68..92a7c9f 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -264,6 +264,10 @@ class InnerNode : public Node QString author() const { return author_; } void setAuthor(const QString& author) { author_ = author; } + QString publisher() const { return publisher_; } + void setPublisher(const QString& publisher) { publisher_ = publisher; } + QString permissions() const { return permissions_; } + void setPermissions(const QString& permissions) { permissions_ = permissions; } QStringList primaryKeys(); QStringList secondaryKeys(); const QStringList& pageKeywords() const { return pageKeywds; } @@ -283,6 +287,8 @@ class InnerNode : public Node void removeRelated(Node* pseudoChild); QString author_; + QString publisher_; + QString permissions_; QStringList pageKeywds; QStringList inc; NodeList children; -- cgit v0.12