Qt Toolkit - Qt/Embedded Pointer Handling

| Classes - Annotated - Tree - Functions - Home - Structure

# Qt/Embedded Pointer Handling

Pointer handling in Qt/Embedded works for any mouse-like device such as a touchpanel, a trackball, or real mouse.

## Mouse Protocols

Qt/Embedded uses the environment variable QWS_MOUSE_PROTO to determine which mouse to use. This environment variable should be set to:

> <protocol>`:`<device>

where <protocol> is one of:

- MouseMan
- IntelliMouse
- Microsoft

and <device> is the mouse device, often `/dev/mouse`. If no such variable is specified, the built-in default is `MouseMan:/dev/mouse`.

If you require support for a mouse other than these, you can use GPM to translate the mouse protocol as an interim solution. To do this, run:

        gpm -t help

choose a protocol from the list and run:

        gpm -R ps2 -t <protocol>

In Qt/Embedded 2.2.0 no attempt is made to auto-detect the mouse type, on the assumption that an embedded device will support a single mouse protocol. Such auto-detection may be available in a future release.

To add another protocol, new subclasses of QMouseHandler can be written in `kernel/qwsmouse_qws.cpp`.

## Vr Touch Panel

Qt/Embedded ships with support for the NEC Vr41XX touchpanel. Like an additional mouse protocol, this is implemented by subclassing QMouseHandler in `kernel/qwsmouse_qws.cpp`.