57 #define COMMAND_INMODULE Doc::alias(QLatin1String("inmodule")) // ### don't document |
57 #define COMMAND_INMODULE Doc::alias(QLatin1String("inmodule")) // ### don't document |
58 #define COMMAND_INTERNAL Doc::alias(QLatin1String("internal")) |
58 #define COMMAND_INTERNAL Doc::alias(QLatin1String("internal")) |
59 #define COMMAND_MAINCLASS Doc::alias(QLatin1String("mainclass")) |
59 #define COMMAND_MAINCLASS Doc::alias(QLatin1String("mainclass")) |
60 #define COMMAND_NONREENTRANT Doc::alias(QLatin1String("nonreentrant")) |
60 #define COMMAND_NONREENTRANT Doc::alias(QLatin1String("nonreentrant")) |
61 #define COMMAND_OBSOLETE Doc::alias(QLatin1String("obsolete")) |
61 #define COMMAND_OBSOLETE Doc::alias(QLatin1String("obsolete")) |
|
62 #define COMMAND_PAGEKEYWORDS Doc::alias(QLatin1String("pagekeywords")) |
62 #define COMMAND_PRELIMINARY Doc::alias(QLatin1String("preliminary")) |
63 #define COMMAND_PRELIMINARY Doc::alias(QLatin1String("preliminary")) |
63 #define COMMAND_INPUBLICGROUP Doc::alias(QLatin1String("inpublicgroup")) |
64 #define COMMAND_INPUBLICGROUP Doc::alias(QLatin1String("inpublicgroup")) |
64 #define COMMAND_REENTRANT Doc::alias(QLatin1String("reentrant")) |
65 #define COMMAND_REENTRANT Doc::alias(QLatin1String("reentrant")) |
65 #define COMMAND_SINCE Doc::alias(QLatin1String("since")) |
66 #define COMMAND_SINCE Doc::alias(QLatin1String("since")) |
66 #define COMMAND_SUBTITLE Doc::alias(QLatin1String("subtitle")) |
67 #define COMMAND_SUBTITLE Doc::alias(QLatin1String("subtitle")) |
67 #define COMMAND_THREADSAFE Doc::alias(QLatin1String("threadsafe")) |
68 #define COMMAND_THREADSAFE Doc::alias(QLatin1String("threadsafe")) |
68 #define COMMAND_TITLE Doc::alias(QLatin1String("title")) |
69 #define COMMAND_TITLE Doc::alias(QLatin1String("title")) |
69 |
70 |
70 QList<CodeParser *> CodeParser::parsers; |
71 QList<CodeParser *> CodeParser::parsers; |
71 bool CodeParser::showInternal = false; |
72 bool CodeParser::showInternal = false; |
|
73 QMap<QString,QString> CodeParser::nameToTitle; |
72 |
74 |
73 /*! |
75 /*! |
74 The constructor adds this code parser to the static |
76 The constructor adds this code parser to the static |
75 list of code parsers. |
77 list of code parsers. |
76 */ |
78 */ |
228 node->setThreadSafeness(Node::Reentrant); |
231 node->setThreadSafeness(Node::Reentrant); |
229 } |
232 } |
230 else if (command == COMMAND_SINCE) { |
233 else if (command == COMMAND_SINCE) { |
231 node->setSince(arg); |
234 node->setSince(arg); |
232 } |
235 } |
|
236 else if (command == COMMAND_PAGEKEYWORDS) { |
|
237 node->addPageKeywords(arg); |
|
238 } |
233 else if (command == COMMAND_SUBTITLE) { |
239 else if (command == COMMAND_SUBTITLE) { |
234 if (node->type() == Node::Fake) { |
240 if (node->type() == Node::Fake) { |
235 FakeNode *fake = static_cast<FakeNode *>(node); |
241 FakeNode *fake = static_cast<FakeNode *>(node); |
236 fake->setSubTitle(arg); |
242 fake->setSubTitle(arg); |
237 } |
243 } |
243 } |
249 } |
244 else if (command == COMMAND_TITLE) { |
250 else if (command == COMMAND_TITLE) { |
245 if (node->type() == Node::Fake) { |
251 if (node->type() == Node::Fake) { |
246 FakeNode *fake = static_cast<FakeNode *>(node); |
252 FakeNode *fake = static_cast<FakeNode *>(node); |
247 fake->setTitle(arg); |
253 fake->setTitle(arg); |
|
254 nameToTitle.insert(fake->name(),arg); |
248 } |
255 } |
249 else |
256 else |
250 location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE)); |
257 location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE)); |
251 } |
258 } |
252 } |
259 } |
253 |
260 |
|
261 /*! |
|
262 Find the page title given the page \a name and return it. |
|
263 */ |
|
264 const QString CodeParser::titleFromName(const QString& name) |
|
265 { |
|
266 const QString t = nameToTitle.value(name); |
|
267 return t; |
|
268 } |
|
269 |
254 QT_END_NAMESPACE |
270 QT_END_NAMESPACE |