Skip to content
Permalink
Browse files

move HAVE_TOUCH to qgsconfig.h - fixes vtable of QgsMapCanvas/QgsMapT…

…ool for plugins
  • Loading branch information
jef-n committed Jul 17, 2012
1 parent 03b0526 commit 0cfe094aca3452e071c9177efc6e0c4266201212
Showing with 15 additions and 11 deletions.
  1. +2 −1 CMakeLists.txt
  2. +2 −0 cmake_templates/qgsconfig.h.in
  3. +2 −5 src/app/qgisapp.cpp
  4. +5 −5 src/app/qgisapp.h
  5. +2 −0 src/gui/qgsmapcanvas.h
  6. +2 −0 src/gui/qgsmaptool.h
@@ -221,7 +221,8 @@ ELSE ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_M
SET (WITH_TOUCH FALSE)
ENDIF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
IF (WITH_TOUCH)
ADD_DEFINITIONS(-DHAVE_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")
@@ -35,5 +35,7 @@

#cmakedefine HAVE_PYTHON

#cmakedefine HAVE_TOUCH

#endif

@@ -1779,9 +1779,6 @@ void QgisApp::createCanvasTools()
mMapTools.mChangeLabelProperties->setAction( mActionChangeLabelProperties );
//ensure that non edit tool is initialised or we will get crashes in some situations
mNonEditMapTool = mMapTools.mPan;
//#ifdef HAVE_TOUCH
// mNonEditMapTool = mMapTools.mTouch;
//#endif
}

void QgisApp::createOverview()
@@ -2969,10 +2966,10 @@ void QgisApp::fileNew( bool thePromptToSaveFlag )
updateCRSStatusBar();

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

#ifdef HAVE_TOUCH
#else
mMapCanvas->setMapTool( mMapTools.mTouch );
mNonEditMapTool = mMapTools.mTouch; // signals are not yet setup to catch this
#endif
@@ -84,18 +84,18 @@ class QgsTileScaleWidget;
#include <QPointer>
#include <QSslError>

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

#include "qgsconfig.h"
#include "qgsfeature.h"
#include "qgspoint.h"
#include "qgssnappingdialog.h"

#include "ui_qgisapp.h"

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

/*! \class QgisApp
* \brief Main window for the Qgis application
*/
@@ -18,6 +18,8 @@
#ifndef QGSMAPCANVAS_H
#define QGSMAPCANVAS_H

#include "qgsconfig.h"

#include <list>
#include <memory>
#include <deque>
@@ -16,6 +16,8 @@
#ifndef QGSMAPTOOL_H
#define QGSMAPTOOL_H

#include "qgsconfig.h"

#include <QCursor>
#include <QString>
#include <QObject>

0 comments on commit 0cfe094

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