Force Directed Edge Bundling
 All Classes Functions Pages
Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RenderThread Class Reference

#include <renderthread.h>

Inheritance diagram for RenderThread:

Signals

void renderedImage (const QImage &image)
 
void setStatus (QString s)
 

Public Member Functions

 RenderThread (QObject *parent=0)
 
 ~RenderThread ()
 
void render (Graph *g, QSize resSize, QPen ePen, QBrush nBrush, QPen nPen, double nRad, bool vEdges=true, bool vNodes=true, bool vDescr=true, bool w=false, bool b=false)
 

Protected Member Functions

void run ()
 
QPointF getWindowCoordinate (QPointF point)
 
QPolygonF getWindowCoordinates (QPolygonF poly)
 

Protected Attributes

Graphgraph
 
QMutex mutex
 
QWaitCondition condition
 
QSize resultSize
 
bool restart
 
bool abort
 
bool visibleEdges
 
bool visibleNodes
 
bool showDescriptions
 
bool wrap
 
bool bundle
 
QPen edgePen
 
QBrush nodeBrush
 
QPen nodePen
 
double nodeRadius
 

Detailed Description

RenderThread subclasses QThread to perform the graph rendering in a different thread from the UI.

This prevents the UI from freezing while the rendering process is going on which is particularly essential for big graphs.

Constructor & Destructor Documentation

RenderThread::RenderThread ( QObject *  parent = 0)

Constructor for a new RenderThread

RenderThread::~RenderThread ( )

Destructor for the RenderThread

Member Function Documentation

QPointF RenderThread::getWindowCoordinate ( QPointF  point)
inlineprotected

convert a normalized graph coordinate to window coordinate

Parameters
pointQPointF in normalized coordinates
Returns
the converted coordinate
QPolygonF RenderThread::getWindowCoordinates ( QPolygonF  poly)
inlineprotected

converts normalized graph coordinates to window coordinates for the entire polygon

Parameters
polygonQPolygonF containing normalized coordinates
Returns
polygon with converted coordinates
void RenderThread::render ( Graph g,
QSize  resSize,
QPen  ePen,
QBrush  nBrush,
QPen  nPen,
double  nRad,
bool  vEdges = true,
bool  vNodes = true,
bool  vDescr = true,
bool  w = false,
bool  b = false 
)

function call to start the rendering of the thread. The function is passed all the necessary arguments, which it copies to local variables

Parameters
gGraph to be rendered
resSizesize of the current viewport
ePenQPen containing the properties for edge drawing
nBrushQBrush containing the properties for the node fill
nPenQPen containing the properties for the node outline
nRadQPen containing the properties for the node outline
vEdgesbool determining the visibility of the edges
vNodesbool determining the visibility of the nodes
wbool determining whether the edges are allowed to wrap
bbool determining whether the rendering should draw bundled edges
void RenderThread::renderedImage ( const QImage &  image)
signal

emits a rendered image when the render thread has finished

void RenderThread::run ( )
protected

main thread method

void RenderThread::setStatus ( QString  s)
signal

signal to notify the main window's status bar of the progress of graph generation


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