1QWheelEvent(3qt)                                              QWheelEvent(3qt)
2
3
4

NAME

6       QWheelEvent - Parameters that describe a wheel event
7

SYNOPSIS

9       #include <qevent.h>
10
11       Inherits QEvent.
12
13   Public Members
14       QWheelEvent ( const QPoint & pos, int delta, int state, Orientation
15           orient = Vertical )
16       QWheelEvent ( const QPoint & pos, const QPoint & globalPos, int delta,
17           int state, Orientation orient = Vertical )
18       int delta () const
19       const QPoint & pos () const
20       const QPoint & globalPos () const
21       int x () const
22       int y () const
23       int globalX () const
24       int globalY () const
25       ButtonState state () const
26       Orientation orientation () const
27       bool isAccepted () const
28       void accept ()
29       void ignore ()
30

DESCRIPTION

32       The QWheelEvent class contains parameters that describe a wheel event.
33
34       Wheel events are sent to the widget under the mouse, and if that widget
35       does not handle the event they are sent to the focus widget. The
36       rotation distance is provided by delta(). The functions pos() and
37       globalPos() return the mouse pointer location at the time of the event.
38
39       A wheel event contains a special accept flag that indicates whether the
40       receiver wants the event. You should call QWheelEvent::accept() if you
41       handle the wheel event; otherwise it will be sent to the parent widget.
42
43       The QWidget::setEnable() function can be used to enable or disable
44       mouse and keyboard events for a widget.
45
46       The event handler QWidget::wheelEvent() receives wheel events.
47
48       See also QMouseEvent, QWidget::grabMouse(), and Event Classes.
49

MEMBER FUNCTION DOCUMENTATION

QWheelEvent::QWheelEvent ( const QPoint & pos, int delta, int state,

52       Orientation orient = Vertical )
53       Constructs a wheel event object.
54
55       The globalPos() is initialized to QCursor::pos(), i.e. pos, which is
56       usually (but not always) right. Use the other constructor if you need
57       to specify the global position explicitly. delta contains the rotation
58       distance, state holds the keyboard modifier flags at the time of the
59       event and orient holds the wheel's orientation.
60
61       See also pos(), delta(), and state().
62

QWheelEvent::QWheelEvent ( const QPoint & pos, const QPoint & globalPos, int

64       delta, int state, Orientation orient = Vertical )
65       Constructs a wheel event object. The position when the event occurred
66       is given in pos and globalPos. delta contains the rotation distance,
67       state holds the keyboard modifier flags at the time of the event and
68       orient holds the wheel's orientation.
69
70       See also pos(), globalPos(), delta(), and state().
71

void QWheelEvent::accept ()

73       Sets the accept flag of the wheel event object.
74
75       Setting the accept parameter indicates that the receiver of the event
76       wants the wheel event. Unwanted wheel events are sent to the parent
77       widget.
78
79       The accept flag is set by default.
80
81       See also ignore().
82

int QWheelEvent::delta () const

84       Returns the distance that the wheel is rotated expressed in multiples
85       or divisions of the wheel delta, which is currently defined to be 120.
86       A positive value indicates that the wheel was rotated forwards away
87       from the user; a negative value indicates that the wheel was rotated
88       backwards toward the user.
89
90       The wheel delta constant was defined to be 120 by wheel mouse vendors
91       to allow building finer-resolution wheels in the future, including
92       perhaps a freely rotating wheel with no notches. The expectation is
93       that such a device would send more messages per rotation but with a
94       smaller value in each message.
95

const QPoint & QWheelEvent::globalPos () const

97       Returns the global position of the mouse pointer at the time of the
98       event. This is important on asynchronous window systems such as X11;
99       whenever you move your widgets around in response to mouse events,
100       globalPos() can differ a lot from the current pointer position
101       QCursor::pos().
102
103       See also globalX() and globalY().
104

int QWheelEvent::globalX () const

106       Returns the global x-position of the mouse pointer at the time of the
107       event.
108
109       See also globalY() and globalPos().
110

int QWheelEvent::globalY () const

112       Returns the global y-position of the mouse pointer at the time of the
113       event.
114
115       See also globalX() and globalPos().
116

void QWheelEvent::ignore ()

118       Clears the accept flag parameter of the wheel event object.
119
120       Clearing the accept parameter indicates that the event receiver does
121       not want the wheel event. Unwanted wheel events are sent to the parent
122       widget. The accept flag is set by default.
123
124       See also accept().
125

bool QWheelEvent::isAccepted () const

127       Returns TRUE if the receiver of the event handles the wheel event;
128       otherwise returns FALSE.
129

Orientation QWheelEvent::orientation () const

131       Returns the wheel's orientation.
132

const QPoint & QWheelEvent::pos () const

134       Returns the position of the mouse pointer, relative to the widget that
135       received the event.
136
137       If you move your widgets around in response to mouse events, use
138       globalPos() instead of this function.
139
140       See also x(), y(), and globalPos().
141

ButtonState QWheelEvent::state () const

143       Returns the keyboard modifier flags of the event.
144
145       The returned value is ShiftButton, ControlButton, and AltButton OR'ed
146       together.
147

int QWheelEvent::x () const

149       Returns the x-position of the mouse pointer, relative to the widget
150       that received the event.
151
152       See also y() and pos().
153

int QWheelEvent::y () const

155       Returns the y-position of the mouse pointer, relative to the widget
156       that received the event.
157
158       See also x() and pos().
159
160

SEE ALSO

162       http://doc.trolltech.com/qwheelevent.html
163       http://www.trolltech.com/faq/tech.html
164
166       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
167       license file included in the distribution for a complete license
168       statement.
169

AUTHOR

171       Generated automatically from the source code.
172

BUGS

174       If you find a bug in Qt, please report it as described in
175       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
176       help you. Thank you.
177
178       The definitive Qt documentation is provided in HTML format; it is
179       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
180       web browser. This man page is provided as a convenience for those users
181       who prefer man pages, although this format is not officially supported
182       by Trolltech.
183
184       If you find errors in this manual page, please report them to qt-
185       bugs@trolltech.com.  Please include the name of the manual page
186       (qwheelevent.3qt) and the Qt version (3.3.8).
187
188
189
190Trolltech AS                    2 February 2007               QWheelEvent(3qt)
Impressum