Skip to content

Commit

Permalink
Some tweaks & fixes
Browse files Browse the repository at this point in the history
- Changed DOT_MAX_FOLD to DOT_WRAP_THRESHOLD
- Improved documentation
- Applied DOT_WRAP_THRESHOLD to the whole string instead of individual
  parts.
  • Loading branch information
doxygen committed Oct 20, 2020
1 parent 173211a commit 0006f83
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
34 changes: 18 additions & 16 deletions src/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ to be found in the default search path.
]]>
</docs>
</option>
<option type='int' id='UML_LIMIT_NUM_FIELDS' defval='10' minval='0' maxval='100' depends='HAVE_DOT'>
<option type='int' id='UML_LIMIT_NUM_FIELDS' defval='10' minval='0' maxval='100' depends='UML_LOOK'>
<docs>
<![CDATA[
If the \ref cfg_uml_look "UML_LOOK" tag is enabled, the fields and methods are shown inside
Expand All @@ -3430,6 +3430,23 @@ to be found in the default search path.
exceeded by 50% before the limit is enforced. So when you set the threshold
to 10, up to 15 fields may appear, but if the number exceeds 15, the
total amount of fields shown is limited to 10.
]]>
</docs>
</option>
<option type='bool' id='DOT_UML_DETAILS' defval='0' depends='UML_LOOK'>
<docs>
<![CDATA[
If the \c DOT_UML_DETAILS tag is set to \c YES, doxygen will
add type and arguments for attributes and methods in the UML graphs.
]]>
</docs>
</option>
<option type='int' id='DOT_WRAP_THRESHOLD' defval='17' minval='0' maxval='1000' depends='HAVE_DOT'>
<docs>
<![CDATA[
The \c DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters to display on
a single line. If the actual line length exceeds this threshold significantly it will wrapped
across multiple lines. Some heuristics are apply to avoid ugly line breaks.
]]>
</docs>
</option>
Expand Down Expand Up @@ -3668,21 +3685,6 @@ to be found in the default search path.
<![CDATA[
If the \c DOT_CLEANUP tag is set to \c YES, doxygen will
remove the intermediate dot files that are used to generate the various graphs.
]]>
</docs>
</option>
<option type='int' id='DOT_MAX_FOLD' defval='17' minval='0' maxval='1000' depends='HAVE_DOT'>
<docs>
<![CDATA[
The \c DOT_MAX_FOLD tag can be used to set the length to fold text of dot graphs.
]]>
</docs>
</option>
<option type='bool' id='DOT_UML_DETAILS' defval='0' depends='HAVE_DOT'>
<docs>
<![CDATA[
If the \c DOT_UML_DETAILS tag is set to \c YES, doxygen will
add details in the uml graphs.
]]>
</docs>
</option>
Expand Down
26 changes: 14 additions & 12 deletions src/dotnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,25 @@ static void writeBoxMemberList(FTextStream &t,
else
{
t << prot << " ";
QCString label;
if(Config_getBool(DOT_UML_DETAILS))
{
t << DotNode::convertLabel(mma->typeString());
t << " ";
label+=mma->typeString();
label+=" ";
}
t << DotNode::convertLabel(mma->name());
label+=mma->name();
if (!mma->isObjCMethod() && (mma->isFunction() || mma->isSlot() || mma->isSignal()))
{
if(Config_getBool(DOT_UML_DETAILS))
{
t << DotNode::convertLabel(mma->argsString());
}
else
{
t << "()";
}
if(Config_getBool(DOT_UML_DETAILS))
{
label+=mma->argsString();
}
else
{
label+="()";
}
}
t << DotNode::convertLabel(label);
t << "\\l";
count++;
}
Expand Down Expand Up @@ -199,7 +201,7 @@ QCString DotNode::convertLabel(const QCString &l)
int len=p.length();
int charsLeft=len;
int sinceLast=0;
int foldLen = Config_getInt(DOT_MAX_FOLD); // ideal text length
int foldLen = Config_getInt(DOT_WRAP_THRESHOLD); // ideal text length
while (idx < p.length())
{
c = p[idx++];
Expand Down

0 comments on commit 0006f83

Please sign in to comment.