From 8e0110a18efb654b653a0dfbab374f163229a2da Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 31 Mar 2015 23:08:12 +0200 Subject: [PATCH] + fix various things --- src/Gui/GestureNavigationStyle.cpp | 2 +- src/Gui/NavigationStyle.cpp | 5 ++++- src/Gui/SoTouchEvents.cpp | 1 + src/Gui/SoTouchEvents.h | 10 +++++++--- src/Gui/View3DInventorViewer.cpp | 8 ++++---- src/Gui/View3DInventorViewer.h | 7 ++++++- src/Gui/WinNativeGestureRecognizers.cpp | 12 +++++++----- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index 3ac06ed052..5317e9445e 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -50,7 +50,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include "InventorAll.h" # include # include # include @@ -58,6 +57,7 @@ # include # include # include +# include # include # include #endif diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 16446ece6d..fa9a6dc237 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -793,7 +793,10 @@ void NavigationStyle::doZoom(SoCamera* camera, SbBool forward, const SbVec2f& po */ void NavigationStyle::doZoom(SoCamera* camera, float logfactor, const SbVec2f& pos) { - if (abs(logfactor)>4.0) return;//something is asking for big zoom factor. This func is made for interactive zooming, where the changes are per mouse move and thus are small. + // something is asking for big zoom factor. This func is made for interactive zooming, + // where the changes are per mouse move and thus are small. + if (abs(logfactor)>4.0) + return; SbBool zoomAtCur = this->zoomAtCursor; if (zoomAtCur) { const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); diff --git a/src/Gui/SoTouchEvents.cpp b/src/Gui/SoTouchEvents.cpp index 37a38b9c54..ec11101b4e 100644 --- a/src/Gui/SoTouchEvents.cpp +++ b/src/Gui/SoTouchEvents.cpp @@ -26,6 +26,7 @@ #include "SoTouchEvents.h" #include #include +#include #include SO_EVENT_SOURCE(SoGestureEvent); diff --git a/src/Gui/SoTouchEvents.h b/src/Gui/SoTouchEvents.h index 5422939d6a..0046651f84 100644 --- a/src/Gui/SoTouchEvents.h +++ b/src/Gui/SoTouchEvents.h @@ -24,10 +24,14 @@ #ifndef SOTOUCHEVENTS_H #define SOTOUCHEVENTS_H -#include -#include -#include +#include #include +#include +#include +#include + +class QWidget; + namespace Quarter = SIM::Coin3D::Quarter; class SoGestureEvent : public SoEvent { diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 79db2b1197..f6bd20ebfa 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -81,7 +81,7 @@ # include # include # include -#include +# include #endif #include @@ -123,10 +123,10 @@ #include #include -#include -#include +#include -#include +#include "SoTouchEvents.h" +#include "WinNativeGestureRecognizers.h" //#define FC_LOGGING_CB diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index 32037260be..0809f6deb3 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -357,7 +357,12 @@ protected: SbBool processSoEventBase(const SoEvent * const ev); void printDimension(); void selectAll(); - bool isWinGesturesTuned;//a flag. If false, gestures on windows will get tuned(or re-tuned) upon the first event that arrives to eventFilter. This is needed to tune windows gestures after Qt does it internally, since its settings are not all right for us. + /** A flag. If false, gestures on windows will get tuned(or re-tuned) + * upon the first event that arrives to eventFilter. This is needed to + * tune windows gestures after Qt does it internally, since its settings + * are not all right for us. + */ + bool isWinGesturesTuned; private: static void setViewportCB(void * userdata, SoAction * action); diff --git a/src/Gui/WinNativeGestureRecognizers.cpp b/src/Gui/WinNativeGestureRecognizers.cpp index c0e1c4677f..b1cd3b6ed3 100644 --- a/src/Gui/WinNativeGestureRecognizers.cpp +++ b/src/Gui/WinNativeGestureRecognizers.cpp @@ -23,11 +23,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ - #include - #include - #include - #include - #include +# include +# include +# include +# ifdef FC_OS_WIN32 +# include +# endif +# include #endif #include "WinNativeGestureRecognizers.h"