SoQtFullViewer(3)
π
SoQtFullViewer(3) β the SoQt manual page, bestie edition
Okay so this is the SoQt manual page for SoQtFullViewer(3), and itβs giving βviewer canvas but with extra UI sprinkled on top.β Weβre going through every single API bit, no skipping, no summarizing, periodt. β¨
πΈ NAME
SoQtFullViewer β the class that adds some user interface components to the viewer canvas. Thatβs the whole name-drop, and yes, itβs iconic.
β¨ SYNOPSIS
#include <Inventor/Qt/viewers/SoQtFullViewer.h>
- Inherits:
SoQtViewer. - Inherited by:
SoQtConstrainedViewer,SoQtExaminerViewer, andSoQtPlaneViewer.
π Public Types
enum BuildFlag { BUILD_NONE = 0x00, BUILD_DECORATION = 0x01, BUILD_POPUP = 0x02, BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) }
π Public Types inherited from SoQtViewer
These are inherited, but theyβre still part of the whole ~situation~:
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
These are the ones SoQtFullViewer brings to the group chat, fr fr:
void setDecoration (const SbBool on)β decoration setter, turn it on or off.SbBool isDecoration (void) constβ decoration check.void setPopupMenuEnabled (const SbBool on)β popup-menu-enabled setter.SbBool isPopupMenuEnabled (void) constβ popup-menu-enabled check.QWidget * getAppPushButtonParent (void) constβ grabs the app push-button parent widget.void addAppPushButton (QWidget *newButton)β adds an app push button.void insertAppPushButton (QWidget *newButton, int index)β inserts an app push button at an index.void removeAppPushButton (QWidget *oldButton)β removes an app push button.int findAppPushButton (QWidget *oldButton) constβ finds an app push button.int lengthAppPushButton (void) constβ app push-button count.QWidget * getRenderAreaWidget (void) constβ grabs the render area widget.virtual void setViewing (SbBool on)β viewing setter.virtual void setComponentCursor (const SoQtCursor &cursor)β component cursor setter.
π Public Member Functions inherited from SoQtViewer
All inherited, all exact, no edits, no cap:
virtual void setCamera (SoCamera *camera)SoCamera * getCamera (void) constvirtual void setCameraType (SoType type)SoType getCameraType (void) constvirtual void toggleCameraType (void)virtual void viewAll (void)virtual void saveHomePosition (void)virtual void resetToHomePosition (void)virtual void setHeadlight (SbBool enable)SbBool isHeadlight (void) constSoDirectionalLight * getHeadlight (void) constvirtual void setDrawStyle (SoQtViewer::DrawType type, SoQtViewer::DrawStyle style)SoQtViewer::DrawStyle getDrawStyle (const SoQtViewer::DrawType type) constvirtual void setBufferingType (SoQtViewer::BufferType type)SoQtViewer::BufferType getBufferingType (void) constSbBool isViewing (void) constvirtual void setCursorEnabled (SbBool enable)SbBool isCursorEnabled (void) constvoid setAutoClipping (SbBool enable)SbBool isAutoClipping (void) constvoid setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)virtual void setStereoViewing (SbBool enable)SbBool isStereoViewing (void) constvirtual void setStereoOffset (const float dist)float getStereoOffset (void) constSbBool setStereoType (SoQtViewer::StereoType s)SoQtViewer::StereoType getStereoType (void) constvoid 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) constvoid setSeekTime (const float seconds)float getSeekTime (void) constvoid 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) constvirtual void setDoubleBuffer (const SbBool enable)virtual void setSceneGraph (SoNode *root)virtual SoNode * getSceneGraph (void)
π¦ Public Member Functions inherited from SoQtRenderArea
More inherited goodness β yes, the whole list, bestie:
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) constvoid setBackgroundIndex (int idx)int getBackgroundIndex (void) constvoid setOverlayBackgroundIndex (int idx)int getOverlayBackgroundIndex (void) constvoid 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) constvoid setTransparencyType (SoGLRenderAction::TransparencyType type)SoGLRenderAction::TransparencyType getTransparencyType (void) constvoid setAntialiasing (SbBool smoothing, int numPasses)void getAntialiasing (SbBool &smoothing, int &numPasses) constvoid setClearBeforeRender (SbBool enable, SbBool zbEnable=TRUE)SbBool isClearBeforeRender (void) constSbBool isClearZBufferBeforeRender (void) constvoid setClearBeforeOverlayRender (SbBool enable)SbBool isClearBeforeOverlayRender (void) constvoid setAutoRedraw (SbBool enable)SbBool isAutoRedraw (void) constvoid setRedrawPriority (uint32_t priority)uint32_t getRedrawPriority (void) constvoid 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) constvoid setOverlaySceneManager (SoSceneManager *manager)SoSceneManager * getOverlaySceneManager (void) constvoid setGLRenderAction (SoGLRenderAction *action)SoGLRenderAction * getGLRenderAction (void) constvoid setOverlayGLRenderAction (SoGLRenderAction *action)SoGLRenderAction * getOverlayGLRenderAction (void) constSbBool sendSoEvent (const SoEvent *event)void registerDevice (SoQtDevice *device)void unregisterDevice (SoQtDevice *device)
π Public Member Functions inherited from SoQtGLWidget
GL-widget inherited stack, zero notes left behind:
void setBorder (const SbBool enable)SbBool isBorder (void) constSbBool isDoubleBuffer (void) constvoid setDrawToFrontBufferEnable (const SbBool enable)SbBool isDrawToFrontBufferEnable (void) constvoid setQuadBufferStereo (const SbBool enable)SbBool isQuadBufferStereo (void) constvoid setAccumulationBuffer (const SbBool enable)SbBool getAccumulationBuffer (void) constvoid setStencilBuffer (const SbBool enable)SbBool getStencilBuffer (void) constvoid setAlphaChannel (const SbBool enable)SbBool getAlphaChannel (void) constvoid setOverlayRender (const SbBool onoff)SbBool isOverlayRender (void) constvoid setSampleBuffers (const int numsamples)int getSampleBuffers (void) constvoid setStealFocus (SbBool enable)SbBool isStealFocus (void) constQWidget * getGLWidget (void) constQWidget * getNormalWidget (void) constQWidget * getOverlayWidget (void) constSbBool hasOverlayGLArea (void) constSbBool hasNormalGLArea (void) constunsigned long getOverlayTransparentPixel (void)void getPointSizeLimits (SbVec2f &range, float &granularity)void getLineWidthLimits (SbVec2f &range, float &granularity)
π§ Public Member Functions inherited from SoQtComponent
Component functions, all inherited, all here, no disappearing acts:
virtual SoType getTypeId (void) constvirtual ~SoQtComponent ()virtual void show (void)virtual void hide (void)SbBool isFullScreen (void) constSbBool setFullScreen (const SbBool onoff)SbBool isVisible (void)SbBool isTopLevelShell (void) constQWidget * getWidget (void) constQWidget * getBaseWidget (void) constQWidget * getShellWidget (void) constQWidget * getParentWidget (void) constvoid setSize (const SbVec2s size)SbVec2s getSize (void) constvoid setTitle (const char *const title)const char * getTitle (void) constvoid setIconTitle (const char *const title)const char * getIconTitle (void) constconst char * getWidgetName (void) constconst char * getClassName (void) constvoid setWindowCloseCallback (SoQtComponentCB *const func, void *const user=NULL)
πͺ© Public Member Functions inherited from SoQtObject
Just one, but she still counts:
SbBool isOfType (SoType type) const
π₯ Protected Member Functions
Protected girlies β still fully listed, because we donβt ghost APIs:
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) constvoid setLeftWheelValue (const float value)virtual void bottomWheelStart (void)virtual void bottomWheelMotion (float)virtual void bottomWheelFinish (void)float getBottomWheelValue (void) constvoid setBottomWheelValue (const float value)virtual void rightWheelStart (void)virtual void rightWheelMotion (float)virtual void rightWheelFinish (void)float getRightWheelValue (void) constvoid setRightWheelValue (const float value)void setLeftWheelString (const char *const name)QWidget * getLeftWheelLabelWidget (void) constvoid setBottomWheelString (const char *const name)QWidget * getBottomWheelLabelWidget (void) constvoid setRightWheelString (const char *const name)const char * getRightWheelString () constQWidget * getRightWheelLabelWidget (void) constvirtual SbBool processSoEvent (const SoEvent *const event)
π‘οΈ Protected Member Functions (the inherited ones, the behind-the-scenes besties)
β¨ inherited from SoQtViewer
SoQtViewer(QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)β the protected constructor, for when you're building your own viewer subclass and don't want randoms instantiating it π~SoQtViewer()β protected destructor, same energyvirtual void setSeekMode(SbBool enable)β flip seek mode on/offSbBool isSeekMode(void) constβ is seek mode on rn?SbBool seekToPoint(const SbVec2s screenpos)β seek to a point on screenvoid seekToPoint(const SbVec3f &scenepos)β seek to a point in the scenevirtual void computeSeekFinalOrientation(void)β work out where the camera should end up after a seekvirtual void actualRedraw(void)β the actual redraw work, lowkey where the magic happensvoid interactiveCountInc(void)β bump the interactive count upvoid interactiveCountDec(void)β bump it back downint getInteractiveCount(void) constβ what's the count rn?void setSeekDistance(const float distance)β set how far the seek goesfloat getSeekDistance(void) constβ read how far the seek goesvoid setSeekValueAsPercentage(const SbBool on)β make seek values percentages instead of absolutesSbBool isSeekValuePercentage(void) constβ are seek values percentages rn?virtual void changeCameraValues(SoCamera *camera)β update camera valuesvoid addSuperimposition(SoNode *scene)β slap a superimposed scene on top β¨void removeSuperimposition(SoNode *scene)β take it back offvoid setSuperimpositionEnabled(SoNode *scene, const SbBool enable)β turn a superimposed scene on/offSbBool getSuperimpositionEnabled(SoNode *scene) constβ is that superimposed scene enabled?
π inherited from SoQtRenderArea
SoQtRenderArea(QWidget *parent, const char *name, SbBool embed, SbBool mouseInput, SbBool keyboardInput, SbBool build)β protected constructor, mouse and keyboard input toggles included πβ¨οΈvirtual void redraw(void)β redraw everythingvirtual void redrawOverlay(void)β redraw just the overlayvirtual void actualOverlayRedraw(void)β the actual overlay redraw, the one doing the workvirtual void processEvent(QEvent *event)β handle an incoming eventvirtual void initGraphic(void)β set up the graphicsvirtual void initOverlayGraphic(void)β set up the overlay graphicsvirtual void widgetChanged(QWidget *widget)β called when the widget swaps outvirtual void afterRealizeHook(void)β the hook that runs after realize, iykykQWidget * buildWidget(QWidget *parent)β actually construct the widgetvirtual const char * getDefaultWidgetName(void) constβ default widget namevirtual const char * getDefaultTitle(void) constβ default titlevirtual const char * getDefaultIconTitle(void) constβ default icon titlevirtual SbBool glScheduleRedraw(void)β schedule a redraw, return whether it worked
π¦ 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)β protected constructor, with defaults:parent=NULL,name=NULL,embed=TRUE,glmodes=SO_GL_RGB,build=TRUE~SoQtGLWidget()β destructorQWidget * buildWidget(QWidget *parent)β build the widgetvoid setGLSize(const SbVec2s size)β set the GL canvas sizeSbVec2s getGLSize(void) constβ read the GL canvas sizefloat getGLAspectRatio(void) constβ read the GL aspect ratiovoid setGlxSize(const SbVec2s size)β set the Glx sizeSbVec2s getGlxSize(void) constβ read the Glx sizefloat getGlxAspectRatio(void) constβ read the Glx aspect ratiovoid setStereoBuffer(SbBool flag)β flip the stereo bufferSbBool isStereoBuffer(void) constβ stereo buffer on?SbBool isRGBMode(void)β RGB mode?void glLockNormal(void)β lock the normal buffervoid glUnlockNormal(void)β unlock itvoid glLockOverlay(void)β lock the overlay buffervoid glUnlockOverlay(void)β unlock itvoid glSwapBuffers(void)β swap those buffers, the classic double-buffer move π₯void glFlushBuffer(void)β flush the buffer
π inherited from SoQtComponent
SoQtComponent(QWidget *const parent=NULL, const char *const name=NULL, const SbBool embed=TRUE)β protected constructor, defaultsparent=NULL,name=NULL,embed=TRUEvoid setClassName(const char *const name)β give the class a namevoid setBaseWidget(QWidget *widget)β set the base widgetvoid registerWidget(QWidget *widget)β register a widgetvoid unregisterWidget(QWidget *widget)β unregister itvoid addVisibilityChangeCallback(SoQtComponentVisibilityCB *const func, void *const user=NULL)β hook up a visibility-change callback, withuser=NULLby defaultvoid removeVisibilityChangeCallback(SoQtComponentVisibilityCB *const func, void *const user=NULL)β and unhook it later
πΈ Protected Attributes (subclass-only vibes)
QWidget * leftWheelβ the left thumbwheel widgetQWidget * rightWheelβ the right thumbwheel widgetQWidget * bottomWheelβ the bottom thumbwheel widgetQWidget * leftDecorationβ left decoration widgetQWidget * rightDecorationβ right decoration widgetQWidget * bottomDecorationβ bottom decoration widgetQWidget * leftWheelLabelβ the label on the left wheelchar * leftWheelStrβ the left wheel's string valuefloat leftWheelValβ the left wheel's float valueQWidget * rightWheelLabelβ the label on the right wheelchar * rightWheelStrβ the right wheel's string valuefloat rightWheelValβ the right wheel's float valueQWidget * bottomWheelLabelβ the label on the bottom wheelchar * bottomWheelStrβ the bottom wheel's string valuefloat bottomWheelValβ the bottom wheel's float valueSoQtPopupMenu * prefmenuβ the preferences pop-up menu object π
β¨ inherited from SoQtGLWidget
SbBool waitForExposeβ wait for an expose event?SbBool drawToFrontBufferβ draw to the front buffer?
π«Ά Additional Inherited Members
Static Public Member Functions inherited from SoQtRenderArea
static uint32_t getDefaultRedrawPriority(void)β grab the default redraw priority
Static Public Member Functions inherited from SoQtComponent
static void initClass(void)β init the classstatic SoType getClassTypeId(void)β get the class type idstatic void setWidgetCursor(QWidget *w, const SoQtCursor &cursor)β set a widget's cursorstatic SoQtComponent * getComponent(QWidget *widget)β look up the component for a widgetstatic void initClasses(void)β init all the classes
Static Public Member Functions inherited from SoQtObject
static void initClass(void)β init the classstatic SoType getClassTypeId(void)β get the class type idstatic void init(void)β init the whole thing
π Detailed Description
Okay so SoQtFullViewer adds a bunch of user interface bits to the viewer canvas. It's literally the glow-up of a plain viewer π
SoQtFullViewer is an abstract viewer class β so you can't just instantiate it directly, bestie β and it extends its superclass (the basic SoQtViewer class) with two major user interface additions:
- decorations around the render canvas, with buttons and thumbwheels to control camera interaction and various other aspects of model / scene viewing
- a pop-up menu, invoked with the right mouse button, which controls yet more aspects of the rendering and the viewer
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.
See also:SoQtConstrainedViewer,SoQtExaminerViewer,SoQtPlaneViewer
π§ Member Enumeration Documentation
enum SoQtFullViewer::BuildFlag
These are the valid values for the constructor argument that decides how much of the user interface features to set up. Heads up: the enum values are bitflags that can be OR'ed together β so you can stack 'em π₯
Enumerators
BUILD_NONEβ Do not add any of the user interface components. None. Zero. Nada. πBUILD_DECORATIONβ Only build and set up the decorations around the OpenGL canvas.BUILD_POPUPβ Only build the pop-up menu. (Activated with the right mouse button.) π±οΈBUILD_ALLβ Build all user interface components of theSoQtFullViewer. The full course, periodt.
π Constructor & Destructor Documentation
SoQtFullViewer::SoQtFullViewer(QWidget * parent, const char * name, SbBool embed, SoQtFullViewer::BuildFlag buildFlag, SoQtViewer::Type type, SbBool build) [protected]
Constructor π See the parent class for explanation of the 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. (Yes, it's called buildNow in the prose and build in the signature β the docs are being iconic like that. Iykyk.)
SoQtFullViewer::~SoQtFullViewer() [protected]
Destructor. Bye bestie π
π Member Function Documentation
void SoQtFullViewer::setDecoration(const SbBool enable)
Turn the viewer decorations on or off. β¨
See also: isDecoration()
SbBool SoQtFullViewer::isDecoration(void) const
Return TRUE if the viewer decorations are on, otherwise FALSE.
See also: 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 pop-up menu when in viewing mode. π±οΈ
See also: isPopupMenuEnabled()
SbBool SoQtFullViewer::isPopupMenuEnabled(void) const
Return TRUE if the pop-up preferences menu is enabled, otherwise FALSE.
See also: 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()
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()
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()
void SoQtFullViewer::removeAppPushButton(QWidget * oldButton)
Remove one of the application specific buttons. Gone, but not forgotten π
See also:addAppPushButton(),insertAppPushButton()
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. (That's the docs' typo, not mine β "of" the button, iconic.)
See also: addAppPushButton()
int SoQtFullViewer::lengthAppPushButton(void) const
Return number of application specific buttons added. π’
See also:addAppPushButton(),insertAddAppPushButton()(yes, the doc really saysinsertAddAppPushButtonβ I'm not fixing it, I'm preserving the lore)
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 mouse clicks 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.
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.
void SoQtFullViewer::sizeChanged(const SbVec2s & size) [protected], [virtual]
Called internally from within the SoQt library when the widget embedded in a component changes its 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.
void SoQtFullViewer::buildDecoration(QWidget * parent) [protected], [virtual]
Build viewer decorations. π
QWidget * SoQtFullViewer::buildLeftTrim(QWidget * parent) [protected], [virtual]
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.
π
QWidget * SoQtFullViewer::buildBottomTrim(QWidget * parent) [protected], [virtual]
Builds the decorations on the bottom of the render canvas, bestie. Override this method in subclasses if you want your own decorations on the viewer window β go off, make it yours β¨
πΈ QWidget * SoQtFullViewer::buildRightTrim(QWidget * parent) [protected], [virtual]
Builds the decorations on the right side of the render canvas. Same deal β override this method in subclasses if you want your own decorations on the viewer window π
π QWidget * SoQtFullViewer::buildAppButtons(QWidget * parent) [protected]
Builds the application-specified button row β but only if any buttons were actually set up. No buttons, no row, periodt.
π¦ QWidget * SoQtFullViewer::buildViewerButtons(QWidget * parent) [protected]
Builds and lays out the viewer-specified button row. Very demure, very mindful layout π
π void SoQtFullViewer::createViewerButtons(QWidget * parent, SbPList * buttonlist) [protected], [virtual]
This is the one that sets up the viewer buttons with pixmaps and event connections. Iconic behavior.
Okay so here is the one important note if you want to override this method and add your own buttons to the list (and in the explanation below, it is assumed that you know how virtual function table pointers are handled by C++ β iykyk):
createViewerButtons() is called (indirectly) from the constructors of the viewer classes. Which meansβ¦ you need to delay its 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. Not me explaining vtable timing at 2am π
The way you delay a superclass viewer from building its decorations is by passing build==FALSE as the last argument of the protected constructors. Then you'll have to explicitly trigger the building in your own constructor. No shortcuts.
Here's a minimal example showing the steps you need 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,
SoQtFullViewer::BUILD_ALL, SoQtFullViewer::BROWSER,
// 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)
{
SoQtExaminerViewer::createViewerButtons(parent, buttonlist);
// [now add your own button(s) to the buttonlist]
}
Reimplemented in SoQtExaminerViewer, and SoQtPlaneViewer.
π void SoQtFullViewer::buildPopupMenu(void ) [protected], [virtual]
Makes a pop-up menu with preferences settings. Menu sweep, but make it preferences π«Ά
One important note β same energy as before β 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. Truly the plot twist nobody asked for π
To make the overriding actually be in effect, you need to delay building the widgets of this class. For info on how to do that, see the documentation of SoQtFullViewer::createViewerButtons(). Go read it, bestie, it's right there β¬οΈ
β¨ void SoQtFullViewer::setPopupMenuString(const char * name) [protected], [virtual]
Sets the title of the pop-up menu. Name it something cute π
π§ void SoQtFullViewer::openPopupMenu(const SbVec2s position) [protected], [virtual]
NOTE: This method is not part of the original InventorXt API.
π void SoQtFullViewer::leftWheelStart(void ) [protected], [virtual]
Called when the user starts 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.
π void SoQtFullViewer::leftWheelMotion(float value) [protected], [virtual]
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 β this is where the whole drag lives, fr fr.
See also: leftWheelStart(), leftWheelFinish(), bottomWheelStart(), rightWheelStart()
Reimplemented in SoQtConstrainedViewer, SoQtExaminerViewer, and SoQtPlaneViewer.
π¦ void SoQtFullViewer::leftWheelFinish(void ) [protected], [virtual]
Called as the user lets go of the thumbwheel in the left frame after a drag operation. The release. The let-go. Override this method in subclassed viewers to provide your own functionality on the thumbwheel π
See also: leftWheelStart(), leftWheelMotion(), bottomWheelStart(), rightWheelStart()
Reimplemented in SoQtPlaneViewer.
πΈ float SoQtFullViewer::getLeftWheelValue(void ) const [protected]
Gets the current value of the left thumbwheel. Look at it. Read it. Get that value π₯
See also: leftWheelMotion()
π void SoQtFullViewer::setLeftWheelValue(const float value) [protected]
Sets a new value for the left thumbwheel. Your wheel, your rules β¨
β void SoQtFullViewer::bottomWheelStart(void ) [protected], [virtual]
Called when the user starts 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.
π₯ void SoQtFullViewer::bottomWheelMotion(float value) [protected], [virtual]
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. Highkey the busiest method on this page π
See also: bottomWheelStart(), bottomWheelFinish(), leftWheelStart(), rightWheelStart()
Reimplemented in SoQtConstrainedViewer, SoQtExaminerViewer, and SoQtPlaneViewer.
π void SoQtFullViewer::bottomWheelFinish(void ) [protected], [virtual]
Called as the user lets 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.
π float SoQtFullViewer::getBottomWheelValue(void ) const [protected]
Gets the current value of the bottom thumbwheel. Value check: passed β¨
See also: bottomWheelMotion()
π§ void SoQtFullViewer::setBottomWheelValue(const float value) [protected]
Sets a new value for the bottom thumbwheel. Slay.
π« void SoQtFullViewer::rightWheelStart(void ) [protected], [virtual]
Called when the user starts 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.
π void SoQtFullViewer::rightWheelMotion(float value) [protected], [virtual]
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. Yes, there's three of these. Yes, they all matter π
See also: rightWheelStart(), rightWheelFinish(), leftWheelStart(), bottomWheelStart()
Reimplemented in SoQtExaminerViewer, SoQtFlyViewer, and SoQtPlaneViewer.
π void SoQtFullViewer::rightWheelFinish(void ) [protected], [virtual]
Called as the user lets 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.
π₯ float SoQtFullViewer::getRightWheelValue(void ) const [protected]
Gets the current value of the right thumbwheel. Last wheel, same energy π
See also: rightWheelMotion()
π void SoQtFullViewer::setRightWheelValue(const float value) [protected]
Sets a new value for the right thumbwheel. And that's the whole wheel saga, periodt.
β¨ void SoQtFullViewer::setLeftWheelString(const char *const string) [protected]
Sets the label of the left thumbwheel. Label it, bestie π·οΈ
π QWidget * SoQtFullViewer::getLeftWheelLabelWidget(void ) const [protected]
This method returns the native widget for the label below the left thumb wheel. Native widget, no cosplay π
πΈ void SoQtFullViewer::setBottomWheelString(const char *const string) [protected]
Sets the label of the bottom thumbwheel. Cute label incoming π«Ά
π¦ QWidget * SoQtFullViewer::getBottomWheelLabelWidget(void ) const [protected]
This method returns the native widget for the label beside the bottom thumb wheel. Beside, not below β read carefully, bestie π
β void SoQtFullViewer::setRightWheelString(const char *const string) [protected]
Sets the label of the right thumbwheel. Final label of the trio β¨
π QWidget * SoQtFullViewer::getRightWheelLabelWidget(void ) const [protected]
This method returns the native widget for the label below the right thumb wheel. And that's all three label widgets accounted for, no cap.
π SbBool SoQtFullViewer::processSoEvent(const SoEvent *const event) [protected], [virtual]
Okay so this is the big one. Toolkit-native events are tried to be converted to Coin-generic events in the SoQtRenderArea::processEvent() method. If this succeeds, they get forwarded to this method. Like a whole relay race of events πββοΈπ¨
This is a virtual method, and it is overridden in its subclasses to catch events of particular interest to the viewer classes, for instance.
Return TRUE if 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. Genuinely do not skip this, or your events will justβ¦ vanish π
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.
πΎ MEMBER DATA DOCUMENTATION πΎ
okay so this is the part where we meet all the protected data members β the actual stuff the class is holding onto. they're all [protected], which means they're inner-circle only, bestie. not for just anyone to touch. π«Ά
QWidget* SoQtFullViewer::leftWheel[protected]β the widget that is the thumbwheel sitting to the left of the render canvas. iconic little guy, holds it down on the left side. π‘QWidget* SoQtFullViewer::rightWheel[protected]β the widget representing the thumbwheel on the right side of the render canvas. yes, it's the leftWheel's sibling. no, they are not twins, they're on opposite sides, keep up. πQWidget* SoQtFullViewer::bottomWheel[protected]β the widget representing the thumbwheel below the render canvas. bottomWheel really said "lowest of the low" and honestly? respect. π¦QWidget* SoQtFullViewer::leftDecoration[protected]β the root widget for all the left-side decorations. like the parent widget of that whole left-side aesthetic. πQWidget* SoQtFullViewer::rightDecoration[protected]β the root widget for the right-side decorations. matching energy, opposite side. β¨QWidget* SoQtFullViewer::bottomDecoration[protected]β the root widget for the bottom decorations. it's giving ground floor, it's giving foundation. πΈQWidget* SoQtFullViewer::leftWheelLabel[protected]β the label widget of the left wheel. you know, the little text bit that says what the wheel does. π·οΈchar* SoQtFullViewer::leftWheelStr[protected]β the text of the left thumbwheel's label. it's achar*! a raw one! keep it close, bestie. πfloat SoQtFullViewer::leftWheelVal[protected]β the current value of the left thumbwheel. it's afloatso it's got decimals and vibes. π«QWidget* SoQtFullViewer::rightWheelLabel[protected]β the label widget of the right wheel. same deal, other side. πchar* SoQtFullViewer::rightWheelStr[protected]β the text of the right thumbwheel's label. twochar*s so far. living dangerously, love that for us. π₯float SoQtFullViewer::rightWheelVal[protected]β the current value of the right-side thumbwheel. note the slightly different wording in the original β right side, not right wheel. she's quirky like that. πQWidget* SoQtFullViewer::bottomWheelLabel[protected]β the label widget of the bottom wheel. the little name tag for the bottom hero. πchar* SoQtFullViewer::bottomWheelStr[protected]β the text of the bottom thumbwheel's label. thirdchar*. the trifecta is complete. π§float SoQtFullViewer::bottomWheelVal[protected]β the current value of the bottom thumbwheel. and that's all three values accounted for. the wheels have been thoroughly documented. βSoQtPopupMenu* SoQtFullViewer::prefmenu[protected]β a pointer to the pop-up menu instance. the preferences menu! the little menu that pops up! she has aSoQtPopupMenu*and she's not afraid to use it. π
βοΈ Author βοΈ
Generated automatically by Doxygen for SoQt from the source code. no human author here, bestie β the robot did it. Doxygen just vibed and produced this whole page. π€β¨
aaaand that's a wrap on SoQtFullViewer(3)! π this final part came to you courtesy of Version 1.6.2, dated Sat Jan 6 2024 12:20:55 β that's the source/version and date stamp, so you know exactly which cut of the docs you're reading. go forth and build your viewers, bestie, you've got all the facts now. periodt. π
ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms