Skip to content

Commit

Permalink
Merge pull request #4138 from nyalldawson/touch
Browse files Browse the repository at this point in the history
Rework map touch tool
  • Loading branch information
m-kuhn committed Feb 16, 2017
2 parents 7f1ff08 + a124fbf commit 35d9b83
Show file tree
Hide file tree
Showing 28 changed files with 114 additions and 380 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -269,23 +269,6 @@ IF (WITH_QTMOBILITY)
FIND_PACKAGE(QtMobility 1.1.0) FIND_PACKAGE(QtMobility 1.1.0)
ENDIF (WITH_QTMOBILITY) ENDIF (WITH_QTMOBILITY)


IF (ANDROID)
SET (DEFAULT_WITH_TOUCH TRUE)
ELSE (ANDROID)
SET (DEFAULT_WITH_TOUCH FALSE)
ENDIF (ANDROID)

#Add a touch mode if Qt has Qt Gestures
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")

IF (WITH_TOUCH)
# following variable is used in qgsconfig.h
SET (HAVE_TOUCH TRUE)
MESSAGE (STATUS "Touch support enabled")
ELSE (WITH_TOUCH)
MESSAGE (STATUS "Touch support disabled")
ENDIF (WITH_TOUCH)

# search for QScintilla2 (C++ lib) # search for QScintilla2 (C++ lib)
FIND_PACKAGE(QScintilla REQUIRED) FIND_PACKAGE(QScintilla REQUIRED)


Expand Down
2 changes: 0 additions & 2 deletions cmake_templates/qgsconfig.h.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@


#cmakedefine HAVE_ORACLE #cmakedefine HAVE_ORACLE


#cmakedefine HAVE_TOUCH

#cmakedefine HAVE_OSGEARTHQT #cmakedefine HAVE_OSGEARTHQT


#cmakedefine SERVER_SKIP_ECW #cmakedefine SERVER_SKIP_ECW
Expand Down
2 changes: 2 additions & 0 deletions doc/api_break.dox
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- QgsMapCanvasMap. It is an internal class used by map canvas. - QgsMapCanvasMap. It is an internal class used by map canvas.
- QgsMapLayerRegistry. Its functionality has been moved to QgsProject. - QgsMapLayerRegistry. Its functionality has been moved to QgsProject.
- QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings. - QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.
- QgsMapToolTouch. The touch navigation functionality is now built into the standard QgsMapToolPan tool.
- QgsPhotoWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead. - QgsPhotoWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer. - QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.
- QgsProjectBadLayerGuiHandler was removed. It was unused in QGIS code and barely useful. Implement your own QgsProjectBadLayerHandler subclass if needed. - QgsProjectBadLayerGuiHandler was removed. It was unused in QGIS code and barely useful. Implement your own QgsProjectBadLayerHandler subclass if needed.
Expand Down Expand Up @@ -360,6 +361,7 @@ QgisInterface {#qgis_api_break_3_0_QgisInterface}


- fileMenu() has been removed, use projectMenu() instead. - fileMenu() has been removed, use projectMenu() instead.
- actionRemoveLayer was removed as it no longer exists. - actionRemoveLayer was removed as it no longer exists.
- actionTouch was removed, as the corresponding action no longer exists (see notes on QgsMapToolTouch)




QgsAbstractGeometry {#qgis_api_break_3_0_QgsAbstractGeometry} QgsAbstractGeometry {#qgis_api_break_3_0_QgsAbstractGeometry}
Expand Down
1 change: 0 additions & 1 deletion ms-windows/cygwin/package.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ cmake -D BUILDNAME="cygwin" \
-D WITH_QSPATIALITE=TRUE \ -D WITH_QSPATIALITE=TRUE \
-D WITH_SERVER=TRUE \ -D WITH_SERVER=TRUE \
-D WITH_GLOBE=TRUE \ -D WITH_GLOBE=TRUE \
-D WITH_TOUCH=TRUE \
-D WITH_ORACLE=FALSE \ -D WITH_ORACLE=FALSE \
-D CMAKE_LEGACY_CYGWIN_WIN32=0 \ -D CMAKE_LEGACY_CYGWIN_WIN32=0 \
-D PYUIC4_PROGRAM=/usr/lib/python2.7/site-packages/PyQt4/pyuic4 \ -D PYUIC4_PROGRAM=/usr/lib/python2.7/site-packages/PyQt4/pyuic4 \
Expand Down
1 change: 0 additions & 1 deletion ms-windows/osgeo4w/package-nightly.cmd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ cmake -G Ninja ^
-D WITH_GRASS7=TRUE ^ -D WITH_GRASS7=TRUE ^
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^ -D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
-D WITH_GLOBE=FALSE ^ -D WITH_GLOBE=FALSE ^
-D WITH_TOUCH=TRUE ^
-D WITH_ORACLE=TRUE ^ -D WITH_ORACLE=TRUE ^
-D WITH_CUSTOM_WIDGETS=TRUE ^ -D WITH_CUSTOM_WIDGETS=TRUE ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^ -D CMAKE_BUILD_TYPE=%BUILDCONF% ^
Expand Down
1 change: 0 additions & 1 deletion ms-windows/osgeo4w/package.cmd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ cmake -G Ninja ^
-D WITH_GRASS7=TRUE ^ -D WITH_GRASS7=TRUE ^
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^ -D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
-D WITH_GLOBE=FALSE ^ -D WITH_GLOBE=FALSE ^
-D WITH_TOUCH=TRUE ^
-D WITH_ORACLE=TRUE ^ -D WITH_ORACLE=TRUE ^
-D WITH_CUSTOM_WIDGETS=TRUE ^ -D WITH_CUSTOM_WIDGETS=TRUE ^
-D CMAKE_CXX_FLAGS_RELEASE="/MD /MP /O2 /Ob2 /D NDEBUG" ^ -D CMAKE_CXX_FLAGS_RELEASE="/MD /MP /O2 /Ob2 /D NDEBUG" ^
Expand Down
4 changes: 0 additions & 4 deletions python/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ARM) SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ARM)
ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")


