1# TuioTouch plugin for Qt 5 2 3## Introduction 4 5This is a QPA-using plugin (meaning, it uses Qt internals) that provides touch 6events from TUIO-based sources (such as [TUIOPad](https://code.google.com/p/tuiopad/)). 7 8[TUIO](http://www.tuio.org/) is a framework for providing touch events over the 9network (implemented here using a UDP transport). 10 11This repository also includes a simple [OSC](http://opensoundcontrol.org/spec-1_0) 12parser. OSC is the binary format that TUIO uses for over-the-wire communication. 13 14## Use 15 16Run your application with -plugin TuioTouch, e.g. 17 18`qmlscene foo.qml -plugin TuioTouch` 19 20Or make sure the plugin is loaded using the QT_QPA_GENERIC_PLUGINS environment 21variable. 22 23By default, you must direct TUIO packets to the IP of the machine the application 24is running on, protocol UDP, port 3333. If you want to customize the port, you 25may provide a port number like this: 26 27`qmlscene foo.qml -plugin TuioTouch:udp=3333` 28 29At present, UDP is the only supported transport mechanism. 30 31## Advanced use 32 33If you have the need to invert the X/Y axis, you can do so, by adding an 34additional option when loading the plugin. 35 36For example: 37 38`qmlscene foo.qml -plugin TuioTouch:udp=4000:invertx:inverty` 39 40Would invert the X and Y coordinates of all input coming in on port 4000. 41 42You can also rotate the coordinates directly, using the rotate option: 43 44`qmlscene foo.qml -plugin TuioTouch:udp=4000:rotate=180` 45 46Supported rotations are 90, 180, and 270. 47 48## Further work 49 50* Support other profiles (we implement 2Dcur, we want 2Dobj, 2Dblb?) 51* Support multiple simultaneous sources, generating distinct QTouchEvents 52 * We'd need to somehow not rely on FSEQ for removing touchpoints, else our 53 currently minor memory exhaustion problem could become a real issue 54* Support TCP transports? 55