SoQtFullViewer Class Reference
[Qt]

VSG extension Base viewer class which adds a decoration around the rendering area. More...

#include <Inventor/Qt/viewers/SoQtFullViewer.h>

Inheritance diagram for SoQtFullViewer:
SoQtViewer SoQtRenderArea SoStereoViewer SoQtGLWidget SoQtComponent SoQtConstrainedViewer SoQtExaminerViewer SoQtPlaneViewer SoQtFlyViewer SoQtWalkViewer

List of all members.

Public Types

enum  BuildFlag {
  BUILD_NONE = 0x00,
  BUILD_DECORATION = 0x01,
  BUILD_POPUP = 0x02,
  BUILD_ALL = 0xff
}

Public Member Functions

virtual void setDecoration (SbBool onOrOff)
SbBool isDecoration ()
void setPopupMenuEnabled (SbBool trueOrFalse)
SbBool isPopupMenuEnabled ()
void setClientPopupMenu (QMenu *menu)
SbBool isClientPopupMenuInstalled ()
QWidget * getAppPushButtonParent () const
void addAppPushButton (SoQtButton *newButton)
void insertAppPushButton (SoQtButton *newButton, int index)
void removeAppPushButton (SoQtButton *oldButton)
int findAppPushButton (SoQtButton *oldButton)
int lengthAppPushButton ()
QWidget * getRenderAreaWidget ()
virtual void setViewing (SbBool onOrOff)
virtual void setCamera (SoCamera *cam)
virtual void hide ()
virtual void setHeadlight (SbBool onOrOff)
virtual void setDrawStyle (SoQtViewer::DrawType type, SoQtViewer::DrawStyle style)
virtual void setBufferingType (SoQtViewer::BufferType type)
virtual SoStereoDialoggetStereoDialog ()
void setStereoDialog (SoStereoDialog *newDialog)

Public Attributes

QPointer< QMenu > mainPopup
QPointer< QMenu > funcPopup
QPointer< QMenu > drawPopup
QPointer< QMenu > prefPopup
QAction * curPopupDrawItem
QAction * curPopupMoveItem
QAction * curPopupBufferItem
QPointer< QMenu > ClientPopup

Detailed Description

VSG extension Base viewer class which adds a decoration around the rendering area.

This is a base class used by all viewer components. The class adds a decoration around the rendering area which includes thumb wheels, a zoom slider and push buttons. This base class also includes a viewer popup menu and a preference sheet with generic viewing functions. The constructors for the various subclasses of SoQtFullViewer provide a flag for specifying whether the decoration and popup menus should be built.

SEE ALSO

SoQtViewer, SoQtComponent, SoQtRenderArea, SoQtExaminerViewer, SoQtWalkViewer, SoQtFlyViewer, SoQtPlaneViewer


Member Enumeration Documentation

Build flags.

This specifies what should be build by default in the constructor

Enumerator:
BUILD_NONE 

Doesn't build anything extra.

BUILD_DECORATION 

Build the decoration only.

BUILD_POPUP 

Build the popup menu only.

BUILD_ALL 

Build everything by default.


Member Function Documentation

void SoQtFullViewer::addAppPushButton ( SoQtButton *  newButton  ) 

Adds application push button, which will be placed in the left hand side decoration trim.

Buttons are appended to the end of the list.

Note: The button bitmaps should be 28-by-28 pixels to fit nicely into the decoration trim like the other viewer buttons.

int SoQtFullViewer::findAppPushButton ( SoQtButton *  oldButton  )  [inline]

Returns index of specified push button.

QWidget* SoQtFullViewer::getAppPushButtonParent (  )  const [inline]

Returns application push button parent.

QWidget* SoQtFullViewer::getRenderAreaWidget (  )  [inline]

Returns the render area window handle.

virtual SoStereoDialog* SoQtFullViewer::getStereoDialog (  )  [inline, virtual]

Returns the current stereo dialog.

virtual void SoQtFullViewer::hide (  )  [virtual]

This hides the component.

Reimplemented from SoQtGLWidget.

void SoQtFullViewer::insertAppPushButton ( SoQtButton *  newButton,
int  index 
)

Adds application push button, which will be placed in the left hand side decoration trim.

Buttons are inserted at the desired index.

Note: The button bitmaps should be 24-by-24 pixels to fit nicely into the decoration trim like the other viewer buttons.

SbBool SoQtFullViewer::isClientPopupMenuInstalled (  )  [inline]

Returns TRUE if an application-specific popup menu is installed.

SbBool SoQtFullViewer::isDecoration (  )  [inline]

Returns whether the viewer component trim is on or off.

SbBool SoQtFullViewer::isPopupMenuEnabled (  )  [inline]

Returns whether the viewer popup menu is enabled or disabled.

int SoQtFullViewer::lengthAppPushButton (  )  [inline]

Returns number of application push buttons.

void SoQtFullViewer::removeAppPushButton ( SoQtButton *  oldButton  ) 

Removes specified application push button.

virtual void SoQtFullViewer::setBufferingType ( SoQtViewer::BufferType  type  )  [virtual]

Sets the current buffering type in the main view (default SoQtViewer::BUFFER_DOUBLE).

Reimplemented from SoQtViewer.

virtual void SoQtFullViewer::setCamera ( SoCamera cam  )  [virtual]

Sets the edited camera.