IF(NOT WITH_TOUCH)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_TOUCH)
ENDIF(NOT WITH_TOUCH)

IF(NOT QT_MOBILITY_LOCATION_FOUND) IF(NOT QT_MOBILITY_LOCATION_FOUND)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} MOBILITY_LOCATION) SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} MOBILITY_LOCATION)
ENDIF(NOT QT_MOBILITY_LOCATION_FOUND) ENDIF(NOT QT_MOBILITY_LOCATION_FOUND)
Expand Down
1 change: 0 additions & 1 deletion python/gui/gui.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
%Include qgsmaptoolidentify.sip %Include qgsmaptoolidentify.sip
%Include qgsmaptoolidentifyfeature.sip %Include qgsmaptoolidentifyfeature.sip
%Include qgsmaptoolpan.sip %Include qgsmaptoolpan.sip
%Include qgsmaptooltouch.sip
%Include qgsmaptoolzoom.sip %Include qgsmaptoolzoom.sip
%Include qgsmaplayerstylemanagerwidget.sip %Include qgsmaplayerstylemanagerwidget.sip
%Include qgsmessagebar.sip %Include qgsmessagebar.sip
Expand Down
2 changes: 0 additions & 2 deletions python/gui/qgisinterface.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ class QgisInterface : QObject
// View menu actions // View menu actions
//! Get access to the native pan action. Call trigger() on it to set the default pan map tool. //! Get access to the native pan action. Call trigger() on it to set the default pan map tool.
virtual QAction *actionPan() = 0; virtual QAction *actionPan() = 0;
//! Get access to the native touch action.
virtual QAction *actionTouch() = 0;
//! Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection. //! Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection.
virtual QAction *actionPanToSelected() = 0; virtual QAction *actionPanToSelected() = 0;
//! Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool. //! Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool.
Expand Down
5 changes: 1 addition & 4 deletions python/gui/qgsmapcanvas.sip
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,3 @@
%Feature HAVE_TOUCH

/** \ingroup gui /** \ingroup gui
* Map canvas is a class for displaying all GIS data types on a canvas. * Map canvas is a class for displaying all GIS data types on a canvas.
*/ */
Expand Down Expand Up @@ -486,10 +484,9 @@ class QgsMapCanvas : QGraphicsView
void messageEmitted( const QString& title, const QString& message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO ); void messageEmitted( const QString& title, const QString& message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO );


protected: protected:
%If (HAVE_TOUCH)
//! Overridden standard event to be gestures aware //! Overridden standard event to be gestures aware
bool event( QEvent * e ); bool event( QEvent * e );
%End


//! Overridden key press event //! Overridden key press event
void keyPressEvent( QKeyEvent * e ); void keyPressEvent( QKeyEvent * e );
Expand Down
2 changes: 0 additions & 2 deletions python/gui/qgsmaptool.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ class QgsMapTool : QObject
//! Key event for overriding. Default implementation does nothing. //! Key event for overriding. Default implementation does nothing.
virtual void keyReleaseEvent( QKeyEvent* e ); virtual void keyReleaseEvent( QKeyEvent* e );


%If (HAVE_TOUCH)
//! gesture event for overriding. Default implementation does nothing. //! gesture event for overriding. Default implementation does nothing.
virtual bool gestureEvent( QGestureEvent* e ); virtual bool gestureEvent( QGestureEvent* e );
%End


/** Use this to associate a QAction to this maptool. Then when the setMapTool /** Use this to associate a QAction to this maptool. Then when the setMapTool
* method of mapcanvas is called the action state will be set to on. * method of mapcanvas is called the action state will be set to on.
Expand Down
22 changes: 0 additions & 22 deletions python/gui/qgsmaptooltouch.sip

This file was deleted.

2 changes: 0 additions & 2 deletions rpm/qgis.spec.template
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ gzip ChangeLog
# Necessary for the test suite # Necessary for the test suite
#export LD_LIBRARY_PATH=%{_builddir}%{name}-%{version}/output/%{_lib} #export LD_LIBRARY_PATH=%{_builddir}%{name}-%{version}/output/%{_lib}


#Info: TOUCH needs Qt >= 4.5
%cmake \ %cmake \
%{_cmake_skip_rpath} \ %{_cmake_skip_rpath} \
-D QGIS_LIB_SUBDIR=%{_lib} \ -D QGIS_LIB_SUBDIR=%{_lib} \
Expand All @@ -224,7 +223,6 @@ gzip ChangeLog
-D WITH_INTERNAL_SIX:BOOL=FALSE \ -D WITH_INTERNAL_SIX:BOOL=FALSE \
-D WITH_PYSPATIALITE:BOOL=FALSE \ -D WITH_PYSPATIALITE:BOOL=FALSE \
-D WITH_SERVER:BOOL=TRUE \ -D WITH_SERVER:BOOL=TRUE \
-D WITH_TOUCH:BOOL=TRUE \
%{configure_with_spatialite} \ %{configure_with_spatialite} \
. .
#-D WITH_QTMOBILITY:BOOL=TRUE \ #-D WITH_QTMOBILITY:BOOL=TRUE \
Expand Down
55 changes: 7 additions & 48 deletions src/app/qgisapp.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -363,10 +363,6 @@ extern "C"
#include <DbgHelp.h> #include <DbgHelp.h>
#endif #endif


#ifdef HAVE_TOUCH
#include "qgsmaptooltouch.h"
#endif

class QTreeWidgetItem; class QTreeWidgetItem;


/** Set the application title bar text /** Set the application title bar text
Expand Down Expand Up @@ -1097,14 +1093,11 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
QgsDebugMsg( "Tips are disabled" ); QgsDebugMsg( "Tips are disabled" );
} }


#ifdef HAVE_TOUCH if ( ! QTouchDevice::devices().isEmpty() )
//add reacting to long click in touch {
grabGesture( Qt::TapAndHoldGesture ); //add reacting to long click in touch
#else grabGesture( Qt::TapAndHoldGesture );
//remove mActionTouch button }
delete mActionTouch;
mActionTouch = nullptr;
#endif


// supposedly all actions have been added, now register them to the shortcut manager // supposedly all actions have been added, now register them to the shortcut manager
QgsShortcutsManager::instance()->registerAllChildren( this ); QgsShortcutsManager::instance()->registerAllChildren( this );
Expand Down Expand Up @@ -1258,9 +1251,6 @@ QgisApp::~QgisApp()
delete mMapTools.mZoomIn; delete mMapTools.mZoomIn;
delete mMapTools.mZoomOut; delete mMapTools.mZoomOut;
delete mMapTools.mPan; delete mMapTools.mPan;
#ifdef HAVE_TOUCH
delete mMapTools.mTouch;
#endif
delete mMapTools.mAddFeature; delete mMapTools.mAddFeature;
delete mMapTools.mAddPart; delete mMapTools.mAddPart;
delete mMapTools.mAddRing; delete mMapTools.mAddRing;
Expand Down Expand Up @@ -1501,12 +1491,10 @@ bool QgisApp::event( QEvent * event )
openFile( foe->file() ); openFile( foe->file() );
done = true; done = true;
} }
#ifdef HAVE_TOUCH else if ( !QTouchDevice::devices().isEmpty() && event->type() == QEvent::Gesture )
else if ( event->type() == QEvent::Gesture )
{ {
done = gestureEvent( static_cast<QGestureEvent*>( event ) ); done = gestureEvent( static_cast<QGestureEvent*>( event ) );
} }
#endif
else else
{ {
// pass other events to base class // pass other events to base class
Expand Down Expand Up @@ -1644,10 +1632,6 @@ void QgisApp::createActions()
connect( mActionOffsetCurve, SIGNAL( triggered() ), this, SLOT( offsetCurve() ) ); connect( mActionOffsetCurve, SIGNAL( triggered() ), this, SLOT( offsetCurve() ) );


// View Menu Items // View Menu Items

#ifdef HAVE_TOUCH
connect( mActionTouch, SIGNAL( triggered() ), this, SLOT( touch() ) );
#endif
connect( mActionPan, SIGNAL( triggered() ), this, SLOT( pan() ) ); connect( mActionPan, SIGNAL( triggered() ), this, SLOT( pan() ) );
connect( mActionPanToSelected, SIGNAL( triggered() ), this, SLOT( panToSelected() ) ); connect( mActionPanToSelected, SIGNAL( triggered() ), this, SLOT( panToSelected() ) );
connect( mActionZoomIn, SIGNAL( triggered() ), this, SLOT( zoomIn() ) ); connect( mActionZoomIn, SIGNAL( triggered() ), this, SLOT( zoomIn() ) );
Expand Down Expand Up @@ -1878,9 +1862,6 @@ void QgisApp::createActionGroups()
// //
// Map Tool Group // Map Tool Group
mMapToolGroup = new QActionGroup( this ); mMapToolGroup = new QActionGroup( this );
#ifdef HAVE_TOUCH
mMapToolGroup->addAction( mActionTouch );
#endif
mMapToolGroup->addAction( mActionPan ); mMapToolGroup->addAction( mActionPan );
mMapToolGroup->addAction( mActionZoomIn ); mMapToolGroup->addAction( mActionZoomIn );
mMapToolGroup->addAction( mActionZoomOut ); mMapToolGroup->addAction( mActionZoomOut );
Expand Down Expand Up @@ -2689,9 +2670,6 @@ void QgisApp::setTheme( const QString& theThemeName )
mActionZoomFullExtent->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomFullExtent.svg" ) ) ); mActionZoomFullExtent->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomFullExtent.svg" ) ) );
mActionZoomToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToSelected.svg" ) ) ); mActionZoomToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToSelected.svg" ) ) );
mActionShowRasterCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowRasterCalculator.png" ) ) ); mActionShowRasterCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowRasterCalculator.png" ) ) );
#ifdef HAVE_TOUCH
mActionTouch->setIcon( QgsApplication::getThemeIcon( "/mActionTouch.svg" ) );
#endif
mActionPan->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPan.svg" ) ) ); mActionPan->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPan.svg" ) ) );
mActionPanToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPanToSelected.svg" ) ) ); mActionPanToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPanToSelected.svg" ) ) );
mActionZoomLast->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomLast.svg" ) ) ); mActionZoomLast->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomLast.svg" ) ) );
Expand Down Expand Up @@ -2868,10 +2846,6 @@ void QgisApp::createCanvasTools()
mMapTools.mZoomOut->setAction( mActionZoomOut ); mMapTools.mZoomOut->setAction( mActionZoomOut );
mMapTools.mPan = new QgsMapToolPan( mMapCanvas ); mMapTools.mPan = new QgsMapToolPan( mMapCanvas );
mMapTools.mPan->setAction( mActionPan ); mMapTools.mPan->setAction( mActionPan );
#ifdef HAVE_TOUCH
mMapTools.mTouch = new QgsMapToolTouch( mMapCanvas );
mMapTools.mTouch->setAction( mActionTouch );
#endif
mMapTools.mIdentify = new QgsMapToolIdentifyAction( mMapCanvas ); mMapTools.mIdentify = new QgsMapToolIdentifyAction( mMapCanvas );
mMapTools.mIdentify->setAction( mActionIdentify ); mMapTools.mIdentify->setAction( mActionIdentify );
connect( mMapTools.mIdentify, SIGNAL( copyToClipboard( QgsFeatureStore & ) ), connect( mMapTools.mIdentify, SIGNAL( copyToClipboard( QgsFeatureStore & ) ),
Expand Down Expand Up @@ -4598,15 +4572,10 @@ void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank )
} }


// set the initial map tool // set the initial map tool
#ifndef HAVE_TOUCH
mMapCanvas->setMapTool( mMapTools.mPan ); mMapCanvas->setMapTool( mMapTools.mPan );
mNonEditMapTool = mMapTools.mPan; // signals are not yet setup to catch this mNonEditMapTool = mMapTools.mPan; // signals are not yet setup to catch this
#else
mMapCanvas->setMapTool( mMapTools.mTouch );
mNonEditMapTool = mMapTools.mTouch; // signals are not yet setup to catch this
#endif


} // QgisApp::fileNew(bool thePromptToSaveFlag) }


bool QgisApp::fileNewFromTemplate( const QString& fileName ) bool QgisApp::fileNewFromTemplate( const QString& fileName )
{ {
Expand Down Expand Up @@ -5849,13 +5818,6 @@ void QgisApp::pan()
mMapCanvas->setMapTool( mMapTools.mPan ); mMapCanvas->setMapTool( mMapTools.mPan );
} }


#ifdef HAVE_TOUCH
void QgisApp::touch()
{
mMapCanvas->setMapTool( mMapTools.mTouch );
}
#endif

void QgisApp::zoomFull() void QgisApp::zoomFull()
{ {
mMapCanvas->zoomToFullExtent(); mMapCanvas->zoomToFullExtent();
Expand Down Expand Up @@ -12129,8 +12091,6 @@ void QgisApp::onLayerError( const QString& msg )
mInfoBar->pushCritical( tr( "Layer %1" ).arg( layer->name() ), msg ); mInfoBar->pushCritical( tr( "Layer %1" ).arg( layer->name() ), msg );
} }



#ifdef HAVE_TOUCH
bool QgisApp::gestureEvent( QGestureEvent *event ) bool QgisApp::gestureEvent( QGestureEvent *event )
{ {
if ( QGesture *tapAndHold = event->gesture( Qt::TapAndHoldGesture ) ) if ( QGesture *tapAndHold = event->gesture( Qt::TapAndHoldGesture ) )
Expand All @@ -12153,7 +12113,6 @@ void QgisApp::tapAndHoldTriggered( QTapAndHoldGesture *gesture )
QApplication::postEvent( receiver, new QMouseEvent( QEvent::MouseButtonRelease, receiver->mapFromGlobal( pos ), Qt::RightButton, Qt::RightButton, Qt::NoModifier ) ); QApplication::postEvent( receiver, new QMouseEvent( QEvent::MouseButtonRelease, receiver->mapFromGlobal( pos ), Qt::RightButton, Qt::RightButton, Qt::NoModifier ) );
} }
} }
#endif


#ifdef Q_OS_WIN #ifdef Q_OS_WIN
LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo ) LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo )
Expand Down
16 changes: 1 addition & 15 deletions src/app/qgisapp.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ class QgsDiagramProperties;
#include "ui_qgisapp.h" #include "ui_qgisapp.h"
#include "qgis_app.h" #include "qgis_app.h"


#ifdef HAVE_TOUCH
#include <QGestureEvent> #include <QGestureEvent>
#include <QTapAndHoldGesture> #include <QTapAndHoldGesture>
#endif


#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <windows.h> #include <windows.h>
Expand Down Expand Up @@ -352,7 +350,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionSnappingOptions() { return mActionSnappingOptions; } QAction *actionSnappingOptions() { return mActionSnappingOptions; }
QAction *actionOffsetCurve() { return mActionOffsetCurve; } QAction *actionOffsetCurve() { return mActionOffsetCurve; }
QAction *actionPan() { return mActionPan; } QAction *actionPan() { return mActionPan; }
QAction *actionTouch() { return mActionTouch; }
QAction *actionPanToSelected() { return mActionPanToSelected; } QAction *actionPanToSelected() { return mActionPanToSelected; }
QAction *actionZoomIn() { return mActionZoomIn; } QAction *actionZoomIn() { return mActionZoomIn; }
QAction *actionZoomOut() { return mActionZoomOut; } QAction *actionZoomOut() { return mActionZoomOut; }
Expand Down Expand Up @@ -1222,10 +1219,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void zoomIn(); void zoomIn();
//! Set map tool to pan //! Set map tool to pan
void pan(); void pan();
#ifdef HAVE_TOUCH
//! Set map tool to touch
void touch();
#endif
//! Identify feature(s) on the currently selected layer //! Identify feature(s) on the currently selected layer
void identify(); void identify();
//! Measure distance //! Measure distance
Expand Down Expand Up @@ -1590,9 +1583,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
: mZoomIn( nullptr ) : mZoomIn( nullptr )
, mZoomOut( nullptr ) , mZoomOut( nullptr )
, mPan( nullptr ) , mPan( nullptr )
#ifdef HAVE_TOUCH
, mTouch( 0 )
#endif
, mIdentify( nullptr ) , mIdentify( nullptr )
, mFeatureAction( nullptr ) , mFeatureAction( nullptr )
, mMeasureDist( nullptr ) , mMeasureDist( nullptr )
Expand Down Expand Up @@ -1639,9 +1629,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgsMapTool *mZoomIn; QgsMapTool *mZoomIn;
QgsMapTool *mZoomOut; QgsMapTool *mZoomOut;
QgsMapTool *mPan; QgsMapTool *mPan;
#ifdef HAVE_TOUCH
QgsMapTool *mTouch;
#endif
QgsMapTool *mIdentify; QgsMapTool *mIdentify;
QgsMapTool *mFeatureAction; QgsMapTool *mFeatureAction;
QgsMapTool *mMeasureDist; QgsMapTool *mMeasureDist;
Expand Down Expand Up @@ -1865,10 +1852,9 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QStackedWidget* mCentralContainer; QStackedWidget* mCentralContainer;


int mProjOpen; int mProjOpen;
#ifdef HAVE_TOUCH
bool gestureEvent( QGestureEvent *event ); bool gestureEvent( QGestureEvent *event );
void tapAndHoldTriggered( QTapAndHoldGesture *gesture ); void tapAndHoldTriggered( QTapAndHoldGesture *gesture );
#endif


friend class TestQgisAppPython; friend class TestQgisAppPython;
}; };
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisappinterface.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ QAction *QgisAppInterface::actionNodeTool() { return qgis->actionNodeTool(); }


//! View menu actions //! View menu actions
QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); } QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); }
QAction *QgisAppInterface::actionTouch() { return qgis->actionTouch(); }
QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); } QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); }
QAction *QgisAppInterface::actionZoomIn() { return qgis->actionZoomIn(); } QAction *QgisAppInterface::actionZoomIn() { return qgis->actionZoomIn(); }
QAction *QgisAppInterface::actionZoomOut() { return qgis->actionZoomOut(); } QAction *QgisAppInterface::actionZoomOut() { return qgis->actionZoomOut(); }
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisappinterface.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ class APP_EXPORT QgisAppInterface : public QgisInterface


//! View menu actions //! View menu actions
virtual QAction *actionPan() override; virtual QAction *actionPan() override;
virtual QAction *actionTouch() override;
virtual QAction *actionPanToSelected() override; virtual QAction *actionPanToSelected() override;
virtual QAction *actionZoomIn() override; virtual QAction *actionZoomIn() override;
virtual QAction *actionZoomOut() override; virtual QAction *actionZoomOut() override;
Expand Down
Loading

0 comments on commit 35d9b83

Please sign in to comment.