diff options
Diffstat (limited to 'addon/doxywizard/expert.cpp')
-rw-r--r-- | addon/doxywizard/expert.cpp | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index 1303a22..7fd7df3 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -139,10 +139,14 @@ void Expert::createTopics(const QDomElement &rootElem) { // Remove _ from a group name like: Source_Browser QString name = childElem.attribute(SA("name")).replace(SA("_"),SA(" ")); - items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(name))); - QWidget *widget = createTopicWidget(childElem); - m_topics[name] = widget; - m_topicStack->addWidget(widget); + QString setting = childElem.attribute(SA("setting")); + if (setting.isEmpty() || IS_SUPPORTED(setting.toLatin1())) + { + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(name))); + QWidget *widget = createTopicWidget(childElem); + m_topics[name] = widget; + m_topicStack->addWidget(widget); + } } childElem = childElem.nextSiblingElement(); } @@ -423,7 +427,7 @@ static QString getDocsForNode(const QDomElement &child) regexp.setPattern(SA("`([^`]+)`")); docs.replace(regexp,SA("<code>\\1</code>")); // \ref key "desc" -> <code>desc</code> - regexp.setPattern(SA("\\\\ref[ ]+[^ ]+[ ]+\"([^ ]+)\"")); + regexp.setPattern(SA("\\\\ref[ ]+[^ ]+[ ]+\"([^\"]+)\"")); docs.replace(regexp,SA("<code>\\1</code> ")); //\ref specials // \ref <key> -> description @@ -752,15 +756,18 @@ void Expert::loadConfig(const QString &fileName) } void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec, - bool brief) + bool brief,bool condensed) { if (!brief) { t << endl; } - t << "#---------------------------------------------------------------------------" << endl; - t << "# " << elem.attribute(SA("docs")) << endl; - t << "#---------------------------------------------------------------------------" << endl; + if (!condensed) + { + t << "#---------------------------------------------------------------------------" << endl; + t << "# " << elem.attribute(SA("docs")) << endl; + t << "#---------------------------------------------------------------------------" << endl; + } // write options... QDomElement childElem = elem.firstChildElement(); while (!childElem.isNull()) @@ -780,24 +787,29 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec, t << convertToComment(option->templateDocs()); t << endl; } - t << name.leftJustified(MAX_OPTION_LENGTH) << "="; - if (option && !option->isEmpty()) + bool toPrint = true; + if (option && condensed) toPrint = !option->isDefault(); + if (toPrint) { - t << " "; - option->writeValue(t,codec); + t << name.leftJustified(MAX_OPTION_LENGTH) << "="; + if (option && !option->isEmpty()) + { + t << " "; + option->writeValue(t,codec); + } + t << endl; } - t << endl; } } childElem = childElem.nextSiblingElement(); } } -bool Expert::writeConfig(QTextStream &t,bool brief) +bool Expert::writeConfig(QTextStream &t,bool brief, bool condensed) { // write global header - t << "# Doxyfile " << getVersion() << endl << endl; - if (!brief) + t << "# Doxyfile " << getDoxygenVersion() << endl << endl; + if (!brief && !condensed) { t << convertToComment(m_header); } @@ -817,7 +829,7 @@ bool Expert::writeConfig(QTextStream &t,bool brief) { if (childElem.tagName()==SA("group")) { - saveTopic(t,childElem,codec,brief); + saveTopic(t,childElem,codec,brief,condensed); } childElem = childElem.nextSiblingElement(); } |