Coin Logo http://www.sim.no
http://www.coin3d.org

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SoQtFullViewer Class Reference

The SoQtFullViewer class adds some user interface components to the viewer canvas.The SoQtFullViewer is an abstract viewer class which extends it's superclass (the basic SoQtViewer class) with two major user interface additions: More...

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

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

Public Types

enum  BuildFlag { BUILD_NONE = 0x00, BUILD_DECORATION = 0x01, BUILD_POPUP = 0x02, BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) }
 
- Public Types inherited from SoQtViewer
enum  Type { BROWSER, EDITOR }
 
enum  DrawStyle {
  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, VIEW_SAME_AS_STILL, VIEW_WIREFRAME_OVERLAY
}
 
enum  DrawType { STILL = 0, INTERACTIVE }
 
enum  BufferType { BUFFER_SINGLE, BUFFER_DOUBLE, BUFFER_INTERACTIVE }
 
enum  AutoClippingStrategy { VARIABLE_NEAR_PLANE, CONSTANT_NEAR_PLANE }
 
enum  StereoType {
  STEREO_NONE, STEREO_ANAGLYPH, STEREO_QUADBUFFER, STEREO_INTERLEAVED_ROWS,
  STEREO_INTERLEAVED_COLUMNS
}
 

Public Member Functions

void setDecoration (const SbBool on)
 
SbBool isDecoration (void) const
 
void setPopupMenuEnabled (const SbBool on)
 
SbBool isPopupMenuEnabled (void) const
 
QWidget * getAppPushButtonParent (void) const
 
void addAppPushButton (QWidget *newButton)
 
void insertAppPushButton (QWidget *newButton, int index)
 
void removeAppPushButton (QWidget *oldButton)
 
int findAppPushButton (QWidget *oldButton) const
 
int lengthAppPushButton (void) const
 
QWidget * getRenderAreaWidget (void) const
 
virtual void setViewing (SbBool on)
 
virtual void setComponentCursor (const SoQtCursor &cursor)
 
- Public Member Functions inherited from SoQtViewer
virtual void setCamera (SoCamera *camera)
 
SoCamera * getCamera (void) const
 
virtual void setCameraType (SoType type)
 
SoType getCameraType (void) const
 
virtual void toggleCameraType (void)
 
virtual void viewAll (void)
 
virtual void saveHomePosition (void)
 
virtual void resetToHomePosition (void)
 
virtual void setHeadlight (SbBool enable)
 
SbBool isHeadlight (void) const
 
SoDirectionalLight * getHeadlight (void) const
 
virtual void setDrawStyle (SoQtViewer::DrawType type, SoQtViewer::DrawStyle style)
 
SoQtViewer::DrawStyle getDrawStyle (const SoQtViewer::DrawType type) const
 
virtual void setBufferingType (SoQtViewer::BufferType type)
 
SoQtViewer::BufferType getBufferingType (void) const
 
SbBool isViewing (void) const
 
virtual void setCursorEnabled (SbBool enable)
 
SbBool isCursorEnabled (void) const
 
void setAutoClipping (SbBool enable)
 
SbBool isAutoClipping (void) const
 
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
 
virtual void setStereoViewing (SbBool enable)
 
SbBool isStereoViewing (void) const
 
virtual void setStereoOffset (const float dist)
 
float getStereoOffset (void) const
 
SbBool setStereoType (SoQtViewer::StereoType s)
 
SoQtViewer::StereoType getStereoType (void) const
 
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
 
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
 
void setDetailSeek (const SbBool enable)
 
SbBool isDetailSeek (void) const
 
void setSeekTime (const float seconds)
 
float getSeekTime (void) const
 
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
 
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
 
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
 
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
 
void setWireframeOverlayColor (const SbColor &color)
 
const SbColor & getWireframeOverlayColor (void) const
 
virtual void setDoubleBuffer (const SbBool enable)
 
virtual void setSceneGraph (SoNode *root)
 
virtual SoNode * getSceneGraph (void)
 
- Public Member Functions inherited from SoQtRenderArea
 SoQtRenderArea (QWidget *parent=NULL, const char *name=NULL, SbBool embed=TRUE, SbBool mouseInput=TRUE, SbBool keyboardInput=TRUE)
 
 ~SoQtRenderArea ()
 
void setOverlaySceneGraph (SoNode *scene)
 
SoNode * getOverlaySceneGraph (void)
 
void setBackgroundColor (const SbColor &color)
 
const SbColor & getBackgroundColor (void) const
 
