SoQt  1.6.3
Coin3D GUI toolkit binding
Loading...
Searching...
No Matches
SoQtDevice Class Referenceabstract

The SoQtDevice class is the base class for the translation devices. More...

#include <Inventor/Qt/devices/SoQtDevice.h>

Inheritance diagram for SoQtDevice:
SoQtObject SoQtKeyboard SoQtMouse

Public Member Functions

virtual ~SoQtDevice ()
 
virtual void disable (QWidget *w, SoQtEventHandler *handler, void *closure)=0
 
virtual void enable (QWidget *w, SoQtEventHandler *handler, void *closure)=0
 
SbVec2s getWindowSize (void) const
 
void setWindowSize (const SbVec2s size)
 
virtual const SoEvent * translateEvent (QEvent *event)=0
 
- Public Member Functions inherited from SoQtObject
virtual SoType getTypeId (void) const =0
 
SbBool isOfType (SoType type) const
 

Static Public Member Functions

static void initClasses (void)
 
- Static Public Member Functions inherited from SoQtObject
static SoType getClassTypeId (void)
 
static void init (void)
 
static void initClass (void)
 

Protected Member Functions

 SoQtDevice (void)
 
void addEventHandler (QWidget *, SoQtEventHandler *, void *)
 
void invokeHandlers (QEvent *event)
 
void removeEventHandler (QWidget *, SoQtEventHandler *, void *)
 
void setEventPosition (SoEvent *event, int x, int y) const
 

Static Protected Member Functions

static SbVec2s getLastEventPosition (void)
 

Detailed Description

The SoQtDevice class is the base class for the translation devices.

The SoQt device classes provide glue functionality for translating native GUI events from the underlying toolkit to Inventor scene graph SoEvent events.

The device classes are mainly of interest to application programmers when writing extensions for new types of devices, and seldom in other contexts – so they can most often be ignored.

Constructor & Destructor Documentation

◆ ~SoQtDevice()

SoQtDevice::~SoQtDevice ( )
virtual

Public virtual destructor.

◆ SoQtDevice()

SoQtDevice::SoQtDevice ( void )
protected

Constructor. Protected to only enable invocation from derived device classes.

Member Function Documentation

◆ addEventHandler()

void SoQtDevice::addEventHandler ( QWidget * widget,
SoQtEventHandler * handler,
void * closure )
protected

Stores an event handler for the widget, which can later be invoked with SoQtDevice::invokeHandlers(). Used by extension device types.

◆ disable()

void SoQtDevice::disable ( QWidget * widget,
SoQtEventHandler * handler,
void * closure )
pure virtual

This method will disable the handler for the device.

Implemented in SoQtKeyboard, and SoQtMouse.

◆ enable()

void SoQtDevice::enable ( QWidget * widget,
SoQtEventHandler * handler,
void * closure )
pure virtual

This method will enable the device for the widget.

handler is invoked with the closure argument when an event occur in widget.

Implemented in SoQtKeyboard, and SoQtMouse.

◆ getLastEventPosition()

SbVec2s SoQtDevice::getLastEventPosition ( void )
staticprotected

Returns last event position that was set with SoQtDevice::setEventPosition().

◆ getWindowSize()

SbVec2s SoQtDevice::getWindowSize ( void ) const

This method returns the cached window size.

◆ initClasses()

void SoQtDevice::initClasses ( void )
static

This function initializes the type system for all the SoQt device classes. It is called indirectly when calling SoQt::init(), so the application programmer doesn't have to bother with it.

◆ invokeHandlers()

void SoQtDevice::invokeHandlers ( QEvent * event)
protected

Invoke all handlers registered with SoQtDevice::addEventHandler().

◆ removeEventHandler()

void SoQtDevice::removeEventHandler ( QWidget * widget,
SoQtEventHandler * handler,
void * closure )
protected

Remove a handler registered with SoQtDevice::addEventHandler().

◆ setEventPosition()

void SoQtDevice::setEventPosition ( SoEvent * event,
int x,
int y ) const
protected

This method fills in the position information of event, translating the coordinates into the correct coordinate system.

◆ setWindowSize()

void SoQtDevice::setWindowSize ( const SbVec2s size)

This method sets the cached size of the window the device is "attached" to.

◆ translateEvent()

const SoEvent * SoQtDevice::translateEvent ( QEvent * event)
pure virtual

This method translates from native events to Open Inventor SoEvent events.

Implemented in SoQtKeyboard, and SoQtMouse.


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