ParaView
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pqTransferFunctionWidget Class Reference

pqTransferFunctionWidget provides a widget that can edit the control points in a vtkPiecewiseFunction or a vtkScalarsToColors (or subclass) or both. More...

#include <pqTransferFunctionWidget.h>

Inherits QWidget.

Public Slots

void setCurrentPoint (vtkIdType index)
 Set the current point. More...
 
void setCurrentPointPosition (double xpos)
 Set the X-position for the current point (without changing the Y position, if applicable. More...
 
void render ()
 re-renders the transfer function view. More...
 

Signals

void currentPointChanged (vtkIdType index)
 signal fired when the current selected control point changes. More...
 
void controlPointsModified ()
 signal fired to indicate that the control points changed i.e. More...
 

Public Member Functions

 pqTransferFunctionWidget (QWidget *parent=0)
 
virtual ~pqTransferFunctionWidget ()
 
void initialize (vtkScalarsToColors *stc, bool stc_editable, vtkPiecewiseFunction *pwf, bool pwf_editable)
 Initialize the pqTransferFunctionWidget with the given color-transfer-function and piecewise-function (either of which can be null). More...
 
vtkIdType currentPoint () const
 Returns the current point index. More...
 
vtkIdType numberOfControlPoints () const
 Returns the number of control points in the editor widget. More...
 

Protected Slots

void onCurrentChangedEvent ()
 slot called when the internal vtkControlPointsItem fires vtkControlPointsItem::CurrentPointChangedEvent More...
 
void renderInternal ()
 

Protected Member Functions

void onCurrentPointEditEvent ()
 callback called when vtkControlPointsItem fires vtkControlPointsItem::CurrentPointEditEvent. More...
 

Detailed Description

pqTransferFunctionWidget provides a widget that can edit the control points in a vtkPiecewiseFunction or a vtkScalarsToColors (or subclass) or both.

It is used by pqColorOpacityEditorWidget, for example, to show transfer function editors for color and opacity for a PVLookupTable proxy.

Definition at line 48 of file pqTransferFunctionWidget.h.

Constructor & Destructor Documentation

◆ pqTransferFunctionWidget()

pqTransferFunctionWidget::pqTransferFunctionWidget ( QWidget *  parent = 0)

◆ ~pqTransferFunctionWidget()

virtual pqTransferFunctionWidget::~pqTransferFunctionWidget ( )
virtual

Member Function Documentation

◆ initialize()

void pqTransferFunctionWidget::initialize ( vtkScalarsToColors *  stc,
bool  stc_editable,
vtkPiecewiseFunction *  pwf,
bool  pwf_editable 
)

Initialize the pqTransferFunctionWidget with the given color-transfer-function and piecewise-function (either of which can be null).

The editable flags are used to control if the users should be allowed to edit/change the particular transfer function.

◆ currentPoint()

vtkIdType pqTransferFunctionWidget::currentPoint ( ) const

Returns the current point index.

-1 is none is selected.

◆ numberOfControlPoints()

vtkIdType pqTransferFunctionWidget::numberOfControlPoints ( ) const

Returns the number of control points in the editor widget.

◆ setCurrentPoint

void pqTransferFunctionWidget::setCurrentPoint ( vtkIdType  index)
slot

Set the current point.

Set to -1 clear the current point.

◆ setCurrentPointPosition

void pqTransferFunctionWidget::setCurrentPointPosition ( double  xpos)
slot

Set the X-position for the current point (without changing the Y position, if applicable.

We ensure that the point doesn't move past neighbouring points. Note this will not change the end points i.e. start and end points.

◆ render

void pqTransferFunctionWidget::render ( )
slot

re-renders the transfer function view.

This doesn't render immediately, schedules a render.

◆ currentPointChanged

void pqTransferFunctionWidget::currentPointChanged ( vtkIdType  index)
signal

signal fired when the current selected control point changes.

◆ controlPointsModified

void pqTransferFunctionWidget::controlPointsModified ( )
signal

signal fired to indicate that the control points changed i.e.

either they were moved, orone was added/deleted, or edited to change color, etc.

◆ onCurrentChangedEvent

void pqTransferFunctionWidget::onCurrentChangedEvent ( )
protectedslot

slot called when the internal vtkControlPointsItem fires vtkControlPointsItem::CurrentPointChangedEvent

◆ renderInternal

void pqTransferFunctionWidget::renderInternal ( )
protectedslot

◆ onCurrentPointEditEvent()

void pqTransferFunctionWidget::onCurrentPointEditEvent ( )
protected

callback called when vtkControlPointsItem fires vtkControlPointsItem::CurrentPointEditEvent.


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