diff options
author | albert-github <albert.tests@gmail.com> | 2020-10-06 09:23:02 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-10-06 09:23:02 (GMT) |
commit | 9f68f7f9932b349d65b6af6059807af55d2e535a (patch) | |
tree | 3614f00d384d00026180e7d52b98633aa078d04b /addon/doxywizard/expert.cpp | |
parent | 2c7b7cb90091ea43b42bf4abe886631e073f639b (diff) | |
download | Doxygen-9f68f7f9932b349d65b6af6059807af55d2e535a.zip Doxygen-9f68f7f9932b349d65b6af6059807af55d2e535a.tar.gz Doxygen-9f68f7f9932b349d65b6af6059807af55d2e535a.tar.bz2 |
Create possibility to show in doxywizard "condensed" settings
Doxygen has the possibility to show "condensed" (i.e. only show differences from the doxygen default)settings by means of `doxygen -x`.
Creating in the doxygen wizard a button that also can show the "condensed" settings, it is already possible to show all settings.
Diffstat (limited to 'addon/doxywizard/expert.cpp')
-rw-r--r-- | addon/doxywizard/expert.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index c043994..5fc5376 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -752,15 +752,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 +783,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 " << getDoxygenVersion() << endl << endl; - if (!brief) + if (!brief && !condensed) { t << convertToComment(m_header); } @@ -817,7 +825,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(); } |