rtVTK  0.6.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
rtVTK::MainWindow Class Reference

Main Window of the Application. More...

List of all members.

Public Slots

void slotUpdateCoords (const Camera &)

Signals

void sgnlLoadScene (const Options &)
void sgnlSetView (const Scene::ViewParameters &)
void sgnlSetLookMode (uiCore::CameraMode)
void sgnlActivatePlugin (Plugin *, const Mesh &, QLayout *, QWidget *)
void sgnlSetRotationSpeed (float)
void sgnlSetTranslationSpeed (float)
void sgnlSetDollySpeed (float)
void sgnlSetFOV (float)
void sgnlSetBG (float, float, float)
void sgnlRender ()
void sgnlSetIdle (bool)
void sgnlNewRay ()
void sgnlCoordsChanged (QString, QString)
void sgnlPauseTimers ()
void sgnlUnpauseTimers ()

Public Member Functions

 MainWindow (const Configuration &, QWidget *=0)
 ~MainWindow ()
glWidget const * getGLW () const
rl::RayLoggergetRL () const
void show ()
QDir getConfigDir (string str)
Shortcut Management

A shortcut is like a library book, only one person may checkout the book at a time. No one else can checkout the book until it is returned. Claim is analogous to checking out a book and Release is analogous to returning the book to the library so that someone else may use it. These functions help plugins avoid shortcut collisions. Hint: const QObject* argument should almost always be "this" keyword.

const set< QKeySequence > *const getTakenKeyCombos () const
bool claimKeyCombo (const QObject *requester_, const QString &shortcut_)
bool claimKeyCombo (const QObject *requester_, const QKeySequence &shortcut_)
bool releaseKeyCombo (const QObject *requester_, const QString &shortcut_)
bool releaseKeyCombo (const QObject *requester_, const QKeySequence &shortcut_)

Private Slots

void slotBackground ()
void slotToggleFullScreenMode (bool)
void slotShowUsingDocs ()
void slotShowWritingDocs ()
void slotShowMainDocs ()
void slotSetLookModeFocal ()
void slotSetLookModeEye ()
void slotShowPipeline ()
void slotSetDefaultScene ()
void slotShowAbout ()
void slotRestoreIdle ()
void slotDisableIdle ()
void slotToggleIdle ()
void slotPauseTimers ()
void slotUnpauseTimers ()
void slotShowTimerDialog ()
void slotNewRay ()
void slotResetRL ()
File Open

Slots to load scene data from files

void slotOpenScene ()
void slotLoadScene (const Options &)
void slotLoadMesh ()
void slotLoadView ()
Camera Control

Slots to alter the behavior of the camera

void slotToggleAdvancedSettings ()
void slotConvertRotationSpeed (int)
void slotConvertTranslationSpeed (int)
void slotConvertDollySpeed (int)
void slotConvertFOV (int)
void slotConvertFOV (double)
Save File

Slots to save visualization data

void slotCopyImage ()
void slotSaveImage ()
void slotSaveView ()
DLL Slots

Slots related to plugin management

void slotLoadDLL (QAction *)
void slotUnloadDLL (QAction *)
void slotSetActivePlugins (const vector< string > &)
void slotEstablishTabsForActivePlugins (const vector< string > &)
Slider Controls

Functions for incrementing/decrementing camera slider values

void slotIncrRotation ()
void slotIncrDolly ()
void slotIncrTranslation ()
void slotIncrFOV ()
void slotDecrRotation ()
void slotDecrDolly ()
void slotDecrTranslation ()
void slotDecrFOV ()

Private Member Functions

bool eventFilter (QObject *, QEvent *)
void loadDefaultScene ()
bool initializePlugin (Plugin *)
void setShortcuts ()
bool event (QEvent *)

Private Attributes

Ui::MainWindowui
PluginManagerpmgr
glWidgetglw
RenderWindowwinRender
DocumentationwinDoc
vector< QShortcut * > shortcuts
set< QKeySequence > keyCombos
map< const QKeySequence, const
QObject * > 
pluginShortcutOwnership
Configuration config
Scene scene
Mesh mesh
rl::RayLogger rlRayLogger
Tab Components

Vectors to aggregate Qt components used to create plugin tabs.

vector< QScrollArea * > scrollAreas
vector< QWidget * > scrollAreasContents
Speed settings

Camera speed settings, determined from file.

float rspeed
float tspeed
float dspeed
map< Plugin *, QWidget * > pluginToTab
vector< Plugin * > pipeline
AboutDialogdlgAbout
PipelineDialogdlgPipeline
TimerDialogdlgTimer
bool isInSlotFullScreenMode
bool userResizedCaptured
bool areThereCustomPlugins

Detailed Description

Main Window of the Application.

MainWindow controls the application GUI. It aggregates glWidget and PluginManager, and acts as the middleman between these two classes.


Constructor & Destructor Documentation

rtVTK::MainWindow::MainWindow ( const Configuration config_,
QWidget *  parent = 0 
) [explicit]

Performs setup operations for MainWindow. Instantiates glWidget and PluginManager. Connects signals and slots. Loads glRenderer and rlRenderer.
Calls winRender->show().

Parameters:
parent: QWidget* = 0 - parent of MainWindow.

References Ui_MainWindow::actionAbout, Ui_MainWindow::actionBGColor, Ui_MainWindow::actionConfigurePipeline, Ui_MainWindow::actionCopy, Ui_MainWindow::actionCut, Ui_MainWindow::actionDocumentation, Ui_MainWindow::actionExit, Ui_MainWindow::actionFullscreen, Ui_MainWindow::actionOpenMesh, Ui_MainWindow::actionOpenScene, Ui_MainWindow::actionOpenView, Ui_MainWindow::actionSaveImage, Ui_MainWindow::actionSaveView, Ui_MainWindow::actionSetDefaultScene, Ui_MainWindow::actionTimerManagement, Ui_MainWindow::actionToggleIdle, Ui_MainWindow::actionUsing, Ui_MainWindow::actionWriting, areThereCustomPlugins, config, dlgAbout, dlgPipeline, dlgTimer, rtVTK::PluginManager::findValidDLLs(), Ui_MainWindow::frame_advancedSettings, rtVTK::PluginManager::getPluginByName(), glw, initializePlugin(), loadDefaultScene(), pmgr, setShortcuts(), Ui_MainWindow::setupUi(), sgnlLoadScene(), sgnlPauseTimers(), sgnlRender(), sgnlSetBG(), sgnlSetDollySpeed(), sgnlSetFOV(), sgnlSetIdle(), sgnlSetLookMode(), sgnlSetRotationSpeed(), sgnlSetTranslationSpeed(), sgnlSetView(), sgnlUnpauseTimers(), slotBackground(), slotConvertDollySpeed(), slotConvertFOV(), slotConvertRotationSpeed(), slotConvertTranslationSpeed(), slotCopyImage(), slotDisableIdle(), slotEstablishTabsForActivePlugins(), slotLoadDLL(), slotLoadMesh(), slotLoadScene(), slotLoadView(), slotOpenScene(), slotPauseTimers(), slotResetRL(), slotRestoreIdle(), slotSaveImage(), slotSaveView(), slotSetActivePlugins(), slotSetDefaultScene(), slotSetLookModeEye(), slotSetLookModeFocal(), slotShowAbout(), slotShowMainDocs(), slotShowPipeline(), slotShowTimerDialog(), slotShowUsingDocs(), slotShowWritingDocs(), slotToggleAdvancedSettings(), slotToggleFullScreenMode(), slotToggleIdle(), slotUnloadDLL(), slotUnpauseTimers(), slotUpdateCoords(), ui, winDoc, and winRender.

Deletes all heap-allocated members. Note that the ordering of delete statements is important here. Also note that vectors of pointers are iterated through to delete each pointer element.

References dlgPipeline, dlgTimer, pmgr, scrollAreas, scrollAreasContents, shortcuts, ui, and winDoc.


Member Function Documentation

bool rtVTK::MainWindow::claimKeyCombo ( const QObject *  requester_,
const QString &  shortcut_ 
) [inline]

Overload for MainWindow::claimKeyCombo(const Plugin* requester_, const QKeySequence& shortcut_) const.

Parameters:
requester_: const Plugin*& - the plugin attempting to claim the shortcut. Typically the "this" keyword.
shortcut_: const QString& - the key combo being claimed.
Returns:
True if claim was successful and plugin should go ahead with using that shortcut. False if claim failed and plugin should not use that shortcut.

Referenced by rtVTK::rlRenderer::rlRenderer().

bool rtVTK::MainWindow::claimKeyCombo ( const QObject *  requester_,
const QKeySequence &  shortcut_ 
) [inline]

Determines if a shortcut is available to claim and if so, set "ownership" of the shortcut key sequence to the requesting plugin.

Parameters:
requester_: const Plugin*& - the plugin attempting to claim the shortcut. Typically the "this" keyword.
shortcut_: const QKeySequence& - the key combo being claimed.
Returns:
True if claim was successful and plugin should go ahead with using that shortcut. False if claim failed and plugin should not use that shortcut.

References keyCombos, and pluginShortcutOwnership.

bool rtVTK::MainWindow::event ( QEvent *  e) [private]
bool rtVTK::MainWindow::eventFilter ( QObject *  obj,
QEvent *  e 
) [private]

Because this eventFilter is a reimplementation of QObject's eventFilter function, returning true will filter out the event. Inversely, returning false will pass the event to the parent base class.
Resize event is filtered to ensure that resizing in full screen is only done at certain times. The private Boolean variables of MainWindow are used to determine who/what sent the Resize Event. One bool indicates if slotToggleFullScreenMode is currently on the call stack. The ui->actionFullscreen->isChecked() is used like a bool variable to check if rtVTK is in full screen mode or not.
WindowBlocked and WindowUnblocked are triggered when a modal dialog box appears or disappears, respectively.

Returns:
Answer to the question "Does this signal get heard by the parent class event handler?"
Todo:
TODO(ajc) - remove keyPressEvent propagation, we have shortcuts now...

References Ui_MainWindow::actionFullscreen, isInSlotFullScreenMode, sgnlPauseTimers(), sgnlUnpauseTimers(), slotDisableIdle(), slotRestoreIdle(), ui, and userResizedCaptured.

QDir rtVTK::MainWindow::getConfigDir ( string  str) [inline]

References config.

Referenced by rtVTK::rlRenderer::slotOpenFile().

glWidget const* rtVTK::MainWindow::getGLW ( ) const [inline]

References rlRayLogger.

const set<QKeySequence>* const rtVTK::MainWindow::getTakenKeyCombos ( ) const [inline]

Accessor for the set of shortcuts being used. The pointer returned can't be used to modify keyCombos (1st const). The pointer can't be set to point to someplace else (2nd const). This function will not change MainWindow (3rd const).

Returns:
Returns a pointer to the data structure holding the key sequences.

References keyCombos.

bool rtVTK::MainWindow::initializePlugin ( Plugin pl) [private]

This function calls create() for a given plugin, sets the plugin's initialized flag to true, and creates a tab on the main window for the plugin's options. After initialization, a plugin may be added to the rendering pipeline.

Parameters:
pl: Plugin* - plugin to be initialized.
Returns:
Successful plugin loading will result in true, otherwise false.

References rtVTK::Plugin::callClose(), rtVTK::Plugin::callCreate(), uiCore::Trackball::getCam(), rtVTK::glWidget::getTrackball(), glw, rtVTK::Plugin::initialized, mesh, rtVTK::Plugin::name, pluginToTab, rtVTK::Plugin::requiresTab, scrollAreas, scrollAreasContents, and ui.

Referenced by MainWindow(), and slotLoadDLL().

Loads the default scene. A default scene must reside in the scenes directory.
Emits sgnlLoadScene.

References ioCore::Options::bname, config, ioCore::Options::fname, rtVTK::Configuration::getDefaultScene(), ioCore::Options::path, and sgnlLoadScene().

Referenced by MainWindow().

bool rtVTK::MainWindow::releaseKeyCombo ( const QObject *  requester_,
const QString &  shortcut_ 
) [inline]

Overload for MainWindow::releaseKeyCombo(const Plugin* requester_, const QKeySequence& shortcut_) const.

Parameters:
requester_: const Plugin*& - the plugin attempting to release the shortcut. Typically the "this" keyword.
shortcut_: const QString& - the key combo being released.
Returns:
True if release was successful. False if release failed, often because the plugin doesn't own the shortcut.

Referenced by rtVTK::rlRenderer::~rlRenderer().

bool rtVTK::MainWindow::releaseKeyCombo ( const QObject *  requester_,
const QKeySequence &  shortcut_ 
) [inline]

A plugin that is being unloaded/destructed or which no longer needs a shortcut which it owns should release it back to the pool of unused shortcuts. This will allow other plugins and user created timers to claim the shortcut for use.

Parameters:
requester_: const Plugin*& - the plugin attempting to release the shortcut. Typically the "this" keyword.
shortcut_: const QString& - the key combo being released.
Returns:
True if release was successful. False if release failed, often because the plugin doesn't own the shortcut.

References keyCombos, and pluginShortcutOwnership.

void rtVTK::MainWindow::setShortcuts ( ) [private]

Sets up the keyboard shortcuts provided by the application. This function is meant to be called only the the constructor of MainWindow. Logically, it is a part of construction. This function is called before plugins are called, so it is believed to be safe (and faster) to push/connect these shortcuts without actually checking the set keyCombos. Normally, keyCombos should be accessed to make sure a desired key sequence has not already been used. In other words don't use this function as an example of shortcut management; instead, look at TimerDialog::slotAddTimer() and TimerDialog::slotRemoveTimer().
Plugins that want to use a shortcut should use the public interface involving claimKeyCombo and releaseKeyCombo.

References Ui_MainWindow::actionCopy, Ui_MainWindow::actionCut, Ui_MainWindow::actionDocumentation, Ui_MainWindow::actionExit, Ui_MainWindow::actionFullscreen, Ui_MainWindow::actionOpenScene, Ui_MainWindow::actionPaste, Ui_MainWindow::actionSaveImage, Ui_MainWindow::actionTimerManagement, glw, keyCombos, shortcuts, slotDecrDolly(), slotDecrFOV(), slotDecrRotation(), slotDecrTranslation(), slotIncrDolly(), slotIncrFOV(), slotIncrRotation(), slotIncrTranslation(), slotShowMainDocs(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::sgnlActivatePlugin ( Plugin ,
const Mesh ,
QLayout *  ,
QWidget *   
) [signal]
void rtVTK::MainWindow::sgnlCoordsChanged ( QString  ,
QString   
) [signal]

Referenced by slotUpdateCoords().

void rtVTK::MainWindow::sgnlLoadScene ( const Options ) [signal]
void rtVTK::MainWindow::sgnlNewRay ( ) [signal]

Referenced by slotNewRay().

void rtVTK::MainWindow::sgnlRender ( ) [signal]
void rtVTK::MainWindow::sgnlSetBG ( float  ,
float  ,
float   
) [signal]

Referenced by MainWindow(), and slotBackground().

void rtVTK::MainWindow::sgnlSetDollySpeed ( float  ) [signal]
void rtVTK::MainWindow::sgnlSetFOV ( float  ) [signal]

Referenced by MainWindow(), and slotConvertFOV().

void rtVTK::MainWindow::sgnlSetIdle ( bool  ) [signal]
void rtVTK::MainWindow::sgnlSetRotationSpeed ( float  ) [signal]
void rtVTK::MainWindow::sgnlSetTranslationSpeed ( float  ) [signal]

Displays the right-hand panel (MainWindow) and the render window (RenderWindow).

References winRender.

void rtVTK::MainWindow::slotBackground ( ) [private, slot]

Allows user to select new color for background of glWidget from the QColorDialog box.
Emits sgnlSetBG if user clicks the color selection's Ok button.

References sgnlSetBG(), sgnlSetIdle(), slotPauseTimers(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotConvertDollySpeed ( int  value) [private, slot]

Converts value from dolly speed slider into a multiplier and calculates new speed value.
Emits sgnlSetDollySpeed with this value.

Parameters:
value: int - value of dolly speed slider bar.

References dspeed, sgnlSetDollySpeed(), and ui.

Referenced by MainWindow(), and slotLoadScene().

void rtVTK::MainWindow::slotConvertFOV ( int  value) [private, slot]

Given value of fov slider, calculates new field of view value.
Emits sgnlSetFOV with this value.

Parameters:
value: int - value of fov slider bar.

References sgnlSetFOV(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotConvertFOV ( double  value) [private, slot]

Given value of fov spin box, calculates new field of view value.
Emits sgnlSetFOV with this value.

Parameters:
value: float - value of fov spin box.

References sgnlSetFOV(), and ui.

void rtVTK::MainWindow::slotConvertRotationSpeed ( int  value) [private, slot]

Converts value from rotation speed slider into a multiplier and calculates new speed value.
Emits sgnlSetRotationSpeed with this value.

Parameters:
value: int - value of rotation speed slider bar.

References rspeed, sgnlSetRotationSpeed(), and ui.

Referenced by MainWindow(), and slotLoadScene().

void rtVTK::MainWindow::slotConvertTranslationSpeed ( int  value) [private, slot]

Converts value from rotation speed slider into a multiplier and calculates new speed value.
Emits sgnlSetTranslationSpeed with this value.

Parameters:
value: int - value of translation speed slider bar.

References sgnlSetTranslationSpeed(), tspeed, and ui.

Referenced by MainWindow(), and slotLoadScene().

void rtVTK::MainWindow::slotCopyImage ( ) [private, slot]

Saves the current render image to the clipboard.

References glw, sgnlSetIdle(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotDecrDolly ( ) [private, slot]

Decrements value of dolly speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotDecrFOV ( ) [private, slot]

Subtracts ten from the value of field of view slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotDecrRotation ( ) [private, slot]

Decrements value of rotation speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotDecrTranslation ( ) [private, slot]

Decrements value of translation speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotDisableIdle ( ) [private, slot]

Pauses idling so that it may be continued at a later point.

References sgnlSetIdle().

Referenced by eventFilter(), and MainWindow().

void rtVTK::MainWindow::slotEstablishTabsForActivePlugins ( const vector< string > &  activePluginNames) [private, slot]

Sets tabs for each plugin to enabled if plugin is in the pipeline and inactive if plugin is not in the pipeline.
This slot is only called when the plugins are set to active.

Parameters:
activePluginNames: const vector<string>& - names of plugins currently in the pipeline.

References rtVTK::PluginManager::getInitPluginNames(), rtVTK::PluginManager::getPluginByName(), pluginToTab, pmgr, rtVTK::Plugin::requiresTab, and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotIncrDolly ( ) [private, slot]

Increments value of dolly speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotIncrFOV ( ) [private, slot]

Adds ten to the value of field of view slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotIncrRotation ( ) [private, slot]

Increments value of rotation speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotIncrTranslation ( ) [private, slot]

Increments value of translation speed slider bar.

References ui.

Referenced by setShortcuts().

void rtVTK::MainWindow::slotLoadDLL ( QAction *  choice) [private, slot]

This function, given a plugin name, queries the PluginManager for a Plugin*. MainWindow::initializePlugin() is called for this Plugin*.

Parameters:
choice: QAction* - the item that has been selected from the Load Plugin menu.

References rtVTK::PluginManager::getPluginByName(), initializePlugin(), pmgr, and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotLoadMesh ( ) [private, slot]

Allows user to select a new mesh file to be loaded. Emits either sgnlSetIdle and/or sgnlRefesh, depending on conditions.

Bug:
XXX(ejq) - slotLoadMesh currently broken
Bug:
XXX(cpg) - is emitting sgnlRender() here the correct thing to do?

References config, Core::Mesh::load(), mesh, sgnlRender(), sgnlSetIdle(), slotPauseTimers(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotLoadScene ( const Options opt) [private, slot]
void rtVTK::MainWindow::slotLoadView ( ) [private, slot]
void rtVTK::MainWindow::slotNewRay ( ) [private, slot]

References sgnlNewRay().

void rtVTK::MainWindow::slotOpenScene ( ) [private, slot]

Displays a dialog box and allows the user to select a scene file.
Emits sgnlLoadScene.

References ioCore::Options::bname, config, ioCore::Options::fname, ioCore::Options::path, sgnlLoadScene(), sgnlSetIdle(), slotPauseTimers(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotPauseTimers ( ) [private, slot]
void rtVTK::MainWindow::slotResetRL ( ) [private, slot]
void rtVTK::MainWindow::slotRestoreIdle ( ) [private, slot]

Continues idling where it was last left off. Does not re-render the window because that would lose all of the previous calculations and start over from scratch.

References sgnlSetIdle(), and ui.

Referenced by eventFilter(), and MainWindow().

void rtVTK::MainWindow::slotSaveImage ( ) [private, slot]

Allows user to save an image of the view currently displayed by glWidget.

References glw, sgnlSetIdle(), slotPauseTimers(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotSaveView ( ) [private, slot]
void rtVTK::MainWindow::slotSetActivePlugins ( const vector< string > &  names) [private, slot]

Given a set of plugin names, this function queries PluginManager for the plugins and replaces the current pipeline with them.
The plugins become, in the order they are passed, the rendering pipeline.

Parameters:
names: const vector<string>& - names of plugins to be set as active.

References rtVTK::Plugin::callResize(), rtVTK::PluginManager::getPluginByName(), glw, pipeline, pmgr, sgnlRender(), sgnlSetIdle(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotSetDefaultScene ( ) [private, slot]

Opens the select file dialog box for user to choose a default scene.

References config, rtVTK::Configuration::setDefaultScene(), sgnlSetIdle(), slotPauseTimers(), slotUnpauseTimers(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotSetLookModeEye ( ) [private, slot]

Emits sgnlSetLookMode with argument uiCore::Eye.

References uiCore::Eye, and sgnlSetLookMode().

Referenced by MainWindow().

void rtVTK::MainWindow::slotSetLookModeFocal ( ) [private, slot]

Emits sgnlSetLookMode with argument uiCore::Lookat.

References uiCore::Lookat, and sgnlSetLookMode().

Referenced by MainWindow().

void rtVTK::MainWindow::slotShowAbout ( ) [private, slot]

References dlgAbout.

Referenced by MainWindow().

void rtVTK::MainWindow::slotShowMainDocs ( ) [private, slot]

Shows main documentation window, setting webView URL to the location of the documentation files.

References config, rtVTK::Documentation::setPath(), sgnlSetIdle(), slotPauseTimers(), ui, and winDoc.

Referenced by MainWindow(), and setShortcuts().

void rtVTK::MainWindow::slotShowPipeline ( ) [private, slot]

Retrieves names of loaded plugins from PluginManager and of active plugins from glWidget.
Passes this information to pipeline's populate function.

References dlgPipeline, rtVTK::PluginManager::getInitPluginNames(), pipeline, pmgr, rtVTK::PipelineDialog::populate(), sgnlSetIdle(), and slotPauseTimers().

Referenced by MainWindow().

void rtVTK::MainWindow::slotShowTimerDialog ( ) [private, slot]

This will tell the TimerDialog that it needs to populate the list of plugins to prepare for showing the potential slots for the user to choose from.

References dlgTimer, and rtVTK::TimerDialog::populate().

Referenced by MainWindow().

void rtVTK::MainWindow::slotShowUsingDocs ( ) [private, slot]

Shows "Using rtVTK" documentation window, setting webView URL to the location of the documentation files.

References config, rtVTK::Documentation::setPath(), sgnlSetIdle(), slotPauseTimers(), ui, and winDoc.

Referenced by MainWindow().

void rtVTK::MainWindow::slotShowWritingDocs ( ) [private, slot]

Shows "Writing Plugins" documentation window, setting webView URL to the location of the documentation files.

References config, rtVTK::Documentation::setPath(), sgnlSetIdle(), slotPauseTimers(), ui, and winDoc.

Referenced by MainWindow().

Changes the visibility of advanced camera speed settings, such as rotation translation, and dolly speeds, as well as the field of view.

References Ui_MainWindow::frame_advancedSettings, and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotToggleFullScreenMode ( bool  on) [private, slot]

Toggles fullscreen mode. Emits sgnlRender.

Parameters:
on: bool - true if fullscreen is being turned on; false otherwise.

References Ui_MainWindow::actionFullscreen, isInSlotFullScreenMode, sgnlRender(), ui, userResizedCaptured, and winRender.

Referenced by MainWindow().

void rtVTK::MainWindow::slotToggleIdle ( ) [private, slot]

Toggles the idle state.
Emits the new toggle state.

References sgnlSetIdle(), and ui.

Referenced by MainWindow().

void rtVTK::MainWindow::slotUnloadDLL ( QAction *  choice) [private, slot]

This function takes the name of a given plugin and calls PluginManager::unload() for that plugin. The plugin is removed from the pipeline if necessary. The plugin's tab on the main window is destroyed.

Parameters:
choice: QAction* - the item that has been selected from the Unload Plugin menu.
Bug:
XXX(ejq) - map will return 0 if element doesn't exist because it adds pl with a grounded pointer for QWidget*, but 0 is a potentially valid tab index. So we're going to live dangerously and trust that all plugins here exist in the map.

References rtVTK::PluginManager::getPluginByName(), pipeline, pluginToTab, pmgr, rtVTK::Plugin::requiresTab, scrollAreas, scrollAreasContents, sgnlRender(), ui, and rtVTK::PluginManager::unload().

Referenced by MainWindow().

void rtVTK::MainWindow::slotUnpauseTimers ( ) [private, slot]
void rtVTK::MainWindow::slotUpdateCoords ( const Camera camera) [slot]

Outputs camera coordinates to the status bar. Emits sgnlCoordChanged to change the labels at the bottom of the render window.

Parameters:
camera: const uiCore::Camera& - camera to be used for output.

References uiCore::Camera::getEye(), uiCore::Camera::getFOV(), uiCore::Camera::getLook(), sgnlCoordsChanged(), and ui.

Referenced by MainWindow().


Member Data Documentation

Referenced by MainWindow(), and slotLoadScene().

Referenced by MainWindow(), and slotShowAbout().

float rtVTK::MainWindow::dspeed [private]

glw leverages function calls inherited from QGLWidget to draw to the main window. Actual rendering is done by the plugins that glw aggregates.

Referenced by getGLW(), initializePlugin(), MainWindow(), setShortcuts(), slotCopyImage(), slotSaveImage(), slotSaveView(), and slotSetActivePlugins().

Got sick and tired of ResizeEvent() doing silly things. This prevents it from doing weird, double call stuff.

Referenced by eventFilter(), and slotToggleFullScreenMode().

set<QKeySequence> rtVTK::MainWindow::keyCombos [mutable, private]

rtVTK Shortcut Policy: All shortcut key combos must be added to this data structure. This is a record of existing combinations so that before a new shortcut is created, it is verified that the desired key sequence does not already exist. Shortcuts with multiple connections are rejected by Qt as ambiguous and neither connection is executed.

std::set stores unique elements and the elements are the keys. Because std::set is implemented as a binary tree, accessing elements is more efficient than linear search. To compare to a less efficient implementation using std::vector, go to:

git branch c03e63698e65b63c1ea8eb8d4cd33c9867c883ef

NOTE (ajc) Mutable. Because MainWindow's mutators for the keyCombos is, a const function, I needed a way for the MainWindow object to be able make an internal change. This member is private and is unchangeable by outsiders when getTakenKeyCombos() is called. If an outsider needs to checkout a shortcut, they will attempt to checkout the QKeySquence and if MainWindow returns back true, then the plugin is permitted to connecting QShortcuts around. If false, the plugin should not move forward with connecting the shortcut

Q: Why not just pass by ref the private member to plugins like with TimerDialog?
A: Plugins are "dangerous". TimerDialog is written by us, so it is known how the reference is used/modified, viz. TimerDialog is not dangerous. Plugins shall use the MainWindow interface for claiming and releasing shortcut key combinations.

Referenced by claimKeyCombo(), getTakenKeyCombos(), releaseKeyCombo(), and setShortcuts().

The current mesh, loaded from file.

Referenced by initializePlugin(), slotLoadMesh(), and slotLoadScene().

vector<Plugin*> rtVTK::MainWindow::pipeline [private]

The container which holds a pointer for each of the active plugins.

Referenced by slotSetActivePlugins(), slotShowPipeline(), and slotUnloadDLL().

map<const QKeySequence, const QObject*> rtVTK::MainWindow::pluginShortcutOwnership [mutable, private]

Keeps track of which shortcuts were created by which plugin. Their plugin "owner" reserves the right to delete them. Other plugins may not delete them. This design makes it acceptable to use mutable. Shortcuts owned by MainWindow (including user created Timers) are not stored in this container.

Unique Key: QKeySequence shortcut Non-key data: QObject* owner of the shortcut

Referenced by claimKeyCombo(), and releaseKeyCombo().

map<Plugin*, QWidget*> rtVTK::MainWindow::pluginToTab [private]

Maps Plugin IDs to tab widgets.

Referenced by initializePlugin(), slotEstablishTabsForActivePlugins(), and slotUnloadDLL().

pmgr is used to control loading, unloading, and aggregation of plugins

Referenced by MainWindow(), slotEstablishTabsForActivePlugins(), slotLoadDLL(), slotSetActivePlugins(), slotShowPipeline(), slotUnloadDLL(), and ~MainWindow().

An instance of rl::RayLogger to deal with rl immediate-mode

Referenced by getRL(), and slotResetRL().

float rtVTK::MainWindow::rspeed [private]

The current scene, loaded from file.

Referenced by slotLoadScene().

vector<QScrollArea*> rtVTK::MainWindow::scrollAreas [private]
vector<QWidget*> rtVTK::MainWindow::scrollAreasContents [private]
vector<QShortcut*> rtVTK::MainWindow::shortcuts [private]

Vector to aggregate keyboard shortcuts pointers (i.e. pressing 'f' to adjust the field of view) local to MainWindow. and another to keep a list of shortcut combos. This data structure is not used outside of the class, unlike keyCombos which is. This data structure is used to properly delete the dynamic shortcuts during destruction. Removal of this member would not be acceptable.

Referenced by setShortcuts(), and ~MainWindow().

float rtVTK::MainWindow::tspeed [private]

Got sick and tired of slotFullScreenMode() doing silly things. This prevents it from jumping to an old size of winRender when the user manually resizes winRender.

Referenced by eventFilter(), and slotToggleFullScreenMode().

The most recent documentation window, created on menu item selection.

Referenced by MainWindow(), slotShowMainDocs(), slotShowUsingDocs(), slotShowWritingDocs(), and ~MainWindow().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends