25#ifndef _SO_QT_COMPONENT_
26#define _SO_QT_COMPONENT_
28#include <Inventor/Qt/OivQtCompat.h>
33#include <Inventor/Qt/SoQt.h>
34#include <Inventor/Gui/SoGuiComponent.h>
36#include <Inventor/SbBasic.h>
37#include <Inventor/SbString.h>
38#include <Inventor/SbDict.h>
127 virtual QWidget*
getWidget()
const {
return _baseWidget; }
140 QWidget*
getShellWidget()
const {
return m_guiComponent->isTopLevelShell() ? parentWidget : NULL; }
267 { m_windowCloseFunc = func; m_windowCloseData = data; }
274 void setFullScreenOn(
SbBool enable ) { m_guiComponent->setFullScreen( enable ); };
276 static void finish();
281#ifndef HIDDEN_FROM_DOC
282 void visibilityChanged(
SbBool visible);
288 const char* name = NULL,
289 SbBool buildInsideParent = TRUE,
298 void setBaseWidget( QWidget* w );
300 void setClassName(
const char* n ) { m_guiComponent->setClassName( n ); }
302 virtual void afterRealizeHook();
307 virtual SbString getDefaultWidgetName()
const;
308 virtual SbString getDefaultTitle()
const;
309 virtual SbString getDefaultIconTitle()
const;
324 void registerWidget( QWidget* w );
325 void unregisterWidget( QWidget* w );
329 static HPALETTE _setupColorPalette( HDC );
332 virtual bool eventFilter( QObject*
object,QEvent *event );
342 void openHelpCard(
const char* cardName );
344 static void windowCloseActionCB( SoWidget widget,
SoQtComponent* p,
void* data );
348 const char* buildHelpPath(
const char* filename );
350 void constructorCommon( QWidget* parent,
const char* name,
SbBool buildInsideParent,
SbBool sync );
356 QWidget* parentWidget;
357 QPointer<QWidget> _baseWidget;
363 static SbDict* widgetDictionary;
368 QWidget* m_oldParentWidget;
374 void* m_windowCloseData;
387 return QString::fromUtf16( m_guiComponent->getTitle().
toUtf16() );
393 return QString::fromUtf16( m_guiComponent->getIconTitle().
toUtf16() );
399 return m_guiComponent->getClassName();
405 return m_guiComponent->getWidgetName();
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.
void SoQtComponentCB(void *userData, SoQtComponent *comp)
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.