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 293 of file dot.h.

Constructor & Destructor Documentation

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

Definition at line 296 of file dot.h.

297  : pNStart(start), pNEnd(end), eType(type)
298  { links.setAutoDelete(TRUE); }
QList< Link > links
Definition: dot.h:304
const bool TRUE
Definition: qglobal.h:371

Member Function Documentation

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

Definition at line 4677 of file dot.cpp.

4678 {
4679  const char* linkTypeColor[] = {
4680  "darkorchid3"
4681  ,"orange"
4682  ,"blueviolet"
4683  ,"darkgreen"
4684  ,"firebrick4"
4685  ,"grey75"
4686  ,"midnightblue"
4687  };
4688  QCString arrowStyle = "dir=\"none\", style=\"dashed\"";
4689  t << " Node" << pNStart->number();
4690  t << "->";
4691  t << "Node" << pNEnd->number();
4692 
4693  t << " [shape=plaintext";
4694  if (links.count()>0) // there are links
4695  {
4696  t << ", ";
4697  // HTML-like edge labels crash on my Mac with Graphviz 2.0! and
4698  // are not supported by older version of dot.
4699  //
4700  //t << label=<<TABLE BORDER=\"0\" CELLBORDER=\"0\">";
4701  //QListIterator<Link> lli(links);
4702  //Link *link;
4703  //for( lli.toFirst(); (link=lli.current()); ++lli)
4704  //{
4705  // t << "<TR><TD";
4706  // if ( !link->url.isEmpty() )
4707  // t << " HREF=\"" << link->url << "\"";
4708  // t << ">" << link->label << "</TD></TR>";
4709  //}
4710  //t << "</TABLE>>";
4711 
4712  t << "label=\"";
4714  Link *link;
4715  bool first=TRUE;
4716  int count=0;
4717  const int maxLabels = 10;
4718  for( lli.toFirst(); (link=lli.current()) && count<maxLabels; ++lli,++count)
4719  {
4720  if (first) first=FALSE; else t << "\\n";
4721  t << convertLabel(link->label);
4722  }
4723  if (count==maxLabels) t << "\\n...";
4724  t << "\"";
4725 
4726  }
4727  switch( eType )
4728  {
4729  case thierarchy:
4730  arrowStyle = "dir=\"back\", style=\"solid\"";
4731  break;
4732  default:
4733  t << ", color=\"" << linkTypeColor[(int)eType] << "\"";
4734  break;
4735  }
4736  t << ", " << arrowStyle;
4737  t << "];" << endl;
4738 }
static QCString convertLabel(const QCString &l)
Definition: dot.cpp:1564
const bool FALSE
Definition: qglobal.h:370
QList< Link > links
Definition: dot.h:304
int number() const
Definition: dot.h:88
const bool TRUE
Definition: qglobal.h:371
QTextStream & endl(QTextStream &s)

Member Data Documentation

EdgeType DotGroupCollaboration::Edge::eType

Definition at line 302 of file dot.h.

QList<Link> DotGroupCollaboration::Edge::links

Definition at line 304 of file dot.h.

DotNode* DotGroupCollaboration::Edge::pNEnd

Definition at line 301 of file dot.h.

DotNode* DotGroupCollaboration::Edge::pNStart

Definition at line 300 of file dot.h.


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