diff options
Diffstat (limited to 'WebCore/platform/qt/WheelEventQt.cpp')
-rw-r--r-- | WebCore/platform/qt/WheelEventQt.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/WebCore/platform/qt/WheelEventQt.cpp b/WebCore/platform/qt/WheelEventQt.cpp index 307e007..135f15a 100644 --- a/WebCore/platform/qt/WheelEventQt.cpp +++ b/WebCore/platform/qt/WheelEventQt.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Trolltech ASA + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -15,9 +15,6 @@ along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - This class provides all functionality needed for loading images, style sheets and html - pages from the web. It has a memory cache for these objects. */ #include "config.h" @@ -29,15 +26,21 @@ namespace WebCore { + PlatformWheelEvent::PlatformWheelEvent(QWheelEvent* e) +#ifdef QT_NO_WHEELEVENT +{ + Q_UNUSED(e); +} +#else : m_position(e->pos()) , m_globalPosition(e->globalPos()) + , m_granularity(ScrollByLineWheelEvent) , m_isAccepted(false) , m_shiftKey(e->modifiers() & Qt::ShiftModifier) , m_ctrlKey(e->modifiers() & Qt::ControlModifier) , m_altKey(e->modifiers() & Qt::AltModifier) , m_metaKey(e->modifiers() & Qt::MetaModifier) - , m_isContinuous(false) { if (e->orientation() == Qt::Horizontal) { m_deltaX = (e->delta() / 120); @@ -46,6 +49,11 @@ PlatformWheelEvent::PlatformWheelEvent(QWheelEvent* e) m_deltaX = 0; m_deltaY = (e->delta() / 120); } + + // FIXME: retrieve the user setting for the number of lines to scroll on each wheel event + m_deltaX *= horizontalLineMultiplier(); + m_deltaY *= verticalLineMultiplier(); } +#endif // QT_NO_WHEELEVENT } // namespace WebCore |