Frapper  1.0a
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Slots | Private Attributes | List of all members
Frapper::ViewportPanel Class Reference

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

#include <ViewportPanel.h>

Inheritance diagram for Frapper::ViewportPanel:
Inheritance graph
[legend]
Collaboration diagram for Frapper::ViewportPanel:
Collaboration graph
[legend]

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.
 
- Public Member Functions inherited from Frapper::ViewPanel
 ViewPanel (Type viewPanelType, QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the ViewPanel class.
 
Type getViewPanelType ()
 Returns the type of the view panel.
 
- Public Member Functions inherited from Frapper::Panel
 Panel (QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the Panel class.
 
virtual ~Panel ()
 Destructor of the Panel class.
 
QMap< QString, QString > getPanelParameters ()
 Gets the panel parameters. For load and save functionality.
 
virtual void registerControl (NodeModel *nodeModel, SceneModel *sceneModel)
 Connects the panel with the scene.
 

Protected Slots

void toggleFullscreen (bool enable)
 Toggles displaying the viewport widget in fullscreen mode.
 
void toggleStereo (bool enable)
 Toggles displaying the viewport widget in stereo 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 (float 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.
 

Additional Inherited Members

- Public Types inherited from Frapper::ViewPanel
enum  Type {
  T_Documentation, T_Viewport, T_NetworkEditor, T_HierarchyEditor,
  T_ParameterEditor, T_CurveEditor, T_Timeline, T_PluginPanel,
  T_PainterPanel, T_NumTypes
}
 Nested enumeration for the different types of view panels. More...
 
- Static Public Member Functions inherited from Frapper::Panel
static QString getTypeName (Type panelType)
 Returns the name of the given panel type.
 
static QString getTypeIconName (Type panelType)
 Returns the icon name for the given panel type.
 
- Protected Attributes inherited from Frapper::Panel
QMap< QString, QString > m_parameterMap
 Map with default values. For load and save functionality.
 

Detailed Description

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

Constructor & Destructor Documentation

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

Constructor of the ViewportPanel class.

Constructors and Destructors.

Parameters
parentThe parent widget the created instance will be a child of.
flagsExtra widget options.

Constructor of the ViewportPanel class.

Parameters
parentThe parent widget the created instance will be a child of.
flagsExtra widget options.
Frapper::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 Frapper::ViewportPanel::fillToolBars ( QToolBar *  mainToolBar,
QToolBar *  panelToolBar 
)
virtual

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

Public Functions.

Parameters
mainToolBarThe main tool bar to fill with actions.
panelToolBarThe panel tool bar to fill with actions.

Fills the given tool bars with actions for the viewport view.

Parameters
mainToolBarThe main tool bar to fill with actions.
panelToolBarThe panel tool bar to fill with actions.

Reimplemented from Frapper::Panel.

ViewportWidget * Frapper::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 Frapper::ViewportPanel::setPanelParameters ( const QMap< QString, QString > &  parameterMap)
virtual

Sets the panel parameters. For load and save functionality.

Reimplemented from Frapper::Panel.

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

Updates the camera drop down menu.

Public Slots.

void Frapper::ViewportPanel::fullscreenEnabled ( )
signal

Signal that is emitted when the fullscreen mode was activated.

void Frapper::ViewportPanel::newCameraRequested ( ViewingParameters viewingParameters)
signal

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

Parameters
viewingParametersThe viewing parameters to use for the new camera.
void Frapper::ViewportPanel::selectCameraRequested ( const QString &  cameraName,
bool  toggle 
)
signal

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

Parameters
cameraNameThe name of the camera to select.
toggleFlag that controls whether to toggle the selection of the camera with the given name.
void Frapper::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
cameraNameThe name of the camera to update with the viewing parameters.
viewingParametersThe viewing parameters to use for the camera with the given name.
void Frapper::ViewportPanel::deleteCameraRequested ( const QString &  cameraName)
signal

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

Parameters
cameraNameThe name of the camera to delete.
void Frapper::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
cameraNameThe name of the camera to use.
viewingParametersThe viewing parameters to modify.
void Frapper::ViewportPanel::requestCameraList ( )
signal

Requests to update the list of cameras in the scene.

void Frapper::ViewportPanel::triggerRebuild ( )
signal

Requests a redraw.

void Frapper::ViewportPanel::keyPressEvent ( QKeyEvent *  event)
protected

Handles key press events for the widget.

Protected Events.

Parameters
eventThe description of the key event.

Handles key press events for the widget.

Parameters
eventThe description of the key event.
void Frapper::ViewportPanel::keyReleaseEvent ( QKeyEvent *  event)
protected

Handles key release events for the widget.

Parameters
eventThe description of the key event.
void Frapper::ViewportPanel::toggleFullscreen ( bool  enable)
protectedslot

Toggles displaying the viewport widget in fullscreen mode.

Protected Slots.

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

Toggles displaying the viewport widget in fullscreen mode.

Parameters
enableFlag to enable or disable the fullscreen mode for the viewport widget.
void Frapper::ViewportPanel::toggleStereo ( bool  enable)
protectedslot

Toggles displaying the viewport widget in stereo mode.

Parameters
enableFlag to enable or disable the stereo mode for the viewport widget.
void Frapper::ViewportPanel::showStereoDialog ( )
protectedslot

Show stereo config dialog.

void Frapper::ViewportPanel::setStereoParameters ( )
protectedslot

Show stereo config dialog.

void Frapper::ViewportPanel::on_ui_addCameraAction_triggered ( bool  checked = false)
privateslot

Creates a new camera node with the current viewing parameters.

Private Slots.

Parameters
checkedThe action's checked state.

Requests the creation of a new camera node with the current viewing parameters.

Parameters
checkedThe action's checked state.
void Frapper::ViewportPanel::on_ui_linkViewAction_toggled ( bool  checked)
privateslot

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

Parameters
checkedThe action's checked state.
void Frapper::ViewportPanel::on_ui_selectCameraAction_triggered ( bool  checked = false)
privateslot

Requests the selection of an existing camera node.

Parameters
checkedThe action's checked state.
void Frapper::ViewportPanel::on_ui_removeCameraAction_triggered ( bool  checked = false)
privateslot

Requests the deletion of an existing camera node.

Parameters
checkedThe action's checked state.
void Frapper::ViewportPanel::on_ui_overlayOnlyAction_toggled ( bool  checked = false)
privateslot

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

Parameters
checkedThe action's checked state.
void Frapper::ViewportPanel::selectCamera ( const QString &  cameraName)
privateslot

Selects the camera to use for the viewport.

Parameters
cameraNameThe name of the camera to use.
void Frapper::ViewportPanel::updateCamera ( ViewingParameters viewingParameters)
privateslot

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

Parameters
viewingParametersThe viewing parameters currently set in the viewport.
viewingParametersThe viewing parameters currently set in the viewport
void Frapper::ViewportPanel::selectStage ( )
privateslot

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

Parameters
triggeredActionThe action that was triggered.
void Frapper::ViewportPanel::changeFog ( float  value)
privateslot

Sets new fog configuration.

void Frapper::ViewportPanel::changeFog ( int  value)
privateslot

Sets new fog configuration.

void Frapper::ViewportPanel::changeFogColor ( )
privateslot

Changes fog color.

void Frapper::ViewportPanel::changeBackgroundColor ( )
privateslot

Changes background color.

Member Data Documentation

ViewportWidget* Frapper::ViewportPanel::m_viewportWidget
private

The viewport widget to use for displaying the scene.

bool Frapper::ViewportPanel::m_fullscreen
private

Flag that states whether fullscreen mode is enabled.

QMap<QString, QDoubleSpinBox *> Frapper::ViewportPanel::m_stereoParameterSBMap
private

Stereo parameter spin box map.

QDoubleSpinBox* Frapper::ViewportPanel::m_fogSpinBox
private

Line edit value for fog density.

QCheckBox* Frapper::ViewportPanel::m_fogCheckBox
private

Checkbox which enables/disables for in the associated viewport.

QPushButton* Frapper::ViewportPanel::m_fogColorButton
private

Color button for choosing fog color.

QPushButton* Frapper::ViewportPanel::m_backgroundColorButton
private

Color button for choosing background color.

QActionGroup* Frapper::ViewportPanel::m_stageActionGroup
private

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

QComboBox* Frapper::ViewportPanel::m_cameraComboBox
private

Camera selection group box.

bool Frapper::ViewportPanel::m_cameraCreator
private

Flag that states whether the user has triggered the ui_addCameraAction.


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