VAPoR
3.0.0
|
A class that manages the contents of the parameter tabs in VAPOR GUI. More...
#include <tabmanager.h>
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... | |
EventRouter * | getFrontEventRouter () |
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 TabManager * | getInstance () |
Protected Slots | |
void | newTopTab (int tabnum) |
void | newSubTab (int tabid) |
A class that manages the contents of the parameter tabs in VAPOR GUI.
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.
VAPoR::TabManager::TabManager | ( | QWidget * | parent, |
const char * | name | ||
) |
Constructor: Invoked by the MainForm during the set up of the main window.
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
[in] | evWid | indicates the QWidget that is associated with an EventRouter |
[in] | tag | is the Params Tag associated with the EventRouter. |
|
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
Definition at line 101 of file tabmanager.h.
References VAPoR::VizWinMgr::getEventRouter(), and VAPoR::VizWinMgr::getInstance().
|
inlinestatic |
Static method returns the (unique) TabManager instance.
Definition at line 84 of file tabmanager.h.
|
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.
[in] | widType | is either 0, 1 or 2, for RenderHolder, Navigation, or Settings. |
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
[in] | is | the QWidget* to be checked |
int VAPoR::TabManager::moveToFront | ( | string | widgetTag | ) |
Make the specified EventRouter be displayed in front.
[in] | widgetTag | is the Params tag that should be moved to front. |
|
protectedslot |
Slot that responds to user selecting a 2nd level tab, i.e. a tab that corresponds to an EventRouter.
[in] | tabid | ID of selected subtab. |
|
protectedslot |
Slot that responds to selecting a tab to be in front
[in] | tabnum | is 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.
[in] | tag | is the tag associated with the renderer. |