void setBackgroundIndex (int idx)
 
int getBackgroundIndex (void) const
 
void setOverlayBackgroundIndex (int idx)
 
int getOverlayBackgroundIndex (void) const
 
void setColorMap (int start, int num, const SbColor *colors)
 
void setOverlayColorMap (int start, int num, const SbColor *colors)
 
void setViewportRegion (const SbViewportRegion &newRegion)
 
const SbViewportRegion & getViewportRegion (void) const
 
void setTransparencyType (SoGLRenderAction::TransparencyType type)
 
SoGLRenderAction::TransparencyType getTransparencyType (void) const
 
void setAntialiasing (SbBool smoothing, int numPasses)
 
void getAntialiasing (SbBool &smoothing, int &numPasses) const
 
void setClearBeforeRender (SbBool enable, SbBool zbEnable=TRUE)
 
SbBool isClearBeforeRender (void) const
 
SbBool isClearZBufferBeforeRender (void) const
 
void setClearBeforeOverlayRender (SbBool enable)
 
SbBool isClearBeforeOverlayRender (void) const
 
void setAutoRedraw (SbBool enable)
 
SbBool isAutoRedraw (void) const
 
void setRedrawPriority (uint32_t priority)
 
uint32_t getRedrawPriority (void) const
 
void render (void)
 
void renderOverlay (void)
 
void scheduleRedraw (void)
 
void scheduleOverlayRedraw (void)
 
void redrawOnSelectionChange (SoSelection *selection)
 
void redrawOverlayOnSelectionChange (SoSelection *selection)
 
void setEventCallback (SoQtRenderAreaEventCB *func, void *user=NULL)
 
void setSceneManager (SoSceneManager *manager)
 
SoSceneManager * getSceneManager (void) const
 
void setOverlaySceneManager (SoSceneManager *manager)
 
SoSceneManager * getOverlaySceneManager (void) const
 
void setGLRenderAction (SoGLRenderAction *action)
 
SoGLRenderAction * getGLRenderAction (void) const
 
void setOverlayGLRenderAction (SoGLRenderAction *action)
 
SoGLRenderAction * getOverlayGLRenderAction (void) const
 
SbBool sendSoEvent (const SoEvent *event)
 
void registerDevice (SoQtDevice *device)
 
void unregisterDevice (SoQtDevice *device)
 
- Public Member Functions inherited from SoQtGLWidget
void setBorder (const SbBool enable)
 
SbBool isBorder (void) const
 
SbBool isDoubleBuffer (void) const
 
void setDrawToFrontBufferEnable (const SbBool enable)
 
SbBool isDrawToFrontBufferEnable (void) const
 
void setQuadBufferStereo (const SbBool enable)
 
SbBool isQuadBufferStereo (void) const
 
void setAccumulationBuffer (const SbBool enable)
 
SbBool getAccumulationBuffer (void) const
 
void setStencilBuffer (const SbBool enable)
 
SbBool getStencilBuffer (void) const
 
void setAlphaChannel (const SbBool enable)
 
SbBool getAlphaChannel (void) const
 
void setOverlayRender (const SbBool onoff)
 
SbBool isOverlayRender (void) const
 
void setSampleBuffers (const int numsamples)
 
int getSampleBuffers (void) const
 
void setStealFocus (SbBool enable)
 
SbBool isStealFocus (void) const
 
QWidget * getGLWidget (void) const
 
QWidget * getNormalWidget (void) const
 
QWidget * getOverlayWidget (void) const
 
SbBool hasOverlayGLArea (void) const
 
SbBool hasNormalGLArea (void) const
 
unsigned long getOverlayTransparentPixel (void)
 
void getPointSizeLimits (SbVec2f &range, float &granularity)
 
void getLineWidthLimits (SbVec2f &range, float &granularity)
 
- Public Member Functions inherited from SoQtComponent
virtual ~SoQtComponent ()
 
virtual void show (void)
 
virtual void hide (void)
 
SbBool isFullScreen (void) const
 
SbBool setFullScreen (const SbBool onoff)
 
SbBool isVisible (void)
 
SbBool isTopLevelShell (void) const
 
QWidget * getWidget (void) const
 
QWidget * getBaseWidget (void) const
 
QWidget * getShellWidget (void) const
 
QWidget * getParentWidget (void) const
 
void setSize (const SbVec2s size)
 
SbVec2s getSize (void) const
 
void setTitle (const char *const title)
 
const char * getTitle (void) const
 
void setIconTitle (const char *const title)
 
