Good day,

I am the sole developer left on the development of the QRap plugin 
( / ). As this is not 
even my main focus, I tent not to update so often as only sync with LTR 

Until QGis 2.8 the mouse clicked worked fine, but when I updated to 2.14 it no 
longer worked. Attached is the MouseEvent code I use. I originally had it 
inherit from QqsMapTool and then from QgsMapToolEmitPoint ... both works on 
QGis 2.8, but neither on 2.14.   I tried using QgsMapToolEmitPoint directly but 
it said 
QgsMapToolEmitPoint::canvasClicked(QgsPoint&,Qt::MouseButton) does not exist 
when I run it ... it does not both in 2.8 and 2.14. 

I can confirm that MapCanvas()->SetMapTool run sucessfully  (I caught the 
mapToolSet signal ... )

Does any of you with years of experience perhaps have a pointer that would help 
me resolve it. 

Kind Regards
Magdaleen Ballot

PS: Why is QRap not in the QGis repository ... because it is huge, and I still 
want to get rid of Poco (which is used for XML parsing and replace it with a Qt 

Attachment: cMouseEvents.cpp
Description: Binary data

 *    QRAP Project
 *    Version     : 0.1
 *    Date        : 2008/04/01
 *    License     : GNU GPLv3
 *    File        : cMouseEvents.h
 *    Copyright   : University of Pretoria
 *    Author      : Dirk van der Merwe 
 *                : email:
 *    Description : This probably come from QGIS ... sorry maggie doesn't 
 *                  know true origin
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *


#include <QCursor>
#include <QString>
#include <QObject>
#include <QMouseEvent>
#include <qgsmaptool.h>
#include <qgsmapcanvas.h>
#include <qgsmaptopixel.h> 
#include <qgsmaptoolemitpoint.h> 

class QgsMapLayer;
class QgsMapCanvas;
class QMouseEvent;
class QgsPoint;
class QgsMapTool;

        class MouseEvents  : public QgsMapToolEmitPoint
        { Q_OBJECT
                MouseEvents(QgsMapCanvas* canvas);
                virtual ~MouseEvents();
        public slots:
                virtual void canvasReleaseEvent(QMouseEvent * e); 
                virtual void canvasMoveEvent(QMouseEvent * e);
                void RightPoint(QgsPoint &Point);
                void LeftPoint(QgsPoint &Point);
                void MouseMove(QgsPoint &Point);
        //! pointer to map canvas
        QgsMapCanvas* mCanvas;
         //! cursor used in map tool
        QCursor mCursor;

#endif /*MOUSEEVENTS_H_*/ 
Qgis-developer mailing list
List info:

Reply via email to