data/RelationGraphBlocks.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "RelationGraph.h" | ||
| 4 | |||
| 5 | #include <QList> | ||
| 6 | #include <QSet> | ||
| 7 | |||
| 8 | // The blocks of the relationship graph's overview (Sprint 103): pure and | ||
| 9 | // deterministic, split from RelationGraphLayout.cpp. | ||
| 10 | namespace RelationGraphLayout { | ||
| 11 | |||
| 12 | // Whether a node is drawn as a person: family cards (F103-13) and "+N more" | ||
| 13 | // stand-ins are not. | ||
| 14 |
3/4✓ Branch 2 → 3 taken 18729 times.
✓ Branch 2 → 5 taken 68 times.
✓ Branch 3 → 4 taken 18729 times.
✗ Branch 3 → 5 not taken.
|
18797 | inline bool isShown(const RelationGraph::Node &node) { return !node.family && node.moreCount == 0; } |
| 15 | |||
| 16 | // The overview's blocks: people joined by family relationships (kin edges) | ||
| 17 | // or by one family card's area form one block, everyone else is a block of | ||
| 18 | // one. Blocks are ordered by their smallest node key, members by index. | ||
| 19 | // `inArea` receives the shown members of any family area. | ||
| 20 | QList<QList<int>> overviewBlocks(const RelationGraph::Graph &graph, QSet<int> *inArea); | ||
| 21 | |||
| 22 | } // namespace RelationGraphLayout | ||
| 23 |