Doxygen
TreeDiagram类 参考

Class representing the tree layout for the built-in class diagram. 更多...

Public 类型

using Ptr = std::unique_ptr< DiagramRow >
 
using Vec = std::vector< Ptr >
 
using iterator = typename Vec::iterator
 

Public 成员函数

 TreeDiagram (const ClassDef *root, bool doBases)
 
void computeLayout ()
 
uint computeRows ()
 
void moveChildren (DiagramItem *root, int dx)
 
void computeExtremes (uint *labelWidth, uint *xpos)
 
void drawBoxes (TextStream &t, Image *image, bool doBase, bool bitmap, uint baseRows, uint superRows, uint cellWidth, uint cellHeight, QCString relPath="", bool generateMap=TRUE)
 
void drawConnectors (TextStream &t, Image *image, bool doBase, bool bitmap, uint baseRows, uint superRows, uint cellWidth, uint cellheight)
 
DiagramRow * row (int index)
 
uint numRows () const
 
DiagramRow * addRow (uint l)
 
iterator begin ()
 
iterator end ()
 

Private 成员函数

bool layoutTree (DiagramItem *root, uint row)
 
TreeDiagram & operator= (const TreeDiagram &)
 
 TreeDiagram (const TreeDiagram &)
 

Private 属性

Vec m_rows
 

详细描述

Class representing the tree layout for the built-in class diagram.

在文件 diagram.cpp 第 100 行定义.

成员类型定义说明

◆ iterator

using TreeDiagram::iterator = typename Vec::iterator

在文件 diagram.cpp 第 105 行定义.

◆ Ptr

using TreeDiagram::Ptr = std::unique_ptr<DiagramRow>

在文件 diagram.cpp 第 103 行定义.

◆ Vec

using TreeDiagram::Vec = std::vector<Ptr>

在文件 diagram.cpp 第 104 行定义.

构造及析构函数说明

◆ TreeDiagram() [1/2]

TreeDiagram::TreeDiagram ( const ClassDef *  root,
bool  doBases 
)

在文件 diagram.cpp 第 377 行定义.

378 {
379  auto row = std::make_unique<DiagramRow>(this,0);
380  DiagramRow *row_ptr = row.get();
381  m_rows.push_back(std::move(row));
382  row_ptr->insertClass(0,root,doBases,Public,Normal,QCString());
383 }

引用了 DiagramRow::insertClass(), m_rows, Normal, Public , 以及 row().

◆ TreeDiagram() [2/2]

TreeDiagram::TreeDiagram ( const TreeDiagram &  )
private

成员函数说明

◆ addRow()

DiagramRow* TreeDiagram::addRow ( uint  l)
inline

在文件 diagram.cpp 第 123 行定义.

124  { m_rows.push_back(std::make_unique<DiagramRow>(this,l)); return m_rows.back().get(); }

引用了 m_rows.

被这些函数引用 DiagramRow::insertClass().

◆ begin()

iterator TreeDiagram::begin ( )
inline

在文件 diagram.cpp 第 125 行定义.

125 { return m_rows.begin(); }

引用了 m_rows.

◆ computeExtremes()

void TreeDiagram::computeExtremes ( uint *  labelWidth,
uint *  xpos 
)

在文件 diagram.cpp 第 515 行定义.

516 {
517  uint ml=0,mx=0;
518  for (const auto &dr : m_rows) // for each row
519  {
520  bool done=FALSE;
521  for (const auto &di : *dr) // for each item in a row
522  {
523  if (di->isInList()) done=TRUE;
524  if (maxXPos) mx=std::max(mx,(uint)di->xPos());
525  if (maxLabelLen) ml=std::max(ml,Image::stringLength(di->label()));
526  }
527  if (done) break;
528  }
529  if (maxLabelLen) *maxLabelLen=ml;
530  if (maxXPos) *maxXPos=mx;
531 }

引用了 FALSE, m_rows, Image::stringLength , 以及 TRUE.

◆ computeLayout()

void TreeDiagram::computeLayout ( )

在文件 diagram.cpp 第 434 行定义.