const char * getIconTitle (void) const
 
const char * getWidgetName (void) const
 
const char * getClassName (void) const
 
void setWindowCloseCallback (SoQtComponentCB *const func, void *const user=NULL)
 
- Public Member Functions inherited from SoQtObject
virtual SoType getTypeId (void) const =0
 
SbBool isOfType (SoType type) const
 

Protected Member Functions

 SoQtFullViewer (QWidget *parent, const char *name, SbBool embed, BuildFlag flag, Type type, SbBool build)
 
 ~SoQtFullViewer ()
 
virtual void sizeChanged (const SbVec2s &size)
 
QWidget * buildWidget (QWidget *parent)
 
virtual void buildDecoration (QWidget *parent)
 
virtual QWidget * buildLeftTrim (QWidget *parent)
 
virtual QWidget * buildBottomTrim (QWidget *parent)
 
virtual QWidget * buildRightTrim (QWidget *parent)
 
QWidget * buildAppButtons (QWidget *parent)
 
QWidget * buildViewerButtons (QWidget *parent)
 
virtual void createViewerButtons (QWidget *parent, SbPList *buttonlist)
 
virtual void buildPopupMenu (void)
 
virtual void setPopupMenuString (const char *title)
 
virtual void openPopupMenu (const SbVec2s position)
 
virtual void leftWheelStart (void)
 
virtual void leftWheelMotion (float)
 
virtual void leftWheelFinish (void)
 
float getLeftWheelValue (void) const
 
void setLeftWheelValue (const float value)
 
virtual void bottomWheelStart (void)
 
virtual void bottomWheelMotion (float)
 
virtual void bottomWheelFinish (void)
 
float getBottomWheelValue (void) const
 
void setBottomWheelValue (const float value)
 
virtual void rightWheelStart (void)
 
virtual void rightWheelMotion (float)
 
virtual void rightWheelFinish (void)
 
float getRightWheelValue (void) const
 
void setRightWheelValue (const float value)
 
void setLeftWheelString (const char *const name)
 
QWidget * getLeftWheelLabelWidget (void) const
 
void setBottomWheelString (const char *const name)
 
QWidget * getBottomWheelLabelWidget (void) const
 
void setRightWheelString (const char *const name)
 
const char * getRightWheelString () const
 
QWidget * getRightWheelLabelWidget (void) const
 
virtual SbBool processSoEvent (const SoEvent *const event)
 
- Protected Member Functions inherited from SoQtViewer
 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 
 ~SoQtViewer ()
 
virtual void setSeekMode (SbBool enable)
 
SbBool isSeekMode (void) const
 
SbBool seekToPoint (const SbVec2s screenpos)
 
void seekToPoint (const SbVec3f &scenepos)
 
virtual void computeSeekFinalOrientation (void)
 
virtual void actualRedraw (void)
 
void interactiveCountInc (void)
 
void interactiveCountDec (void)
 
int getInteractiveCount (void) const
 
void setSeekDistance (const float distance)
 
float getSeekDistance (void) const
 
void setSeekValueAsPercentage (const SbBool on)
 
SbBool isSeekValuePercentage (void) const
 
virtual void changeCameraValues (SoCamera *camera)
 
void addSuperimposition (SoNode *scene)
 
void removeSuperimposition (SoNode *scene)
 
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
 
SbBool getSuperimpositionEnabled (SoNode *scene) const
 
- Protected Member Functions inherited from SoQtRenderArea
 SoQtRenderArea (QWidget *parent, const char *name, SbBool embed, SbBool mouseInput, SbBool keyboardInput, SbBool build)
 
virtual void redraw (void)
 
virtual void redrawOverlay (void)
 
virtual void actualOverlayRedraw (void)
 
virtual void processEvent (QEvent *event)
 
virtual void initGraphic (void)
 
virtual void initOverlayGraphic (void)
 
virtual void widgetChanged (QWidget *widget)
 
virtual void afterRealizeHook (void)
 
QWidget * buildWidget (QWidget *parent)
 
virtual const char * getDefaultWidgetName (void) const
 
virtual const char * getDefaultTitle (void) const
 
virtual const char * getDefaultIconTitle (void) const
 
virtual SbBool glScheduleRedraw (void)
 
- Protected Member Functions inherited from SoQtGLWidget
 SoQtGLWidget (QWidget *const parent=NULL, const char *const name=NULL, const SbBool embed=TRUE, const int glmodes=SO_GL_RGB, const SbBool build=TRUE)
 
 ~SoQtGLWidget ()
 
