Skip to content

Commit

Permalink
Add Qgs3DMapTool::cursor()
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Sep 10, 2018
1 parent 407a5cb commit cf87b85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/3d/qgs3dmapcanvas.cpp
Expand Up @@ -125,7 +125,7 @@ void Qgs3DMapCanvas::setMapTool( Qgs3DMapTool *tool )
{
mEngine->window()->installEventFilter( this );
mScene->cameraController()->setEnabled( false );
mEngine->window()->setCursor( Qt::CrossCursor );
mEngine->window()->setCursor( tool->cursor() );
}

if ( mMapTool )
Expand Down
5 changes: 5 additions & 0 deletions src/app/3d/qgs3dmaptool.cpp
Expand Up @@ -45,3 +45,8 @@ void Qgs3DMapTool::activate()
void Qgs3DMapTool::deactivate()
{
}

QCursor Qgs3DMapTool::cursor() const
{
return Qt::CrossCursor;
}
3 changes: 3 additions & 0 deletions src/app/3d/qgs3dmaptool.h
Expand Up @@ -41,6 +41,9 @@ class Qgs3DMapTool : public QObject
//! Called when map tool is being deactivated
virtual void deactivate();

//! Mouse cursor to be used when the tool is active
virtual QCursor cursor() const;

protected:
Qgs3DMapCanvas *mCanvas = nullptr;
};
Expand Down
4 changes: 1 addition & 3 deletions src/app/3d/qgs3dmaptoolidentify.h
Expand Up @@ -23,8 +23,6 @@ namespace Qt3DRender
class QPickEvent;
}

//class QgsMapToolIdentifyAction;


class Qgs3DMapToolIdentify : public Qgs3DMapTool
{
Expand All @@ -45,7 +43,7 @@ class Qgs3DMapToolIdentify : public Qgs3DMapTool
void onTerrainEntityChanged();

private:
//QgsMapToolIdentifyAction *mIdentifyTool2D = nullptr;

};

#endif // QGS3DMAPTOOLIDENTIFY_H

0 comments on commit cf87b85

Please sign in to comment.