435 {
436  auto it = m_rows.begin();
437  while (it!=m_rows.end() && (*it)->numItems()<maxTreeWidth) ++it;
438  if (it!=m_rows.end())
439  {
440  const auto &row = *it;
441  //printf("computeLayout() list row at %d\n",row->number());
442  DiagramItem *opi=0;
443  int delta=0;
444  bool first=TRUE;
445  for (const auto &di : *row)
446  {
447  DiagramItem *pi=di->parentItem();
448  if (pi==opi && !first) { delta-=gridWidth; }
449  first = pi!=opi;
450  opi=pi;
451  di->move(delta,0); // collapse all items in the same
452  // list (except the first)
453  di->putInList();
454  }
455  }
456 
457  // re-organize the diagram items
458  DiagramItem *root=m_rows.front()->item(0);
459  while (layoutTree(root,0)) { }
460 
461  // move first items of the lists
462  if (it!=m_rows.end())
463  {
464  const auto &row = *it;
465  auto rit = row->begin();
466  while (rit!=row->end())
467  {
468  DiagramItem *pi=(*rit)->parentItem();
469  if (pi->numChildren()>1)
470  {
471  (*rit)->move(gridWidth,0);
472  while (rit!=row->end() && (*rit)->parentItem()==pi)
473  {
474  ++rit;
475  }
476  }
477  else
478  {
479  ++rit;
480  }
481  }
482  }
483 }

引用了 DiagramRow::begin(), DiagramRow::end(), gridWidth, layoutTree(), m_rows, maxTreeWidth, DiagramItem::move(), DiagramItem::numChildren(), DiagramItem::parentItem(), row() , 以及 TRUE.

◆ computeRows()

uint TreeDiagram::computeRows ( )

在文件 diagram.cpp 第 485 行定义.

486 {
487  //printf("TreeDiagram::computeRows()=%d\n",count());
488  uint count=0;
489  auto it = m_rows.begin();
490  while (it!=m_rows.end() && !(*it)->item(0)->isInList())
491  {
492  ++it;
493  ++count;
494  }
495 
496  //printf("count=%d row=%p\n",count,row);
497  if (it!=m_rows.end())
498  {
499  const auto &row = *it;
500  uint maxListLen=0;
501  uint curListLen=0;
502  DiagramItem *opi=0;
503  for (const auto &di : *row) // for each item in a row
504  {
505  if (di->parentItem()!=opi) curListLen=1; else curListLen++;
506  if (curListLen>maxListLen) maxListLen=curListLen;
507  opi=di->parentItem();
508  }
509  //printf("maxListLen=%d\n",maxListLen);
510  count+=maxListLen;
511  }
512  return count;
513 }

引用了 m_rows, DiagramItem::parentItem() , 以及 row().

◆ drawBoxes()

void TreeDiagram::drawBoxes ( TextStream &  t,
Image *  image,
bool  doBase,
bool  bitmap,
uint  baseRows,
uint  superRows,
uint  cellWidth,
uint  cellHeight,
QCString  relPath = "",
bool  generateMap = TRUE 
)

在文件 diagram.cpp 第 568 行定义.

