1125 \a qmlClassNode. |
1125 \a qmlClassNode. |
1126 |
1126 |
1127 Currently, it only handles QML property groups. |
1127 Currently, it only handles QML property groups. |
1128 */ |
1128 */ |
1129 QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, |
1129 QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, |
1130 SynopsisStyle style) |
1130 SynopsisStyle style, |
|
1131 const Tree* tree) |
1131 { |
1132 { |
1132 QList<Section> sections; |
1133 QList<Section> sections; |
1133 if (qmlClassNode) { |
1134 if (qmlClassNode) { |
1134 if (style == Summary) { |
1135 if (style == Summary) { |
1135 FastSection qmlproperties(qmlClassNode, |
1136 FastSection qmlproperties(qmlClassNode, |
1242 append(sections,qmlsignals); |
1243 append(sections,qmlsignals); |
1243 append(sections,qmlattachedsignals); |
1244 append(sections,qmlattachedsignals); |
1244 append(sections,qmlmethods); |
1245 append(sections,qmlmethods); |
1245 append(sections,qmlattachedmethods); |
1246 append(sections,qmlattachedmethods); |
1246 } |
1247 } |
|
1248 else { |
|
1249 FastSection all(qmlClassNode,"","","member","members"); |
|
1250 |
|
1251 QStack<const QmlClassNode*> stack; |
|
1252 stack.push(qmlClassNode); |
|
1253 |
|
1254 while (!stack.isEmpty()) { |
|
1255 const QmlClassNode* ancestorClass = stack.pop(); |
|
1256 |
|
1257 NodeList::ConstIterator c = ancestorClass->childNodes().begin(); |
|
1258 while (c != ancestorClass->childNodes().end()) { |
|
1259 // if ((*c)->access() != Node::Private) |
|
1260 if ((*c)->subType() == Node::QmlPropertyGroup) { |
|
1261 const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c); |
|
1262 NodeList::ConstIterator p = qpgn->childNodes().begin(); |
|
1263 while (p != qpgn->childNodes().end()) { |
|
1264 if ((*p)->type() == Node::QmlProperty) { |
|
1265 insert(all,*p,style,Okay); |
|
1266 } |
|
1267 ++p; |
|
1268 } |
|
1269 } |
|
1270 else |
|
1271 insert(all,*c,style,Okay); |
|
1272 ++c; |
|
1273 } |
|
1274 |
|
1275 if (!ancestorClass->links().empty()) { |
|
1276 if (ancestorClass->links().contains(Node::InheritsLink)) { |
|
1277 QPair<QString,QString> linkPair; |
|
1278 linkPair = ancestorClass->links()[Node::InheritsLink]; |
|
1279 QStringList strList(linkPair.first); |
|
1280 const Node* n = tree->findNode(strList,Node::Fake); |
|
1281 if (n && n->subType() == Node::QmlClass) { |
|
1282 const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n); |
|
1283 stack.prepend(qcn); |
|
1284 } |
|
1285 } |
|
1286 } |
|
1287 } |
|
1288 append(sections, all); |
|
1289 } |
1247 } |
1290 } |
1248 |
1291 |
1249 return sections; |
1292 return sections; |
1250 } |
1293 } |
1251 #endif |
1294 #endif |