CopperSpice API
1.9.2
|
The QScrollPrepareEvent class is sent in preparation of scrolling. More...
Public Methods | |
QScrollPrepareEvent (const QPointF &startPos) | |
~QScrollPrepareEvent () | |
QPointF | contentPos () const |
QRectF | contentPosRange () const |
void | setContentPos (const QPointF &pos) |
void | setContentPosRange (const QRectF &rect) |
void | setViewportSize (const QSizeF &size) |
QPointF | startPos () const |
QSizeF | viewportSize () const |
Public Methods inherited from QEvent | |
QEvent (const QEvent &other) | |
QEvent (Type type) | |
virtual | ~QEvent () |
void | accept () |
void | ignore () |
bool | isAccepted () const |
QEvent & | operator= (const QEvent &other) |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Type | type () const |
Additional Inherited Members | |
Public Types inherited from QEvent | |
enum | Type |
Static Public Methods inherited from QEvent | |
static int | registerEventType (int hint=-1) |
The QScrollPrepareEvent class is sent in preparation of scrolling. The scroll prepare event is sent before scrolling is started. The object receiving this event should set the viewportSize, contentPos, and contentPosRange properties. 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, for example in a case where the maximum content position is (0,0).
|
explicit |
Creates a new QScrollPrepareEvent. The startPos is the position of the touch or mouse event that started the scrolling.
QScrollPrepareEvent::~QScrollPrepareEvent | ( | ) |
Destroys the QScrollEvent.
QPointF QScrollPrepareEvent::contentPos | ( | ) | const |
Returns the current position of the content.
QRectF QScrollPrepareEvent::contentPosRange | ( | ) | const |
Returns the range of coordinates for the content.
void QScrollPrepareEvent::setContentPos | ( | const QPointF & | pos | ) |
Sets the current content position to pos.
void QScrollPrepareEvent::setContentPosRange | ( | const QRectF & | rect | ) |
Sets the range of content coordinates to rect.
void QScrollPrepareEvent::setViewportSize | ( | const QSizeF & | size | ) |
Sets the size of the area that is to be scrolled to size.
QPointF QScrollPrepareEvent::startPos | ( | ) | const |
Returns the position of the touch or mouse event that started the scrolling.
QSizeF QScrollPrepareEvent::viewportSize | ( | ) | const |
Returns size of the area that is to be scrolled.