QScrollPrepareEvent Class
The QScrollPrepareEvent class is sent in preparation of scrolling. 更多...
头文件: | #include <QScrollPrepareEvent> |
qmake: | QT += gui |
开始支持版本: | Qt 4.8 |
基类: | QEvent |
公有函数
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 |
- 6 个公有函数继承自 QEvent
其他继承的成员
详细描述
The QScrollPrepareEvent class is sent in preparation of scrolling.
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 acceepted QScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).
参见 QScrollEvent and QScroller.
成员函数
QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos)
Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.
QScrollPrepareEvent::~QScrollPrepareEvent()
Destroys QScrollEvent.
QPointF QScrollPrepareEvent::contentPos() const
Returns the current position of the content as set by setContentPos.
参见 setContentPos().
QRectF QScrollPrepareEvent::contentPosRange() const
Returns the range of coordinates for the content as set by setContentPosRange().
参见 setContentPosRange().
void QScrollPrepareEvent::setContentPos(const QPointF &pos)
Sets the current content position to pos.
参见 contentPos().
void QScrollPrepareEvent::setContentPosRange(const QRectF &rect)
Sets the range of content coordinates to rect.
参见 contentPosRange().
void QScrollPrepareEvent::setViewportSize(const QSizeF &size)
Sets the size of the area that is to be scrolled to size.
参见 viewportSize().
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 as set by setViewportSize
参见 setViewportSize().