diff options
Diffstat (limited to 'examples/opengl/overlay_x11')
-rw-r--r-- | examples/opengl/overlay_x11/README | 14 | ||||
-rw-r--r-- | examples/opengl/overlay_x11/README.X11-OVERLAYS | 8 | ||||
-rw-r--r-- | examples/opengl/overlay_x11/gearwidget.h | 2 | ||||
-rw-r--r-- | examples/opengl/overlay_x11/overlay_x11.doc | 14 |
4 files changed, 19 insertions, 19 deletions
diff --git a/examples/opengl/overlay_x11/README b/examples/opengl/overlay_x11/README index f11c439df..00b0f6454 100644 --- a/examples/opengl/overlay_x11/README +++ b/examples/opengl/overlay_x11/README @@ -3,7 +3,7 @@ UPDATE: From version 5.0 onwards, the TQt OpenGL Extension includes direct support for use of OpenGL overlays. For many uses of overlays, this makes the technique described below redundant. See the 'overlay' -example program. The following is a discussion on how to use non-QGL +example program. The following is a discussion on how to use non-TQGL widgets in overlay planes. ----------------------------------------------------------------------- @@ -15,10 +15,10 @@ Extension with X11 overlay visuals. The example program has three main parts: -GearWidget: A simple QGLWidget that renders the usual gears. Modified +GearWidget: A simple TQGLWidget that renders the usual gears. Modified so that it will print a debug message every time it redraws (renders) itself. Thus, you can eaily confirm that drawing in the overlay plane -does not cause redrawings in the main plane where the QGLWidget +does not cause redrawings in the main plane where the TQGLWidget resides. RubberbandWidget: Very simple standard (non-GL) TQt widget that @@ -38,7 +38,7 @@ Running it: ----------- Start the overlayrubber executable. Click and drag with the left mouse -button to see rubberband drawing. Observe that the QGLWidget does +button to see rubberband drawing. Observe that the TQGLWidget does not redraw itself (no redraw debug messages are output), and yet the image is not destroyed. Marvel at the coolness of X11 overlays! @@ -58,15 +58,15 @@ Using with geometry management: The QLayout classes will not allow you to put one widget (the overlay) on top of another (the OpenGL widget); that would defy the whole purpose of the automatic layout. The solution is to add just one of them to the QLayout object. Have it -keep a pointer to the other (i.e. the QGLWidget knows about its +keep a pointer to the other (i.e. the TQGLWidget knows about its overlay widget or vice versa). Implement the resizeEvent() method of the widget you put in the layout, and make it call setGeometry() on the other widget with its own geometry as parameters, thus keeping the two widgets' geometries synchronized. -Using with QPalette and TQColorGroup: Instead of the somewhat +Using with TQPalette and TQColorGroup: Instead of the somewhat simplistic setBackgroundColor( transparentColor ), you can use Qt's -QPalette system for having your overlay widgets use transparent color +TQPalette system for having your overlay widgets use transparent color for what you want. This way, the normal TQt widgets can be used as overlays for fancy effects: just create a palette for them with the transparent color for the wanted color roles, e.g. Background and diff --git a/examples/opengl/overlay_x11/README.X11-OVERLAYS b/examples/opengl/overlay_x11/README.X11-OVERLAYS index 18bcb1e5f..7d014bbca 100644 --- a/examples/opengl/overlay_x11/README.X11-OVERLAYS +++ b/examples/opengl/overlay_x11/README.X11-OVERLAYS @@ -11,7 +11,7 @@ highly recommended book "OpenGL Programming for the X Window System" UPDATE: From version 5.0 onwards, the TQt OpenGL Extension includes direct support for use of OpenGL overlays. For many uses of overlays, this makes the technique described below redundant. See the 'overlay' -example program. The following is a discussion on how to use non-QGL +example program. The following is a discussion on how to use non-TQGL widgets in overlay planes. ----------------------------------------------------------------------- @@ -43,9 +43,9 @@ for more information. How it works: ------------- -Given the above, a QGLWidget will by default use the main plane +Given the above, a TQGLWidget will by default use the main plane visual, while all other widgets will use the overlay visual. Thus, one -can place a normal widget on top of the QGLWidget, and do drawing in +can place a normal widget on top of the TQGLWidget, and do drawing in it, without destroying the image in the OpenGL window. In other words, one can use all the drawing capabilities of TQPainter to draw the annotations, rubberbands, whatever. For the typical use of overlays, @@ -85,7 +85,7 @@ the visual is in an overlay plane. transparency information for overlay visuals. The overlayrubber example program will output what visual is used for -the normal TQt widgets, and what visual is used by the QGLWidget. +the normal TQt widgets, and what visual is used by the TQGLWidget. diff --git a/examples/opengl/overlay_x11/gearwidget.h b/examples/opengl/overlay_x11/gearwidget.h index ce1c2b822..4c04fcbc8 100644 --- a/examples/opengl/overlay_x11/gearwidget.h +++ b/examples/opengl/overlay_x11/gearwidget.h @@ -12,7 +12,7 @@ #ifndef GEAR_H #define GEAR_H -#include <ntqgl.h> +#include <tqgl.h> class GearWidget : public TQGLWidget { diff --git a/examples/opengl/overlay_x11/overlay_x11.doc b/examples/opengl/overlay_x11/overlay_x11.doc index 8b2f0a459..d38bff08c 100644 --- a/examples/opengl/overlay_x11/overlay_x11.doc +++ b/examples/opengl/overlay_x11/overlay_x11.doc @@ -7,7 +7,7 @@ direct support for use of OpenGL overlays. For many uses of overlays, this makes the technique described below redundant. See the \link opengl-overlay-example.html overlay\endlink example program. The -following is a discussion on how to use non-QGL widgets in overlay +following is a discussion on how to use non-TQGL widgets in overlay planes. Overlayrubber: An example program showing how to use TQt and TQt OpenGL @@ -21,11 +21,11 @@ information on \link opengl-x11-overlays.html overlays\endlink. The example program has three main parts: \list 1 -\i \e GearWidget - a normal, simple QGLWidget. This renders the usual +\i \e GearWidget - a normal, simple TQGLWidget. This renders the usual gears. It has been modified to print a debug message every time it redraws (renders) itself. Thus, you can easily confirm that drawing in the overlay plane does not cause redrawings in the main plane where -the QGLWidget resides. +the TQGLWidget resides. \i \e RubberbandWidget - Very simple standard (non-GL) TQt widget that implements rubberband drawing. Designed for use in an overlay plane. @@ -42,7 +42,7 @@ color of that plane. \section1 Running the Example Start the \c overlayrubber executable. Click and drag with the left -mouse button to see rubberband drawing. Observe that the QGLWidget +mouse button to see rubberband drawing. Observe that the TQGLWidget does not redraw itself (no redraw debug messages are output), and yet the image is not destroyed. Marvel at the coolness of X11 overlays! @@ -63,15 +63,15 @@ be moved, resized, or removed without destroying the OpenGL image. putting one widget (the overlay) on top of another (the OpenGL widget); that would defy the whole purpose of the automatic layout. The solution is to add just one of them to the QLayout object. Have it -keep a pointer to the other (i.e. the QGLWidget knows about its +keep a pointer to the other (i.e. the TQGLWidget knows about its overlay widget or vice versa). Implement the resizeEvent() method of the widget you put in the layout, and make it call setGeometry() on the other widget with its own geometry as parameters, thus keeping the two widgets' geometries synchronized. -\i \e{Using together with QPalette and TQColorGroup.} Instead of the +\i \e{Using together with TQPalette and TQColorGroup.} Instead of the simplistic setBackgroundColor( transparentColor ), you can -use Qt's QPalette system to make your overlay widgets use +use Qt's TQPalette system to make your overlay widgets use transparent color for what you want. This way, the normal TQt widgets can be used as overlays for fancy effects. Just create a palette for them with the transparent color for the relevant color roles, e.g. |