Setting the camera is only needed if the first camera found in the scene when setting the scene graph isn't the one the user really wants to edit.

Reimplemented from SoQtViewer.

Reimplemented in SoQtConstrainedViewer, SoQtExaminerViewer, SoQtFlyViewer, SoQtPlaneViewer, and SoQtWalkViewer.

void SoQtFullViewer::setClientPopupMenu ( QMenu *  menu  ) 

Enables application-specific popup menu.

virtual void SoQtFullViewer::setDecoration ( SbBool  onOrOff  )  [virtual]

Shows/hides the viewer component trim (default on).

See the viewer constructor to prevent the decoration from being built.

The default value can be set using the environment variable OIV_VIEWER_DECORATION (0 = OFF, 1 = ON).

virtual void SoQtFullViewer::setDrawStyle ( SoQtViewer::DrawType  type,
SoQtViewer::DrawStyle  style 
) [virtual]

Sets the current drawing style in the main view.

The user can specify the INTERACTIVE draw style (draw style used when the scene changes) independently from the STILL style. Default is VIEW_AS_IS draw style for STILL and VIEW_SAME_AS_STILL for INTERACTIVE.

The default value can be set using the environment variables OIV_STILL_DRAW_STYLE and OIV_INTERACTIVE_DRAW_STYLE. Valid values are VIEW_AS_IS, VIEW_HIDDEN_LINE, VIEW_NO_TEXTURE, VIEW_LOW_COMPLEXITY, VIEW_LINE, VIEW_POINT, VIEW_BBOX, VIEW_LOW_RES_LINE, VIEW_LOW_RES_POINT for OIV_STILL_DRAW_STYLE and the same plus VIEW_SAME_AS_STILL for OIV_INTERACTIVE_DRAW_STYLE.

Possible draw styles are: VIEW_AS_IS - Leaves the objects unchanged.

VIEW_HIDDEN_LINE - Renders the object as wireframe, but only shows the object front faces. This is accomplished using a two-pass rendering. In the first pass, the objects are rendered as FILLED using the background BASE_COLOR (this sets up the wanted z-buffer values). The second pass then renders the objects as LINES, while adjusting the z-buffer range to limit overlapping polygons problems.

VIEW_NO_TEXTURE - Renders the objects without any textures. This is done by setting the override flag on an empty SoTexture2 node.

VIEW_LOW_COMPLEXITY - Renders the objects without any textures and with a low complexity. This is done by setting the override flag on an empty SoTexture2 node, and by setting a low complexity value on an SoComplexity node with override set to TRUE.

VIEW_LINE - Renders the objects as LINES (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_LINE - Renders the objects as LINES (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_POINT - Renders the objects as POINTS (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_POINT - Renders the objects as POINTS (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_BBOX - Renders the objects with complexity BOUNDING_BOX, lighting model set to BASE_COLOR and drawing style LINES (no texture) with no depth comparison.

VIEW_SAME_AS_STILL - This only applies to INTERACTIVE draw type. It enables the interactive draw style mode to match the regular draw style mode without having to set it explicitly.

Reimplemented from SoQtViewer.

virtual void SoQtFullViewer::setHeadlight ( SbBool  onOrOff  )  [virtual]

Turns the headlight on/off (default on).



The default value can be set using the environment variable OIV_USE_HEADLIGHT (0 = FALSE, 1 = TRUE).

Reimplemented from SoQtViewer.

void SoQtFullViewer::setPopupMenuEnabled ( SbBool  trueOrFalse  ) 

Enables/disables the viewer popup menu (default enabled).

See the viewer constructor to prevent the popup menu from being built.

The default value can be set using the environment variable OIV_VIEWER_POPUP_MENU (0 = OFF, 1 = ON).

Description or equivalent function for each submenu of this popup menu:

void SoQtFullViewer::setStereoDialog ( SoStereoDialog newDialog  ) 

Sets the stereo dialog the viewer should use.

virtual void SoQtFullViewer::setViewing ( SbBool  onOrOff  )  [virtual]

Sets whether the viewer is turned on or off.

When turned on, events are consumed by the viewer. When viewing is off, events are processed by the viewer's render area. This means events will be sent down to the scene graph for processing (i.e. picking can occur). Note that if the application has registered an event callback, it will be invoked on every message, whether viewing is turned on or not. However, the return value of this callback (which specifies whether the callback handled the event or not) is ignored when viewing is on. That is, the viewer will process the event even if the callback already did. This is to ensure that the viewing paradigm is not broken (default viewing is on).

Reimplemented from SoQtViewer.

Reimplemented in SoQtExaminerViewer, SoQtFlyViewer, SoQtPlaneViewer, and SoQtWalkViewer.


Member Data Documentation

QPointer<QMenu> SoQtFullViewer::ClientPopup

Popup menu provided by a client (i.e.

application program) of the viewer.

In this version we track the currently "check marked" menu item in the Draw Style submenu (only one checked at a time).

Tracks the checkmark for "Still" draw style.

QPointer<QMenu> SoQtFullViewer::drawPopup

Pointer to the Draw Style submenu.

QPointer<QMenu> SoQtFullViewer::funcPopup

Pointer to the Functions submenu.

QPointer<QMenu> SoQtFullViewer::mainPopup

Pointer to the root of the popup menu.

QPointer<QMenu> SoQtFullViewer::prefPopup

Pointer to the Preferences submenu.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/