QtBase
v6.3.1
|
The QScrollPrepareEvent class is sent in preparation of scrolling. More...
#include <qevent.h>
Public Member Functions | |
QScrollPrepareEvent (const QPointF &startPos) | |
~QScrollPrepareEvent () | |
QScrollPrepareEvent * | clone () const override |
QPointF | startPos () const |
QSizeF | viewportSize () const |
QRectF | contentPosRange () const |
QPointF | contentPos () const |
void | setViewportSize (const QSizeF &size) |
void | setContentPosRange (const QRectF &rect) |
void | setContentPos (const QPointF &pos) |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
virtual | ~QEvent () |
Type | type () const |
bool | spontaneous () const |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
void | ignore () |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
The QScrollPrepareEvent class is sent in preparation of scrolling.
\inmodule QtGui
The scroll prepare event is sent before scrolling (usually by QScroller) is started. The object receiving this event should set viewportSize, maxContentPos and contentPos. It also should accept this event to indicate that scrolling should be started.
It is not guaranteed that a QScrollEvent will be sent after an accepted QScrollPrepareEvent, e.g. in a case where the maximum content position is (0, 0).
Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.
Definition at line 4671 of file qevent.cpp.
QScrollPrepareEvent::~QScrollPrepareEvent | ( | ) |
Destroys QScrollEvent.
Definition at line 4679 of file qevent.cpp.
|
inlineoverridevirtual |
|
inline |
|
inline |
Returns the range of coordinates for the content as set by setContentPosRange().
Definition at line 1069 of file qevent.h.
Sets the current content position to pos.
Definition at line 4731 of file qevent.cpp.
Sets the range of content coordinates to rect.
Definition at line 4721 of file qevent.cpp.
Sets the size of the area that is to be scrolled to size.
Definition at line 4711 of file qevent.cpp.
|
inline |
|
inline |
Returns size of the area that is to be scrolled as set by setViewportSize
Definition at line 1068 of file qevent.h.