QWidget * buildWidget (QWidget *parent)
 
void setGLSize (const SbVec2s size)
 
SbVec2s getGLSize (void) const
 
float getGLAspectRatio (void) const
 
void setGlxSize (const SbVec2s size)
 
SbVec2s getGlxSize (void) const
 
float getGlxAspectRatio (void) const
 
void setStereoBuffer (SbBool flag)
 
SbBool isStereoBuffer (void) const
 
SbBool isRGBMode (void)
 
void glLockNormal (void)
 
void glUnlockNormal (void)
 
void glLockOverlay (void)
 
void glUnlockOverlay (void)
 
void glSwapBuffers (void)
 
void glFlushBuffer (void)
 
- Protected Member Functions inherited from SoQtComponent
 SoQtComponent (QWidget *const parent=NULL, const char *const name=NULL, const SbBool embed=TRUE)
 
void setClassName (const char *const name)
 
void setBaseWidget (QWidget *widget)
 
void registerWidget (QWidget *widget)
 
void unregisterWidget (QWidget *widget)
 
void addVisibilityChangeCallback (SoQtComponentVisibilityCB *const func, void *const user=NULL)
 
void removeVisibilityChangeCallback (SoQtComponentVisibilityCB *const func, void *const user=NULL)
 

Protected Attributes

QWidget * leftWheel
 
QWidget * rightWheel
 
QWidget * bottomWheel
 
QWidget * leftDecoration
 
QWidget * rightDecoration
 
QWidget * bottomDecoration
 
QWidget * leftWheelLabel
 
char * leftWheelStr
 
float leftWheelVal
 
QWidget * rightWheelLabel
 
char * rightWheelStr
 
float rightWheelVal
 
QWidget * bottomWheelLabel
 
char * bottomWheelStr
 
float bottomWheelVal
 
SoQtPopupMenu * prefmenu
 
- Protected Attributes inherited from SoQtGLWidget
SbBool waitForExpose
 
SbBool drawToFrontBuffer
 

Friends

class SoGuiFullViewerP
 
class SoQtFullViewerP
 

Additional Inherited Members

- Static Public Member Functions inherited from SoQtRenderArea
static uint32_t getDefaultRedrawPriority (void)
 
- Static Public Member Functions inherited from SoQtComponent
static void setWidgetCursor (QWidget *w, const SoQtCursor &cursor)
 
static SoQtComponentgetComponent (QWidget *widget)
 
static void initClasses (void)
 
- Static Public Member Functions inherited from SoQtObject
static void initClass (void)
 
static SoType getClassTypeId (void)
 
static void init (void)
 

Detailed Description

The SoQtFullViewer class adds some user interface components to the viewer canvas.

The SoQtFullViewer is an abstract viewer class which extends it's superclass (the basic SoQtViewer class) with two major user interface additions:

The user interface features listed above are the common parts of the user interfaces of the SoQtFullViewer's non-abstract subclasses.

For "real" application programs, the viewers / components from this class onwards and further down in the inheritance hierarchy is usually not all that interesting, as they enforces too much extra user interface cruft not compatible with the look and feel of the other parts of the application user interface. So most "real" applications will use either the SoQtViewer or the SoQtRenderArea as their base-level component, and then inherit one of these down into one's own "proper" viewer classes.

The non-abstract subclasses of the SoQtFullViewer class are viewer components often used as a test-bed for prototyping / rapid application development when doing quick testing of scenes, stand-alone 3D-models, animation techniques, etc etc.

See Also
SoQtConstrainedViewer, SoQtExaminerViewer, SoQtPlaneViewer

Member Enumeration Documentation

Valid values for the constructor argument that decides how much of the user interface features to set up. The enum values are bitflags that can be OR'ed together.

Enumerator
BUILD_NONE 

Do not add any of the user interface components.

BUILD_DECORATION 

Only build and set up the decorations around the OpenGL canvas.

BUILD_POPUP 

Only build the popup menu. (Activated with the right mousebutton.)

BUILD_ALL 

Build all user interface components of the SoQtFullViewer.

Constructor & Destructor Documentation

SoQtFullViewer::SoQtFullViewer ( QWidget *  parent,
const char *  name,
SbBool  embed,
SoQtFullViewer::BuildFlag  buildFlag,
SoQtViewer::Type  type,
SbBool  build 
)
protected

Constructor. See parent class for explanation of arguments.

Subclasses will probably usually call with the buildNow flag set to FALSE to be able to do delayed building of the OpenGL canvas after other setup tasks has been performed.

References bottomDecoration, bottomWheel, bottomWheelLabel, bottomWheelStr, bottomWheelVal, BUILD_DECORATION, BUILD_POPUP, SoQtComponent::getParentWidget(), leftDecoration, leftWheel, leftWheelLabel, leftWheelStr, leftWheelVal, prefmenu, rightDecoration, rightWheel, rightWheelLabel, rightWheelStr, rightWheelVal, SoQtComponent::setBaseWidget(), setBottomWheelString(), SoQtComponent::setClassName(), setLeftWheelString(), setRightWheelString(), and SoQtComponent::setSize().

SoQtFullViewer::~SoQtFullViewer ( )
protected

Member Function Documentation

void SoQtFullViewer::setDecoration ( const SbBool  enable)

Turn the viewer decorations on or off.

See Also
isDecoration()

References isDecoration().

SbBool SoQtFullViewer::isDecoration ( void  ) const

Return TRUE if the viewer decorations are on, otherwise FALSE.

See Also
setDecoration()

Referenced by setDecoration().

void SoQtFullViewer::setPopupMenuEnabled ( const SbBool  enable)

Decide whether or not if clicking with the right mouse button on the OpenGL canvas should reveal a preferences popup menu when in viewing mode.

See Also
isPopupMenuEnabled()

References isPopupMenuEnabled().

SbBool SoQtFullViewer::isPopupMenuEnabled ( void  ) const

Return TRUE if the popup preferences menu is enabled, otherwise FALSE.

See Also
setPopupMenuEnabled()

Referenced by openPopupMenu(), processSoEvent(), and setPopupMenuEnabled().

QWidget * SoQtFullViewer::getAppPushButtonParent ( void  ) const

Returns the widget which is used as the parent of application specified buttons. The row of application buttons (if any) will be placed in the upper left corner.

See Also
addAppPushButton(), insertAppPushButton(), removeAppPushButton()

Referenced by addAppPushButton(), insertAppPushButton(), and removeAppPushButton().

void SoQtFullViewer::addAppPushButton ( QWidget *  newButton)

Add an application specific push button to the viewer decorations. Application buttons will be laid out in a vertical row from the upper left corner.

The button will be added bottom-most.

See Also
insertAppPushButton(), removeAppPushButton(), getAppPushButtonParent()

References getAppPushButtonParent().

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

Insert an application specific push button to the viewer decorations at the given index.

See Also
addAppPushButton(), removeAppPushButton(), getAppPushButtonParent()

References getAppPushButtonParent(), and lengthAppPushButton().

void SoQtFullViewer::removeAppPushButton ( QWidget *  oldButton)

Remove one of the application specific buttons.

See Also
addAppPushButton(), insertAppPushButton()

References getAppPushButtonParent().

int SoQtFullViewer::findAppPushButton ( QWidget *  oldButton) const

Return the index of a particular button that has been specified by the application, or -1 of the button has not been added.

See Also
addAppPushButton()
int SoQtFullViewer::lengthAppPushButton ( void  ) const

Return number of application specific buttons added.

See Also
addAppPushButton(), insertAddAppPushButton()

Referenced by buildAppButtons(), and insertAppPushButton().

QWidget * SoQtFullViewer::getRenderAreaWidget ( void  ) const

Returns the render area OpenGL canvas widget.

void SoQtFullViewer::setViewing ( SbBool  enable)
virtual

Set view mode.

If the view mode is on, user events will be caught and used to influence the camera position / orientation. If view mode is off, all events in the viewer canvas (like for instance keypresses or mouseclicks and -movements) will be passed along to the scene graph.

Default is to have the view mode active.

See Also
isViewing()

Reimplemented from SoQtViewer.

Reimplemented in SoQtExaminerViewer, SoQtFlyViewer, and SoQtPlaneViewer.

References SoQtViewer::isViewing().

void SoQtFullViewer::setComponentCursor ( const SoQtCursor cursor)
virtual

Sets the cursor for this component.

Note: not part of the original SGI InventorXt API.

Reimplemented from SoQtComponent.

References SoQtGLWidget::getGLWidget(), and SoQtComponent::setWidgetCursor().

void SoQtFullViewer::sizeChanged ( const SbVec2s &  size)
protectedvirtual

Called internally from within the SoQt library when the widget embedded in a component changes it size, which is usually triggered by end-user interaction.

This method is then invoked to notify the component that the size has changed. It is called from the top and all the way down to the bottom, the size being adjusted to take into account extra decorations having been added at each level in the component class hierarchy.

