From 57aa9780b8a04948356a2261ba939640517a9994 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Mon, 27 Mar 2017 13:40:21 +0300 Subject: [PATCH] Gui: Gesture: fix for conda @peterl94 said anaconda's Qt doesn't offer private headers. The definitions used have almost no code associated with them, I simply copied them to the cpp file. See thread "ana(conda) windows packaging", starting from this post: https://forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=70#p167370 --- src/Gui/WinNativeGestureRecognizers.cpp | 37 ++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/Gui/WinNativeGestureRecognizers.cpp b/src/Gui/WinNativeGestureRecognizers.cpp index d74e3c738c..3107112305 100644 --- a/src/Gui/WinNativeGestureRecognizers.cpp +++ b/src/Gui/WinNativeGestureRecognizers.cpp @@ -40,13 +40,48 @@ #include -#include + #include QT_BEGIN_NAMESPACE #if !defined(QT_NO_NATIVE_GESTURES) +//#include +//this include is not avalable on conda Qt, see https://forum.freecadweb.org/viewtopic.php?f=4&t=21405&p=167395#p167395 +//copy-pasted from this header: +class QNativeGestureEvent : public QEvent +{ +public: + enum Type { + None, + GestureBegin, + GestureEnd, + Pan, + Zoom, + Rotate, + Swipe + }; + + QNativeGestureEvent() + : QEvent(QEvent::NativeGesture), gestureType(None), percentage(0) +#ifdef Q_WS_WIN + , sequenceId(0), argument(0) +#endif + { + } + + Type gestureType; + float percentage; + QPoint position; + float angle; +#ifdef Q_WS_WIN + ulong sequenceId; + quint64 argument; +#endif +}; + + QGesture* WinNativeGestureRecognizerPinch::create(QObject* target) { if (!target)