FlowVis 1.0
|
Transfer widget. More...
#include <transferwidget.h>
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 |
HoverPoints * | hoverPoints |
Friends | |
QDataStream & | operator<< (QDataStream &out, const TransferWidget *transfer) |
Serialization. | |
QDataStream & | operator>> (QDataStream &in, TransferWidget *transfer) |
Deserialization. |
Transfer widget.
This widget handles the transfer function.
Definition at line 21 of file transferwidget.h.
void TransferWidget::addTestPoints | ( | ) | [private] |
Adds test points.
Adds test points to the transfer function
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.
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.
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.
color | The color. |
void TransferWidget::InvokeUpdateColorSelector | ( | const QColor & | color | ) | [signal] |
Invoke update color selector.
Signals that the color selector has changed.
color | The color. |
void TransferWidget::LoadConfig | ( | QString | filename | ) | [slot] |
Loads a configuration.
Loads a transfer function from a config file
filename | Filename 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.
filename | Filename of the file. | |
[in,out] | points | The points. |
[in,out] | colors | The colors. |
Definition at line 111 of file transferwidget.cpp.
void TransferWidget::PointsChanged | ( | ) | [slot] |
Points changed.
Is called when the points have changed
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.
filename | Filename 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.
filename | Filename 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.
image | The image. |
QDataStream & TransferWidget::operator<< | ( | QDataStream & | out, |
const TransferWidget * | transfer | ||
) | [friend] |
Serialization.
This operator is used to serialize the TransferWidget class.
out | datastream for writing |
item | object 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.
out | datastream for writing |
item | object which should be serialized |
Definition at line 97 of file transferwidget.cpp.