VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | List of all members
RenderEventRouter Class Referenceabstract

A pure virtual class specifying the common properties of all the renderer parameter tabs in the VAPOR GUI. More...

#include <RenderEventRouter.h>

Inheritance diagram for RenderEventRouter:
EventRouter RenderEventRouterGUI BarbEventRouter ContourEventRouter FlowEventRouter ImageEventRouter ModelEventRouter ParticleEventRouter SliceEventRouter TwoDDataEventRouter VolumeEventRouter VolumeIsoEventRouter WireFrameEventRouter

Public Member Functions

 RenderEventRouter (VAPoR::ControlExec *ce, string paramsType)
 
virtual ~RenderEventRouter ()
 
void SetActive (string instName)
 
virtual void hookUpTab ()
 
virtual void updateTab ()
 
virtual void confirmText ()
 
virtual bool Supports2DVariables () const =0
 
virtual bool Supports3DVariables () const =0
 
virtual bool SupportsParticleVariables () const
 
void updateRenderer (VAPoR::RenderParams *rParams, bool prevEnabled, string VizName, string renderInstName, bool newWindow)
 
virtual void sessionLoadTF (string name)
 
virtual void fitToView ()
 
virtual ColorbarWidget * getColorbarWidget ()
 
virtual void variableChanged ()
 
VAPoR::RenderParamsGetActiveParams () const
 
VAPoR::DataMgrGetActiveDataMgr () const
 
string GetDescription () const
 
string GetSmallIconImagePath () const
 
string GetIconImagePath () const
 
- Public Member Functions inherited from EventRouter
 EventRouter (VAPoR::ControlExec *ce, string paramsType)
 
virtual ~EventRouter ()
 
virtual VAPoR::ParamsBaseGetActiveParams () const
 
virtual void hookUpTab ()
 
virtual void GetWebHelp (std::vector< std::pair< string, string > > &help) const
 
virtual void updateTab ()
 
virtual void confirmText ()
 
void SetTextChanged (bool on)
 
virtual void captureMouseUp ()
 
virtual void captureMouseDown (int mouseNum)
 
virtual void StartCursorMove ()
 
virtual void EndCursorMove ()
 
GUIStateParamsGetStateParams () const
 
AnimationParamsGetAnimationParams () const
 
size_t GetCurrentTimeStep () const
 
virtual string GetType () const =0
 
virtual void LoadDataNotify (string dataSetName)
 

Protected Member Functions

 RenderEventRouter ()
 
virtual void _updateTab ()=0
 
virtual void _confirmText ()
 
virtual string _getDescription () const =0
 
virtual string _getSmallIconImagePath () const =0
 
virtual string _getIconImagePath () const =0
 
- Protected Member Functions inherited from EventRouter
 EventRouter ()
 
virtual void _initializeTab ()
 
virtual void _updateTab ()=0
 
virtual void _confirmText ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EventRouter
static size_t GetCurrentTimeStep (VAPoR::ControlExec *ce)
 
- Protected Attributes inherited from EventRouter
VAPoR::ControlExec_controlExec
 
bool _textChangedFlag
 
string _paramsType
 

Detailed Description

A pure virtual class specifying the common properties of all the renderer parameter tabs in the VAPOR GUI.

The RendererEventRouter class manages communication between tabs in the GUI, visualizers, and params. Implementers of new renderer tabs in vaporgui must implement an RenderEventRouter class that translates user actions in the tab to changes in the corresponding Params instance, and conversely, populates the tab display based on the most recent state of the params.

RenderEventRouter are associated with RenderParams. RenderParams support having multiple sub-tabs, and are presented in the RenderHolder that displays the parameters of the currently selected renderer. Other EventRouter classes are themselves tabs and have their content defined by a Qt Designer .ui file. Such EventRouter classes are derived from the _UI class that is based on the .ui widget.

Each widget in the tab is connected to slots in the RenderEventRouter by signals emitted by the widget when its state is changed. The connections must be set up in the RenderEventRouter::hookUpTab() method.

In addition to implementing the various pure virtual methods on this class, additional virtual methods must be implemented to support changes in rendering, Transfer Functions, etc., based on the functionality of the tab.

Specifically, each EventRouter subclass implementor must provide the following:

Implement hookUpTab() to connect all signals/slots that are permanent (not data dependent). If some widgets are created dynamically, the appropriate connections must be established at that time.

