From 8a0a43bdaa216c131ab11b2bf7112eb746d7fc35 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 13 Nov 2020 13:42:41 +0100 Subject: Inline trivial getters for QEvent subclasses Change-Id: Ic0ee4f3e311e1068d23796cee4fe58008a2a8114 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qevent.cpp | 58 ++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 41 deletions(-) (limited to 'src/gui/kernel/qevent.cpp') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 659f0e353b..c459ca3b6a 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4508,39 +4508,27 @@ QScrollPrepareEvent::~QScrollPrepareEvent() } /*! + \fn QPointF QScrollPrepareEvent::startPos() const + 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 \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(). */ -QRectF QScrollPrepareEvent::contentPosRange() const -{ - return m_contentPosRange; -} /*! + \fn QPointF QScrollPrepareEvent::contentPos() const 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. @@ -4623,25 +4611,23 @@ QScrollEvent::~QScrollEvent() } /*! + \fn QPointF QScrollEvent::contentPos() const + Returns the new scroll position. */ -QPointF QScrollEvent::contentPos() const -{ - return m_contentPos; -} /*! + \fn QPointF QScrollEvent::overshootDistance() const + Returns the new overshoot distance. See QScroller for an explanation of the term overshoot. \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. 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. @@ -4649,10 +4635,6 @@ QPointF QScrollEvent::overshootDistance() const 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 @@ -4671,20 +4653,16 @@ QScreenOrientationChangeEvent::~QScreenOrientationChangeEvent() } /*! + \fn QScreen *QScreenOrientationChangeEvent::screen() const + 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. */ -Qt::ScreenOrientation QScreenOrientationChangeEvent::orientation() const -{ - return m_orientation; -} /*! Creates a new QApplicationStateChangeEvent. @@ -4696,12 +4674,10 @@ QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState } /*! + \fn Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const + Returns the state of the application. */ -Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const -{ - return m_applicationState; -} /*! \internal Add the given \a point. -- cgit v1.2.3