1 #ifndef SOQT_COMPONENT_H 2 #define SOQT_COMPONENT_H 38 #include <Inventor/SbLinear.h> 39 #include <Inventor/Qt/SoQtObject.h> 43 #endif // __COIN_SOQT__ 45 #include <X11/Intrinsic.h> 46 #endif // __COIN_SOXT__ 49 #endif // __COIN_SOGTK__ 52 #endif // __COIN_SOWIN__ 55 #endif // __COIN_SOWX__ 61 typedef void SoQtComponentCB(
void * user,
SoQtComponent * component);
62 typedef void SoQtComponentVisibilityCB(
void * user, SbBool visible);
72 virtual void show(
void);
73 virtual void hide(
void);
75 virtual void setComponentCursor(
const SoQtCursor & cursor);
76 static void setWidgetCursor(QWidget* w,
const SoQtCursor & cursor);
78 SbBool isFullScreen(
void)
const;
79 SbBool setFullScreen(
const SbBool onoff);
81 SbBool isVisible(
void);
82 SbBool isTopLevelShell(
void)
const;
84 QWidget* getWidget(
void)
const;
85 QWidget* getBaseWidget(
void)
const;
86 QWidget* getShellWidget(
void)
const;
87 QWidget* getParentWidget(
void)
const;
89 void setSize(
const SbVec2s size);
92 void setTitle(
const char *
const title);
93 const char * getTitle(
void)
const;
94 void setIconTitle(
const char *
const title);
95 const char * getIconTitle(
void)
const;
97 const char * getWidgetName(
void)
const;
98 const char * getClassName(
void)
const;
100 void setWindowCloseCallback(SoQtComponentCB *
const func,
101 void *
const user = NULL);
104 static void initClasses(
void);
108 const char *
const name = NULL,
109 const SbBool embed = TRUE);
111 virtual void afterRealizeHook(
void);
117 #ifndef __COIN_SOQT__ 119 #endif // __COIN_SOQT__ 121 void setClassName(
const char *
const name);
122 void setBaseWidget(QWidget* widget);
124 void registerWidget(QWidget* widget);
125 void unregisterWidget(QWidget* widget);
127 virtual const char * getDefaultWidgetName(
void)
const;
128 virtual const char * getDefaultTitle(
void)
const;
129 virtual const char * getDefaultIconTitle(
void)
const;
131 virtual void sizeChanged(
const SbVec2s & size);
133 void addVisibilityChangeCallback(SoQtComponentVisibilityCB *
const func,
134 void *
const user = NULL);
135 void removeVisibilityChangeCallback(SoQtComponentVisibilityCB *
const func,
136 void *
const user = NULL);
139 class SoQtComponentP * pimpl;
140 friend class SoGuiComponentP;
141 friend class SoQtComponentP;
148 Display * getDisplay(
void);
149 void fitSize(
const SbVec2s size);
152 void addWindowCloseCallback(SoXtComponentCB * callback,
void * closure = NULL);
153 void removeWindowCloseCallback(SoXtComponentCB * callback,
void * closure = NULL);
158 void invokeVisibilityChangeCallbacks(
const SbBool enable)
const;
159 void invokeWindowCloseCallbacks(
void)
const;
160 virtual void windowCloseAction(
void);
164 static void event_handler(Widget, XtPointer, XEvent *, Boolean *);
165 #endif // __COIN_SOXT__ 167 #ifdef __COIN_SOGTK__ 169 virtual SbBool eventFilter(GtkWidget *
object, GdkEvent * event);
171 static gint eventHandler(GtkWidget *
object, GdkEvent * event, gpointer closure);
172 #endif // __COIN_SOGTK__ 177 #endif // ! SOQT_COMPONENT_H The SoQtComponent class is the base class for all GUI components.
Definition: SoQtComponent.h:66
The SoQtObject class is the common superclass for all SoQt component classes.
Definition: SoQtObject.h:48
The SoQtCursor class is used to set cursors for GUI components.
Definition: SoQtCursor.h:41