.TH "SoQtDevice" 3 "Thu Oct 17 2013" "Version 1.6.0a" "SoQt" \" -*- nroff -*- .ad l .nh .SH NAME SoQtDevice \- .PP The \fBSoQtDevice\fP class is the base class for the translation devices\&. .PP The \fBSoQt\fP device classes provide glue functionality for translating native GUI events from the underlying toolkit to Inventor scenegraph SoEvent events\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoQtObject\fP\&. .PP Inherited by \fBSoQtKeyboard\fP, and \fBSoQtMouse\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoQtDevice\fP ()" .br .ti -1c .RI "virtual void \fBenable\fP (QWidget *w, SoQtEventHandler *handler, void *closure)=0" .br .ti -1c .RI "virtual void \fBdisable\fP (QWidget *w, SoQtEventHandler *handler, void *closure)=0" .br .ti -1c .RI "virtual const SoEvent * \fBtranslateEvent\fP (QEvent *event)=0" .br .ti -1c .RI "void \fBsetWindowSize\fP (const SbVec2s size)" .br .ti -1c .RI "SbVec2s \fBgetWindowSize\fP (void) const " .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBSoQtDevice\fP (void)" .br .ti -1c .RI "void \fBsetEventPosition\fP (SoEvent *event, int x, int y) const " .br .ti -1c .RI "void \fBaddEventHandler\fP (QWidget *, SoQtEventHandler *, void *)" .br .ti -1c .RI "void \fBremoveEventHandler\fP (QWidget *, SoQtEventHandler *, void *)" .br .ti -1c .RI "void \fBinvokeHandlers\fP (QEvent *event)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static SbVec2s \fBgetLastEventPosition\fP (void)" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "class \fBSoQtDeviceP\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoQtDevice\fP class is the base class for the translation devices\&. .PP The \fBSoQt\fP device classes provide glue functionality for translating native GUI events from the underlying toolkit to Inventor scenegraph 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\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoQtDevice::~SoQtDevice ()\fC [virtual]\fP" Public virtual destructor\&. .SS "SoQtDevice::SoQtDevice (void)\fC [protected]\fP" Constructor\&. Protected to only enable invocation from derived device classes\&. .SH "Member Function Documentation" .PP .SS "void SoQtDevice::enable (QWidget *widget, SoQtEventHandler *handler, void *closure)\fC [pure virtual]\fP" This method will enable the device for the widget\&. .PP \fIhandler\fP is invoked with the \fIclosure\fP argument when an event occur in \fIwidget\fP\&. .PP Implemented in \fBSoQtMouse\fP, and \fBSoQtKeyboard\fP\&. .PP Referenced by SoQtRenderArea::buildWidget(), and SoQtRenderArea::registerDevice()\&. .SS "void SoQtDevice::disable (QWidget *widget, SoQtEventHandler *handler, void *closure)\fC [pure virtual]\fP" This method will disable the handler for the device\&. .PP Implemented in \fBSoQtMouse\fP, and \fBSoQtKeyboard\fP\&. .PP Referenced by SoQtRenderArea::unregisterDevice()\&. .SS "const SoEvent * SoQtDevice::translateEvent (QEvent *event)\fC [pure virtual]\fP" This method translates from native events to Open Inventor SoEvent events\&. .PP Implemented in \fBSoQtMouse\fP, and \fBSoQtKeyboard\fP\&. .SS "void SoQtDevice::setWindowSize (const SbVec2ssize)" This method sets the cached size of the window the device is 'attached' to\&. .PP Referenced by SoQtRenderArea::registerDevice()\&. .SS "SbVec2s SoQtDevice::getWindowSize (void) const" This method returns the cached window size\&. .SS "void SoQtDevice::initClasses (void)\fC [static]\fP" This function initializes the type system for all the \fBSoQt\fP device classes\&. It is called indirectly when calling \fBSoQt::init()\fP, so the application programmer doesn't have to bother with it\&. .PP References SoQtObject::initClass()\&. .PP Referenced by SoQtObject::init()\&. .SS "void SoQtDevice::setEventPosition (SoEvent *event, intx, inty) const\fC [protected]\fP" This method fills in the position information of \fIevent\fP, translating the coordinates into the correct coordinate system\&. .PP Referenced by SoQtKeyboard::translateEvent(), and SoQtMouse::translateEvent()\&. .SS "SbVec2s SoQtDevice::getLastEventPosition (void)\fC [static]\fP, \fC [protected]\fP" Returns last event position that was set with \fBSoQtDevice::setEventPosition()\fP\&. .PP Referenced by SoQtKeyboard::translateEvent()\&. .SS "void SoQtDevice::addEventHandler (QWidget *widget, SoQtEventHandler *handler, void *closure)\fC [protected]\fP" Stores an event \fIhandler\fP for the \fIwidget\fP, which can later be invoked with \fBSoQtDevice::invokeHandlers()\fP\&. Used by extension device types\&. .SS "void SoQtDevice::removeEventHandler (QWidget *widget, SoQtEventHandler *handler, void *closure)\fC [protected]\fP" Remove a \fIhandler\fP registered with \fBSoQtDevice::addEventHandler()\fP\&. .SS "void SoQtDevice::invokeHandlers (QEvent *event)\fC [protected]\fP" Invoke all handlers registered with \fBSoQtDevice::addEventHandler()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for SoQt from the source code\&.