My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
DotGroupCollaboration::Edge Class Reference

#include <dot.h>

Public Member Functions

 Edge (DotNode *start, DotNode *end, EdgeType type)
 
void write (FTextStream &t) const
 

Public Attributes

DotNodepNStart
 
DotNodepNEnd
 
EdgeType eType
 
QList< Linklinks
 

Detailed Description

Definition at line 299 of file dot.h.

Constructor & Destructor Documentation

DotGroupCollaboration::Edge::Edge ( DotNode start,
DotNode end,
EdgeType  type 
)
inline

Definition at line 302 of file dot.h.

References links.

: pNStart(start), pNEnd(end), eType(type)
{ links.setAutoDelete(TRUE); }

Member Function Documentation

void DotGroupCollaboration::Edge::write ( FTextStream t) const

Definition at line 4627 of file dot.cpp.

References convertLabel(), endl(), eType, DotGroupCollaboration::Link::label, links, DotNode::number(), pNEnd, pNStart, and DotGroupCollaboration::thierarchy.

Referenced by DotGroupCollaboration::writeGraph().

{
const char* linkTypeColor[] = {
"darkorchid3"
,"orange"
,"blueviolet"
,"darkgreen"
,"firebrick4"
,"grey75"
,"midnightblue"
};
QCString arrowStyle = "dir=\"none\", style=\"dashed\"";
t << " Node" << pNStart->number();
t << "->";
t << "Node" << pNEnd->number();
t << " [shape=plaintext";
if (links.count()>0) // there are links
{
t << ", ";
// HTML-like edge labels crash on my Mac with Graphviz 2.0! and
// are not supported by older version of dot.
//
//t << label=<<TABLE BORDER=\"0\" CELLBORDER=\"0\">";
//QListIterator<Link> lli(links);
//Link *link;
//for( lli.toFirst(); (link=lli.current()); ++lli)
//{
// t << "<TR><TD";
// if ( !link->url.isEmpty() )
// t << " HREF=\"" << link->url << "\"";
// t << ">" << link->label << "</TD></TR>";
//}
//t << "</TABLE>>";
t << "label=\"";
QListIterator<Link> lli(links);
Link *link;
bool first=TRUE;
int count=0;
const int maxLabels = 10;
for( lli.toFirst(); (link=lli.current()) && count<maxLabels; ++lli,++count)
{
if (first) first=FALSE; else t << "\\n";
t << convertLabel(link->label);
}
if (count==maxLabels) t << "\\n...";
t << "\"";
}
switch( eType )
{
case thierarchy:
arrowStyle = "dir=\"back\", style=\"solid\"";
break;
default:
t << ", color=\"" << linkTypeColor[(int)eType] << "\"";
break;
}
t << ", " << arrowStyle;
t << "];" << endl;
}

Member Data Documentation

EdgeType DotGroupCollaboration::Edge::eType

Definition at line 308 of file dot.h.

Referenced by DotGroupCollaboration::addEdge(), and write().

QList<Link> DotGroupCollaboration::Edge::links

Definition at line 310 of file dot.h.

Referenced by DotGroupCollaboration::addEdge(), Edge(), and write().

DotNode* DotGroupCollaboration::Edge::pNEnd

Definition at line 307 of file dot.h.

Referenced by DotGroupCollaboration::addEdge(), and write().

DotNode* DotGroupCollaboration::Edge::pNStart

Definition at line 306 of file dot.h.

Referenced by DotGroupCollaboration::addEdge(), and write().


The documentation for this class was generated from the following files: