1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/embedded/qmouse_qws.cpp -->
7
<title>Qt 4.0: QWSMouseHandler Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QWSMouseHandler Class Reference</h1>
21
<p>The QWSMouseHandler class is a mouse driver for Qt/Embedded. <a href="#details">More...</a></p>
22
<pre>#include <QWSMouseHandler></pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
24
<li><a href="qwsmousehandler-members.html">List of all members, including inherited members</a></li>
26
<a name="public-functions"></a>
27
<h3>Public Functions</h3>
29
<li><div class="fn"/><b><a href="qwsmousehandler.html#QWSMouseHandler">QWSMouseHandler</a></b> ( const QString & <i>driver</i> = QString(), const QString & <i>device</i> = QString() )</li>
30
<li><div class="fn"/>virtual <b><a href="qwsmousehandler.html#dtor.QWSMouseHandler">~QWSMouseHandler</a></b> ()</li>
31
<li><div class="fn"/>virtual void <b><a href="qwsmousehandler.html#calibrate">calibrate</a></b> ( const QWSPointerCalibrationData * <i>data</i> )</li>
32
<li><div class="fn"/>virtual void <b><a href="qwsmousehandler.html#clearCalibration">clearCalibration</a></b> ()</li>
33
<li><div class="fn"/>void <b><a href="qwsmousehandler.html#limitToScreen">limitToScreen</a></b> ( QPoint & <i>pt</i> )</li>
34
<li><div class="fn"/>void <b><a href="qwsmousehandler.html#mouseChanged">mouseChanged</a></b> ( const QPoint & <i>pos</i>, int <i>bstate</i>, int <i>wheel</i> = 0 )</li>
35
<li><div class="fn"/>const QPoint & <b><a href="qwsmousehandler.html#pos">pos</a></b> () const</li>
36
<li><div class="fn"/>virtual void <b><a href="qwsmousehandler.html#resume">resume</a></b> () = 0</li>
37
<li><div class="fn"/>virtual void <b><a href="qwsmousehandler.html#suspend">suspend</a></b> () = 0</li>
39
<a name="details"></a>
41
<h2>Detailed Description</h2>
42
<p>The QWSMouseHandler class is a mouse driver for Qt/Embedded.</p>
43
<p>The mouse driver handles events from system devices and generates mouse events.</p>
44
<p>A QWSMouseHandler will usually open some system device in its constructor, create a <a href="qsocketnotifier.html">QSocketNotifier</a> on that opened device and when it receives data, it will call <a href="qwsmousehandler.html#mouseChanged">mouseChanged</a>() to send the event to Qt/Embedded for relaying to clients.</p>
46
<h2>Member Function Documentation</h2>
47
<h3 class="fn"><a name="QWSMouseHandler"></a>QWSMouseHandler::QWSMouseHandler ( const <a href="qstring.html">QString</a> & <i>driver</i> = QString(), const <a href="qstring.html">QString</a> & <i>device</i> = QString() )</h3>
48
<p>Constructs a mouse handler. This becomes the primary mouse handler.</p>
49
<p>Note that once created, mouse handlers are controlled by the system and should not be deleted.</p>
50
<p>The <i>driver</i> and <i>device</i> arguments are not used by this base class.</p>
51
<h3 class="fn"><a name="dtor.QWSMouseHandler"></a>QWSMouseHandler::~QWSMouseHandler () <tt> [virtual]</tt></h3>
52
<p>Destroys the mouse handler. You should not call this directly.</p>
53
<h3 class="fn"><a name="calibrate"></a>void QWSMouseHandler::calibrate ( const <a href="qwspointercalibrationdata.html">QWSPointerCalibrationData</a> * <i>data</i> ) <tt> [virtual]</tt></h3>
54
<p>This method is reimplemented in the calibrated mouse handler to set calibration information passed in <i>data</i>, for example, from the Qtopia calibration screen. This version does nothing.</p>
55
<h3 class="fn"><a name="clearCalibration"></a>void QWSMouseHandler::clearCalibration () <tt> [virtual]</tt></h3>
56
<p>This method is reimplemented in the calibrated mouse handler to clear calibration information. This version does nothing.</p>
57
<h3 class="fn"><a name="limitToScreen"></a>void QWSMouseHandler::limitToScreen ( <a href="qpoint.html">QPoint</a> & <i>pt</i> )</h3>
58
<p>Ensures that the given point, <i>pt</i> is within the screen's boundaries, changing <i>pt</i> if necessary.</p>
59
<h3 class="fn"><a name="mouseChanged"></a>void QWSMouseHandler::mouseChanged ( const <a href="qpoint.html">QPoint</a> & <i>pos</i>, int <i>bstate</i>, int <i>wheel</i> = 0 )</h3>
60
<p>When a mouse event occurs this function is called with the mouse's position in <i>pos</i>, the state of its buttons in <i>bstate</i>, and the wheel motion in <i>wheel</i>.</p>
61
<h3 class="fn"><a name="pos"></a>const <a href="qpoint.html">QPoint</a> & QWSMouseHandler::pos () const</h3>
62
<p>Returns the mouse position.</p>
63
<h3 class="fn"><a name="resume"></a>void QWSMouseHandler::resume () <tt> [pure virtual]</tt></h3>
64
<p>Must be implemented in subclasses to resume handling mouse events.</p>
65
<p>See also <a href="qwsmousehandler.html#suspend">suspend</a>().</p>
66
<h3 class="fn"><a name="suspend"></a>void QWSMouseHandler::suspend () <tt> [pure virtual]</tt></h3>
67
<p>Must be implemented in subclasses to suspend reading and handling of mouse events.</p>
68
<p>See also <a href="qwsmousehandler.html#resume">resume</a>().</p>
69
<p /><address><hr /><div align="center">
70
<table width="100%" cellspacing="0" border="0"><tr class="address">
71
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
72
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
73
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
74
</tr></table></div></address></body>