graph_analysis
Public Types | Public Member Functions | List of all members
graph_analysis::gui::layouts::GridLayout Class Reference

#include <GridLayout.hpp>

Inheritance diagram for graph_analysis::gui::layouts::GridLayout:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::gui::layouts::GridLayout:
Collaboration graph
[legend]

Public Types

typedef shared_ptr< GridLayout > Ptr
 
typedef std::string ColumnLabel
 
typedef std::string RowLabel
 
typedef std::vector< ColumnLabel > ColumnLabels
 
typedef std::vector< RowLabel > RowLabels
 
- Public Types inherited from graph_analysis::gui::GraphLayout
typedef shared_ptr< GraphLayout > Ptr
 

Public Member Functions

 GridLayout (GetLabelFunction getColumnLabelFunction=GetLabelFunction(), GetLabelFunction getRowLabelFunction=GetLabelFunction())
 
virtual ~GridLayout ()
 
virtual std::string getClassName () const
 
virtual GraphWidget::VertexItemCoordinateCache getCoordinates (const BaseGraph::Ptr &graph) const
 
ColumnLabels getColumns () const
 
virtual RowLabels getRows () const
 
size_t getColumnIndex (const ColumnLabel &) const
 
size_t getRowIndex (const RowLabel &) const
 
ColumnLabel getColumnLabel (const Vertex::Ptr &vertex) const
 
RowLabel getRowLabel (const Vertex::Ptr &vertex) const
 
QPointF getPosition (const Vertex::Ptr &vertex) const
 
void update (const BaseGraph::Ptr &graph, const std::string &layoutName, GraphWidget::VertexItemMap &map, QGraphicsScene *scene)
 
void setColumnLabelFunction (GetLabelFunction f)
 
void setRowLabelFunction (GetLabelFunction f)
 
void setSortColumnLabelFunction (SortLabelFunction f)
 
void setSortRowLabelFunction (SortLabelFunction f)
 
void setColumnScalingFactor (double f)
 
void setRowScalingFactor (double f)
 
double getColumnScalingFactor () const
 
double getRowScalingFactor () const
 
void setColumnOffset (double o)
 
void setRowOffset (double o)
 
double getColumnOffset () const
 
double getRowOffset () const
 
double getXPosition (const ColumnLabel &columnLabel) const
 
double getYPosition (const RowLabel &rowLabel) const
 
std::set< std::string > getSupportedLayouts () const
 
float currentXPositionInScene (const ColumnLabel &columnLabel) const
 
float currentYPositionInScene (const ColumnLabel &columnLabel) const
 
- Public Member Functions inherited from graph_analysis::gui::GraphLayout
 GraphLayout ()
 
virtual ~GraphLayout ()
 

Detailed Description

General grid layouter which uses row and columns It requires two functions inorder to associate a vertex to a row / a column

Member Typedef Documentation

◆ ColumnLabel

◆ ColumnLabels

◆ Ptr

◆ RowLabel

◆ RowLabels

Constructor & Destructor Documentation

◆ GridLayout()

graph_analysis::gui::layouts::GridLayout::GridLayout ( GetLabelFunction  getColumnLabelFunction = GetLabelFunction(),
GetLabelFunction  getRowLabelFunction = GetLabelFunction() 
)

◆ ~GridLayout()

graph_analysis::gui::layouts::GridLayout::~GridLayout ( )
virtual

Member Function Documentation

◆ currentXPositionInScene()

float graph_analysis::gui::layouts::GridLayout::currentXPositionInScene ( const ColumnLabel &  columnLabel) const
inline

Get the effective x position in the scene

◆ currentYPositionInScene()

float graph_analysis::gui::layouts::GridLayout::currentYPositionInScene ( const ColumnLabel &  columnLabel) const
inline

◆ getClassName()

virtual std::string graph_analysis::gui::layouts::GridLayout::getClassName ( ) const
inlinevirtual

◆ getColumnIndex()

size_t graph_analysis::gui::layouts::GridLayout::getColumnIndex ( const ColumnLabel &  label) const

◆ getColumnLabel()

GridLayout::ColumnLabel graph_analysis::gui::layouts::GridLayout::getColumnLabel ( const Vertex::Ptr &  vertex) const

◆ getColumnOffset()

double graph_analysis::gui::layouts::GridLayout::getColumnOffset ( ) const
inline

◆ getColumns()

ColumnLabels graph_analysis::gui::layouts::GridLayout::getColumns ( ) const
inline

◆ getColumnScalingFactor()

double graph_analysis::gui::layouts::GridLayout::getColumnScalingFactor ( ) const
inline

◆ getCoordinates()

GraphWidget::VertexItemCoordinateCache graph_analysis::gui::layouts::GridLayout::getCoordinates ( const BaseGraph::Ptr &  graph) const
virtual

Get the coordinates of the layout

Implements graph_analysis::gui::GraphLayout.

◆ getPosition()

QPointF graph_analysis::gui::layouts::GridLayout::getPosition ( const Vertex::Ptr &  vertex) const

◆ getRowIndex()

size_t graph_analysis::gui::layouts::GridLayout::getRowIndex ( const RowLabel &  label) const

◆ getRowLabel()

GridLayout::RowLabel graph_analysis::gui::layouts::GridLayout::getRowLabel ( const Vertex::Ptr &  vertex) const

◆ getRowOffset()

double graph_analysis::gui::layouts::GridLayout::getRowOffset ( ) const
inline

◆ getRows()

virtual RowLabels graph_analysis::gui::layouts::GridLayout::getRows ( ) const
inlinevirtual

◆ getRowScalingFactor()

double graph_analysis::gui::layouts::GridLayout::getRowScalingFactor ( ) const
inline

◆ getSupportedLayouts()

std::set< std::string > graph_analysis::gui::layouts::GridLayout::getSupportedLayouts ( ) const
virtual

◆ getXPosition()

double graph_analysis::gui::layouts::GridLayout::getXPosition ( const ColumnLabel &  columnLabel) const

Get the x position for a given column

◆ getYPosition()

double graph_analysis::gui::layouts::GridLayout::getYPosition ( const RowLabel &  rowLabel) const

Get the y position for a given row

◆ setColumnLabelFunction()

void graph_analysis::gui::layouts::GridLayout::setColumnLabelFunction ( GetLabelFunction  f)
inline

◆ setColumnOffset()

void graph_analysis::gui::layouts::GridLayout::setColumnOffset ( double  o)
inline

◆ setColumnScalingFactor()

void graph_analysis::gui::layouts::GridLayout::setColumnScalingFactor ( double  f)
inline

◆ setRowLabelFunction()

void graph_analysis::gui::layouts::GridLayout::setRowLabelFunction ( GetLabelFunction  f)
inline

◆ setRowOffset()

void graph_analysis::gui::layouts::GridLayout::setRowOffset ( double  o)
inline

◆ setRowScalingFactor()

void graph_analysis::gui::layouts::GridLayout::setRowScalingFactor ( double  f)
inline

◆ setSortColumnLabelFunction()

void graph_analysis::gui::layouts::GridLayout::setSortColumnLabelFunction ( SortLabelFunction  f)
inline

◆ setSortRowLabelFunction()

void graph_analysis::gui::layouts::GridLayout::setSortRowLabelFunction ( SortLabelFunction  f)
inline

◆ update()

void graph_analysis::gui::layouts::GridLayout::update ( const BaseGraph::Ptr &  graph,
const std::string &  layoutName,
GraphWidget::VertexItemMap &  VertexItemMap,
QGraphicsScene *  scene 
)
virtual

Update the current layout, e.g. after changes to the underlying graph

Implements graph_analysis::gui::GraphLayout.


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