Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::QtEventToAzInputMapper Class Referencefinal

#include <QtEventToAzInputMapper.h>

Inherits QObject, and AzFramework::InputChannelNotificationBus::Handler.

Signals

void InputChannelUpdated (const AzFramework::InputChannel *channel, QEvent *event)
 

Public Member Functions

 QtEventToAzInputMapper (QWidget *sourceWidget, int syntheticDeviceId=0)
 
bool HandlesInputEvent (const AzFramework::InputChannel &channel) const
 
void SetEnabled (bool enabled)
 Sets whether or not this input mapper should be updating its input channels from Qt events.
 
void SetCursorCaptureEnabled (bool enabled)
 
void SetCursorMode (AzToolsFramework::CursorInputMode mode)
 Set the cursor mode.
 
void SetOverrideCursor (ViewportInteraction::CursorStyleOverride cursorStyleOverride)
 
void ClearOverrideCursor ()
 
bool eventFilter (QObject *object, QEvent *event) override
 

Protected Member Functions

AZ::s32 GetPriority () const override
 
void OnInputChannelEvent (const AzFramework::InputChannel &inputChannel, bool &hasBeenConsumed) override
 

Detailed Description

Maps events from the Qt input system to synthetic InputChannels in AzFramework that can be used by AzFramework::ViewportControllers.

Member Function Documentation

◆ HandlesInputEvent()

bool AzToolsFramework::QtEventToAzInputMapper::HandlesInputEvent ( const AzFramework::InputChannel &  channel) const

Queries whether a given input channel has a synthetic equivalent mapped by this system.

Returns
true if the channel is handled by MapQtEventToAzInput.

◆ InputChannelUpdated

void AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated ( const AzFramework::InputChannel *  channel,
QEvent *  event 
)
signal

This signal fires whenever the state of the specified input channel changes. This is determined by Qt events dispatched to the source widget.

Parameters
channelThe AZ input channel that has been updated.
eventThe underlying Qt event that triggered this change, if applicable.

◆ SetCursorCaptureEnabled()

void AzToolsFramework::QtEventToAzInputMapper::SetCursorCaptureEnabled ( bool  enabled)

Sets whether or not the cursor should be constrained to the source widget and invisible. Internally, this will reset the cursor position after each move event to ensure movement events don't allow the cursor to escape. This can be used for typical camera controls like a dolly or rotation, where mouse movement is important but cursor location is not.

Deprecated:
Use SetCursorMode()

The documentation for this class was generated from the following file: