Sceneview
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
sv::InputHandler Class Referenceabstract

Receive and handle mouse/keyboard input events. More...

#include <sceneview/input_handler.hpp>

Inheritance diagram for sv::InputHandler:
sv::ViewHandlerHorizontal

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...
 

Detailed Description

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).

Member Function Documentation

virtual QWidget* sv::InputHandler::GetWidget ( )
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.

virtual void sv::InputHandler::LoadState ( const QVariant &  val)
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.

virtual QVariant sv::InputHandler::SaveState ( )
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.


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