Skip to content

Commit

Permalink
cleanup includes
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and wonder-sk committed Jan 31, 2023
1 parent 07b01fe commit 537b2dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
10 changes: 2 additions & 8 deletions src/3d/qgscameracontroller.cpp
Expand Up @@ -14,10 +14,8 @@
***************************************************************************/

#include "qgscameracontroller.h"
#include "qgsraycastingutils_p.h"
#include "qgsterrainentity_p.h"
#include "qgsvector3d.h"
#include "qgssettings.h"
#include "qgs3dutils.h"
#include "qgswindow3dengine.h"
#include "qgs3dmapscene.h"
Expand All @@ -26,8 +24,6 @@

#include <QDomDocument>
#include <Qt3DRender/QCamera>
#include <Qt3DRender/QObjectPicker>
#include <Qt3DRender/QPickEvent>
#include <Qt3DInput>

#include "qgslogger.h"
Expand All @@ -39,12 +35,10 @@ QgsCameraController::QgsCameraController( Qgs3DMapScene *scene )
, mCameraBeforeRotation( new Qt3DRender::QCamera )
, mCameraBeforeDrag( new Qt3DRender::QCamera )
, mCameraBeforeZoom( new Qt3DRender::QCamera )
, mMouseDevice( new Qt3DInput::QMouseDevice() )
, mKeyboardDevice( new Qt3DInput::QKeyboardDevice() )
, mMouseHandler( new Qt3DInput::QMouseHandler )
, mKeyboardHandler( new Qt3DInput::QKeyboardHandler )
{
mMouseHandler->setSourceDevice( mMouseDevice );
mMouseHandler->setSourceDevice( new Qt3DInput::QMouseDevice() );
connect( mMouseHandler, &Qt3DInput::QMouseHandler::positionChanged,
this, &QgsCameraController::onPositionChanged );
connect( mMouseHandler, &Qt3DInput::QMouseHandler::wheel,
Expand All @@ -55,7 +49,7 @@ QgsCameraController::QgsCameraController( Qgs3DMapScene *scene )
this, &QgsCameraController::onMouseReleased );
addComponent( mMouseHandler );

mKeyboardHandler->setSourceDevice( mKeyboardDevice );
mKeyboardHandler->setSourceDevice( new Qt3DInput::QKeyboardDevice() );
connect( mKeyboardHandler, &Qt3DInput::QKeyboardHandler::pressed,
this, &QgsCameraController::onKeyPressed );
connect( mKeyboardHandler, &Qt3DInput::QKeyboardHandler::released,
Expand Down
9 changes: 0 additions & 9 deletions src/3d/qgscameracontroller.h
Expand Up @@ -18,27 +18,22 @@

#include "qgis_3d.h"

#include <QPointer>
#include <QRect>
#include <Qt3DCore/QEntity>
#include <Qt3DInput/QMouseEvent>
#include <QImage>

namespace Qt3DInput
{
class QKeyEvent;
class QKeyboardDevice;
class QKeyboardHandler;
class QMouseEvent;
class QMouseDevice;
class QMouseHandler;
class QWheelEvent;
}

namespace Qt3DRender
{
class QCamera;
class QPickEvent;
}

#include "qgscamerapose.h"
Expand Down Expand Up @@ -307,10 +302,6 @@ class _3D_EXPORT QgsCameraController : public Qt3DCore::QEntity
bool mZoomPointCalculated = false;
QVector3D mZoomPoint;

//! Delegates mouse events to the attached MouseHandler objects
Qt3DInput::QMouseDevice *mMouseDevice = nullptr;
Qt3DInput::QKeyboardDevice *mKeyboardDevice = nullptr;

Qt3DInput::QMouseHandler *mMouseHandler = nullptr;
Qt3DInput::QKeyboardHandler *mKeyboardHandler = nullptr;
NavigationMode mCameraNavigationMode = NavigationMode::TerrainBasedNavigation;
Expand Down

0 comments on commit 537b2dc

Please sign in to comment.