FlowVis 1.0

TransferWidget Class Reference

Transfer widget. More...

#include <transferwidget.h>

List of all members.

Public Slots

void ChangeSelectedColor (const QColor &color)
void PointsChanged ()
 Points changed.
void SaveConfig (QString filename)
 Saves a configuration.
void LoadConfig (QString filename)
 Loads a configuration.

Signals

void InvokeChangeSelectedColor (const QColor &color)
 Invoke change selected color.
void InvokeUpdateColorSelector (const QColor &color)
 Invoke update color selector.
void TransferImageUpdated (const QImage &image)
 Transfer image updated.

Public Member Functions

 TransferWidget (QWidget *parent=NULL)
void paintEvent (QPaintEvent *e)

Private Member Functions

void Init ()
void calcShadeImage ()
 Calculates the shade image.
void calcGradientStops ()
 Calculates the gradient stops.
void saveToFile (QString filename)
 Saves to file.
void loadFromFile (QString filename, QVector< QPointF > &points, QVector< QColor > &colors)
 Loads from file.
void addTestPoints ()
 Adds test points.

Private Attributes

QLinearGradient gradient
QLinearGradient gradientWithAlpha
QGradientStops stops
QImage shadeImage
QImage transferImage
HoverPointshoverPoints

Friends

QDataStream & operator<< (QDataStream &out, const TransferWidget *transfer)
 Serialization.
QDataStream & operator>> (QDataStream &in, TransferWidget *transfer)
 Deserialization.

Detailed Description

Transfer widget.

This widget handles the transfer function.

Author:
Horm
Date:
05.12.2010

Definition at line 21 of file transferwidget.h.


Member Function Documentation

void TransferWidget::addTestPoints ( ) [private]

Adds test points.

Adds test points to the transfer function

Author:
Horm
Date:
05.12.2010

Definition at line 173 of file transferwidget.cpp.

void TransferWidget::calcGradientStops ( ) [private]

Calculates the gradient stops.

The gradient stops are calculated using the user defined transfer points.

Author:
Horm
Date:
05.12.2010

Definition at line 209 of file transferwidget.cpp.

void TransferWidget::calcShadeImage ( ) [private]

Calculates the shade image.

The shade image is calculated using the user defined points.

Author:
Horm
Date:
05.12.2010

Definition at line 182 of file transferwidget.cpp.

void TransferWidget::InvokeChangeSelectedColor ( const QColor &  color) [signal]

Invoke change selected color.

Signals that the selected color has changed.

Author:
Horm
Date:
05.12.2010
Parameters:
colorThe color.
void TransferWidget::InvokeUpdateColorSelector ( const QColor &  color) [signal]

Invoke update color selector.

Signals that the color selector has changed.

Author:
Horm
Date:
05.12.2010
Parameters:
colorThe color.
void TransferWidget::LoadConfig ( QString  filename) [slot]

Loads a configuration.

Loads a transfer function from a config file

Author:
Horm
Date:
05.12.2010
Parameters:
filenameFilename of the file.

Definition at line 66 of file transferwidget.cpp.

void TransferWidget::loadFromFile ( QString  filename,
QVector< QPointF > &  points,
QVector< QColor > &  colors 
) [private]

Loads from file.

Loads the transfer function from a config file.

Author:
Horm
Date:
05.12.2010
Parameters:
filenameFilename of the file.
[in,out]pointsThe points.
[in,out]colorsThe colors.

Definition at line 111 of file transferwidget.cpp.

void TransferWidget::PointsChanged ( ) [slot]

Points changed.

Is called when the points have changed

Author:
Horm
Date:
05.12.2010

Definition at line 129 of file transferwidget.cpp.

void TransferWidget::SaveConfig ( QString  filename) [slot]

Saves a configuration.

Saves a transfer function to a config file.

Author:
Horm
Date:
05.12.2010
Parameters:
filenameFilename of the file.

Definition at line 60 of file transferwidget.cpp.

void TransferWidget::saveToFile ( QString  filename) [private]

Saves to file.

Saves the transfer function to a file. This config file is binary and therefore not human-readable.

Author:
Horm
Date:
05.12.2010
Parameters:
filenameFilename of the file.

Definition at line 78 of file transferwidget.cpp.

void TransferWidget::TransferImageUpdated ( const QImage &  image) [signal]

Transfer image updated.

Signals that the transfer fucntion 1d image has changed.

Author:
Horm
Date:
05.12.2010
Parameters:
imageThe image.

Friends And Related Function Documentation

QDataStream & TransferWidget::operator<< ( QDataStream &  out,
const TransferWidget transfer 
) [friend]

Serialization.

This operator is used to serialize the TransferWidget class.

Date:
15.01.2011
Parameters:
outdatastream for writing
itemobject which should be serialized

Definition at line 91 of file transferwidget.cpp.

QDataStream & TransferWidget::operator>> ( QDataStream &  in,
TransferWidget transfer 
) [friend]

Deserialization.

This operator is used to deserialize the TransferWidget class.

Date:
15.01.2011
Parameters:
outdatastream for writing
itemobject which should be serialized

Definition at line 97 of file transferwidget.cpp.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends