Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
SIM::Coin3D::Quarter::InputDevice Class Referenceabstract

The InputDevice class is the base class for devices such as the Keyboard and Mouse. It can be subclassed to support other devices. More...

#include <Quarter/devices/InputDevice.h>

Inheritance diagram for SIM::Coin3D::Quarter::InputDevice:
SIM::Coin3D::Quarter::Keyboard SIM::Coin3D::Quarter::Mouse

Public Member Functions

 InputDevice (QuarterWidget *quarter)
 
virtual const SoEventtranslateEvent (QEvent *event)=0
 
void setMousePosition (const SbVec2s &pos)
 
void setWindowSize (const SbVec2s &size)
 
void setModifiers (SoEvent *soevent, const QInputEvent *qevent)
 

Protected Attributes

SbVec2s mousepos
 
SbVec2s windowsize
 
QuarterWidgetquarter
 

Detailed Description

The InputDevice class is the base class for devices such as the Keyboard and Mouse. It can be subclassed to support other devices.

Member Function Documentation

◆ translateEvent()

virtual const SoEvent* SIM::Coin3D::Quarter::InputDevice::translateEvent ( QEvent *  event)
pure virtual

Subclasses must override this method to provide custom event handling

Implemented in SIM::Coin3D::Quarter::Mouse, and SIM::Coin3D::Quarter::Keyboard.

◆ setMousePosition()

void InputDevice::setMousePosition ( const SbVec2s pos)

Sets the mouseposition

Parameters
[in]posposition of mouse in pixelcoordinates

◆ setWindowSize()

void InputDevice::setWindowSize ( const SbVec2s size)

Sets the window size of the owning window

Parameters
[in]sizein pixels

◆ setModifiers()

void InputDevice::setModifiers ( SoEvent soevent,
const QInputEvent *  qevent 
)

Transforms a qevent into an soevent

Parameters
[in,out]soeventthe transformed event
[in]qeventincoming qevent

Member Data Documentation

◆ mousepos

InputDevice::mousepos
protected

Holds the last known position of the mouse. This should be set even for a keyboard event.

◆ windowsize

InputDevice::windowsize
protected

Holds the size of the owning window


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