Reimplemented from SoQtViewer.

References bottomDecoration, leftDecoration, and rightDecoration.

void SoQtFullViewer::buildDecoration ( QWidget *  parent)
protectedvirtual
QWidget * SoQtFullViewer::buildLeftTrim ( QWidget *  parent)
protectedvirtual

Build decorations on the left of the render canvas. Override this method in subclasses if you want your own decorations on the viewer window.

The decoration will be 30 pixels wide.

References buildAppButtons(), leftWheel, and leftWheelVal.

Referenced by buildDecoration().

QWidget * SoQtFullViewer::buildBottomTrim ( QWidget *  parent)
protectedvirtual

Build decorations on the bottom of the render canvas. Override this method in subclasses if you want your own decorations on the viewer window.

References bottomWheel, bottomWheelLabel, bottomWheelStr, bottomWheelVal, leftWheelLabel, leftWheelStr, rightWheelLabel, and rightWheelStr.

Referenced by buildDecoration().

QWidget * SoQtFullViewer::buildRightTrim ( QWidget *  parent)
protectedvirtual

Build decorations on the right side of the render canvas. Override this method in subclasses if you want your own decorations on the viewer window.

References buildViewerButtons(), rightWheel, and rightWheelVal.

Referenced by buildDecoration().

QWidget * SoQtFullViewer::buildAppButtons ( QWidget *  parent)
protected

Build the application specified button row (if any buttons were set up).

References lengthAppPushButton().

Referenced by buildLeftTrim().

QWidget * SoQtFullViewer::buildViewerButtons ( QWidget *  parent)
protected

Build and layout viewer specified button row.

References createViewerButtons().

Referenced by buildRightTrim().

void SoQtFullViewer::createViewerButtons ( QWidget *  parent,
SbPList *  buttonlist 
)
protectedvirtual

Set up the viewer buttons with pixmaps and event connections.

One important note if you want to override this method to add your own buttons to the list (in the explanation below, it is assumed that you know how virtual function table pointers are handled by C++):

createViewerButtons() is called (indirectly) from the constructors of the viewer classes. This means that you need to delay it's invocation until your own subclass's constructor is run, because otherwise your re-implementation won't have been added to the internal virtual function table yet.

Delaying a superclass viewer from building it's decorations is done by passing build==FALSE as the last argument of the protected constructors. You will then have to explicitly trigger the building in your own constructor.

Here's a minimal example that shows the steps needed to be able to override createViewerButtons() from SoQtExaminerViewer:

class MyExaminerViewer : public SoQtExaminerViewer {
public:
MyExaminerViewer(QWidget * parent);
protected:
virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist);
};
MyExaminerViewer::MyExaminerViewer(QWidget * parent)
: SoQtExaminerViewer(parent, NULL, TRUE,
// build == FALSE, to delay creation of decorations
FALSE)
{
// Explicitly trigger the construction of viewer decorations.
QWidget * widget = this->buildWidget(this->getParentWidget());
this->setBaseWidget(widget);
}
void
MyExaminerViewer::createViewerButtons(QWidget * parent, SbPList * buttonlist)
{
// [now add your own button(s) to the buttonlist]
}

Reimplemented in SoQtExaminerViewer, and SoQtPlaneViewer.

References SoQtViewer::isViewing().

Referenced by buildViewerButtons().

void SoQtFullViewer::buildPopupMenu ( void  )
protectedvirtual

Make a popup menu with preferences settings.

One important note as for when you want to override this function in a subclass: be aware that it will usually be invoked (indirectly) from this class's constructor. That is before the table of virtual function pointers has been set up for the subclass, and because of this, the function will not be called in the subclass even though it is virtual.

To make the overriding actually be in effect, you need to delay building the widgets of this class. For information on how to do that, see the documentation of SoQtFullViewer::createViewerButtons().

References prefmenu.

Referenced by openPopupMenu().

void SoQtFullViewer::setPopupMenuString ( const char *  name)
protectedvirtual

Set title of popup menu.

References prefmenu.

void SoQtFullViewer::openPopupMenu ( const SbVec2s  position)
protectedvirtual

NOTE: This method is not part of the original InventorXt API.

References buildPopupMenu(), SoQtGLWidget::getGLSize(), SoQtGLWidget::getGLWidget(), isPopupMenuEnabled(), and prefmenu.

Referenced by processSoEvent().

void SoQtFullViewer::leftWheelStart ( void  )
protectedvirtual

