ArrowRenderer Class Reference

A renderer that renders flow information using arrow glyphs. More...

#include <ArrowRenderer.h>

Inheritance diagram for ArrowRenderer:

Inheritance graph
[legend]
Collaboration diagram for ArrowRenderer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ArrowRenderer (const Data &aData)
virtual void render (QPixmap *pixmap)
 Render data into a provided pixmap.
void setArrowDistance (float dist)
 Sets the distance between two arrows.
void setArrowSize (float size)
 Sets the size of an arrow in world coordinates.
void setScaleArrowIndex (int newIndex)
 Scale arrows according to a specific data piece.
void setScaleArrows (bool scaleArrows)
void setScaleMax (float max)
 Sets the maximum data value.
void setScaleMin (float min)
 Sets the minimum data value.
void setArrowBrush (QBrush brush)
 Sets the brush for arrow drawing.

Static Public Member Functions

static void drawArrow (QPainter &painter, const QBrush &brush, float arrowSize)
 Draws an arrow of specified size in the specified painter.

Private Member Functions

void drawArrow (QPainter &painter, float x, float y) const

Private Attributes

float mArrowDistance
float mArrowSize
float mScaleMax
float mScaleMin
int mScaleArrowIndex
bool mScaleArrows
QBrush mArrowBrush

Detailed Description

A renderer that renders flow information using arrow glyphs.

It can optionally scale the arrows according to a specific data piece.


Constructor & Destructor Documentation

ArrowRenderer::ArrowRenderer const Data aData  )  [inline]
 


Member Function Documentation

void ArrowRenderer::drawArrow QPainter &  painter,
float  x,
float  y
const [private]
 

void ArrowRenderer::drawArrow QPainter &  painter,
const QBrush &  brush,
float  arrowSize
[static]
 

Draws an arrow of specified size in the specified painter.

void ArrowRenderer::render QPixmap *  pixmap  )  [virtual]
 

Render data into a provided pixmap.

The size of the pixmap must be getImageSize().

Implements ARender.

void ArrowRenderer::setArrowBrush QBrush  brush  )  [inline]
 

Sets the brush for arrow drawing.

Defaults to solid black.

void ArrowRenderer::setArrowDistance float  dist  )  [inline]
 

Sets the distance between two arrows.

The distance is specified in world coordinates. This does not affect the size of an arrow, use setArrowSize() for that.

void ArrowRenderer::setArrowSize float  size  )  [inline]
 

Sets the size of an arrow in world coordinates.

See also setArrowDistance().

void ArrowRenderer::setScaleArrowIndex int  newIndex  )  [inline]
 

Scale arrows according to a specific data piece.

Scaling must be enabled via setScaleArrows().

void ArrowRenderer::setScaleArrows bool  scaleArrows  )  [inline]
 

void ArrowRenderer::setScaleMax float  max  )  [inline]
 

Sets the maximum data value.

Values larger than the one specified here will not show an arrow. Between this value and the min value, arrow sizes will be linearly interpolated.

void ArrowRenderer::setScaleMin float  min  )  [inline]
 

Sets the minimum data value.

Values smaller than the one specified here will not show an arrow. Between this value and the max value, arrow sizes will be linearly interpolated.


Member Data Documentation

QBrush ArrowRenderer::mArrowBrush [private]
 

float ArrowRenderer::mArrowDistance [private]
 

float ArrowRenderer::mArrowSize [private]
 

int ArrowRenderer::mScaleArrowIndex [private]
 

bool ArrowRenderer::mScaleArrows [private]
 

float ArrowRenderer::mScaleMax [private]
 

float ArrowRenderer::mScaleMin [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Jan 23 19:44:57 2006 for Visualization by  doxygen 1.4.6