data/logic/ui: added aggregation edges

This change adds the creation of aggregation edges to the StorageGraph, which save the connection counts between
children in their parents. Aggregation edges are displayed using a straight line, that is thicker than more connections
it represents with the connection count in the middle.
This commit is contained in:
Eberhard Graether
2015-01-07 14:42:35 +01:00
parent 8dafd0435f
commit ee85abfc7b
18 changed files with 410 additions and 117 deletions
@@ -0,0 +1,29 @@
#include "data/graph/token_component/TokenComponentAggregation.h"
TokenComponentAggregation::TokenComponentAggregation()
{
}
TokenComponentAggregation::~TokenComponentAggregation()
{
}
std::shared_ptr<TokenComponent> TokenComponentAggregation::copy() const
{
return std::make_shared<TokenComponentAggregation>(*this);
}
int TokenComponentAggregation::getAggregationCount() const
{
return m_ids.size();
}
void TokenComponentAggregation::addAggregationId(Id id)
{
m_ids.insert(id);
}
const std::set<Id>& TokenComponentAggregation::getAggregationIds() const
{
return m_ids;
}
@@ -0,0 +1,27 @@
#ifndef TOKEN_COMPONENT_AGGREGATION_H
#define TOKEN_COMPONENT_AGGREGATION_H
#include <set>
#include "utility/types.h"
#include "data/graph/token_component/TokenComponent.h"
class TokenComponentAggregation
: public TokenComponent
{
public:
TokenComponentAggregation();
virtual ~TokenComponentAggregation();
virtual std::shared_ptr<TokenComponent> copy() const;
int getAggregationCount() const;
void addAggregationId(Id id);
const std::set<Id>& getAggregationIds() const;
private:
std::set<Id> m_ids;
};
#endif // TOKEN_COMPONENT_AGGREGATION_H