-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API for custom map tools in 3D map canvas
- Loading branch information
Showing
5 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*************************************************************************** | ||
qgs3dmaptool.cpp | ||
-------------------------------------- | ||
Date : Sep 2018 | ||
Copyright : (C) 2018 by Martin Dobias | ||
Email : wonder dot sk at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* 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 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgs3dmaptool.h" | ||
|
||
Qgs3DMapTool::Qgs3DMapTool( Qgs3DMapCanvas *canvas ) | ||
: mCanvas( canvas ) | ||
{ | ||
} | ||
|
||
void Qgs3DMapTool::mousePressEvent( QMouseEvent *event ) | ||
{ | ||
Q_UNUSED( event ); | ||
} | ||
|
||
void Qgs3DMapTool::mouseReleaseEvent( QMouseEvent *event ) | ||
{ | ||
Q_UNUSED( event ); | ||
} | ||
|
||
void Qgs3DMapTool::mouseMoveEvent( QMouseEvent *event ) | ||
{ | ||
Q_UNUSED( event ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/*************************************************************************** | ||
qgs3dmaptool.h | ||
-------------------------------------- | ||
Date : Sep 2018 | ||
Copyright : (C) 2018 by Martin Dobias | ||
Email : wonder dot sk at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* 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 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGS3DMAPTOOL_H | ||
#define QGS3DMAPTOOL_H | ||
|
||
#include <QObject> | ||
|
||
class Qgs3DMapCanvas; | ||
class QMouseEvent; | ||
|
||
/** | ||
* Base class for map tools operating on 3D map canvas. | ||
*/ | ||
class Qgs3DMapTool : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
Qgs3DMapTool( Qgs3DMapCanvas *canvas ); | ||
|
||
virtual void mousePressEvent( QMouseEvent *event ); | ||
virtual void mouseReleaseEvent( QMouseEvent *event ); | ||
virtual void mouseMoveEvent( QMouseEvent *event ); | ||
|
||
protected: | ||
Qgs3DMapCanvas *mCanvas = nullptr; | ||
}; | ||
|
||
#endif // QGS3DMAPTOOL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters