Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QScrollPrepareEvent class is sent in preparation of scrolling. More...
#include <qevent.h>
Public Member Functions | |
QScrollPrepareEvent (const QPointF &startPos) | |
Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling. | |
QPointF | startPos () const |
Returns the position of the touch or mouse event that started the scrolling. | |
QSizeF | viewportSize () const |
Returns size of the area that is to be scrolled as set by setViewportSize. | |
QRectF | contentPosRange () const |
Returns the range of coordinates for the content as set by setContentPosRange(). | |
QPointF | contentPos () const |
Returns the current position of the content as set by setContentPos. | |
void | setViewportSize (const QSizeF &size) |
Sets the size of the area that is to be scrolled to size. | |
void | setContentPosRange (const QRectF &rect) |
Sets the range of content coordinates to rect. | |
void | setContentPos (const QPointF &pos) |
Sets the current content position to pos. | |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. | |
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).
|
explicit |
Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.
Definition at line 4590 of file qevent.cpp.
|
inline |
|
inline |
Returns the range of coordinates for the content as set by setContentPosRange().
Sets the current content position to pos.
Definition at line 4645 of file qevent.cpp.
Sets the range of content coordinates to rect.
Definition at line 4635 of file qevent.cpp.
Sets the size of the area that is to be scrolled to size.
Definition at line 4625 of file qevent.cpp.
|
inline |
|
inline |
Returns size of the area that is to be scrolled as set by setViewportSize.