Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoQtComponent Class Reference

VSG extension Abstract base class for all Open Inventor Qt components. More...

#include <Inventor/Qt/SoQtComponent.h>

+ Inheritance diagram for SoQtComponent:

Public Member Functions

virtual void show ()
 This shows the component.
 
virtual void hide ()
 This hides the component.
 
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
virtual QWidget * getWidget () const
 This returns the base widget handle for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
QWidget * getShellWidget () const
 Returns the topLevelShell widget handle (NULL if the topLevelShell hasn't been created by this component).
 
QWidget * getParentWidget () const
 Returns the parent widget handle.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget handle.
 
SbVec2s getSize ()
 Convenience routine on the widget handle.
 
virtual SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable (void) const
 Queries if it is possible to put the viewer in fullscreen mode.
 
SbGlContextHelper::Display getDisplay ()
 On UNIX, returns the X display associated with this components widget.
 
void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
void setTitle (const QString &newTitle)
 Sets window title.
 
const QString getTitle () const
 Gets window title.
 
void setIconTitle (const QString &newIconTitle)
 Included for portability only.
 
const QString getIconTitle () const
 Included for portability only.
 
SbString getWidgetName () const
 Returns the widget handle name.
 
SbString getClassName () const
 Returns the class name.
 
void setWindowCloseCallback (SoQtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 

Static Public Member Functions

static SoQtComponentgetComponent (QWidget *widget)
 Returns the SoQtComponent for this widget handle.
 

Public Attributes

SbString helpFileName
 Name of help file to open when the viewer Help button is pressed.
 

Detailed Description

VSG extension Abstract base class for all Open Inventor Qt components.

Abstract base class from which all Open Inventor Qt components are derived. This class provides a basic C++ protocol for building and displaying Qt components. Components are used to encapsulate some function or task into a reusable package in the form of a Qt widget handle that can be used in any Open Inventor Qt program. See the Example section on how to build and use SoQtComponents.

EXAMPLE

SEE ALSO

SoQt, SoQtRenderArea, SoQtViewer

Definition at line 100 of file SoQtComponent.h.

Member Function Documentation

◆ getClassName()

SbString SoQtComponent::getClassName ( ) const
inline

Returns the class name.

The class name is predefined by each component.

Definition at line 396 of file SoQtComponent.h.

◆ getComponent()

static SoQtComponent * SoQtComponent::getComponent ( QWidget *  widget)
static

Returns the SoQtComponent for this widget handle.

If the widget handle does not match that of any Open Inventor component, then NULL is returned.

◆ getDisplay()

SbGlContextHelper::Display SoQtComponent::getDisplay ( )
inline

On UNIX, returns the X display associated with this components widget.

Definition at line 378 of file SoQtComponent.h.

◆ getIconTitle()

const QString SoQtComponent::getIconTitle ( ) const
inline

Included for portability only.

Definition at line 390 of file SoQtComponent.h.

◆ getParentWidget()

QWidget * SoQtComponent::getParentWidget ( ) const
inline

Returns the parent widget handle.

Definition at line 144 of file SoQtComponent.h.

◆ getShellWidget()

QWidget * SoQtComponent::getShellWidget ( ) const
inline

Returns the topLevelShell widget handle (NULL if the topLevelShell hasn't been created by this component).

Definition at line 139 of file SoQtComponent.h.

◆ getSize()

SbVec2s SoQtComponent::getSize ( )

Convenience routine on the widget handle.

◆ getTitle()

const QString SoQtComponent::getTitle ( ) const
inline

Gets window title.

Definition at line 384 of file SoQtComponent.h.

◆ getWidget()

virtual QWidget * SoQtComponent::getWidget ( ) const
inlinevirtual

This returns the base widget handle for this component.

Definition at line 126 of file SoQtComponent.h.

◆ getWidgetName()

SbString SoQtComponent::getWidgetName ( ) const
inline

Returns the widget handle name.

The widget handle name is passed to the build method.

Definition at line 402 of file SoQtComponent.h.

◆ hide()

virtual void SoQtComponent::hide ( )
virtual

◆ isFullScreen()

SbBool SoQtComponent::isFullScreen ( void  ) const

Queries if the viewer is in fullscreen mode.

◆ isFullScreenEnable()

SbBool SoQtComponent::isFullScreenEnable ( void  ) const

Queries if it is possible to put the viewer in fullscreen mode.

◆ isTopLevelShell()

SbBool SoQtComponent::isTopLevelShell ( ) const
inline

Returns TRUE if this component is a top level shell component (has its own window).

Subclasses may use this to decide if they are allowed to resize themselves.

Definition at line 133 of file SoQtComponent.h.

◆ isVisible()

SbBool SoQtComponent::isVisible ( )

Returns TRUE if this component is mapped onto the screen.

For a component to be visible, its widget and the shell containing this widget must be mapped (which is FALSE when the component is iconified).

◆ setFullScreen()

virtual SbBool SoQtComponent::setFullScreen ( const SbBool  enable)
virtual

Switches the viewer into (or out of) fullscreen mode.

This works fine on Windows, but has certain problems under the X Window System. For details, see the Qt documentation for QWidget::showFullScreen.

◆ setFullScreenEnable()

void SoQtComponent::setFullScreenEnable ( const SbBool  enable)

Enables/disables fullscreen mode.

If fullscreen mode is disabled, it is not possible to activate fullscreen mode with the right mouse button popup menu.

◆ setIconTitle()

void SoQtComponent::setIconTitle ( const QString &  newIconTitle)

Included for portability only.

◆ setSize()

void SoQtComponent::setSize ( const SbVec2s size)

Convenience routine on the widget handle.

◆ setTitle() [1/3]

void SoQtComponent::setTitle ( const char *  newTitle)

Sets window title.

The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).

◆ setTitle() [2/3]

void SoQtComponent::setTitle ( const QString &  newTitle)

Sets window title.

The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).

◆ setTitle() [3/3]

void SoQtComponent::setTitle ( const SbString newTitle)

Sets window title.

The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).

◆ setWindowCloseCallback()

void SoQtComponent::setWindowCloseCallback ( SoQtComponentCB func,
void *  data = NULL 
)
inline

Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.

A pointer to this class will be passed as the callback data.

Note: this callback is supplied because the user may wish to delete this component when it is closed.

Definition at line 265 of file SoQtComponent.h.

◆ show()

virtual void SoQtComponent::show ( )
virtual

Member Data Documentation

◆ helpFileName

SbString SoQtComponent::helpFileName

Name of help file to open when the viewer Help button is pressed.

Definition at line 246 of file SoQtComponent.h.


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