ui: redesigned graph overview and use new list layouting within overview bundles

* overview bundles imitate style of bundled node type
* removed bundle for built-in types
* show contents of overview bundle in vertical list layouted with new ListLayouter
* nodes starting with the same letter are grouped with the letter displayed above
* pressing the letter key will scroll to the group
* also use this list layouting for namespace & package contents
* renamed BucketGrid to BucketLayouter
* moved used functions of GraphPostProcessor to GraphViewStyle and removed GraphPostProcessor

fortune cookie message = Don't be afraid to take that big step
This commit is contained in:
Eberhard Graether
2017-02-02 13:29:40 +01:00
parent 993d66727d
commit 52b0cd2017
34 changed files with 577 additions and 578 deletions
@@ -8,9 +8,10 @@
#include "component/view/GraphViewStyle.h"
#include "qt/graphics/QtCountCircleItem.h"
QtGraphNodeBundle::QtGraphNodeBundle(Id tokenId, size_t nodeCount, std::string name)
QtGraphNodeBundle::QtGraphNodeBundle(Id tokenId, size_t nodeCount, Node::NodeType type, std::string name)
: QtGraphNode()
, m_tokenId(tokenId)
, m_type(type)
{
this->setName(name);
@@ -38,12 +39,24 @@ Id QtGraphNodeBundle::getTokenId() const
void QtGraphNodeBundle::onClick()
{
MessageGraphNodeBundleSplit(m_tokenId).dispatch();
MessageGraphNodeBundleSplit(
m_tokenId,
m_type != Node::NODE_UNDEFINED && getName() != "Anonymous Namespaces",
m_type != Node::NODE_UNDEFINED
).dispatch();
}
void QtGraphNodeBundle::updateStyle()
{
GraphViewStyle::NodeStyle style = GraphViewStyle::getStyleOfBundleNode(m_isHovering);
GraphViewStyle::NodeStyle style;
if (m_type != Node::NODE_UNDEFINED)
{
style = GraphViewStyle::getStyleForNodeType(m_type, true, false, m_isHovering, false, false);
}
else
{
style = GraphViewStyle::getStyleOfBundleNode(m_isHovering);
}
setStyle(style);
m_circle->setPosition(Vec2f(m_rect->rect().right() - 3, m_rect->rect().top() + 3));