VAPoR  3.0.0
Signals | Public Member Functions | Properties | List of all members
MappingFrame Class Reference

A QGLWidget that displays a Transfer Function Editor, or an Iso Selection Window. More...

#include <mappingframe.h>

Inheritance diagram for MappingFrame:

Signals

void startChange (QString description)
 
void endChange ()
 
void mappingChanged ()
 

Public Member Functions

 MappingFrame (QWidget *parent, const char *name=0)
 
virtual ~MappingFrame ()
 
void hookup (EventRouter *evrouter, QPushButton *editButton, QPushButton *ZoomPan, QPushButton *fitToView, QPushButton *histoButton, QPushButton *fitData, QPushButton *bindColorToOpac, QPushButton *bindOpacToColor, QSlider *opacityScaleSlider)
 
void setColorMapping (bool flag)
 
void setOpacityMapping (bool flag)
 
void setIsoSlider (bool flag)
 
void setIsolineSliders (bool flag)
 
void setIsolineSliders (const vector< double > &slidervals)
 
void updateTab (RenderParams *rp)
 
void setMapperFunction (MapperFunction *mapper)
 
void updateParams ()
 Synchronize the MappingFrame with the underlying RenderParams. Invoked in EventRouter::setEditorDirty(). More...
 
void setVariableName (std::string name)
 Specify the variable associated with the MappingFrame. Invoked in EventRouter::setEditorDirty() More...
 
void update ()
 Update the display of the MappingFrame. Invoked in EventRouter::setEditorDirty() More...
 
MapperFunction * mapperFunction ()
 
float minDataValue ()
 
float maxDataValue ()
 

Properties

bool colorMapping
 
bool opacityMapping
 

Detailed Description

A QGLWidget that displays a Transfer Function Editor, or an Iso Selection Window.

Author
Alan Norton
Version
3.0
Date
May 2015 The MappingFrame is a QGLWidget that can be used to map colors and/or opacity from a 1D interval. The MappingFrame can be inserted in the VAPOR tabs using QDesigner. Several Signal/Slot connections must be implemented to support editing functionality.

Definition at line 76 of file mappingframe.h.

Constructor & Destructor Documentation

MappingFrame::MappingFrame ( QWidget *  parent,
const char *  name = 0 
)
virtual MappingFrame::~MappingFrame ( )
virtual

Member Function Documentation

void MappingFrame::endChange ( )
signal

Signal that is invoked when user ends modifying the transfer function. This should be connected to a slot in the EventRouter that completes and saves the Command that is used for saving the edit changes in the Command queue.

void MappingFrame::hookup ( EventRouter evrouter,
QPushButton *  editButton,
QPushButton *  ZoomPan,
QPushButton *  fitToView,
QPushButton *  histoButton,
QPushButton *  fitData,
QPushButton *  bindColorToOpac,
QPushButton *  bindOpacToColor,
QSlider *  opacityScaleSlider 
)

Method required to establish a connection between the EventRouter that contains a transfer function editor, (or an IsoControl) and the MappingFrame that provides the editing functionality. This method should be invoked in the method EventRouter::hookupTab()

Parameters
[in]evrouterThe EventRouter associated with this MappingFrame
[in]editButtonThe QPushButton that enables Edit mode
[in]ZoomPanQPushButton that enables zoom/pan (navigate) mode.
[in]histoButtonQPushButton that refreshes the histogram.
[in]fitDataQPushButton that fits the bounds to the data
[in]bindColorToOpacQPushButton that binds the selected color control point to selected opacity control point.
[in]bindOpacToColorQPushButton that binds the selected opacity control point to the selected color control point.
[in]opacityScaleSliderQSlider that controls the opacity scale
MapperFunction* MappingFrame::mapperFunction ( )
inline

Identify the current mapperFunction associated with the MappingFrame. Needed by various GLWidgets embedded in the MappingFrame

Returns
MapperFunction* associated with this MappingFrame.

Definition at line 172 of file mappingframe.h.

void MappingFrame::mappingChanged ( )
signal

Signal indicates that the mapping function has changed, update the visualizer on this signal if you want transfer function edits visualized in real-time

float MappingFrame::maxDataValue ( )
inline

Identify the maximum data value associated with the MappingFrame. Needed by various GLWidgets embedded in the MappingFrame

Returns
maximum data bound associated with this MappingFrame.

Definition at line 182 of file mappingframe.h.

float MappingFrame::minDataValue ( )
inline

Identify the minimum data value associated with the MappingFrame. Needed by various GLWidgets embedded in the MappingFrame

Returns
minimum data bound associated with this MappingFrame.

Definition at line 177 of file mappingframe.h.

void MappingFrame::setColorMapping ( bool  flag)

Enable or disable the color mapping in the Transfer Function. Should be specified in the EventRouter constructor

Parameters
[in]flagset true if color mapping will be enabled.
void MappingFrame::setIsolineSliders ( bool  flag)
inline

Enable or disable the use of multiple iso sliders in an IsoControl editor Should be specified in the EventRouter constructor

Parameters
[in]flagset true if multiple iso Sliders will be enabled.

Definition at line 141 of file mappingframe.h.

void MappingFrame::setIsolineSliders ( const vector< double > &  slidervals)

Specify the set of values that will be associated with multiple Iso Sliders Should be specified whenever the Isovalues are changed.

Parameters
[in]slidervalsis a vector of iso values
void MappingFrame::setIsoSlider ( bool  flag)
inline

Enable or disable the use of a single iso slider in an IsoControl editor Should be specified in the EventRouter constructor

Parameters
[in]flagset true if one iso Slider will be enabled.

Definition at line 136 of file mappingframe.h.

void MappingFrame::setMapperFunction ( MapperFunction *  mapper)

Specify the MapperFunction that is associated with this MappingFrame. This is invoked in EventRouter::setEditorDirty()

Parameters
[in]mapperMapperFunction to be associated with this MappingFrame
void MappingFrame::setOpacityMapping ( bool  flag)

Enable or disable the opacity mapping in the Transfer Function. Should be specified in the EventRouter constructor

Parameters
[in]flagset true if opacity mapping will be enabled.
void MappingFrame::setVariableName ( std::string  name)

Specify the variable associated with the MappingFrame. Invoked in EventRouter::setEditorDirty()

void MappingFrame::startChange ( QString  description)
signal

Signal that is invoked when user starts to modify the transfer function. This should be connected to a slot in the EventRouter that creates a Command that will be used for putting the edit changes into the Command queue.

Parameters
[in]descriptionof the change that is occurring
void MappingFrame::update ( )
inline

Update the display of the MappingFrame. Invoked in EventRouter::setEditorDirty()

Definition at line 165 of file mappingframe.h.

void MappingFrame::updateParams ( )

Synchronize the MappingFrame with the underlying RenderParams. Invoked in EventRouter::setEditorDirty().

void MappingFrame::updateTab ( RenderParams rp)

Update the display of the Transfer Function or IsoControl based on the current RenderParams that contains the MapperFunction being used. This should be invoked in EventRouter::updateTab()

Parameters
[in]rpRenderParams* that contains the Transfer Function or IsoControl

Property Documentation

bool MappingFrame::colorMapping
readwrite

Definition at line 80 of file mappingframe.h.

bool MappingFrame::opacityMapping
readwrite

Definition at line 81 of file mappingframe.h.


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