Skip to content

Commit

Permalink
qgscameracontroller: Make MouseOperation enum public
Browse files Browse the repository at this point in the history
This will be used for testing.
  • Loading branch information
ptitjano committed Mar 12, 2024
1 parent 9e8d505 commit 6387847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions python/3d/auto_generated/qgscameracontroller.sip.in
Expand Up @@ -187,6 +187,7 @@ preventing it from being instead handled by parents of the 3D window before
the controller ever receives it.
%End


public slots:

void setCameraNavigationMode( Qgis::NavigationMode navigationMode );
Expand Down
22 changes: 11 additions & 11 deletions src/3d/qgscameracontroller.h
Expand Up @@ -199,6 +199,17 @@ class _3D_EXPORT QgsCameraController : public QObject
*/
bool willHandleKeyEvent( QKeyEvent *event );

//! List of possible operations with the mouse in TerrainBased navigation
enum class MouseOperation SIP_SKIP
{
None = 0, // no operation
Translation, // left button pressed, no modifier
RotationCamera, // left button pressed + ctrl modifier
RotationCenter, // left button pressed + shift modifier
Zoom, // right button pressed
ZoomWheel // mouse wheel scroll
};

public slots:

/**
Expand All @@ -224,17 +235,6 @@ class _3D_EXPORT QgsCameraController : public QObject
//! Returns a pointer to the scene's engine's window or nullptr if engine is QgsOffscreen3DEngine
QWindow *window() const;

//! List of possible operations with the mouse in TerrainBased navigation
enum class MouseOperation
{
None = 0, // no operation
Translation, // left button pressed, no modifier
RotationCamera, // left button pressed + ctrl modifier
RotationCenter, // left button pressed + shift modifier
Zoom, // right button pressed
ZoomWheel // mouse wheel scroll
};

// This list gathers all the rotation and translation operations.
// It is used to update the appropriate parameters when successive
// translation and rotation happen.
Expand Down

0 comments on commit 6387847

Please sign in to comment.