Inline trivial getters for QEvent subclasses
Change-Id: Ic0ee4f3e311e1068d23796cee4fe58008a2a8114 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
64d62c53c1
commit
8a0a43bdaa
@ -4508,39 +4508,27 @@ QScrollPrepareEvent::~QScrollPrepareEvent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QPointF QScrollPrepareEvent::startPos() const
|
||||||
|
|
||||||
Returns the position of the touch or mouse event that started the scrolling.
|
Returns the position of the touch or mouse event that started the scrolling.
|
||||||
*/
|
*/
|
||||||
QPointF QScrollPrepareEvent::startPos() const
|
|
||||||
{
|
|
||||||
return m_startPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QSizeF QScrollPrepareEvent::viewportSize() const
|
||||||
Returns size of the area that is to be scrolled as set by setViewportSize
|
Returns size of the area that is to be scrolled as set by setViewportSize
|
||||||
|
|
||||||
\sa setViewportSize()
|
\sa setViewportSize()
|
||||||
*/
|
*/
|
||||||
QSizeF QScrollPrepareEvent::viewportSize() const
|
|
||||||
{
|
|
||||||
return m_viewportSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QRectF QScrollPrepareEvent::contentPosRange() const
|
||||||
Returns the range of coordinates for the content as set by setContentPosRange().
|
Returns the range of coordinates for the content as set by setContentPosRange().
|
||||||
*/
|
*/
|
||||||
QRectF QScrollPrepareEvent::contentPosRange() const
|
|
||||||
{
|
|
||||||
return m_contentPosRange;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QPointF QScrollPrepareEvent::contentPos() const
|
||||||
Returns the current position of the content as set by setContentPos.
|
Returns the current position of the content as set by setContentPos.
|
||||||
*/
|
*/
|
||||||
QPointF QScrollPrepareEvent::contentPos() const
|
|
||||||
{
|
|
||||||
return m_contentPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the size of the area that is to be scrolled to \a size.
|
Sets the size of the area that is to be scrolled to \a size.
|
||||||
@ -4623,25 +4611,23 @@ QScrollEvent::~QScrollEvent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QPointF QScrollEvent::contentPos() const
|
||||||
|
|
||||||
Returns the new scroll position.
|
Returns the new scroll position.
|
||||||
*/
|
*/
|
||||||
QPointF QScrollEvent::contentPos() const
|
|
||||||
{
|
|
||||||
return m_contentPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QPointF QScrollEvent::overshootDistance() const
|
||||||
|
|
||||||
Returns the new overshoot distance.
|
Returns the new overshoot distance.
|
||||||
See QScroller for an explanation of the term overshoot.
|
See QScroller for an explanation of the term overshoot.
|
||||||
|
|
||||||
\sa QScroller
|
\sa QScroller
|
||||||
*/
|
*/
|
||||||
QPointF QScrollEvent::overshootDistance() const
|
|
||||||
{
|
|
||||||
return m_overshoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QScrollEvent::ScrollState QScrollEvent::scrollState() const
|
||||||
|
|
||||||
Returns the current scroll state as a combination of ScrollStateFlag values.
|
Returns the current scroll state as a combination of ScrollStateFlag values.
|
||||||
ScrollStarted (or ScrollFinished) will be set, if this scroll event is the first (or last) event in a scrolling activity.
|
ScrollStarted (or ScrollFinished) will be set, if this scroll event is the first (or last) event in a scrolling activity.
|
||||||
Please note that both values can be set at the same time, if the activity consists of a single QScrollEvent.
|
Please note that both values can be set at the same time, if the activity consists of a single QScrollEvent.
|
||||||
@ -4649,10 +4635,6 @@ QPointF QScrollEvent::overshootDistance() const
|
|||||||
|
|
||||||
A widget could for example revert selections when scrolling is started and stopped.
|
A widget could for example revert selections when scrolling is started and stopped.
|
||||||
*/
|
*/
|
||||||
QScrollEvent::ScrollState QScrollEvent::scrollState() const
|
|
||||||
{
|
|
||||||
return m_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Creates a new QScreenOrientationChangeEvent
|
Creates a new QScreenOrientationChangeEvent
|
||||||
@ -4671,20 +4653,16 @@ QScreenOrientationChangeEvent::~QScreenOrientationChangeEvent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn QScreen *QScreenOrientationChangeEvent::screen() const
|
||||||
|
|
||||||
Returns the screen whose orientation changed.
|
Returns the screen whose orientation changed.
|
||||||
*/
|
*/
|
||||||
QScreen *QScreenOrientationChangeEvent::screen() const
|
|
||||||
{
|
|
||||||
return m_screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn Qt::ScreenOrientation QScreenOrientationChangeEvent::orientation() const
|
||||||
|
|
||||||
Returns the orientation of the screen.
|
Returns the orientation of the screen.
|
||||||
*/
|
*/
|
||||||
Qt::ScreenOrientation QScreenOrientationChangeEvent::orientation() const
|
|
||||||
{
|
|
||||||
return m_orientation;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Creates a new QApplicationStateChangeEvent.
|
Creates a new QApplicationStateChangeEvent.
|
||||||
@ -4696,12 +4674,10 @@ QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\fn Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const
|
||||||
|
|
||||||
Returns the state of the application.
|
Returns the state of the application.
|
||||||
*/
|
*/
|
||||||
Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const
|
|
||||||
{
|
|
||||||
return m_applicationState;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
Add the given \a point.
|
Add the given \a point.
|
||||||
|
@ -937,11 +937,11 @@ public:
|
|||||||
explicit QScrollPrepareEvent(const QPointF &startPos);
|
explicit QScrollPrepareEvent(const QPointF &startPos);
|
||||||
~QScrollPrepareEvent();
|
~QScrollPrepareEvent();
|
||||||
|
|
||||||
QPointF startPos() const;
|
QPointF startPos() const { return m_startPos; }
|
||||||
|
|
||||||
QSizeF viewportSize() const;
|
QSizeF viewportSize() const { return m_viewportSize; }
|
||||||
QRectF contentPosRange() const;
|
QRectF contentPosRange() const { return m_contentPosRange; }
|
||||||
QPointF contentPos() const;
|
QPointF contentPos() const { return m_contentPos; }
|
||||||
|
|
||||||
void setViewportSize(const QSizeF &size);
|
void setViewportSize(const QSizeF &size);
|
||||||
void setContentPosRange(const QRectF &rect);
|
void setContentPosRange(const QRectF &rect);
|
||||||
@ -968,9 +968,9 @@ public:
|
|||||||
QScrollEvent(const QPointF &contentPos, const QPointF &overshoot, ScrollState scrollState);
|
QScrollEvent(const QPointF &contentPos, const QPointF &overshoot, ScrollState scrollState);
|
||||||
~QScrollEvent();
|
~QScrollEvent();
|
||||||
|
|
||||||
QPointF contentPos() const;
|
QPointF contentPos() const { return m_contentPos; }
|
||||||
QPointF overshootDistance() const;
|
QPointF overshootDistance() const { return m_overshoot; }
|
||||||
ScrollState scrollState() const;
|
ScrollState scrollState() const { return m_state; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointF m_contentPos;
|
QPointF m_contentPos;
|
||||||
@ -984,8 +984,8 @@ public:
|
|||||||
QScreenOrientationChangeEvent(QScreen *screen, Qt::ScreenOrientation orientation);
|
QScreenOrientationChangeEvent(QScreen *screen, Qt::ScreenOrientation orientation);
|
||||||
~QScreenOrientationChangeEvent();
|
~QScreenOrientationChangeEvent();
|
||||||
|
|
||||||
QScreen *screen() const;
|
QScreen *screen() const { return m_screen; }
|
||||||
Qt::ScreenOrientation orientation() const;
|
Qt::ScreenOrientation orientation() const { return m_orientation; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScreen *m_screen;
|
QScreen *m_screen;
|
||||||
@ -996,7 +996,7 @@ class Q_GUI_EXPORT QApplicationStateChangeEvent : public QEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit QApplicationStateChangeEvent(Qt::ApplicationState state);
|
explicit QApplicationStateChangeEvent(Qt::ApplicationState state);
|
||||||
Qt::ApplicationState applicationState() const;
|
Qt::ApplicationState applicationState() const { return m_applicationState; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Qt::ApplicationState m_applicationState;
|
Qt::ApplicationState m_applicationState;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user