574 {
575  auto it = m_rows.begin();
576  if (it!=m_rows.end() && !doBase) ++it;
577  bool firstRow = doBase;
578  bool done=FALSE;
579  for (;it!=m_rows.end() && !done;++it) // for each row
580  {
581  const auto &dr = *it;
582  uint x=0,y=0;
583  float xf=0.0f,yf=0.0f;
584  DiagramItem *firstDi = dr->item(0);
585  if (firstDi->isInList()) // put boxes in a list
586  {
587  DiagramItem *opi=0;
589  while (!dit.atEnd())
590  {
591  DiagramItem *di = (*dit).get();
592  if (di->parentItem()==opi)
593  {
594  if (bitmap)
595  {
596  if (doBase) y -= cellHeight+labelVertSpacing;
597  else y += cellHeight+labelVertSpacing;
598  }
599  else
600  {
601  if (doBase) yf += 1.0f;
602  else yf -= 1.0f;
603  }
604  }
605  else
606  {
607  if (bitmap)
608  {
609  x = di->xPos()*(cellWidth+labelHorSpacing)/gridWidth;
610  if (doBase)
611  {
612  y = image->height()-
613  superRows*cellHeight-
614  (superRows-1)*labelVertSpacing-
615  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
616  }
617  else
618  {
619  y = (baseRows-1)*(cellHeight+labelVertSpacing)+
620  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
621  }
622  }
623  else
624  {
625  xf = di->xPos()/(float)gridWidth;
626  if (doBase)
627  {
628  yf = di->yPos()/(float)gridHeight+superRows-1;
629  }
630  else
631  {
632  yf = superRows-1-di->yPos()/(float)gridHeight;
633  }
634  }
635  }
636  opi=di->parentItem();
637 
638  if (bitmap)
639  {
640  bool hasDocs=di->getClassDef()->isLinkable();
641  writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,
642  hasDocs,di->numChildren()>0);
643  if (!firstRow && generateMap)
644  writeMapArea(t,di->getClassDef(),relPath,x,y,cellWidth,cellHeight);
645  }
646  else
647  {
648  writeVectorBox(t,di,xf,yf,di->numChildren()>0);
649  }
650 
651  ++dit;
652  }
653  done=TRUE;
654  }
655  else // draw a tree of boxes
656  {
657  for (const auto &di : *dr)
658  {
659  if (bitmap)
660  {
661  x = di->xPos()*(cellWidth+labelHorSpacing)/gridWidth;
662  if (doBase)
663  {
664  y = image->height()-
665  superRows*cellHeight-
666  (superRows-1)*labelVertSpacing-
667  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
668  }
669  else
670  {
671  y = (baseRows-1)*(cellHeight+labelVertSpacing)+
672  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
673  }
674  bool hasDocs=di->getClassDef()->isLinkable();
675  writeBitmapBox(di.get(),image,x,y,cellWidth,cellHeight,firstRow,hasDocs);
676  if (!firstRow && generateMap)
677  writeMapArea(t,di->getClassDef(),relPath,x,y,cellWidth,cellHeight);
678  }
679  else
680  {
681  xf=di->xPos()/(float)gridWidth;
682  if (doBase)
683  {
684  yf = di->yPos()/(float)gridHeight+superRows-1;
685  }
686  else
687  {
688  yf = superRows-1-di->yPos()/(float)gridHeight;
689  }
690  writeVectorBox(t,di.get(),xf,yf);
691  }
692  }
693  }
694  firstRow=FALSE;
695  }
696 }

引用了 DualDirIterator< C, I >::atEnd(), FALSE, DiagramItem::getClassDef(), gridHeight, gridWidth, Image::height(), DiagramItem::isInList(), ClassDef::isLinkable(), labelHorSpacing, labelVertSpacing, m_rows, DiagramItem::numChildren(), DiagramItem::parentItem(), TRUE, writeBitmapBox(), writeMapArea(), writeVectorBox(), DiagramItem::xPos() , 以及 DiagramItem::yPos().

◆ drawConnectors()

void TreeDiagram::drawConnectors ( TextStream &  t,
Image *  image,
bool  doBase,
bool  bitmap,
uint  baseRows,
uint  superRows,
uint  cellWidth,
uint  cellheight 
)

在文件 diagram.cpp 第 698 行定义.

