Qt 4.8
Static Public Functions | Static Private Attributes | List of all members
QMacScrollOptimization Class Reference

#include <qt_cocoa_helpers_mac_p.h>

Static Public Functions

static bool delayScroll (QWidgetPrivate *target, int dx, int dy, const QRect &scrollRect)
 
static void initDelayedScroll ()
 
static void performDelayedScroll ()
 

Static Private Attributes

static int _dx = 0
 
static int _dy = 0
 
static bool _inWheelEvent = false
 
static QRect _scrollRect = QRect(0, 0, -1, -1)
 
static QWidgetPrivate_target = 0
 

Detailed Description

Definition at line 249 of file qt_cocoa_helpers_mac_p.h.

Functions

◆ delayScroll()

static bool QMacScrollOptimization::delayScroll ( QWidgetPrivate target,
int  dx,
int  dy,
const QRect scrollRect 
)
inlinestatic

Definition at line 269 of file qt_cocoa_helpers_mac_p.h.

Referenced by QWidgetPrivate::scroll_sys().

270  {
271  if (!_inWheelEvent)
272  return false;
273  if (_target && _target != target)
274  return false;
275  if (_scrollRect.width() != -1 && _scrollRect != scrollRect)
276  return false;
277 
278  _target = target;
279  _dx += dx;
280  _dy += dy;
281  _scrollRect = scrollRect;
282  return true;
283  }
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
static QWidgetPrivate * _target

◆ initDelayedScroll()

static void QMacScrollOptimization::initDelayedScroll ( )
inlinestatic

Definition at line 264 of file qt_cocoa_helpers_mac_p.h.

265  {
266  _inWheelEvent = true;
267  }

◆ performDelayedScroll()

static void QMacScrollOptimization::performDelayedScroll ( )
inlinestatic

Definition at line 285 of file qt_cocoa_helpers_mac_p.h.

286  {
287  if (!_inWheelEvent)
288  return;
289  _inWheelEvent = false;
290  if (!_target)
291  return;
292 
294 
295  _target = 0;
296  _dx = 0;
297  _dy = 0;
298  _scrollRect = QRect(0, 0, -1, -1);
299  }
static QWidgetPrivate * _target
void scroll_sys(int dx, int dy)
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

Properties

◆ _dx

int QMacScrollOptimization::_dx = 0
staticprivate

Definition at line 259 of file qt_cocoa_helpers_mac_p.h.

Referenced by qt_mac_post_retranslateAppMenu().

◆ _dy

int QMacScrollOptimization::_dy = 0
staticprivate

Definition at line 260 of file qt_cocoa_helpers_mac_p.h.

Referenced by qt_mac_post_retranslateAppMenu().

◆ _inWheelEvent

bool QMacScrollOptimization::_inWheelEvent = false
staticprivate

Definition at line 258 of file qt_cocoa_helpers_mac_p.h.

Referenced by qt_mac_post_retranslateAppMenu().

◆ _scrollRect

QRect QMacScrollOptimization::_scrollRect = QRect(0, 0, -1, -1)
staticprivate

Definition at line 261 of file qt_cocoa_helpers_mac_p.h.

Referenced by qt_mac_post_retranslateAppMenu().

◆ _target

QWidgetPrivate * QMacScrollOptimization::_target = 0
staticprivate

Definition at line 257 of file qt_cocoa_helpers_mac_p.h.

Referenced by qt_mac_post_retranslateAppMenu().


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