SoQtTouchScreen Class Reference

Translates and reports Qt events for the touch screen device. More...

#include <Inventor/touch/devices/SoQtTouchScreen.h>

Inheritance diagram for SoQtTouchScreen:
SoQtDevice

List of all members.

Public Member Functions

 SoQtTouchScreen (SoWidget mWindow)
virtual ~SoQtTouchScreen ()
virtual void enable (SoWidget w, XtEventHandler f, XtPointer data, void *unused=NULL)
virtual void disable (SoWidget w, XtEventHandler f, XtPointer data)
virtual const SoEventtranslateEvent (QEvent *event)
SoTouchManagergetTouchManager () const

Detailed Description

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.

     QWidget *mainWindow = SoQt::init(argv[0]);
     . . .
     SoQtExaminerViewer* pViewer = new SoQtExaminerViewer(mainWindow);
     SoQtTouchScreen touchScreenDevice(mainWindow);
     pViewer->registerDevice(&touchScreenDevice);

SEE ALSO

SoQtDevice, SoTouchManager, SoTouchEvent, SoGestureEvent

See related examples:

DragGestureRecognizer, FingerDraw, QtTouchEvent, TouchInertia


Constructor & Destructor Documentation

SoQtTouchScreen::SoQtTouchScreen ( SoWidget  mWindow  ) 
virtual SoQtTouchScreen::~SoQtTouchScreen (  )  [virtual]

Member Function Documentation

virtual void SoQtTouchScreen::disable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data 
) [virtual]

Disables the device for the passed widget.

virtual void SoQtTouchScreen::enable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data,
void *  unused = NULL 
) [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 const SoEvent* SoQtTouchScreen::translateEvent ( QEvent *  event  )  [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.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/