summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-06-28 03:00:50 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-06-28 12:52:30 +0200
commita3634fe80fa5578774df07a2dc327de730f11348 (patch)
tree21ad4cb887952df2fcf90e7cb565c4a9b979d476 /vcl/inc
parentc97fea54813052953fc0ff2ef0b506c372689ac8 (diff)
Qt5 refactor mouse event fill code
Adds Qt5Widget::fillSalAbstractMouseEvent to set the common Sal*MouseEvent members. While the member functions of QMouseEvent and QWheelEvent have the same name, they aren't shared via QInputEvent, so this uses a small FILL_SAME macro for less code, Change-Id: I3e5aa52b1bf2774251d97534ce0106a27ef5899b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97343 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/qt5/Qt5Widget.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index 159794b2d2a3..7bf7ead6ae9a 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -25,8 +25,10 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+class QInputEvent;
class Qt5Frame;
class Qt5Object;
+struct SalAbstractMouseEvent;
class Qt5Widget : public QWidget
{
@@ -46,6 +48,9 @@ class Qt5Widget : public QWidget
static void commitText(Qt5Frame&, const QString& aText);
static bool handleKeyEvent(Qt5Frame&, const QWidget&, QKeyEvent*, const ButtonKeyState);
static void handleMouseButtonEvent(const Qt5Frame&, const QMouseEvent*, const ButtonKeyState);
+ static void fillSalAbstractMouseEvent(const Qt5Frame& rFrame, const QInputEvent* pQEvent,
+ const QPoint& rPos, Qt::MouseButtons eButtons, int nWidth,
+ SalAbstractMouseEvent& aSalEvent);
virtual bool event(QEvent*) override;