You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
203 lines
9.9 KiB
203 lines
9.9 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQWheelEvent Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td 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>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQWheelEvent Class Reference</h1>
|
||
|
|
||
|
<p>The TQWheelEvent class contains parameters that describe a wheel event.
|
||
|
<a href="#details">More...</a>
|
||
5 months ago
|
<p><tt>#include <<a href="tqevent-h.html">tqevent.h</a>></tt>
|
||
|
<p>Inherits <a href="tqevent.html">TQEvent</a>.
|
||
13 years ago
|
<p><a href="qwheelevent-members.html">List of all member functions.</a>
|
||
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQWheelEvent"><b>TQWheelEvent</b></a> ( const TQPoint & pos, int delta, int state, Orientation orient = Vertical )</li>
|
||
|
<li class=fn><a href="#TQWheelEvent-2"><b>TQWheelEvent</b></a> ( const TQPoint & pos, const TQPoint & globalPos, int delta, int state, Orientation orient = Vertical )</li>
|
||
|
<li class=fn>int <a href="#delta"><b>delta</b></a> () const</li>
|
||
|
<li class=fn>const TQPoint & <a href="#pos"><b>pos</b></a> () const</li>
|
||
|
<li class=fn>const TQPoint & <a href="#globalPos"><b>globalPos</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#x"><b>x</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#y"><b>y</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#globalX"><b>globalX</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#globalY"><b>globalY</b></a> () const</li>
|
||
|
<li class=fn>ButtonState <a href="#state"><b>state</b></a> () const</li>
|
||
|
<li class=fn>Orientation <a href="#orientation"><b>orientation</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#isAccepted"><b>isAccepted</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#accept"><b>accept</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#ignore"><b>ignore</b></a> ()</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
The TQWheelEvent class contains parameters that describe a wheel event.
|
||
|
<p>
|
||
|
<p> Wheel events are sent to the widget under the mouse, and if that widget
|
||
|
does not handle the event they are sent to the focus widget. The rotation
|
||
|
distance is provided by <a href="#delta">delta</a>(). The functions <a href="#pos">pos</a>() and <a href="#globalPos">globalPos</a>() return
|
||
|
the mouse pointer location at the time of the event.
|
||
|
<p> A wheel event contains a special accept flag that indicates
|
||
|
whether the receiver wants the event. You should call
|
||
|
<a href="#accept">TQWheelEvent::accept</a>() if you handle the wheel event; otherwise it
|
||
|
will be sent to the parent widget.
|
||
|
<p> The TQWidget::setEnable() function can be used to enable or disable
|
||
|
mouse and keyboard events for a widget.
|
||
7 months ago
|
<p> The event handler <a href="tqwidget.html#wheelEvent">TQWidget::wheelEvent</a>() receives wheel events.
|
||
3 months ago
|
<p> <p>See also <a href="tqmouseevent.html">TQMouseEvent</a>, <a href="tqwidget.html#grabMouse">TQWidget::grabMouse</a>(), and <a href="events.html">Event Classes</a>.
|
||
13 years ago
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
3 months ago
|
<h3 class=fn><a name="TQWheelEvent"></a>TQWheelEvent::TQWheelEvent ( const <a href="tqpoint.html">TQPoint</a> & pos, int delta, int state, <a href="tqt.html#Orientation-enum">Orientation</a> orient = Vertical )
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Constructs a wheel event object.
|
||
4 months ago
|
<p> The <a href="#globalPos">globalPos</a>() is initialized to <a href="tqcursor.html#pos">TQCursor::pos</a>(), i.e. <em>pos</em>,
|
||
13 years ago
|
which is usually (but not always) right. Use the other constructor
|
||
|
if you need to specify the global position explicitly. <em>delta</em>
|
||
|
contains the rotation distance, <em>state</em> holds the keyboard
|
||
|
modifier flags at the time of the event and <em>orient</em> holds the
|
||
|
wheel's orientation.
|
||
|
<p> <p>See also <a href="#pos">pos</a>(), <a href="#delta">delta</a>(), and <a href="#state">state</a>().
|
||
|
|
||
3 months ago
|
<h3 class=fn><a name="TQWheelEvent-2"></a>TQWheelEvent::TQWheelEvent ( const <a href="tqpoint.html">TQPoint</a> & pos, const <a href="tqpoint.html">TQPoint</a> & globalPos, int delta, int state, <a href="tqt.html#Orientation-enum">Orientation</a> orient = Vertical )
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Constructs a wheel event object. The position when the event
|
||
|
occurred is given in <em>pos</em> and <em>globalPos</em>. <em>delta</em> contains
|
||
|
the rotation distance, <em>state</em> holds the keyboard modifier flags
|
||
|
at the time of the event and <em>orient</em> holds the wheel's
|
||
|
orientation.
|
||
|
<p> <p>See also <a href="#pos">pos</a>(), <a href="#globalPos">globalPos</a>(), <a href="#delta">delta</a>(), and <a href="#state">state</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="accept"></a>TQWheelEvent::accept ()
|
||
|
</h3>
|
||
|
|
||
|
<p> Sets the accept flag of the wheel event object.
|
||
|
<p> Setting the accept parameter indicates that the receiver of the
|
||
|
event wants the wheel event. Unwanted wheel events are sent to the
|
||
|
parent widget.
|
||
|
<p> The accept flag is set by default.
|
||
|
<p> <p>See also <a href="#ignore">ignore</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="delta"></a>TQWheelEvent::delta () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the distance that the wheel is rotated expressed in
|
||
|
multiples or divisions of the <em>wheel delta</em>, which is currently
|
||
|
defined to be 120. A positive value indicates that the wheel was
|
||
|
rotated forwards away from the user; a negative value indicates
|
||
|
that the wheel was rotated backwards toward the user.
|
||
|
<p> The <em>wheel delta</em> constant was defined to be 120 by wheel mouse
|
||
|
vendors to allow building finer-resolution wheels in the future,
|
||
|
including perhaps a freely rotating wheel with no notches. The
|
||
|
expectation is that such a device would send more messages per
|
||
|
rotation but with a smaller value in each message.
|
||
|
|
||
5 months ago
|
<h3 class=fn>const <a href="tqpoint.html">TQPoint</a> & <a name="globalPos"></a>TQWheelEvent::globalPos () const
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the global position of the mouse pointer <em>at the time of the event</em>. This is important on asynchronous window systems
|
||
|
such as X11; whenever you move your widgets around in response to
|
||
|
mouse events, <a href="#globalPos">globalPos</a>() can differ a lot from the current
|
||
4 months ago
|
pointer position <a href="tqcursor.html#pos">TQCursor::pos</a>().
|
||
13 years ago
|
<p> <p>See also <a href="#globalX">globalX</a>() and <a href="#globalY">globalY</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="globalX"></a>TQWheelEvent::globalX () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the global x-position of the mouse pointer at the time of
|
||
|
the event.
|
||
|
<p> <p>See also <a href="#globalY">globalY</a>() and <a href="#globalPos">globalPos</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="globalY"></a>TQWheelEvent::globalY () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the global y-position of the mouse pointer at the time of
|
||
|
the event.
|
||
|
<p> <p>See also <a href="#globalX">globalX</a>() and <a href="#globalPos">globalPos</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="ignore"></a>TQWheelEvent::ignore ()
|
||
|
</h3>
|
||
|
|
||
|
<p> Clears the accept flag parameter of the wheel event object.
|
||
|
<p> Clearing the accept parameter indicates that the event receiver
|
||
|
does not want the wheel event. Unwanted wheel events are sent to
|
||
|
the parent widget. The accept flag is set by default.
|
||
|
<p> <p>See also <a href="#accept">accept</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="isAccepted"></a>TQWheelEvent::isAccepted () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns TRUE if the receiver of the event handles the wheel event;
|
||
|
otherwise returns FALSE.
|
||
|
|
||
3 months ago
|
<h3 class=fn><a href="tqt.html#Orientation-enum">Orientation</a> <a name="orientation"></a>TQWheelEvent::orientation () const
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the wheel's orientation.
|
||
|
|
||
5 months ago
|
<h3 class=fn>const <a href="tqpoint.html">TQPoint</a> & <a name="pos"></a>TQWheelEvent::pos () const
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the position of the mouse pointer, relative to the widget
|
||
|
that received the event.
|
||
|
<p> If you move your widgets around in response to mouse
|
||
|
events, use <a href="#globalPos">globalPos</a>() instead of this function.
|
||
|
<p> <p>See also <a href="#x">x</a>(), <a href="#y">y</a>(), and <a href="#globalPos">globalPos</a>().
|
||
|
|
||
3 months ago
|
<h3 class=fn><a href="tqt.html#ButtonState-enum">ButtonState</a> <a name="state"></a>TQWheelEvent::state () const
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the keyboard modifier flags of the event.
|
||
3 months ago
|
<p> The returned value is <a href="tqt.html#ButtonState-enum">ShiftButton</a>, <a href="tqt.html#ButtonState-enum">ControlButton</a>, and <a href="tqt.html#ButtonState-enum">AltButton</a> OR'ed together.
|
||
13 years ago
|
|
||
|
<h3 class=fn>int <a name="x"></a>TQWheelEvent::x () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the x-position of the mouse pointer, relative to the
|
||
|
widget that received the event.
|
||
|
<p> <p>See also <a href="#y">y</a>() and <a href="#pos">pos</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="y"></a>TQWheelEvent::y () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the y-position of the mouse pointer, relative to the
|
||
|
widget that received the event.
|
||
|
<p> <p>See also <a href="#x">x</a>() and <a href="#pos">pos</a>().
|
||
|
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|