QWSCalibratedMouseHandler Class ReferenceThe QWSCalibratedMouseHandler class provides mouse calibration and noise reduction in Qt for Embedded Linux. More... #include <QWSCalibratedMouseHandler> Inherits: QWSMouseHandler. Reimplemented Public Functions
Protected Functions
Detailed DescriptionThe QWSCalibratedMouseHandler class provides mouse calibration and noise reduction in Qt for Embedded Linux. Note that this class is only available in Qt for Embedded Linux. Qt for Embedded Linux provides ready-made drivers for several mouse protocols, see the pointer handling documentation for details. In general, custom mouse drivers can be implemented by subclassing the QWSMouseHandler class. But when the system device does not have a fixed mapping between device and screen coordinates and/or produces noisy events (e.g., a touchscreen), you should derive from the QWSCalibratedMouseHandler class instead to take advantage of its calibration functionality. As always, you must also create a mouse driver plugin (derived from QMouseDriverPlugin); the implementation of the QMouseDriverFactory class will then automatically detect the plugin, and load the driver into the server application at run-time using Qt's plugin system. QWSCalibratedMouseHandler provides an implementation of the calibrate() function to update the calibration parameters based on coordinate mapping of the given calibration data. The calibration data is represented by an QWSPointerCalibrationData object. The linear transformation between device coordinates and screen coordinates is performed by calling the transform() function explicitly on the points passed to the QWSMouseHandler::mouseChanged() function. Use the clearCalibration() function to make the mouse driver return mouse events in raw device coordinates and not in screen coordinates. The calibration parameters are recalculated whenever calibrate() is called, and they can be stored using the writeCalibration() function. Previously written parameters can be retrieved at any time using the readCalibration() function (calibration parameters are always read when the class is instantiated). Note that the calibration parameters is written to and read from the file currently specified by the POINTERCAL_FILE environment variable; the default file is /etc/pointercal. To achieve noise reduction, QWSCalibratedMouseHandler provides the sendFiltered() function. Use this function instead of mouseChanged() whenever a mouse event occurs. The filter's size can be manipulated using the setFilterSize() function. See also QWSMouseHandler, QWSPointerCalibrationData, and Mouse Calibration Example. Member Function Documentation
|
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com