Reference documentation
Public Member Functions | List of all members
AbstractGraphAlgorithm Class Referenceabstract

The Thistle::AbstractGraphAlgorithm class provides an abstract base for the implementation of algorithm used to claculate the position of the nodes in a Thistle::GraphView. More...

Inheritance diagram for AbstractGraphAlgorithm:
GraphAlgorithm

Public Member Functions

 AbstractGraphAlgorithm (GraphView *parent)
 Initializes the abstract object with the given parent.
 
 ~AbstractGraphAlgorithm ()
 Destructs the current instance.
 
const Node node (const QModelIndex &index) const
 Returns the Thistle::Node corresponding to the given index.
 
virtual void run ()=0
 The function is pure virtual. More...
 
void setPosition (const QModelIndex &index, QPointF pos)
 Sets the position pos to the given index. More...
 

Detailed Description

The Thistle::AbstractGraphAlgorithm class provides an abstract base for the implementation of algorithm used to claculate the position of the nodes in a Thistle::GraphView.

The Thistle::AbstractGraphAlgorithm class provides an abstract base for the implementation of algorithm used to claculate the position of the nodes in a Thistle::GraphView.

Member Function Documentation

void run ( )
pure virtual

The function is pure virtual.

this function is used to calculate the position of Thistle::Node in a Thistle::GraphView. Implement this function to use your own algorithm.

Implemented in GraphAlgorithm.

void setPosition ( const QModelIndex &  index,
QPointF  pos 
)
inline

Sets the position pos to the given index.

This function should be called by the algorithm implemented in the run() function when a position of an index is known.