#include <TreeLayoutGenerator.h>
Public Member Functions | |
| TreeLayoutGenerator () | |
| void | layoutTree (DisplayTreeNode *root) |
Protected Types | |
| typedef QPair< ExtremeInfo, ExtremeInfo > | ExtInfoPair |
Protected Member Functions | |
| ExtInfoPair | posCalcTraversal (DisplayTreeNode *node, int layer) |
| void | layoutTraversal (DisplayTreeNode *node) |
| void | paintThreadTraversal (DisplayTreeNode *node) |
| DisplayTreeNode * | advanceRight (DisplayTreeNode *right, double &rightPos, bool &threadUsed) |
| DisplayTreeNode * | advanceLeft (DisplayTreeNode *left, double &leftPos, bool &threadUsed) |
| see advanceRight | |
| double | calcSubtreeDistance (DisplayTreeNode *left, DisplayTreeNode *right, const ExtremeInfo &extInfoL, const ExtremeInfo &extInfoR) |
Protected Attributes | |
| QHash< DisplayTreeNode *, AdditionalNodeInfo * > | nodeInfo |
| double | minNodeDistance |
| double | extraDistSubtrees |
| if subtrees are interleaved this distance is added to minNodeDistance | |
| double | layerHeight |
| basis y-Distance between nodes | |
| double | layerChildFactor |
Classes | |
| struct | AdditionalNodeInfo |
| class | ExtremeInfo |
Definition at line 21 of file TreeLayoutGenerator.h.
typedef QPair<ExtremeInfo,ExtremeInfo> TreeLayoutGenerator::ExtInfoPair [protected] |
Definition at line 30 of file TreeLayoutGenerator.h.
| TreeLayoutGenerator::TreeLayoutGenerator | ( | ) |
Definition at line 97 of file TreeLayoutGenerator.cpp.
| DisplayTreeNode * TreeLayoutGenerator::advanceLeft | ( | DisplayTreeNode * | left, | |
| double & | leftPos, | |||
| bool & | threadUsed | |||
| ) | [protected] |
see advanceRight
Definition at line 206 of file TreeLayoutGenerator.cpp.
Referenced by calcSubtreeDistance().
Here is the call graph for this function:

Here is the caller graph for this function:

| DisplayTreeNode * TreeLayoutGenerator::advanceRight | ( | DisplayTreeNode * | right, | |
| double & | rightPos, | |||
| bool & | threadUsed | |||
| ) | [protected] |
Returns the next node on right outline
| right | current node on right outline | |
| rightPos | in-out parameter , updates the relative offset | |
| threadUsed | is set to true when a thread was followed |
Definition at line 230 of file TreeLayoutGenerator.cpp.
Referenced by calcSubtreeDistance().
Here is the call graph for this function:

Here is the caller graph for this function:

| double TreeLayoutGenerator::calcSubtreeDistance | ( | DisplayTreeNode * | left, | |
| DisplayTreeNode * | right, | |||
| const ExtremeInfo & | extInfoL, | |||
| const ExtremeInfo & | extInfoR | |||
| ) | [protected] |
Calculates the Distance between two subtrees (which have already been processed, and therefore relPosition is already set, and computes the distance between them arguments: extremeInfoR means: on right subtree the rightmost node
Definition at line 254 of file TreeLayoutGenerator.cpp.
Referenced by posCalcTraversal().
Here is the call graph for this function:

Here is the caller graph for this function:

| void TreeLayoutGenerator::layoutTraversal | ( | DisplayTreeNode * | node | ) | [protected] |
Definition at line 348 of file TreeLayoutGenerator.cpp.
Referenced by layoutTree().
Here is the call graph for this function:

Here is the caller graph for this function:

| void TreeLayoutGenerator::layoutTree | ( | DisplayTreeNode * | root | ) |
Definition at line 105 of file TreeLayoutGenerator.cpp.
Referenced by AstGraphWidget::updateGraph().
Here is the call graph for this function:

Here is the caller graph for this function:

| void TreeLayoutGenerator::paintThreadTraversal | ( | DisplayTreeNode * | node | ) | [protected] |
| TreeLayoutGenerator::ExtInfoPair TreeLayoutGenerator::posCalcTraversal | ( | DisplayTreeNode * | node, | |
| int | layer | |||
| ) | [protected] |
Definition at line 125 of file TreeLayoutGenerator.cpp.
Referenced by layoutTree().
Here is the call graph for this function:

Here is the caller graph for this function:

double TreeLayoutGenerator::extraDistSubtrees [protected] |
if subtrees are interleaved this distance is added to minNodeDistance
Definition at line 77 of file TreeLayoutGenerator.h.
Referenced by calcSubtreeDistance().
double TreeLayoutGenerator::layerChildFactor [protected] |
if node has many children, the layerHeight is increased, so that there is more space for the edges total layerHeight is computed as layerHeight+layerChildFactor*childCount
Definition at line 85 of file TreeLayoutGenerator.h.
Referenced by layoutTraversal().
double TreeLayoutGenerator::layerHeight [protected] |
basis y-Distance between nodes
Definition at line 80 of file TreeLayoutGenerator.h.
Referenced by layoutTraversal().
double TreeLayoutGenerator::minNodeDistance [protected] |
distance between nodes, from end of boundingBox1 to begin boundingBox2, not the midpoint distance
Definition at line 74 of file TreeLayoutGenerator.h.
Referenced by calcSubtreeDistance().
QHash<DisplayTreeNode *, AdditionalNodeInfo *> TreeLayoutGenerator::nodeInfo [protected] |
For each node additional layout-information is stored by using a hash index with nodePointer
Definition at line 67 of file TreeLayoutGenerator.h.
Referenced by advanceLeft(), advanceRight(), calcSubtreeDistance(), layoutTraversal(), layoutTree(), paintThreadTraversal(), and posCalcTraversal().
1.4.7