.TH "SoQtDevice" 3 "Sun Dec 11 2011" "Version 1.5.0" "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 "\fBSoQtDevice::~SoQtDevice\fP ()\fC [virtual]\fP"Public virtual destructor\&. .SS "\fBSoQtDevice::SoQtDevice\fP (void)\fC [protected]\fP"Constructor\&. Protected to only enable invocation from derived device classes\&. .SH "Member Function Documentation" .PP .SS "void \fBSoQtDevice::enable\fP (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 \fBSoQtDevice::disable\fP (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 * \fBSoQtDevice::translateEvent\fP (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 \fBSoQtDevice::setWindowSize\fP (const SbVec2ssize)"This method sets the cached size of the window the device is 'attached' to\&. .PP Referenced by SoQtRenderArea::registerDevice()\&. .SS "SbVec2s \fBSoQtDevice::getWindowSize\fP (void) const"This method returns the cached window size\&. .SS "void \fBSoQtDevice::initClasses\fP (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 \fBSoQtDevice::setEventPosition\fP (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 \fBSoQtDevice::getLastEventPosition\fP (void)\fC [static, protected]\fP"Returns last event position that was set with \fBSoQtDevice::setEventPosition()\fP\&. .PP Referenced by SoQtKeyboard::translateEvent()\&. .SS "void \fBSoQtDevice::addEventHandler\fP (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 \fBSoQtDevice::removeEventHandler\fP (QWidget *widget, SoQtEventHandler *handler, void *closure)\fC [protected]\fP"Remove a \fIhandler\fP registered with \fBSoQtDevice::addEventHandler()\fP\&. .SS "void \fBSoQtDevice::invokeHandlers\fP (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\&.