|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QWSMouseHandler Class Reference

The QWSMouseHandler class is a mouse driver for Qt/Embedded. More...

    #include <QWSMouseHandler>

Part of the QtGui module.

- List of all members, including inherited members

### Public Functions

- QWSMouseHandler ( const QString & driver = QString::null, const QString & device = QString::null )
- virtual ~QWSMouseHandler ()
- virtual void calibrate ( const QWSPointerCalibrationData * data )
- virtual void clearCalibration ()
- void limitToScreen ( QPoint & pt )
- void mouseChanged ( const QPoint & pos, int bstate, int wheel = 0 )
- const QPoint & pos () const
- virtual void resume () = 0
- virtual void suspend () = 0

## Detailed Description

The QWSMouseHandler class is a mouse driver for Qt/Embedded.

The mouse driver handles events from system devices and generates mouse events.

A QWSMouseHandler will usually open some system device in its constructor, create a QSocketNotifier on that opened device and when it receives data, it will call mouseChanged() to send the event to Qt/Embedded for relaying to clients.

## Member Function Documentation

### QWSMouseHandler::QWSMouseHandler ( const QString & driver = QString::null, const QString & device = QString::null )

Constructs a mouse handler. This becomes the primary mouse handler.

Note that once created, mouse handlers are controlled by the system and should not be deleted.

The driver and device arguments are not used by this base class.

### QWSMouseHandler::~QWSMouseHandler () `[virtual]`

Destroys the mouse handler. You should not call this directly.

### void QWSMouseHandler::calibrate ( const QWSPointerCalibrationData * data ) `[virtual]`

This method is reimplemented in the calibrated mouse handler to set calibration information passed in data, for example, from the Qtopia calibration screen. This version does nothing.

### void QWSMouseHandler::clearCalibration () `[virtual]`

This method is reimplemented in the calibrated mouse handler to clear calibration information. This version does nothing.

### void QWSMouseHandler::limitToScreen ( QPoint & pt )

Ensures that the given point, pt is within the screen's boundaries, changing pt if necessary.

### void QWSMouseHandler::mouseChanged ( const QPoint & pos, int bstate, int wheel = 0 )

When a mouse event occurs this function is called with the mouse's position in pos, the state of its buttons in bstate, and the wheel motion in wheel.

### const QPoint & QWSMouseHandler::pos () const

Returns the mouse position.

### void QWSMouseHandler::resume () `[pure virtual]`

Must be implemented in subclasses to resume handling mouse events.

See also suspend.

### void QWSMouseHandler::suspend () `[pure virtual]`

Must be implemented in subclasses to suspend reading and handling of mouse events.

See also resume.