150 QDomElement docsVal = child.firstChildElement();
151 while (!docsVal.isNull())
153 if (docsVal.tagName()==
SA(
"docs") &&
154 docsVal.attribute(
SA(
"doxywizard")) !=
SA(
"0"))
156 for (QDomNode
n = docsVal.firstChild(); !
n.isNull();
n =
n.nextSibling())
158 QDomText
t =
n.toText();
159 if (!t.isNull()) docs+=t.
data();
163 docsVal = docsVal.nextSiblingElement();
167 if (type==
SA(
"enum"))
170 docs +=
SA(
"Possible values are: ");
172 docsVal = child.firstChildElement();
173 while (!docsVal.isNull())
175 if (docsVal.tagName()==
SA(
"value"))
179 docsVal = docsVal.nextSiblingElement();
182 docsVal = child.firstChildElement();
183 while (!docsVal.isNull())
185 if (docsVal.tagName()==
SA(
"value"))
188 docs +=
SA(
"<code>") + docsVal.attribute(
SA(
"name")) +
SA(
"</code>");
198 else if (i==numValues)
207 docsVal = docsVal.nextSiblingElement();
211 docs+=
SA(
" The default value is: <code>")+
212 child.attribute(
SA(
"defval"))+
216 else if (type==
SA(
"int"))
219 docs+=
SA(
"Minimum value: ")+child.attribute(
SA(
"minval"))+
SA(
", ");
220 docs+=
SA(
"maximum value: ")+child.attribute(
SA(
"maxval"))+
SA(
", ");
221 docs+=
SA(
"default value: ")+child.attribute(
SA(
"defval"))+
SA(
".");
224 else if (type==
SA(
"bool"))
227 if (child.hasAttribute(
SA(
"altdefval")))
229 docs+=
SA(
" The default value is: system dependent.");
233 QString defval = child.attribute(
SA(
"defval"));
234 docs+=
SA(
" The default value is: <code>")+
235 (defval==
SA(
"1")?
SA(
"YES"):
SA(
"NO"))+
240 else if (type==
SA(
"list"))
242 if (child.attribute(
SA(
"format"))==
SA(
"string"))
245 docsVal = child.firstChildElement();
246 while (!docsVal.isNull())
248 if (docsVal.tagName()==
SA(
"value"))
251 if (docsVal.hasAttribute(
SA(
"show_docu")))
253 showDocu = docsVal.attribute(
SA(
"show_docu")).toLower();
255 if ((showDocu !=
SA(
"no")) && (docsVal.attribute(
SA(
"name"))!=
SA(
""))) numValues++;
257 docsVal = docsVal.nextSiblingElement();
262 docsVal = child.firstChildElement();
263 while (!docsVal.isNull())
265 if (docsVal.tagName()==
SA(
"value"))
268 if (docsVal.hasAttribute(
SA(
"show_docu")))
270 showDocu = docsVal.attribute(
SA(
"show_docu")).toLower();
272 if ((showDocu !=
SA(
"no")) && (docsVal.attribute(
SA(
"name"))!=
SA(
"")))
275 docs +=
SA(
"<code>") + docsVal.attribute(
SA(
"name")) +
SA(
"</code>");
276 QString desc = docsVal.attribute(
SA(
"desc"));
285 else if (i==numValues)
295 docsVal = docsVal.nextSiblingElement();
301 else if (type==
SA(
"string"))
303 QString defval = child.attribute(
SA(
"defval"));
304 if (child.attribute(
SA(
"format")) ==
SA(
"dir"))
306 if (defval !=
SA(
""))
309 docs +=
SA(
" The default directory is: <code>") + defval +
SA(
"</code>.");
313 else if (child.attribute(
SA(
"format")) ==
SA(
"file"))
315 QString abspath = child.attribute(
SA(
"abspath"));
316 if (defval !=
SA(
""))
319 if (abspath !=
SA(
"1"))
321 docs +=
SA(
" The default file is: <code>") + defval +
SA(
"</code>.");
325 docs +=
SA(
" The default file (with absolute path) is: <code>") + defval +
SA(
"</code>.");
331 if (abspath ==
SA(
"1"))
334 docs +=
SA(
" The file has to be specified with full path.");
339 else if (child.attribute(
SA(
"format")) ==
SA(
"image"))
341 QString abspath = child.attribute(
SA(
"abspath"));
342 if (defval !=
SA(
""))
345 if (abspath !=
SA(
"1"))
347 docs +=
SA(
" The default image is: <code>") + defval +
SA(
"</code>.");
351 docs +=
SA(
" The default image (with absolute path) is: <code>") + defval +
SA(
"</code>.");
357 if (abspath ==
SA(
"1"))
360 docs +=
SA(
" The image has to be specified with full path.");
367 if (defval !=
SA(
""))
370 docs +=
SA(
" The default value is: <code>") + defval +
SA(
"</code>.");
376 if (child.hasAttribute(
SA(
"depends")))
378 QString dependsOn = child.attribute(
SA(
"depends"));
380 docs+=
SA(
" This tag requires that the tag \\ref cfg_");
381 docs+= dependsOn.toLower();
383 docs+= dependsOn.toUpper();
384 docs+=
SA(
"\" is set to <code>YES</code>.");
398 docs.
replace(regexp,
SA(
"<code>\\1</code>)"));
401 docs.
replace(regexp,
SA(
"<code>\\1</code>,"));
404 docs.
replace(regexp,
SA(
"<code>\\1</code>."));
407 docs.
replace(regexp,
SA(
"<code>\\1</code> "));
411 docs.
replace(regexp,
SA(
"<code>\\1</code>"));
413 regexp.
setPattern(
SA(
"\\\\ref[ ]+[^ ]+[ ]+\"([^ ]+)\""));
414 docs.
replace(regexp,
SA(
"<code>\\1</code> "));
418 docs.
replace(regexp,
SA(
"\"Doxygen usage\""));
420 docs.
replace(regexp,
SA(
"\"External Indexing and Searching\""));
422 docs.
replace(regexp,
SA(
"\"Linking to external documentation\""));
430 docs.
replace(regexp,
SA(
"<em>\\1</em> "));
464 docs.
replace(regexp,
SA(
" <a href=\"\\1\">\\1</a>\\2"));
466 regexp.
setPattern(
SA(
"\\\\f\\$\\\\mbox\\{\\\\LaTeX\\}\\\\f\\$"));
469 regexp.
setPattern(
SA(
"\\\\f\\$2\\^\\{\\(16\\+\\\\mbox\\{LOOKUP\\\\_CACHE\\\\_SIZE\\}\\)\\}\\\\f\\$"));
470 docs.
replace(regexp,
SA(
"2^(16+LOOKUP_CACHE_SIZE)"));
471 regexp.
setPattern(
SA(
"\\\\f\\$2\\^\\{16\\} = 65536\\\\f\\$"));
474 return docs.trimmed();
The QRegExp class provides pattern matching using regular expressions or wildcards.
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
void setPattern(const QCString &pattern)
const char * data() const
QString & replace(uint index, uint len, const QString &)