Qt 4.8
Functions
qabstractslider.cpp File Reference
#include <qapplication.h>
#include "qabstractslider.h"
#include "qevent.h"
#include "qabstractslider_p.h"
#include "qdebug.h"
#include "qaccessible.h"
#include <limits.h>

Go to the source code of this file.

Functions

static int clampScrollStep (qreal x)
 Truncate qreal to int without flipping on overflow. More...
 

Function Documentation

◆ clampScrollStep()

static int clampScrollStep ( qreal  x)
inlinestatic

Truncate qreal to int without flipping on overflow.

Warning
This function is not part of the public interface.

Definition at line 746 of file qabstractslider.cpp.

Referenced by QAbstractSliderPrivate::scrollByDelta().

747 {
748  return int(qBound(qreal(INT_MIN), x, qreal(INT_MAX)));
749 }
double qreal
Definition: qglobal.h:1193
Q_DECL_CONSTEXPR const T & qBound(const T &min, const T &val, const T &max)
Definition: qglobal.h:1219
#define INT_MAX