Implement _updateTab() to set the values of all gui elements based on current Params settings, whenever the tab is exposed.

Implement _confirmText() to read all the text values in the tab and set them in the Params

Implement a slot for each widget in the tab to respond to user changes, except QLineEdits get two slots (as described in EventRouter::hookUpTab()) )

Call confirmText() in the slots associated with each widget change, so that text changes are updated prior to committing the widget change.

If any data variables are associated with the tab (for RenderParams), include the VariablesWidget as a tab inside this gui tab. Note that the VariablesWidget handles its own signals and slots.

Provide text descriptions and URLs for Web-based help as described under EventRouter::makeWebHelpActions()

If there is a MouseMode (manipulator) associated with the tab, then EventRouter::captureMouseUp() and EventRouter::captureMouseDown() must be implemented.

Author
Alan Norton
Version
3.0
Date
January 2017

Definition at line 110 of file RenderEventRouter.h.

Constructor & Destructor Documentation

◆ RenderEventRouter() [1/2]

RenderEventRouter::RenderEventRouter ( VAPoR::ControlExec ce,
string  paramsType 
)
inline

Definition at line 112 of file RenderEventRouter.h.

◆ ~RenderEventRouter()

virtual RenderEventRouter::~RenderEventRouter ( )
inlinevirtual

Definition at line 114 of file RenderEventRouter.h.

◆ RenderEventRouter() [2/2]

RenderEventRouter::RenderEventRouter ( )
inlineprotected

Definition at line 207 of file RenderEventRouter.h.

Member Function Documentation

◆ _confirmText()

virtual void RenderEventRouter::_confirmText ( )
inlineprotectedvirtual

Pure virtual method to respond to changes in text in the tab. This method should be called whenever user presses enter, or changes the state of a widget (other than a textEdit) in the tab. In each implementation, the values of ALL QLineEdit's in the tab must be read and set in the corresponding Params instance.

Parameters
[in]pParams instance associated with the current active tab.

Reimplemented from EventRouter.

Definition at line 228 of file RenderEventRouter.h.

◆ _getDescription()

virtual string RenderEventRouter::_getDescription ( ) const
protectedpure virtual

◆ _getIconImagePath()

virtual string RenderEventRouter::_getIconImagePath ( ) const
protectedpure virtual

◆ _getSmallIconImagePath()

virtual string RenderEventRouter::_getSmallIconImagePath ( ) const
protectedpure virtual

◆ _updateTab()

virtual void RenderEventRouter::_updateTab ( )
protectedpure virtual

Pure virtual method to set the values of all the gui elements in the tab based on current Params state. This is invoked whenever the tab is redisplayed and the values in the tab need to be refreshed. If there is a VariablesWidget, _updateTab() must invoke VariablesWidget::updateTab().

Parameters
[in]pParams instance associated with the current active tab.

Implements EventRouter.

Implemented in ContourEventRouter, FlowEventRouter, and RenderEventRouterGUI.

◆ confirmText()

virtual void RenderEventRouter::confirmText ( )
inlinevirtual

Method to respond to changes in text in the tab. This method should be called whenever user presses enter, or changes the state of a widget (other than a textEdit) in the tab.

Reimplemented from EventRouter.

Definition at line 122 of file RenderEventRouter.h.

References EventRouter::confirmText().

◆ fitToView()

virtual void RenderEventRouter::fitToView ( )
inlinevirtual

Virtual method to fit the color map editor interval to the current map bounds. By default does nothing

Definition at line 165 of file RenderEventRouter.h.

◆ GetActiveDataMgr()

VAPoR::DataMgr * RenderEventRouter::GetActiveDataMgr ( ) const

Return the currently active DataMgr instance for this event router.

◆ GetActiveParams()

VAPoR::RenderParams * RenderEventRouter::GetActiveParams ( ) const
virtual

Return the currently active params instance for this event router.

Reimplemented from EventRouter.

◆ getColorbarWidget()

virtual ColorbarWidget * RenderEventRouter::getColorbarWidget ( )
inlinevirtual

Virtual method identifies the ColorbarWidget associated with an EventRouter. Must be implemented in every EventRouter with a MappingFrame

Return values
ColorbarWidget*is ColorbarWidget associated with the EventRouter

Definition at line 170 of file RenderEventRouter.h.

◆ GetDescription()

