Qt 4.8
Public Functions | Protected Variables | Friends | List of all members
QWSTslibMouseHandler Class Reference

The QWSTslibMouseHandler class implements a mouse driver for the Universal Touch Screen Library, tslib. More...

#include <qmousetslib_qws.h>

Inheritance diagram for QWSTslibMouseHandler:
QWSCalibratedMouseHandler QWSMouseHandler

Public Functions

void calibrate (const QWSPointerCalibrationData *data)
 Reimplemented Function More...
 
void clearCalibration ()
 Reimplemented Function More...
 
 QWSTslibMouseHandler (const QString &driver=QString(), const QString &device=QString())
 
void resume ()
 Reimplemented Function More...
 
void suspend ()
 Reimplemented Function More...
 
 ~QWSTslibMouseHandler ()
 
- Public Functions inherited from QWSCalibratedMouseHandler
virtual void getCalibration (QWSPointerCalibrationData *) const
 Fills cd with the device coordinates corresponding to the given screen coordinates. More...
 
 QWSCalibratedMouseHandler (const QString &driver=QString(), const QString &device=QString())
 
- Public Functions inherited from QWSMouseHandler
void limitToScreen (QPoint &pt)
 Ensures that the given position is within the screen's boundaries, changing the position if necessary. More...
 
void mouseChanged (const QPoint &pos, int bstate, int wheel=0)
 Notifies the system of a new mouse event. More...
 
const QPointpos () const
 Returns the current mouse position. More...
 
 QWSMouseHandler (const QString &driver=QString(), const QString &device=QString())
 Constructs a mouse driver. More...
 
void setScreen (const QScreen *screen)
 Sets the screen for this mouse driver to be the given screen. More...
 
virtual ~QWSMouseHandler ()
 Destroys this mouse driver. More...
 

Protected Variables

QWSTslibMouseHandlerPrivated
 
- Protected Variables inherited from QWSMouseHandler
QWSMouseHandlerPrivated_ptr
 
QPointmousePos
 

Friends

class QWSTslibMouseHandlerPrivate
 

Additional Inherited Members

- Protected Functions inherited from QWSCalibratedMouseHandler
void readCalibration ()
 Reads previously written calibration parameters which are stored in /etc/pointercal (separated by whitespace and in alphabetical order). More...
 
bool sendFiltered (const QPoint &, int button)
 Notifies the system of a new mouse event after applying a noise reduction filter. More...
 
void setFilterSize (int)
 Sets the size of the filter used in noise reduction to the given size. More...
 
QPoint transform (const QPoint &)
 Transforms the given position from device coordinates to screen coordinates, and returns the transformed position. More...
 
void writeCalibration ()
 Saves the current calibration parameters in /etc/pointercal (separated by whitespace and in alphabetical order). More...
 

Detailed Description

The QWSTslibMouseHandler class implements a mouse driver for the Universal Touch Screen Library, tslib.

Warning
This function is not part of the public interface.

QWSTslibMouseHandler inherits the QWSCalibratedMouseHandler class, providing calibration and noise reduction functionality in addition to generating mouse events, for devices using the Universal Touch Screen Library.

To be able to compile this mouse handler, Qt for Embedded Linux must be configured with the -qt-mouse-tslib option, see the Pointer Handling documentation for details. In addition, the tslib headers and library must be present in the build environment. The tslib sources can be downloaded from http://tslib.berlios.de/ . Use the -L and -I options with configure to explicitly specify the location of the library and its headers:

configure -L <path to tslib library> -I <path to tslib headers>

In order to use this mouse handler, tslib must also be correctly installed on the target machine. This includes providing a ts.conf configuration file and setting the necessary environment variables, see the README file provided with tslib for details.

The ts.conf file will usually contain the following two lines

module_raw input
module linear

To make Qt for Embedded Linux explicitly choose the tslib mouse handler, set the QWS_MOUSE_PROTO environment variable.

See also
{Pointer Handling}, {Qt for Embedded Linux}

Definition at line 57 of file qmousetslib_qws.h.

Constructors and Destructors

◆ QWSTslibMouseHandler()

QWSTslibMouseHandler::QWSTslibMouseHandler ( const QString driver = QString(),
const QString device = QString() 
)
explicit
Warning
This function is not part of the public interface.

Definition at line 322 of file qmousetslib_qws.cpp.

324  : QWSCalibratedMouseHandler(driver, device)
325 {
326  d = new QWSTslibMouseHandlerPrivate(this, device);
327 }
QWSTslibMouseHandlerPrivate * d
friend class QWSTslibMouseHandlerPrivate
QWSCalibratedMouseHandler(const QString &driver=QString(), const QString &device=QString())
Definition: qmouse_qws.cpp:382

◆ ~QWSTslibMouseHandler()

QWSTslibMouseHandler::~QWSTslibMouseHandler ( )
Warning
This function is not part of the public interface.

Definition at line 332 of file qmousetslib_qws.cpp.

333 {
334  delete d;
335 }
QWSTslibMouseHandlerPrivate * d

Functions

◆ calibrate()

void QWSTslibMouseHandler::calibrate ( const QWSPointerCalibrationData data)
virtual

Reimplemented Function

Reimplemented from QWSCalibratedMouseHandler.

Definition at line 364 of file qmousetslib_qws.cpp.

365 {
366  d->calibrate(data);
367 }
QWSTslibMouseHandlerPrivate * d
void calibrate(const QWSPointerCalibrationData *data)

◆ clearCalibration()

void QWSTslibMouseHandler::clearCalibration ( )
virtual

Reimplemented Function

Reimplemented from QWSCalibratedMouseHandler.

Definition at line 356 of file qmousetslib_qws.cpp.

357 {
358  d->clearCalibration();
359 }
QWSTslibMouseHandlerPrivate * d

◆ resume()

void QWSTslibMouseHandler::resume ( )
virtual

Reimplemented Function

Implements QWSMouseHandler.

Definition at line 348 of file qmousetslib_qws.cpp.

349 {
350  d->resume();
351 }
QWSTslibMouseHandlerPrivate * d

◆ suspend()

void QWSTslibMouseHandler::suspend ( )
virtual

Reimplemented Function

Implements QWSMouseHandler.

Definition at line 340 of file qmousetslib_qws.cpp.

341 {
342  d->suspend();
343 }
QWSTslibMouseHandlerPrivate * d

Friends and Related Functions

◆ QWSTslibMouseHandlerPrivate

Definition at line 71 of file qmousetslib_qws.h.

Referenced by QWSTslibMouseHandler().

Properties

◆ d

QWSTslibMouseHandlerPrivate* QWSTslibMouseHandler::d
protected

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