The Edge
Struct Reference
Declaration
struct DotGroupCollaboration::Edge { ... }
Public Constructors Index
Edge (DotNode *start, DotNode *end, EdgeType type) | |
Public Member Functions Index
void | write (TextStream &t) const |
Public Member Attributes Index
DotNode * | pNStart |
DotNode * | pNEnd |
EdgeType | eType |
std::vector< Link > | links |
Definition at line 66 of file dotgroupcollaboration.h.
Public Member Functions
write()
|
Declaration at line 76 of file dotgroupcollaboration.h, definition at line 259 of file dotgroupcollaboration.cpp.
259void DotGroupCollaboration::Edge::write( TextStream &t ) const
260{
261 const char* linkTypeColor[] = {
262 "darkorchid3"
263 ,"orange"
264 ,"blueviolet"
265 ,"darkgreen"
266 ,"firebrick4"
267 ,"grey75"
268 ,"midnightblue"
269 };
270 QCString arrowStyle = "dir=\"none\", style=\"dashed\"";
271 t << " Node" << pNStart->number();
272 t << "->";
273 t << "Node" << pNEnd->number();
274
275 t << " [shape=plaintext";
276 if (!links.empty()) // there are links
277 {
278 t << ", ";
279 // HTML-like edge labels crash on my Mac with Graphviz 2.0! and
280 // are not supported by older version of dot.
281 //
282 //t << label=<<TABLE BORDER=\"0\" CELLBORDER=\"0\">";
283 //for (const auto &link : links)
284 //{
285 // t << "<TR><TD";
286 // if ( !link.url.isEmpty() )
287 // t << " HREF=\"" << link.url << "\"";
288 // t << ">" << DotNode::convertLabel(link->label) << "</TD></TR>";
289 //}
290 //t << "</TABLE>>";
291
292 t << "label=\"";
293 bool first=TRUE;
294 int count=0;
295 const int maxLabels = 10;
296 for (const auto &link : links)
297 {
298 if (first) first=FALSE; else t << "\\n";
299 t << DotNode::convertLabel(link.label);
300 count++;
301 }
302 if (count==maxLabels) t << "\\n...";
303 t << "\"";
304
305 }
306 switch( eType )
307 {
308 case thierarchy:
309 arrowStyle = "dir=\"back\", style=\"solid\"";
310 break;
311 default:
312 t << ", color=\"" << linkTypeColor[static_cast<int>(eType)] << "\"";
313 break;
314 }
315 t << ", " << arrowStyle;
316 t << "];\n";
317}
References DotNode::convertLabel, eType, FALSE, links, pNEnd, pNStart, DotGroupCollaboration::thierarchy and TRUE.
Public Member Attributes
eType
|
links
|
Definition at line 75 of file dotgroupcollaboration.h.
Referenced by write.
pNEnd
|
pNStart
The documentation for this struct was generated from the following files:
Generated via doxygen2docusaurus by Doxygen 1.14.0.