702 {
703  bool done=FALSE;
704  auto it = m_rows.begin();
705  for (;it!=m_rows.end() && !done;++it) // for each row
706  {
707  const auto &dr = *it;
708  DiagramItem *rootDi = dr->item(0);
709  if (rootDi->isInList()) // row consists of list connectors
710  {
711  uint x=0,y=0,ys=0;
712  float xf=0.0f,yf=0.0f,ysf=0.0f;
713  auto rit = dr->begin();
714  while (rit!=dr->end())
715  {
716  DiagramItem *di=(*rit).get();
717  DiagramItem *pi=di->parentItem();
718  DiagramItemList dil=pi->getChildren();
719  DiagramItem *last=dil.back();
720  if (di==last) // single child
721  {
722  if (bitmap) // draw pixels
723  {
724  x = di->xPos()*(cellWidth+labelHorSpacing)/gridWidth + cellWidth/2;
725  if (doBase) // base classes
726  {
727  y = image->height()-
728  (superRows-1)*(cellHeight+labelVertSpacing)-
729  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
730  image->drawVertArrow(x,y,y+labelVertSpacing/2,
731  protToColor(di->protection()),
732  protToMask(di->protection()));
733  }
734  else // super classes
735  {
736  y = (baseRows-1)*(cellHeight+labelVertSpacing)-
738  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
739  image->drawVertLine(x,y,y+labelVertSpacing/2,
740  protToColor(di->protection()),
741  protToMask(di->protection()));
742  }
743  }
744  else // draw vectors
745  {
746  t << protToString(di->protection()) << "\n";
747  if (doBase)
748  {
749  t << "1 " << (di->xPos()/(float)gridWidth) << " "
750  << (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
751  }
752  else
753  {
754  t << "0 " << (di->xPos()/(float)gridWidth) << " "
755  << ((float)superRows-0.25f-di->yPos()/(float)gridHeight)
756  << " in\n";
757  }
758  }
759  }
760  else // multiple children, put them in a vertical list
761  {
762  if (bitmap)
763  {
764  x = di->parentItem()->xPos()*
765  (cellWidth+labelHorSpacing)/gridWidth+cellWidth/2;
766  if (doBase) // base classes
767  {
768  ys = image->height()-
769  (superRows-1)*(cellHeight+labelVertSpacing)-
770  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
771  y = ys - cellHeight/2;
772  }
773  else // super classes
774  {
775  ys = (baseRows-1)*(cellHeight+labelVertSpacing)+
776  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
777  y = ys + cellHeight/2;
778  }
779  }
780  else
781  {
782  xf = di->parentItem()->xPos()/(float)gridWidth;
783  if (doBase)
784  {
785  ysf = di->yPos()/(float)gridHeight+superRows-1;
786  yf = ysf + 0.5f;
787  }
788  else
789  {
790  ysf = (float)superRows-0.25f-di->yPos()/(float)gridHeight;
791  yf = ysf - 0.25f;
792  }
793  }
794  while (di!=last) // more children to add
795  {
796  if (bitmap)
797  {
798  if (doBase) // base classes
799  {
800  image->drawHorzArrow(y,x,x+cellWidth/2+labelHorSpacing,
801  protToColor(di->protection()),
802  protToMask(di->protection()));
803  y -= cellHeight+labelVertSpacing;
804  }
805  else // super classes
806  {
807  image->drawHorzLine(y,x,x+cellWidth/2+labelHorSpacing,
808  protToColor(di->protection()),
809  protToMask(di->protection()));
810  y += cellHeight+labelVertSpacing;
811  }
812  }
813  else
814  {
815  t << protToString(di->protection()) << "\n";
816  if (doBase)
817  {
818  t << "1 " << xf << " " << yf << " hedge\n";
819  yf += 1.0f;
820  }
821  else
822  {
823  t << "0 " << xf << " " << yf << " hedge\n";
824  yf -= 1.0f;
825  }
826  }
827  ++rit;
828  if (rit!=dr->end()) di = (*rit).get(); else di=0;
829  }
830  // add last horizontal line and a vertical connection line
831  if (bitmap)
832  {
833  if (doBase) // base classes
834  {
835  image->drawHorzArrow(y,x,x+cellWidth/2+labelHorSpacing,
836  protToColor(di->protection()),
837  protToMask(di->protection()));
838  image->drawVertLine(x,y,ys+labelVertSpacing/2,
841  }
842  else // super classes
843  {
844  image->drawHorzLine(y,x,x+cellWidth/2+labelHorSpacing,
845  protToColor(di->protection()),
846  protToMask(di->protection()));
847  image->drawVertLine(x,ys-labelVertSpacing/2,y,
850  }
851  }
852  else
853  {
854  t << protToString(di->protection()) << "\n";
855  if (doBase)
856  {
857  t << "1 " << xf << " " << yf << " hedge\n";
858  }
859  else
860  {
861  t << "0 " << xf << " " << yf << " hedge\n";
862  }
863  t << protToString(getMinProtectionLevel(dil)) << "\n";
864  if (doBase)
865  {
866  t << xf << " " << ysf << " " << yf << " vedge\n";
867  }
868  else
869  {
870  t << xf << " " << (ysf + 0.25f) << " " << yf << " vedge\n";
871  }
872  }
873  }
874  if (rit!=dr->end()) ++rit;
875  }
876  done=TRUE; // the tree is drawn now
877  }
878  else // normal tree connector
879  {
880  for (const auto &di : *dr)
881  {
882  uint x=0,y=0;
883  DiagramItemList dil = di->getChildren();
884  DiagramItem *parent = di->parentItem();
885  if (parent) // item has a parent -> connect to it
886  {
887  if (bitmap) // draw pixels
888  {
889  x = di->xPos()*(cellWidth+labelHorSpacing)/gridWidth + cellWidth/2;
890  if (doBase) // base classes
891  {
892  y = image->height()-
893  (superRows-1)*(cellHeight+labelVertSpacing)-
894  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
895  /* write input line */
896  image->drawVertArrow(x,y,y+labelVertSpacing/2,
897  protToColor(di->protection()),
898  protToMask(di->protection()));
899  }
900  else // super classes
901  {
902  y = (baseRows-1)*(cellHeight+labelVertSpacing)-
904  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
905  /* write output line */
906  image->drawVertLine(x,y,y+labelVertSpacing/2,
907  protToColor(di->protection()),
908  protToMask(di->protection()));
909  }
910  }
911  else // draw pixels
912  {
913  t << protToString(di->protection()) << "\n";
914  if (doBase)
915  {
916  t << "1 " << di->xPos()/(float)gridWidth << " "
917  << (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
918  }
919  else
920  {
921  t << "0 " << di->xPos()/(float)gridWidth << " "
922  << ((float)superRows-0.25f-di->yPos()/(float)gridHeight)
923  << " in\n";
924  }
925  }
926  }
927  if (!dil.empty())
928  {
930  uint mask=protToMask(p);
931  uchar col=protToColor(p);
932  if (bitmap)
933  {
934  x = di->xPos()*(cellWidth+labelHorSpacing)/gridWidth + cellWidth/2;
935  if (doBase) // base classes
936  {
937  y = image->height()-
938  (superRows-1)*(cellHeight+labelVertSpacing)-
939  cellHeight-labelVertSpacing/2-
940  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
941  image->drawVertLine(x,y,y+labelVertSpacing/2-1,col,mask);
942  }
943  else // super classes
944  {
945  y = (baseRows-1)*(cellHeight+labelVertSpacing)+
946  cellHeight+
947  di->yPos()*(cellHeight+labelVertSpacing)/gridHeight;
948  image->drawVertArrow(x,y,y+labelVertSpacing/2-1,col,mask);
949  }
950  }
951  else
952  {
953  t << protToString(p) << "\n";
954  if (doBase)
955  {
956  t << "0 " << di->xPos()/(float)gridWidth << " "
957  << (di->yPos()/(float)gridHeight+superRows-1) << " out\n";
958  }
959  else
960  {
961  t << "1 " << di->xPos()/(float)gridWidth << " "
962  << ((float)superRows-1.75f-di->yPos()/(float)gridHeight)
963  << " out\n";
964  }
965  }
966  /* write input line */
967  DiagramItem *first = dil.front();
968  DiagramItem *last = dil.back();
969  if (first!=last && !first->isInList()) /* connect with all base classes */
970  {
971  if (bitmap)
972  {
973  uint xs = first->xPos()*(cellWidth+labelHorSpacing)/gridWidth
974  + cellWidth/2;
975  uint xe = last->xPos()*(cellWidth+labelHorSpacing)/gridWidth
976  + cellWidth/2;
977  if (doBase) // base classes
978  {
979  image->drawHorzLine(y,xs,xe,col,mask);
980  }
981  else // super classes
982  {
983  image->drawHorzLine(y+labelVertSpacing/2,xs,xe,col,mask);
984  }
985  }
986  else
987  {
988  t << protToString(p) << "\n";
989  if (doBase)
990  {
991  t << first->xPos()/(float)gridWidth << " "
992  << last->xPos()/(float)gridWidth << " "
993  << (first->yPos()/(float)gridHeight+superRows-1)
994  << " conn\n";
995  }
996  else
997  {
998  t << first->xPos()/(float)gridWidth << " "
999  << last->xPos()/(float)gridWidth << " "
1000  << ((float)superRows-first->yPos()/(float)gridHeight)
1001  << " conn\n";
1002  }
1003  }
1004  }
1005  }
1006  }
1007  }
1008  }
1009 }

引用了 Image::drawHorzArrow(), Image::drawHorzLine(), Image::drawVertArrow(), Image::drawVertLine(), FALSE, DiagramItem::getChildren(), getMinProtectionLevel(), gridHeight, gridWidth, Image::height(), DiagramItem::isInList(), labelHorSpacing, labelVertSpacing, m_rows, DiagramItem::parentItem(), DiagramItem::protection(), protToColor(), protToMask(), protToString(), TRUE, DiagramItem::xPos() , 以及 DiagramItem::yPos().

◆ end()

iterator TreeDiagram::end ( )
inline

在文件 diagram.cpp 第 126 行定义.

126 { return m_rows.end(); }

引用了 m_rows.

◆ layoutTree()

bool TreeDiagram::layoutTree ( DiagramItem *  root,
uint  row 
)
private

在文件 diagram.cpp 第 394 行定义.

395 {
396  bool moved=FALSE;
397  //printf("layoutTree(%s,%d)\n",qPrint(root->label()),r);
398 
399  if (root->numChildren()>0)
400  {
401  auto children = root->getChildren();
402  uint k;
403  uint pPos=root->xPos();
404  uint cPos=root->avgChildPos();
405  if (pPos>cPos) // move children
406  {
407  const auto &row=m_rows.at(r+1);
408  //printf("Moving children %d-%d in row %d\n",
409  // dil->getFirst()->number(),row->count()-1,r+1);
410  for (k=children.front()->number();k<row->numItems();k++)
411  row->item(k)->move((int)(pPos-cPos),0);
412  moved=TRUE;
413  }
414  else if (pPos<cPos) // move parent
415  {
416  const auto &row=m_rows.at(r);
417  //printf("Moving parents %d-%d in row %d\n",
418  // root->number(),row->count()-1,r);
419  for (k=root->number();k<row->numItems();k++)
420  row->item(k)->move((int)(cPos-pPos),0);
421  moved=TRUE;
422  }
423 
424  // recurse to children
425  auto it = children.begin();
426  for (;it!=children.end() && !moved && !(*it)->isInList();++it)
427  {
428  moved = layoutTree(*it,r+1);
429  }
430  }
431  return moved;
432 }

引用了 DiagramItem::avgChildPos(), FALSE, DiagramItem::getChildren(), DiagramRow::item(), m_rows, DiagramItem::move(), DiagramItem::number(), DiagramItem::numChildren(), row(), TRUE , 以及 DiagramItem::xPos().

被这些函数引用 computeLayout().

◆ moveChildren()

void TreeDiagram::moveChildren ( DiagramItem *  root,
int  dx 
)

在文件 diagram.cpp 第 385 行定义.

386 {
387  for (const auto &di : root->getChildren())
388  {
389  di->move(dx,0);
390  moveChildren(di,dx);
391  }
392 }

引用了 DiagramItem::getChildren().

◆ numRows()

uint TreeDiagram::numRows ( ) const
inline

在文件 diagram.cpp 第 122 行定义.

122 { return static_cast<uint>(m_rows.size()); }

引用了 m_rows.

被这些函数引用 DiagramRow::insertClass().

◆ operator=()

TreeDiagram& TreeDiagram::operator= ( const TreeDiagram &  )
private

◆ row()

DiagramRow* TreeDiagram::row ( int  index)
inline

在文件 diagram.cpp 第 121 行定义.

121 { return m_rows.at(index).get(); }

引用了 m_rows.

被这些函数引用 computeLayout(), computeRows(), DiagramRow::insertClass(), layoutTree() , 以及 TreeDiagram().

类成员变量说明

◆ m_rows

Vec TreeDiagram::m_rows
private

该类的文档由以下文件生成:
DiagramRow::item
DiagramItem * item(int index)
Definition: diagram.cpp:87
DiagramRow::end
iterator end()
Definition: diagram.cpp:90
Normal
@ Normal
Definition: types.h:29
Protection
Protection
Protection level of members
Definition: types.h:26
DiagramItem::move
void move(int dx, int dy)
Definition: diagram.cpp:49
getMinProtectionLevel
static Protection getMinProtectionLevel(const DiagramItemList &dil)
Definition: diagram.cpp:195
DiagramItem::getChildren
DiagramItemList getChildren()
Definition: diagram.cpp:48
DiagramRow
Class representing a row in the built-in class diagram
Definition: diagram.cpp:75
DiagramItem::parentItem
DiagramItem * parentItem()
Definition: diagram.cpp:47
writeMapArea
static void writeMapArea(TextStream &t, const ClassDef *cd, QCString relPath, uint x, uint y, uint w, uint h)
Definition: diagram.cpp:245
maxTreeWidth
const uint maxTreeWidth
Definition: diagram.cpp:138
DiagramRow::begin
iterator begin()
Definition: diagram.cpp:89
Image::stringLength
friend uint stringLength(const QCString &s)
Definition: image.cpp:314
Image::drawVertLine
void drawVertLine(uint x, uint ys, uint ye, uchar colIndex, uint mask)
Definition: image.cpp:347
Public
@ Public
Definition: types.h:26
DiagramItem::isInList
bool isInList() const
Definition: diagram.cpp:59
TreeDiagram::m_rows
Vec m_rows
Definition: diagram.cpp:131
DiagramItem::xPos
uint xPos() const
Definition: diagram.cpp:50
uint
unsigned uint
Definition: qcstring.h:40
Image::height
uint height() const
Definition: image.h:61
DiagramItem::number
uint number() const
Definition: diagram.cpp:55
uchar
unsigned char uchar
Definition: qcstring.h:38
TreeDiagram::moveChildren
void moveChildren(DiagramItem *root, int dx)
Definition: diagram.cpp:385
DiagramItem::protection
Protection protection() const
Definition: diagram.cpp:56
DiagramItem::numChildren
uint numChildren() const
Definition: diagram.cpp:323
protToMask
static uint protToMask(Protection p)
Definition: diagram.cpp:147
Image::drawHorzLine
void drawHorzLine(uint y, uint xs, uint xe, uchar colIndex, uint mask)
Definition: image.cpp:326
labelHorSpacing
const uint labelHorSpacing
Definition: diagram.cpp:142
DualDirIterator
helper class representing an iterator that can iterate forwards or backwards
Definition: diagram.cpp:535
TRUE
#define TRUE
Definition: qcstring.h:36
protToColor
static uchar protToColor(Protection p)
Definition: diagram.cpp:159
Image::drawVertArrow
void drawVertArrow(uint x, uint ys, uint ye, uchar colIndex, uint mask)
Definition: image.cpp:356
gridHeight
const uint gridHeight
Definition: diagram.cpp:140
DiagramItem::yPos
uint yPos() const
Definition: diagram.cpp:51
writeBitmapBox
static void writeBitmapBox(DiagramItem *di, Image *image, uint x, uint y, uint w, uint h, bool firstRow, bool hasDocs, bool children=FALSE)
Definition: diagram.cpp:215
protToString
static QCString protToString(Protection p)
Definition: diagram.cpp:171
labelVertSpacing
const uint labelVertSpacing
Definition: diagram.cpp:143
TreeDiagram::layoutTree
bool layoutTree(DiagramItem *root, uint row)
Definition: diagram.cpp:394
gridWidth
const uint gridWidth
Definition: diagram.cpp:139
DiagramItem::getClassDef
const ClassDef * getClassDef() const
Definition: diagram.cpp:60
DiagramItemList
std::vector< DiagramItem * > DiagramItemList
Definition: diagram.cpp:37
DiagramItem::avgChildPos
uint avgChildPos() const
Definition: diagram.cpp:309
DiagramRow::insertClass
void insertClass(DiagramItem *parent, const ClassDef *cd, bool doBases, Protection prot, Specifier virt, const QCString &ts)
Definition: diagram.cpp:335
Image::drawHorzArrow
void drawHorzArrow(uint y, uint xs, uint xe, uchar colIndex, uint mask)
Definition: image.cpp:336
ClassDef::isLinkable
virtual bool isLinkable() const =0
return TRUE iff a link to this class is possible (either within this project, or as a cross-reference...
writeVectorBox
static void writeVectorBox(TextStream &t, DiagramItem *di, float x, float y, bool children=FALSE)
Definition: diagram.cpp:236
TreeDiagram::row
DiagramRow * row(int index)
Definition: diagram.cpp:121
DiagramItem
Class representing a single node in the built-in class diagram
Definition: diagram.cpp:40
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108