VAPOR3 3.9.4
|
A pure virtual class specifying the common properties of all the renderer parameter tabs in the VAPOR GUI. More...
#include <RenderEventRouter.h>
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::RenderParams * | GetActiveParams () const |
VAPoR::DataMgr * | GetActiveDataMgr () 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::ParamsBase * | GetActiveParams () 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 () |
GUIStateParams * | GetStateParams () const |
AnimationParams * | GetAnimationParams () 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 |
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.
Definition at line 110 of file RenderEventRouter.h.
|
inline |
Definition at line 112 of file RenderEventRouter.h.
|
inlinevirtual |
Definition at line 114 of file RenderEventRouter.h.
|
inlineprotected |
Definition at line 207 of file RenderEventRouter.h.
|
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.
[in] | p | Params instance associated with the current active tab. |
Reimplemented from EventRouter.
Definition at line 228 of file RenderEventRouter.h.
|
protectedpure virtual |
Implemented in BarbEventRouter, ContourEventRouter, FlowEventRouter, ImageEventRouter, ModelEventRouter, ParticleEventRouter, SliceEventRouter, TwoDDataEventRouter, VolumeEventRouter, VolumeIsoEventRouter, and WireFrameEventRouter.
Referenced by GetDescription().
|
protectedpure virtual |
|
protectedpure virtual |
|
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().
[in] | p | Params instance associated with the current active tab. |
Implements EventRouter.
Implemented in ContourEventRouter, FlowEventRouter, and RenderEventRouterGUI.
|
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().
|
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.
VAPoR::DataMgr * RenderEventRouter::GetActiveDataMgr | ( | ) | const |
Return the currently active DataMgr instance for this event router.
|
virtual |
Return the currently active params instance for this event router.
Reimplemented from EventRouter.
|
inlinevirtual |
Virtual method identifies the ColorbarWidget associated with an EventRouter. Must be implemented in every EventRouter with a MappingFrame
ColorbarWidget* | is ColorbarWidget associated with the EventRouter |
Definition at line 170 of file RenderEventRouter.h.
|
inline |
Return a brief (3 or 4 sentence description of the renderer
Definition at line 198 of file RenderEventRouter.h.
References _getDescription().
string RenderEventRouter::GetIconImagePath | ( | ) | const |
string RenderEventRouter::GetSmallIconImagePath | ( | ) | const |
Return the path name of a raster file containing an icon for the renderer
|
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.
|
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.
|
inline |
Definition at line 116 of file RenderEventRouter.h.
|
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.
|
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.
|
inlinevirtual |
Reimplemented in ImageEventRouter, ModelEventRouter, and ParticleEventRouter.
Definition at line 132 of file RenderEventRouter.h.
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.
[in] | rp | RenderParams instance to be enabled/disabled |
[in] | wasEnabled | indicates if rendering was previously disabled |
[in] | instance | index being enabled |
[in] | newVis | indicates if the rendering is being enabled in a new visualizer. |
|
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:
Reimplemented from EventRouter.
|
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.