diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 64179fd53ee..cee2e9ead72 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -289,6 +289,7 @@ class QgisInterface : QObject //! View menu actions virtual QAction *actionPan() = 0; + virtual QAction *actionTouch() = 0; virtual QAction *actionPanToSelected() = 0; virtual QAction *actionZoomIn() = 0; virtual QAction *actionZoomOut() = 0; diff --git a/python/gui/qgsmaptooltouch.sip b/python/gui/qgsmaptooltouch.sip new file mode 100644 index 00000000000..59f8fcbf32f --- /dev/null +++ b/python/gui/qgsmaptooltouch.sip @@ -0,0 +1,26 @@ +class QgsMapToolTouch : QgsMapTool +{ +%TypeHeaderCode +#include +%End + + public: + //! constructor + QgsMapToolTouch( QgsMapCanvas* canvas ); + + ~QgsMapToolTouch(); + + void activate(); + void deactivate(); + + //! Overridden mouse move event + virtual void canvasMoveEvent( QMouseEvent * e ); + + //! Overridden mouse release event + virtual void canvasReleaseEvent( QMouseEvent * e ); + + //! Overridden Mouse double click event. + virtual void canvasDoubleClickEvent( QMouseEvent * e ); + + virtual bool isTransient() { return true; } +} diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 68e4d3cc57d..9b33891ea51 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -251,6 +251,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow #endif QAction *actionPan() { return mActionPan; } + QAction *actionTouch() { return mActionTouch; } QAction *actionPanToSelected() { return mActionPanToSelected; } QAction *actionZoomIn() { return mActionZoomIn; } QAction *actionZoomOut() { return mActionZoomOut; } diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index 6e13486d6f2..db329a54395 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -411,6 +411,7 @@ QAction *QgisAppInterface::actionEditSeparator2() { return 0; } //! View menu actions QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); } +QAction *QgisAppInterface::actionTouch() { return qgis->actionTouch(); } QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); } QAction *QgisAppInterface::actionZoomIn() { return qgis->actionZoomIn(); } QAction *QgisAppInterface::actionZoomOut() { return qgis->actionZoomOut(); } diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index 41c4bf28e4c..e9d810a181d 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -260,6 +260,7 @@ class QgisAppInterface : public QgisInterface //! View menu actions virtual QAction *actionPan(); + virtual QAction *actionTouch(); virtual QAction *actionPanToSelected(); virtual QAction *actionZoomIn(); virtual QAction *actionZoomOut(); diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index aff5d049778..e5b4b673021 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -401,6 +401,7 @@ class GUI_EXPORT QgisInterface : public QObject //! View menu actions virtual QAction *actionPan() = 0; + virtual QAction *actionTouch() = 0; virtual QAction *actionPanToSelected() = 0; virtual QAction *actionZoomIn() = 0; virtual QAction *actionZoomOut() = 0;