Skip to content
Permalink
Browse files

Add bindings for touch map tool

 - Also expose via QgisInterface like other actions
  • Loading branch information
NathanW2 committed Jun 26, 2012
1 parent 4e36df0 commit 1e7e763af188542f18fd6c433f0ca636bb561a22
@@ -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;
@@ -0,0 +1,26 @@
class QgsMapToolTouch : QgsMapTool
{
%TypeHeaderCode
#include <qgsmaptooltouch.h>
%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; }
}
@@ -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; }
@@ -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(); }
@@ -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();
@@ -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;

0 comments on commit 1e7e763

Please sign in to comment.
You can’t perform that action at this time.