Receive and handle mouse/keyboard input events. More...
#include <sceneview/input_handler.hpp>
Public Member Functions | |
virtual QString | Name () const =0 |
virtual void | Activated () |
Called when the input handler is activated and given control. | |
virtual void | Deactivated () |
Called when the input handler is deactivated. | |
virtual void | InitializeGL () |
Called when the OpenGL context is ready for use. | |
virtual void | ShutdownGL () |
Called when the OpenGL context is shutting down (usually, right before destruction). | |
virtual void | MousePressEvent (QMouseEvent *event) |
Called when the mouse is pressed in the viewport. | |
virtual void | MouseMoveEvent (QMouseEvent *event) |
Called when the mouse is moved in the viewport. | |
virtual void | MouseReleaseEvent (QMouseEvent *event) |
Called when the mouse is released in the viewport. | |
virtual void | MouseDoubleClickEvent (QMouseEvent *event) |
Called when the mouse is double-clicked in the viewport. | |
virtual void | WheelEvent (QWheelEvent *event) |
Called when the mouse wheel is scrolled. | |
virtual void | KeyPressEvent (QKeyEvent *event) |
Called when a key is pressed in the viewport. | |
virtual void | KeyReleaseEvent (QKeyEvent *event) |
Called when a key is released in the viewport. | |
virtual QWidget * | GetWidget () |
Called to retrieve a widget for the InputHandler to manage. More... | |
virtual QVariant | SaveState () |
Called by the viewport to save the InputHandler state. More... | |
virtual void | LoadState (const QVariant &val) |
Called by the viewport to restore the InputHandler state. More... | |
Receive and handle mouse/keyboard input events.
This class is pure virtual and cannot be instantiated.
Sceneview users can create subclasses of InputHandler to implement custom input handlers (e.g., to interact with objects in the scene, or to provide a command/control UI).
|
inlinevirtual |
Called to retrieve a widget for the InputHandler to manage.
When subclassing from InputHandler, you can create a UI for your class by providing a widget here.
Reimplemented in sv::ViewHandlerHorizontal.
|
inlinevirtual |
Called by the viewport to restore the InputHandler state.
If your input handler has any adjustable settings, then load them from the passed in QVariant here.
|
inlinevirtual |
Called by the viewport to save the InputHandler state.
If your input handler has any adjustable settings, then save them into the returned QVariant.