Called when the user start to drag the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
leftWheelMotion(), leftWheelFinish()
bottomWheelStart(), rightWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountInc().

void SoQtFullViewer::leftWheelMotion ( float  value)
protectedvirtual

Called repeatedly as the user drags the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
leftWheelStart(), leftWheelFinish()
bottomWheelStart(), rightWheelStart()

Reimplemented in SoQtExaminerViewer, SoQtPlaneViewer, and SoQtConstrainedViewer.

References leftWheelVal.

void SoQtFullViewer::leftWheelFinish ( void  )
protectedvirtual

Called as the user let go of the thumbwheel in the left frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
leftWheelStart(), leftWheelMotion()
bottomWheelStart(), rightWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountDec().

float SoQtFullViewer::getLeftWheelValue ( void  ) const
protected
void SoQtFullViewer::setLeftWheelValue ( const float  value)
protected

Set a new value for the left thumbwheel.

References leftWheel, and leftWheelVal.

void SoQtFullViewer::bottomWheelStart ( void  )
protectedvirtual

Called when the user start to drag the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
bottomWheelMotion(), bottomWheelFinish()
leftWheelStart(), rightWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountInc().

void SoQtFullViewer::bottomWheelMotion ( float  value)
protectedvirtual

Called repeatedly as the user drags the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
bottomWheelStart(), bottomWheelFinish()
leftWheelStart(), rightWheelStart()

Reimplemented in SoQtExaminerViewer, SoQtPlaneViewer, and SoQtConstrainedViewer.

References bottomWheelVal.

void SoQtFullViewer::bottomWheelFinish ( void  )
protectedvirtual

Called as the user let go of the thumbwheel in the bottom frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
bottomWheelStart(), bottomWheelMotion()
leftWheelStart(), rightWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountDec().

float SoQtFullViewer::getBottomWheelValue ( void  ) const
protected
void SoQtFullViewer::setBottomWheelValue ( const float  value)
protected

Set a new value for the bottom thumbwheel.

References bottomWheel, and bottomWheelVal.

void SoQtFullViewer::rightWheelStart ( void  )
protectedvirtual

Called when the user start to drag the thumbwheel in the right frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
rightWheelMotion(), rightWheelFinish()
leftWheelStart(), bottomWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountInc().

void SoQtFullViewer::rightWheelMotion ( float  value)
protectedvirtual

Called repeatedly as the user drags the thumbwheel in the right frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
rightWheelStart(), rightWheelFinish()
leftWheelStart(), bottomWheelStart()

Reimplemented in SoQtExaminerViewer, SoQtPlaneViewer, and SoQtFlyViewer.

References rightWheelVal.

void SoQtFullViewer::rightWheelFinish ( void  )
protectedvirtual

Called as the user let go of the thumbwheel in the right frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See Also
rightWheelStart(), rightWheelMotion()
leftWheelStart(), bottomWheelStart()

Reimplemented in SoQtPlaneViewer.

References SoQtViewer::interactiveCountDec().

float SoQtFullViewer::getRightWheelValue ( void  ) const
protected
void SoQtFullViewer::setRightWheelValue ( const float  value)
protected

Set a new value for the right thumbwheel.

References rightWheel, and rightWheelVal.

Referenced by SoQtPlaneViewer::processSoEvent().

void SoQtFullViewer::setLeftWheelString ( const char *const  string)
protected

Set label of the left thumbwheel.

References leftWheelLabel, and leftWheelStr.

Referenced by SoQtConstrainedViewer::SoQtConstrainedViewer(), and SoQtFullViewer().

QWidget * SoQtFullViewer::getLeftWheelLabelWidget ( void  ) const
protected

This method returns the native widget for the label below the left thumb wheel.

References leftWheelLabel.

void SoQtFullViewer::setBottomWheelString ( const char *const  string)
protected

Set label of the bottom thumbwheel.

References bottomWheelLabel, and bottomWheelStr.

Referenced by SoQtConstrainedViewer::SoQtConstrainedViewer(), and SoQtFullViewer().

QWidget * SoQtFullViewer::getBottomWheelLabelWidget ( void  ) const
protected

This method returns the native widget for the label beside the bottom thumb wheel.

References bottomWheelLabel.

void SoQtFullViewer::setRightWheelString ( const char *const  string)
protected
QWidget * SoQtFullViewer::getRightWheelLabelWidget ( void  ) const
protected

This method returns the native widget for the label below the right thumb wheel.

References rightWheelLabel.

