qdoc: Further changes to the QML specialization
Re-adding <qmlInherits>, <qmlInheritedBy>, <qmlInstantiates>, and <qmlSince>. Also adding <qmlAttached>. Change-Id: Iebd70a37b083bc404ce621d0bb9d3090dbc1109e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>bb10
parent
aa17350eb6
commit
7329d61212
|
|
@ -221,6 +221,7 @@ QString DitaXmlGenerator::ditaTags[] =
|
|||
"prodname",
|
||||
"prolog",
|
||||
"publisher",
|
||||
"qmlAttached",
|
||||
"qmlDetail",
|
||||
"qmlImportModule",
|
||||
"qmlInheritedBy",
|
||||
|
|
@ -4463,6 +4464,12 @@ void DitaXmlGenerator::startQmlProperty(QmlPropertyNode* qpn,
|
|||
xmlWriter().writeAttribute("value","default");
|
||||
writeEndTag(); // </qmlQualifier>
|
||||
}
|
||||
if (qpn->isAttached()) {
|
||||
writeStartTag(DT_qmlAttached);
|
||||
xmlWriter().writeAttribute("name","attached");
|
||||
xmlWriter().writeAttribute("value","yes");
|
||||
writeEndTag(); // </qmlAttached>
|
||||
}
|
||||
writeStartTag(DT_apiData);
|
||||
generateQmlItem(qpn, relative, marker, false);
|
||||
writeEndTag(); // </apiData>
|
||||
|
|
@ -4589,6 +4596,12 @@ void DitaXmlGenerator::writeQmlRef(DitaTag tag,
|
|||
QString marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed);
|
||||
writeText(marked, marker, relative);
|
||||
writeEndTag(); // </apiData>
|
||||
if (node->isAttached()) {
|
||||
writeStartTag(DT_qmlAttached);
|
||||
xmlWriter().writeAttribute("name","attached");
|
||||
xmlWriter().writeAttribute("value","yes");
|
||||
writeEndTag(); // </qmlAttached>
|
||||
}
|
||||
writeEndTag(); // </qmlXxxDef>
|
||||
writeQmlDesc(node, marker);
|
||||
writeEndTag(); // </qmlXxxDetail>
|
||||
|
|
@ -4636,9 +4649,9 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker*
|
|||
return;
|
||||
const FakeNode* base = qcn->qmlBase();
|
||||
if (base) {
|
||||
//writeStartTag(DT_qmlInherits);
|
||||
writeStartTag(DT_qmlTypeDef);
|
||||
xmlWriter().writeAttribute("outputclass","inherits");
|
||||
writeStartTag(DT_qmlInherits);
|
||||
//writeStartTag(DT_qmlTypeDef);
|
||||
//xmlWriter().writeAttribute("outputclass","inherits");
|
||||
writeStartTag(DT_apiData);
|
||||
Text text;
|
||||
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(base));
|
||||
|
|
@ -4661,9 +4674,9 @@ void DitaXmlGenerator::generateQmlInheritedBy(const QmlClassNode* qcn, CodeMarke
|
|||
NodeList subs;
|
||||
QmlClassNode::subclasses(qcn->name(),subs);
|
||||
if (!subs.isEmpty()) {
|
||||
//writeStartTag(DT_qmlInheritedBy);
|
||||
writeStartTag(DT_qmlTypeDef);
|
||||
xmlWriter().writeAttribute("outputclass","inherited-by");
|
||||
writeStartTag(DT_qmlInheritedBy);
|
||||
//writeStartTag(DT_qmlTypeDef);
|
||||
//xmlWriter().writeAttribute("outputclass","inherited-by");
|
||||
writeStartTag(DT_apiData);
|
||||
Text text;
|
||||
appendSortedQmlNames(text,qcn,subs,marker);
|
||||
|
|
@ -4686,9 +4699,9 @@ void DitaXmlGenerator::generateQmlInstantiates(QmlClassNode* qcn, CodeMarker* ma
|
|||
{
|
||||
ClassNode* cn = qcn->classNode();
|
||||
if (cn && (cn->status() != Node::Internal)) {
|
||||
//writeStartTag(DT_qmlInstantiates);
|
||||
writeStartTag(DT_qmlTypeDef);
|
||||
xmlWriter().writeAttribute("outputclass","instantiates");
|
||||
writeStartTag(DT_qmlInstantiates);
|
||||
//writeStartTag(DT_qmlTypeDef);
|
||||
//xmlWriter().writeAttribute("outputclass","instantiates");
|
||||
writeStartTag(DT_apiData);
|
||||
Text text;
|
||||
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn));
|
||||
|
|
@ -4707,9 +4720,9 @@ void DitaXmlGenerator::generateQmlInstantiates(QmlClassNode* qcn, CodeMarker* ma
|
|||
void DitaXmlGenerator::generateQmlSince(const Node* node)
|
||||
{
|
||||
if (!node->since().isEmpty()) {
|
||||
//writeStartTag(DT_qmlSince);
|
||||
writeStartTag(DT_qmlTypeDef);
|
||||
xmlWriter().writeAttribute("outputclass","since");
|
||||
writeStartTag(DT_qmlSince);
|
||||
//writeStartTag(DT_qmlTypeDef);
|
||||
//xmlWriter().writeAttribute("outputclass","since");
|
||||
writeStartTag(DT_apiItemName);
|
||||
QStringList pieces = node->since().split(QLatin1Char(' '));
|
||||
writeCharacters(pieces[0]);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ public:
|
|||
DT_prodname,
|
||||
DT_prolog,
|
||||
DT_publisher,
|
||||
DT_qmlAttached,
|
||||
DT_qmlDetail,
|
||||
DT_qmlImportModule,
|
||||
DT_qmlInheritedBy,
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ public:
|
|||
virtual bool isAbstract() const { return false; }
|
||||
virtual bool isQmlPropertyGroup() const { return false; }
|
||||
virtual bool isCollisionNode() const { return false; }
|
||||
virtual bool isAttached() const { return false; }
|
||||
virtual void setAbstract(bool ) { }
|
||||
virtual QString title() const { return QString(); }
|
||||
bool isInternal() const;
|
||||
|
|
@ -613,8 +614,8 @@ public:
|
|||
bool isStored() const { return fromFlagValue(stored_,true); }
|
||||
bool isDesignable() const { return fromFlagValue(designable_,false); }
|
||||
bool isWritable(Tree* tree);
|
||||
bool isAttached() const { return attached_; }
|
||||
bool isReadOnly() const { return fromFlagValue(readOnly_,false); }
|
||||
virtual bool isAttached() const { return attached_; }
|
||||
virtual bool isQmlNode() const { return true; }
|
||||
virtual bool isQtQuickNode() const { return parent()->isQtQuickNode(); }
|
||||
virtual QString qmlModuleName() const { return parent()->qmlModuleName(); }
|
||||
|
|
@ -788,7 +789,7 @@ public:
|
|||
QStringList reconstructParams(bool values = false) const;
|
||||
QString signature(bool values = false) const;
|
||||
const QString& element() const { return parent()->name(); }
|
||||
bool isAttached() const { return attached_; }
|
||||
virtual bool isAttached() const { return attached_; }
|
||||
virtual bool isQmlNode() const {
|
||||
return ((type() == QmlSignal) ||
|
||||
(type() == QmlMethod) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue