VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
VAPoR::TabManager Class Reference

A class that manages the contents of the parameter tabs in VAPOR GUI. More...

#include <tabmanager.h>

Inheritance diagram for VAPoR::TabManager:

Public Member Functions

 TabManager (QWidget *parent, const char *name)
 Constructor: Invoked by the MainForm during the set up of the main window. More...
 
void addWidget (QWidget *evWid, string Tag)
 
QWidget * getSubTabWidget (int widType)
 
void installWidgets ()
 
void showRenderWidget (string tag)
 
void hideRenderWidgets ()
 All the render EventRouter widgets are hidden until one is selected, using this method. More...
 
EventRoutergetFrontEventRouter ()
 
void refresh ()
 Force a re-display of the current front tab. More...
 
int moveToFront (string widgetTag)
 
bool isFrontTab (QWidget *wid)
 

Static Public Member Functions

static TabManagergetInstance ()
 

Protected Slots

void newTopTab (int tabnum)
 
void newSubTab (int tabid)
 

Detailed Description

A class that manages the contents of the parameter tabs in VAPOR GUI.

Author
Alan Norton
Version
3.0
Date
May 2015

The parameters in VAPOR GUI are displayed using a hierarchy of tabs. The TabManager is a QTabWidget that handles the arrangement of these tabs. Generally this layout is automatically set up and maintained by the MainForm and VizWinMgr classes, however users may occasionally need to query the status of a tab.

At the top level there are three "Top" tabs: The Renderer, the Navigation, and the Settings.

When the Renderer tab is selected, the RenderHolder is displayed. This allows creation, deletion, enablement, and selection of the renderer that is to be edited. The currently selected renderer has its parameters displayed in a QStackedWidget that is managed by the RenderHolder class. There is one EventRouter instance whose contents are displayed as tabs in the QStackedWidget.

When the Navigation tab is selected, A QTabWidget is displayed, with one tab for each of the "navigation" EventRouters: Viewpoint/Lights, Region, and Animation.

When the Settings tab is selected, another QTabWidget is displayed, with one tab for User Preferences, and another tab for Visualizer Features.

Definition at line 60 of file tabmanager.h.

Constructor & Destructor Documentation

VAPoR::TabManager::TabManager ( QWidget *  parent,
const char *  name 
)

Constructor: Invoked by the MainForm during the set up of the main window.

Member Function Documentation

void VAPoR::TabManager::addWidget ( QWidget *  evWid,
string  Tag 
)

Method invoked by the VizWinMgr at the time all the EventRouters are created Each eventRouter and its associated tag are saved in arrays for subsequent use

Parameters
[in]evWidindicates the QWidget that is associated with an EventRouter
[in]tagis the Params Tag associated with the EventRouter.
EventRouter* VAPoR::TabManager::getFrontEventRouter ( )
inline

This method identifies the EventRouter that is currently being displayed. This can be invoked to determine if it is necessary to refresh the specified EventRouter

Returns
EventRouter* current displayed EventRouter

Definition at line 101 of file tabmanager.h.

References VAPoR::VizWinMgr::getEventRouter(), and VAPoR::VizWinMgr::getInstance().

static TabManager* VAPoR::TabManager::getInstance ( )
inlinestatic

Static method returns the (unique) TabManager instance.

Returns
pointer to TabManager.

Definition at line 84 of file tabmanager.h.

QWidget* VAPoR::TabManager::getSubTabWidget ( int  widType)
inline

Method identifies the Lower level QWidget of specified widget type. The lower level widget is either a QTabWidget (for widgetType 1 or 2) or (for widgetType 0) the RenderHolder instance that manages Renderer tabs.

Parameters
[in]widTypeis either 0, 1 or 2, for RenderHolder, Navigation, or Settings.
Returns
QWidget* is either a QTabWidget* or a RenderHolder*

Definition at line 78 of file tabmanager.h.

Referenced by VAPoR::ArrowEventRouter::CreateTab(), and VAPoR::HelloEventRouter::CreateTab().

void VAPoR::TabManager::hideRenderWidgets ( )

All the render EventRouter widgets are hidden until one is selected, using this method.

void VAPoR::TabManager::installWidgets ( )

During initialization, after all the EventRouters have been created (and identified via addWidget()), the installWidgets method must be called to set up the various widgets in each tab.

bool VAPoR::TabManager::isFrontTab ( QWidget *  wid)

Determine if a widget is currently the front tab in its subtab

Parameters
[in]isthe QWidget* to be checked
Returns
bool true if it is in front.
int VAPoR::TabManager::moveToFront ( string  widgetTag)

Make the specified EventRouter be displayed in front.

Parameters
[in]widgetTagis the Params tag that should be moved to front.
Returns
the tab position in the associated sub tab.
void VAPoR::TabManager::newSubTab ( int  tabid)
protectedslot

Slot that responds to user selecting a 2nd level tab, i.e. a tab that corresponds to an EventRouter.

Parameters
[in]tabidID of selected subtab.
void VAPoR::TabManager::newTopTab ( int  tabnum)
protectedslot

Slot that responds to selecting a tab to be in front

Parameters
[in]tabnumis 0,1, or 2 for the selected top tab
void VAPoR::TabManager::refresh ( )

Force a re-display of the current front tab.

void VAPoR::TabManager::showRenderWidget ( string  tag)

In order to display the parameters for the selected renderer, QWidget::show() is invoked for the selected EventRouter, and QWidget::hide() is invoked for all other renderer EventRouters. This is performed in the RenderHolder class.

Parameters
[in]tagis the tag associated with the renderer.

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