SbBool SoQtFullViewer::processSoEvent ( const SoEvent *const  event)
protectedvirtual

Toolkit-native events are attempted converted to Coin-generic events in the SoQtRenderArea::processEvent() method. If this succeeds, they are forwarded to this method.

This is a virtual method, and is overridden in it's subclasses to catch events of particular interest to the viewer classes, for instance.

Return TRUE iff the event was processed. If not it should be passed on further up in the inheritance hierarchy by the caller. This last point is extremely important to take note of if you are expanding the toolkit with your own viewer class.

This method is not part of the original SGI InventorXt API. Note that you can still override the toolkit-native processEvent() method instead of this "generic" method.

Reimplemented from SoQtViewer.

Reimplemented in SoQtExaminerViewer, SoQtFlyViewer, and SoQtPlaneViewer.

References isPopupMenuEnabled(), SoQtViewer::isViewing(), and openPopupMenu().

Member Data Documentation

QWidget * SoQtFullViewer::leftWheel
protected

The widget representing the thumbwheel left of the render canvas.

Referenced by buildLeftTrim(), setLeftWheelValue(), and SoQtFullViewer().

QWidget * SoQtFullViewer::rightWheel
protected

The widget representing the thumbwheel on the right side of the render canvas.

Referenced by buildRightTrim(), setRightWheelValue(), and SoQtFullViewer().

QWidget * SoQtFullViewer::bottomWheel
protected

The widget representing the thumbwheel below the render canvas.

Referenced by buildBottomTrim(), setBottomWheelValue(), and SoQtFullViewer().

QWidget * SoQtFullViewer::leftDecoration
protected

The root widget for the left-side decorations.

Referenced by buildDecoration(), sizeChanged(), and SoQtFullViewer().

QWidget * SoQtFullViewer::rightDecoration
protected

The root widget for the right-side decorations.

Referenced by buildDecoration(), sizeChanged(), and SoQtFullViewer().

QWidget * SoQtFullViewer::bottomDecoration
protected

The root widget for the bottom decorations.

Referenced by buildDecoration(), sizeChanged(), and SoQtFullViewer().

QWidget * SoQtFullViewer::leftWheelLabel
protected

Label widget of left wheel.

Referenced by buildBottomTrim(), getLeftWheelLabelWidget(), setLeftWheelString(), and SoQtFullViewer().

char * SoQtFullViewer::leftWheelStr
protected

Text of left thumbwheel's label.

Referenced by buildBottomTrim(), setLeftWheelString(), SoQtFullViewer(), and ~SoQtFullViewer().

float SoQtFullViewer::leftWheelVal
protected

Current value of the left thumbwheel.

Referenced by buildLeftTrim(), getLeftWheelValue(), leftWheelMotion(), setLeftWheelValue(), and SoQtFullViewer().

QWidget * SoQtFullViewer::rightWheelLabel
protected

Label widget of right wheel.

Referenced by buildBottomTrim(), getRightWheelLabelWidget(), setRightWheelString(), and SoQtFullViewer().

char * SoQtFullViewer::rightWheelStr
protected

Text of right thumbwheel's label.

Referenced by buildBottomTrim(), setRightWheelString(), SoQtFullViewer(), and ~SoQtFullViewer().

float SoQtFullViewer::rightWheelVal
protected

Current value of the right-side thumbwheel.

Referenced by buildRightTrim(), getRightWheelValue(), rightWheelMotion(), setRightWheelValue(), and SoQtFullViewer().

QWidget * SoQtFullViewer::bottomWheelLabel
protected

Label widget of bottom wheel.

Referenced by buildBottomTrim(), getBottomWheelLabelWidget(), setBottomWheelString(), and SoQtFullViewer().

char * SoQtFullViewer::bottomWheelStr
protected

Text of bottom thumbwheel's label.

Referenced by buildBottomTrim(), setBottomWheelString(), SoQtFullViewer(), and ~SoQtFullViewer().

float SoQtFullViewer::bottomWheelVal
protected

Current value of the bottom thumbwheel.

Referenced by bottomWheelMotion(), buildBottomTrim(), getBottomWheelValue(), setBottomWheelValue(), and SoQtFullViewer().

SoQtPopupMenu * SoQtFullViewer::prefmenu
protected

Pointer to the popup menu instance.

Referenced by buildPopupMenu(), openPopupMenu(), setPopupMenuString(), SoQtFullViewer(), and ~SoQtFullViewer().


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

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Apr 13 2016 for SoQt by Doxygen 1.8.5.