string RenderEventRouter::GetDescription ( ) const
inline

Return a brief (3 or 4 sentence description of the renderer

Definition at line 198 of file RenderEventRouter.h.

References _getDescription().

◆ GetIconImagePath()

string RenderEventRouter::GetIconImagePath ( ) const

◆ GetSmallIconImagePath()

string RenderEventRouter::GetSmallIconImagePath ( ) const

Return the path name of a raster file containing an icon for the renderer

◆ hookUpTab()

virtual void RenderEventRouter::hookUpTab ( )
inlinevirtual

Virtual method connects all the Qt signals and slots associated with the tab. Must also include connections that send signals when any QTextEdit box is changed and when enter is pressed. Each QLineEdit has a connection to a setTextChanged and enterPressed slot, to register when the value has changed, and when the user has pressed enter over the lineEdit. If there is a MapperFunction editor or IsoSelection panel in the tab, call MappingFrame::hookup() in this method

Reimplemented from EventRouter.

Definition at line 118 of file RenderEventRouter.h.

◆ sessionLoadTF()

virtual void RenderEventRouter::sessionLoadTF ( string  name)
inlinevirtual

Virtual method supports loading a transfer function from the session, for tabs that have transfer functions. param[in] name indicates the name identifying the transfer function

Definition at line 150 of file RenderEventRouter.h.

◆ SetActive()

void RenderEventRouter::SetActive ( string  instName)
inline

Definition at line 116 of file RenderEventRouter.h.

◆ Supports2DVariables()

virtual bool RenderEventRouter::Supports2DVariables ( ) const
pure virtual

Pure virtual method that indicates whether the current RenderEventRouter and its associated renderer support 2D variables.

Implemented in BarbEventRouter, ContourEventRouter, FlowEventRouter, ImageEventRouter, ModelEventRouter, ParticleEventRouter, SliceEventRouter, TwoDDataEventRouter, VolumeEventRouter, VolumeIsoEventRouter, and WireFrameEventRouter.

◆ Supports3DVariables()

virtual bool RenderEventRouter::Supports3DVariables ( ) const
pure virtual

Pure virtual method that indicates whether the current RenderEventRouter and its associated renderer support 3D variables.

Implemented in BarbEventRouter, ContourEventRouter, FlowEventRouter, ImageEventRouter, ModelEventRouter, ParticleEventRouter, SliceEventRouter, TwoDDataEventRouter, VolumeEventRouter, VolumeIsoEventRouter, and WireFrameEventRouter.

◆ SupportsParticleVariables()

virtual bool RenderEventRouter::SupportsParticleVariables ( ) const
inlinevirtual

Reimplemented in ImageEventRouter, ModelEventRouter, and ParticleEventRouter.

Definition at line 132 of file RenderEventRouter.h.

◆ updateRenderer()

void RenderEventRouter::updateRenderer ( VAPoR::RenderParams rParams,
bool  prevEnabled,
string  VizName,
string  renderInstName,
bool  newWindow 
)

Virtual method to enable or disable rendering when turned on or off by a gui tab. Only useful if the tab corresponds to a renderer.

Parameters
[in]rpRenderParams instance to be enabled/disabled
[in]wasEnabledindicates if rendering was previously disabled
[in]instanceindex being enabled
[in]newVisindicates if the rendering is being enabled in a new visualizer.

◆ updateTab()

virtual void RenderEventRouter::updateTab ( )
virtual

Update GUI display

This method set the values of all the gui elements in the tab based on current Params state. This will do appropriate setup and then invoke the pure virtual method _updateTab(). This is invoked whenever the tab is redisplayed and the values in the tab need to be refreshed.

The method has three responsibilities:

  1. Reconcile any anomalous conditions between the DataMgr and the Params instance managed by this event router. Thus if the Params instance contains values that would be viable with the current DataMgr (e.g. a variable name that is not present in the DataMgr) the method will attempt to change the Params instance to a valid state.
  2. Refresh (rebuild) the GUI to reflect the state of the Params.
  3. Ensure that the options presented by the GUI are viable for the current DataMgr.

Reimplemented from EventRouter.

◆ variableChanged()

virtual void RenderEventRouter::variableChanged ( )
inlinevirtual

Respond to a variable change Make any gui changes beyond updating the variable combos. Default does nothing

Definition at line 175 of file RenderEventRouter.h.


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