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__ 58 typedef void SoQtComponentCB(
void * user,
SoQtComponent * component);
59 typedef void SoQtComponentVisibilityCB(
void * user, SbBool visible);
69 virtual void show(
void);
70 virtual void hide(
void);
72 virtual void setComponentCursor(
const SoQtCursor & cursor);
73 static void setWidgetCursor(QWidget* w,
const SoQtCursor & cursor);
75 SbBool isFullScreen(
void)
const;
76 SbBool setFullScreen(
const SbBool onoff);
78 SbBool isVisible(
void);
79 SbBool isTopLevelShell(
void)
const;
81 QWidget* getWidget(
void)
const;
82 QWidget* getBaseWidget(
void)
const;
83 QWidget* getShellWidget(
void)
const;
84 QWidget* getParentWidget(
void)
const;
86 void setSize(
const SbVec2s size);
89 void setTitle(
const char *
const title);
90 const char * getTitle(
void)
const;
91 void setIconTitle(
const char *
const title);
92 const char * getIconTitle(
void)
const;
94 const char * getWidgetName(
void)
const;
95 const char * getClassName(
void)
const;
97 void setWindowCloseCallback(SoQtComponentCB *
const func,
98 void *
const user = NULL);
101 static void initClasses(
void);
105 const char *
const name = NULL,
106 const SbBool embed = TRUE);
108 virtual void afterRealizeHook(
void);
114 #ifndef __COIN_SOQT__ 116 #endif // __COIN_SOQT__ 118 void setClassName(
const char *
const name);
119 void setBaseWidget(QWidget* widget);
121 void registerWidget(QWidget* widget);
122 void unregisterWidget(QWidget* widget);
124 virtual const char * getDefaultWidgetName(
void)
const;
125 virtual const char * getDefaultTitle(
void)
const;
126 virtual const char * getDefaultIconTitle(
void)
const;
128 virtual void sizeChanged(
const SbVec2s & size);
130 void addVisibilityChangeCallback(SoQtComponentVisibilityCB *
const func,
131 void *
const user = NULL);
132 void removeVisibilityChangeCallback(SoQtComponentVisibilityCB *
const func,
133 void *
const user = NULL);
136 class SoQtComponentP * pimpl;
137 friend class SoGuiComponentP;
138 friend class SoQtComponentP;
145 Display * getDisplay(
void);
146 void fitSize(
const SbVec2s size);
149 void addWindowCloseCallback(SoXtComponentCB * callback,
void * closure = NULL);
150 void removeWindowCloseCallback(SoXtComponentCB * callback,
void * closure = NULL);
155 void invokeVisibilityChangeCallbacks(
const SbBool enable)
const;
156 void invokeWindowCloseCallbacks(
void)
const;
157 virtual void windowCloseAction(
void);
161 static void event_handler(Widget, XtPointer, XEvent *, Boolean *);
162 #endif // __COIN_SOXT__ 164 #ifdef __COIN_SOGTK__ 166 virtual SbBool eventFilter(GtkWidget *
object, GdkEvent * event);
168 static gint eventHandler(GtkWidget *
object, GdkEvent * event, gpointer closure);
169 #endif // __COIN_SOGTK__ 174 #endif // ! SOQT_COMPONENT_H The SoQtComponent class is the base class for all GUI components.
Definition: SoQtComponent.h:63
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