Reference documentation
Signals | Public Member Functions | List of all members
GraphModel Class Reference

The GraphModel class provides a specific model for Graph viewes. More...

Inheritance diagram for GraphModel:

Signals

void updateEdges ()
 This signal is emitted when an new edge has been added.
 

Public Member Functions

void addEdge (const QModelIndex &idx1, const QModelIndex &idx2, Edge::Type type=Edge::NoArrow)
 Add an edge between the two nodes referenced by the QModelIndex idx1 and idx2.
 
void addEdge (int row1, int col1, int row2, int col2, Edge::Type type=Edge::NoArrow)
 Add an edge between the two nodes referenced by the coordinates ([row1], [col1]) and ([row2], [col2]).
 
QList< Edgeedges () const
 Returns the list of edges.
 

Detailed Description

The GraphModel class provides a specific model for Graph viewes.

The GraphModel inherits QStandardItemModel and can store the edges between items.