25#ifndef _SO_QT_COMPONENT_
26#define _SO_QT_COMPONENT_
126 virtual QWidget*
getWidget()
const {
return _baseWidget; }
139 QWidget*
getShellWidget()
const {
return m_guiComponent->isTopLevelShell() ? parentWidget : NULL; }
266 { m_windowCloseFunc = func; m_windowCloseData = data; }
275 static void finish();
280#ifndef HIDDEN_FROM_DOC
281 void visibilityChanged(
SbBool visible);
287 const char* name = NULL,
297 void setBaseWidget( QWidget* w );
299 void setClassName(
const char* n ) { m_guiComponent->setClassName( n ); }
301 virtual void afterRealizeHook();
306 virtual SbString getDefaultWidgetName()
const;
307 virtual SbString getDefaultTitle()
const;
308 virtual SbString getDefaultIconTitle()
const;
323 void registerWidget( QWidget* w );
324 void unregisterWidget( QWidget* w );
328 static HPALETTE _setupColorPalette(
HDC );
331 virtual bool eventFilter( QObject*
object,QEvent *event );
341 void openHelpCard(
const char* cardName );
347 const char* buildHelpPath(
const char* filename );
349 void constructorCommon( QWidget* parent,
const char* name,
SbBool buildInsideParent,
SbBool sync );
355 QWidget* parentWidget;
356 QPointer<QWidget> _baseWidget;
362 static SbDict* widgetDictionary;
367 QWidget* m_oldParentWidget;
373 void* m_windowCloseData;
386 return QString::fromUtf16( m_guiComponent->getTitle().
toUtf16() );
392 return QString::fromUtf16( m_guiComponent->getIconTitle().
toUtf16() );
398 return m_guiComponent->getClassName();
404 return m_guiComponent->getWidgetName();
#define TRUE
Possible value of SbBool.
void SoQtComponentCB(void *userData, SoQtComponent *comp)
Class for smart character strings.
unsigned short * toUtf16() const
Returns the string as a UTF-16 string.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
void setTitle(const SbString &newTitle)
Sets window title.
const QString getIconTitle() const
Included for portability only.
const QString getTitle() const
Gets window title.
SbString getWidgetName() const
Returns the widget handle name.
QWidget * getShellWidget() const
Returns the topLevelShell widget handle (NULL if the topLevelShell hasn't been created by this compon...
virtual void show()
This shows the component.
SbString getClassName() const
Returns the class name.
SbVec2s getSize()
Convenience routine on the widget handle.
SbBool isTopLevelShell() const
Returns TRUE if this component is a top level shell component (has its own window).
SbBool isFullScreen(void) const
Queries if the viewer is in fullscreen mode.
SbGlContextHelper::Display getDisplay()
On UNIX, returns the X display associated with this components widget.
static SoQtComponent * getComponent(QWidget *widget)
Returns the SoQtComponent for this widget handle.
QWidget * getParentWidget() const
Returns the parent widget handle.
SbBool isFullScreenEnable(void) const
Queries if it is possible to put the viewer in fullscreen mode.
void setFullScreenEnable(const SbBool enable)
Enables/disables fullscreen mode.
void setWindowCloseCallback(SoQtComponentCB *func, void *data=NULL)
Sets which callback to call when the user closes this component (double click in the upper left corne...
void setTitle(const char *newTitle)
Sets window title.
void setSize(const SbVec2s &size)
Convenience routine on the widget handle.
void setIconTitle(const QString &newIconTitle)
Included for portability only.
SbBool isVisible()
Returns TRUE if this component is mapped onto the screen.
virtual SbBool setFullScreen(const SbBool enable)
Switches the viewer into (or out of) fullscreen mode.
virtual void hide()
This hides the component.
virtual QWidget * getWidget() const
This returns the base widget handle for this component.
void setTitle(const QString &newTitle)
Sets window title.
SbString helpFileName
Name of help file to open when the viewer Help button is pressed.
static SbGlContextHelper::Display getDisplay()
This method is included for portability only.