ui: Group graph nodes by file or namespace (issues #171, #439, #522)

* added buttons to enable grouping by file or namespace
* last used group settings saved to ApplicationSettings
* made groups hoverable/clickable on label only
* improved node hatching and override edge colors
* group overview lists

fortune cookie message = Seen with the eyes of love, everything gets a new meaning.
This commit is contained in:
Eberhard Graether
2018-04-09 00:09:22 +02:00
parent 20106d5ce1
commit 5303187bea
40 changed files with 956 additions and 197 deletions
@@ -194,7 +194,7 @@ void BucketLayouter::createBuckets(
}
}
void BucketLayouter::layoutBuckets()
void BucketLayouter::layoutBuckets(bool addVerticalOffset)
{
std::map<int, int> widths;
std::map<int, int> heights;
@@ -236,6 +236,11 @@ void BucketLayouter::layoutBuckets()
Bucket* midBucket = &m_buckets[0][0];
yOff = (heights[0] - midBucket->getHeight()) / 2 * -j;
}
// move every second bucket in a row slighly lower to avoid edges over nodes
else if (addVerticalOffset && std::abs(i) % 2 == 1)
{
yOff += GraphViewStyle::toGridGap(10);
}
bucket->layout(x, y + yOff, widths[i], heights[j]);
x += widths[i] + GraphViewStyle::toGridGap(85);