Translates and reports Qt events for the touch screen device. More...
#include <Inventor/touch/devices/SoQtTouchScreen.h>
Public Member Functions | |
SoQtTouchScreen (SoWidget mWindow) | |
virtual | ~SoQtTouchScreen () |
virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, void *unused=NULL) |
Enables the device for the passed widget. | |
virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
Disables the device for the passed widget. | |
virtual const SoEvent * | translateEvent (QEvent *event) |
Attempts to convert the passed event into an SoEvent. | |
SoTouchManager * | getTouchManager () const |
Gets the SoTouchManager containing events table, recognizers list and methods to use them. | |
Public Member Functions inherited from SoQtDevice | |
virtual void | enable (QWidget *w, XtEventHandler f, XtPointer data, void *unused=NULL)=0 |
Enables the device for the passed widget. | |
virtual void | disable (QWidget *w, XtEventHandler f, XtPointer data)=0 |
Disables the device for the passed widget. | |
void | setWindowSize (const SbVec2s &s) |
Sets the size of the window this device is registered for. | |
const SbVec2s & | getWindowSize () const |
Gets the size of the window, in pixels, this device is registered for. | |
Translates and reports Qt events for the touch screen device.
This class represents a touch screen input device for the Qt user interface toolkit. It translates and manages messages generated by the touch screen. When the touch screen device is registered in an SoQtRenderArea, the device is able to generate Open Inventor touch events (see SoTouchEvent) and gesture events (see SoGestureEvent) that can be handled (for example) using an SoEventCallback node.
It analyses each touch event and updates events in the SoTouchEvent table of SoTouchManager.
Note: Unlike SoQtMouse and SoQtKeyboard, this device must be explicitly registered with the render area / viewer by the application.
SoQtDevice, SoTouchManager, SoTouchEvent, SoGestureEvent
Definition at line 71 of file SoQtTouchScreen.h.
SoQtTouchScreen::SoQtTouchScreen | ( | SoWidget | mWindow | ) |
|
virtual |
|
virtual |
Disables the device for the passed widget.
|
virtual |
Enables the device for the passed widget.
When enabled, the callback function f will be invoked when events occur in the window. data is the clientData which will be passed.
SoTouchManager * SoQtTouchScreen::getTouchManager | ( | ) | const |
Gets the SoTouchManager containing events table, recognizers list and methods to use them.
|
virtual |
Attempts to convert the passed event into an SoEvent.
Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.
Implements SoQtDevice.