graph_analysis
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
graph_analysis::gui::VertexItemTypeManager Class Reference

factory for VertexItem-s: clones different types of VertexItem instances (i.e. graphical vertexs) More...

#include <VertexItemTypeManager.hpp>

Inheritance diagram for graph_analysis::gui::VertexItemTypeManager:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::gui::VertexItemTypeManager:
Collaboration graph
[legend]

Public Types

typedef std::map< vertex::Type, VertexItemBase * > ClassVisualizationMap
 

Public Member Functions

void registerVisualization (const vertex::Type &type, VertexItemBase *graphicsItem, bool throwOnAlreadyRegistered=false)
 
VertexItemBase * createItem (GraphWidget *graphWidget, const graph_analysis::Vertex::Ptr &vertex, QGraphicsItem *parent, const std::string &type=std::string())
 clones a new graphical vertex of a specified type More...
 
QStringList getSupportedTypes () const
 

Protected Member Functions

 VertexItemTypeManager ()
 constructor More...
 
 ~VertexItemTypeManager ()
 destructor More...
 

Friends

class base::Singleton< VertexItemTypeManager >
 

Detailed Description

factory for VertexItem-s: clones different types of VertexItem instances (i.e. graphical vertexs)

Member Typedef Documentation

◆ ClassVisualizationMap

Constructor & Destructor Documentation

◆ VertexItemTypeManager()

graph_analysis::gui::VertexItemTypeManager::VertexItemTypeManager ( )
protected

constructor

◆ ~VertexItemTypeManager()

graph_analysis::gui::VertexItemTypeManager::~VertexItemTypeManager ( )
protected

destructor

Member Function Documentation

◆ createItem()

VertexItemBase * graph_analysis::gui::VertexItemTypeManager::createItem ( GraphWidget *  graphWidget,
const graph_analysis::Vertex::Ptr &  vertex,
QGraphicsItem *  parent,
const std::string &  type = std::string() 
)

clones a new graphical vertex of a specified type

Parameters
graphWidgetthe managing graph widget to assume parenthood of the to-be-created item
vertexunderlying conceptual graph vertex
parentParent of this item
typeoptional preferred type
Returns
smart pointer to the newly created graphical vertex instance

◆ getSupportedTypes()

QStringList graph_analysis::gui::VertexItemTypeManager::getSupportedTypes ( ) const

Get list of supported visualizations

Returns
a list of supported vertex visualization types

◆ registerVisualization()

void graph_analysis::gui::VertexItemTypeManager::registerVisualization ( const vertex::Type &  type,
VertexItemBase *  graphicsItem,
bool  throwOnAlreadyRegistered = false 
)

Friends And Related Function Documentation

◆ base::Singleton< VertexItemTypeManager >

friend class base::Singleton< VertexItemTypeManager >
friend

The documentation for this class was generated from the following files: