ViewportPanel Class Reference

Class for a panel that contains a 3D viewport widget. More...

#include <ViewportPanel.h>

Inheritance diagram for ViewportPanel:

Inheritance graph
[legend]
Collaboration diagram for ViewportPanel:

Collaboration graph
[legend]

List of all members.

Public Slots

void updateCameras (const QList< Node * > &cameraNodes, const QString &cameraName)
 Updates the camera drop down menu.

Signals

void fullscreenEnabled ()
 Signal that is emitted when the fullscreen mode was activated.
void newCameraRequested (ViewingParameters *viewingParameters)
 Signal that is emitted when a new camera should be created initialized according to the given viewing parameters.
void selectCameraRequested (const QString &cameraName, bool toggle)
 Signal that is emitted when an existing camera should be selected.
void updateCameraRequested (const QString &cameraName, ViewingParameters *viewingParameters)
 Signal that is emitted when the viewport's viewing parameters have changed, a custom camera is selected and the link view to camera option is enabled.
void deleteCameraRequested (const QString &cameraName)
 Signal that is emitted when an existing camera should be deleted.
void applyCameraRequested (const QString &cameraName, ViewingParameters *viewingParameters)
 Signal that is emitted when an existing camera's viewing parameters should be applied to the viewport's viewing parameters.
void requestCameraList ()
 Requests to update the list of cameras in the scene.
void triggerRebuild ()
 Requests a redraw.

Public Member Functions

 ViewportPanel (QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the ViewportPanel class.
virtual ~ViewportPanel ()
 Destructor of the ViewportPanel class.
virtual void fillToolBars (QToolBar *mainToolBar, QToolBar *panelToolBar)
 Fills the given tool bars in a panel frame with actions for the panel.
ViewportWidgetgetViewportWidget () const
 Returns the viewport widget that is used for displaying the scene.
void setPanelParameters (const QMap< QString, QString > &parameterMap)
 Sets the panel parameters. For load and save functionality.

Protected Slots

void toggleFullscreen (bool enable)
 Toggles displaying the viewport widget in fullscreen mode.
void showStereoDialog ()
 Show stereo config dialog.
void setStereoParameters ()
 Show stereo config dialog.

Protected Member Functions

void keyPressEvent (QKeyEvent *event)
 Handles key press events for the widget.
void keyReleaseEvent (QKeyEvent *event)
 Handles key release events for the widget.

Private Slots

void on_ui_addCameraAction_triggered (bool checked=false)
 Creates a new camera node with the current viewing parameters.
void on_ui_linkViewAction_toggled (bool checked)
 Requests an update of the currently selected camera if the action is currently checked.
void on_ui_selectCameraAction_triggered (bool checked=false)
 Requests the selection of an existing camera node.
void on_ui_removeCameraAction_triggered (bool checked=false)
 Requests the deletion of an existing camera node.
void on_ui_overlayOnlyAction_toggled (bool checked=false)
 Sets whether only overlays (no geometry) should be displayed in viewport.
void selectCamera (const QString &cameraName)
 Selects the camera to use for the viewport.
void updateCamera (ViewingParameters *viewingParameters)
 Requests an update of the currently selected camera if the ui_linkViewAction is currently checked.
void selectStage ()
 Selects the stage to display in the viewport corresponding to the triggered stage action.
void changeFog (double value)
 Sets new fog configuration.
void changeFog (int value)
 Sets new fog configuration.
void changeFogColor ()
 Changes fog color.
void changeBackgroundColor ()
 Changes background color.

Private Attributes

ViewportWidgetm_viewportWidget
 The viewport widget to use for displaying the scene.
bool m_fullscreen
 Flag that states whether fullscreen mode is enabled.
QMap< QString, QDoubleSpinBox * > m_stereoParameterSBMap
 Stereo parameter spin box map.
QDoubleSpinBox * m_fogSpinBox
 Line edit value for fog density.
QCheckBox * m_fogCheckBox
 Checkbox which enables/disables for in the associated viewport.
QPushButton * m_fogColorButton
 Color button for choosing fog color.
QPushButton * m_backgroundColorButton
 Color button for choosing background color.
QActionGroup * m_stageActionGroup
 The group that all the stage actions will be added to.
QComboBox * m_cameraComboBox
 Camera selection group box.
bool m_cameraCreator
 Flag that states whether the user has triggered the ui_addCameraAction.


Detailed Description

Class for a panel that contains a 3D viewport widget.

Constructor & Destructor Documentation

ViewportPanel::ViewportPanel ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Constructor of the ViewportPanel class.

Constructors and Destructors.

Parameters:
parent The parent widget the created instance will be a child of.
flags Extra widget options.
Constructor of the ViewportPanel class.

Parameters:
parent The parent widget the created instance will be a child of.
flags Extra widget options.

ViewportPanel::~ViewportPanel (  )  [virtual]

Destructor of the ViewportPanel class.

Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.


Member Function Documentation

void ViewportPanel::fillToolBars ( QToolBar *  mainToolBar,
QToolBar *  panelToolBar 
) [virtual]

Fills the given tool bars in a panel frame with actions for the panel.

Public Functions.

Parameters:
mainToolBar The main tool bar to fill with actions.
panelToolBar The panel tool bar to fill with actions.
Fills the given tool bars with actions for the viewport view.

Parameters:
mainToolBar The main tool bar to fill with actions.
panelToolBar The panel tool bar to fill with actions.

Reimplemented from Panel.

ViewportWidget * ViewportPanel::getViewportWidget (  )  const

Returns the viewport widget that is used for displaying the scene.

Returns:
the viewport widget that is used for displaying the scene.

void ViewportPanel::setPanelParameters ( const QMap< QString, QString > &  parameterMap  )  [virtual]

Sets the panel parameters. For load and save functionality.

Reimplemented from Panel.

void ViewportPanel::updateCameras ( const QList< Node * > &  cameraNodes,
const QString &  cameraName 
) [slot]

Updates the camera drop down menu.

Public Slots.

void ViewportPanel::fullscreenEnabled (  )  [signal]

Signal that is emitted when the fullscreen mode was activated.

void ViewportPanel::newCameraRequested ( ViewingParameters viewingParameters  )  [signal]

Signal that is emitted when a new camera should be created initialized according to the given viewing parameters.

Parameters:
viewingParameters The viewing parameters to use for the new camera.

void ViewportPanel::selectCameraRequested ( const QString &  cameraName,
bool  toggle 
) [signal]

Signal that is emitted when an existing camera should be selected.

Parameters:
cameraName The name of the camera to select.
toggle Flag that controls whether to toggle the selection of the camera with the given name.

void ViewportPanel::updateCameraRequested ( const QString &  cameraName,
ViewingParameters viewingParameters 
) [signal]

Signal that is emitted when the viewport's viewing parameters have changed, a custom camera is selected and the link view to camera option is enabled.

Parameters:
cameraName The name of the camera to update with the viewing parameters.
viewingParameters The viewing parameters to use for the camera with the given name.

void ViewportPanel::deleteCameraRequested ( const QString &  cameraName  )  [signal]

Signal that is emitted when an existing camera should be deleted.

Parameters:
cameraName The name of the camera to delete.

void ViewportPanel::applyCameraRequested ( const QString &  cameraName,
ViewingParameters viewingParameters 
) [signal]

Signal that is emitted when an existing camera's viewing parameters should be applied to the viewport's viewing parameters.

Parameters:
cameraName The name of the camera to use.
viewingParameters The viewing parameters to modify.

void ViewportPanel::requestCameraList (  )  [signal]

Requests to update the list of cameras in the scene.

void ViewportPanel::triggerRebuild (  )  [signal]

Requests a redraw.

void ViewportPanel::keyPressEvent ( QKeyEvent *  event  )  [protected]

Handles key press events for the widget.

Protected Events.

Parameters:
event The description of the key event.
Handles key press events for the widget.

Parameters:
event The description of the key event.

void ViewportPanel::keyReleaseEvent ( QKeyEvent *  event  )  [protected]

Handles key release events for the widget.

Parameters:
event The description of the key event.

void ViewportPanel::toggleFullscreen ( bool  enable  )  [protected, slot]

Toggles displaying the viewport widget in fullscreen mode.

Protected Slots.

Parameters:
enable Flag to enable or disable the fullscreen mode for the viewport widget.
Toggles displaying the viewport widget in fullscreen mode.

Parameters:
enable Flag to enable or disable the fullscreen mode for the viewport widget.

void ViewportPanel::showStereoDialog (  )  [protected, slot]

Show stereo config dialog.

void ViewportPanel::setStereoParameters (  )  [protected, slot]

Show stereo config dialog.

void ViewportPanel::on_ui_addCameraAction_triggered ( bool  checked = false  )  [private, slot]

Creates a new camera node with the current viewing parameters.

Private Slots.

Parameters:
checked The action's checked state.
Requests the creation of a new camera node with the current viewing parameters.

Parameters:
checked The action's checked state.

void ViewportPanel::on_ui_linkViewAction_toggled ( bool  checked  )  [private, slot]

Requests an update of the currently selected camera if the action is currently checked.

Parameters:
checked The action's checked state.

void ViewportPanel::on_ui_selectCameraAction_triggered ( bool  checked = false  )  [private, slot]

Requests the selection of an existing camera node.

Parameters:
checked The action's checked state.

void ViewportPanel::on_ui_removeCameraAction_triggered ( bool  checked = false  )  [private, slot]

Requests the deletion of an existing camera node.

Parameters:
checked The action's checked state.

void ViewportPanel::on_ui_overlayOnlyAction_toggled ( bool  checked = false  )  [private, slot]

Sets whether only overlays (no geometry) should be displayed in viewport.

Parameters:
checked The action's checked state.

void ViewportPanel::selectCamera ( const QString &  cameraName  )  [private, slot]

Selects the camera to use for the viewport.

Parameters:
cameraName The name of the camera to use.

void ViewportPanel::updateCamera ( ViewingParameters viewingParameters  )  [private, slot]

Requests an update of the currently selected camera if the ui_linkViewAction is currently checked.

Parameters:
viewingParameters The viewing parameters currently set in the viewport.
viewingParameters The viewing parameters currently set in the viewport

void ViewportPanel::selectStage (  )  [private, slot]

Selects the stage to display in the viewport corresponding to the triggered stage action.

Parameters:
triggeredAction The action that was triggered.

void ViewportPanel::changeFog ( double  value  )  [private, slot]

Sets new fog configuration.

void ViewportPanel::changeFog ( int  value  )  [private, slot]

Sets new fog configuration.

void ViewportPanel::changeFogColor (  )  [private, slot]

Changes fog color.

void ViewportPanel::changeBackgroundColor (  )  [private, slot]

Changes background color.


Member Data Documentation

The viewport widget to use for displaying the scene.

Flag that states whether fullscreen mode is enabled.

QMap<QString, QDoubleSpinBox *> ViewportPanel::m_stereoParameterSBMap [private]

Stereo parameter spin box map.

QDoubleSpinBox* ViewportPanel::m_fogSpinBox [private]

Line edit value for fog density.

QCheckBox* ViewportPanel::m_fogCheckBox [private]

Checkbox which enables/disables for in the associated viewport.

QPushButton* ViewportPanel::m_fogColorButton [private]

Color button for choosing fog color.

Color button for choosing background color.

QActionGroup* ViewportPanel::m_stageActionGroup [private]

The group that all the stage actions will be added to.

QComboBox* ViewportPanel::m_cameraComboBox [private]

Camera selection group box.

Flag that states whether the user has triggered the ui_addCameraAction.


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

Generated on Wed Feb 24 15:01:03 2010 for Frapper by  doxygen 1.5.9