summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/node.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-09-01 10:45:36 (GMT)
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-09-01 10:47:02 (GMT)
commit47ec2fd2193f56e02a402df4d0fa9f1b521d07fc (patch)
treed4d0af46486c486b25253fde8d4550844dc66dd3 /tools/qdoc3/node.cpp
parent274619e086e6e9ebba6c383ffb837dc140c840e7 (diff)
parentcac60dcca5b4632173a8fe76a78cd2ec9bea5873 (diff)
downloadQt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.zip
Qt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.tar.gz
Qt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.tar.bz2
Merge branch 4.8 into qt-4.8-from-4.7
Conflicts: tools/qdoc3/ditaxmlgenerator.cpp tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r--tools/qdoc3/node.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 4fc8946..709f03f 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -51,6 +51,8 @@
QT_BEGIN_NAMESPACE
+ExampleNodeMap ExampleNode::exampleNodeMap;
+
/*!
\class Node
\brief The Node class is a node in the Tree.
@@ -317,6 +319,38 @@ QString Node::ditaXmlHref()
}
/*!
+ If this node is a QML class node, return a pointer to it.
+ If it is a child of a QML class node, return a pointer to
+ the QML class node. Otherwise, return 0;
+ */
+const QmlClassNode* Node::qmlClassNode() const
+{
+ if (isQmlNode()) {
+ const Node* n = this;
+ while (n && n->subType() != Node::QmlClass)
+ n = n->parent();
+ if (n && n->subType() == Node::QmlClass)
+ return static_cast<const QmlClassNode*>(n);
+ }
+ return 0;
+}
+
+/*!
+ If this node is a QML node, find its QML class node,
+ and return a pointer to the C++ class node from the
+ QML class node. That pointer will be null if the QML
+ class node is a component. It will be non-null if
+ the QML class node is a QML element.
+ */
+const ClassNode* Node::declarativeCppNode() const
+{
+ const QmlClassNode* qcn = qmlClassNode();
+ if (qcn)
+ return qcn->classNode();
+ return 0;
+}
+
+/*!
\class InnerNode
*/
@@ -1073,6 +1107,16 @@ QString FakeNode::subTitle() const
}
/*!
+ The constructor calls the FakeNode constructor with
+ \a parent, \a name, and Node::Example.
+ */
+ExampleNode::ExampleNode(InnerNode* parent, const QString& name)
+ : FakeNode(parent, name, Node::Example)
+{
+ // nothing
+}
+
+/*!
\class EnumNode
*/