Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device. More...
#include <Inventor/Qt/devices/SoQtSpaceball.h>
Public Member Functions | |
SoQtSpaceball (SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
Constructor. | |
SoQtSpaceball (SbGlContextHelper::Display d, SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
Constructor. | |
~SoQtSpaceball () | |
Destructor. | |
virtual void | enable (QWidget *w, XtEventHandler f, XtPointer data, void *unused=NULL) |
Enables the device for the passed widget. | |
virtual void | disable (QWidget *w, XtEventHandler f, XtPointer data) |
Disables the device for the passed widget. | |
virtual const SoEvent * | translateEvent (QEvent *xevent) |
Attempts to convert the passed event into an SoEvent. | |
void | setRotationScaleFactor (float f) |
The spaceball reports rotations and translations as integers. | |
float | getRotationScaleFactor () const |
Returns the rotation scale factor. | |
void | setTranslationScaleFactor (float f) |
The spaceball reports rotations and translations as integers. | |
float | getTranslationScaleFactor () const |
Returns the translation scale factor. | |
void | setFocusToWindow (SbBool flag) |
Sets the input focus method used to get events from the space ball. | |
SbBool | isFocusToWindow () const |
Gets the input focus method. | |
Public Member Functions inherited from SoQtDevice | |
void | setWindowSize (const SbVec2s &s) |
Sets the size of the window this device is registered for. | |
const SbVec2s & | getWindowSize () const |
Gets the size of the window, in pixels, this device is registered for. | |
Static Public Member Functions | |
static SbBool | exists () |
Returns whether or not the spaceball device exists for use. | |
static SbBool | exists (SbGlContextHelper::Display d) |
Returns whether or not the spaceball device exists for use. | |
Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device.
This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and spaceball button press and release events (SoSpaceballButtonEvent).
SoQtDevice, SoMotion3Event, SoSpaceballButtonEvent
Definition at line 52 of file SoQtSpaceball.h.
SoQtSpaceball::SoQtSpaceball | ( | SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL | ) |
Constructor.
SoQtSpaceball::SoQtSpaceball | ( | SbGlContextHelper::Display | d, |
SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL |
||
) |
Constructor.
SoQtSpaceball::~SoQtSpaceball | ( | ) |
Destructor.
|
virtual |
Disables the device for the passed widget.
Implements SoQtDevice.
|
virtual |
Enables the device for the passed widget.
When enabled, the callback function f will be invoked when events occur in the window. data is the clientData which will be passed.
Implements SoQtDevice.
|
inlinestatic |
Returns whether or not the spaceball device exists for use.
Definition at line 133 of file SoQtSpaceball.h.
|
static |
Returns whether or not the spaceball device exists for use.
|
inline |
Returns the rotation scale factor.
Definition at line 118 of file SoQtSpaceball.h.
|
inline |
Returns the translation scale factor.
Definition at line 128 of file SoQtSpaceball.h.
|
inline |
Gets the input focus method.
See setFocusToWindow() for details.
Definition at line 149 of file SoQtSpaceball.h.
void SoQtSpaceball::setFocusToWindow | ( | SbBool | flag | ) |
Sets the input focus method used to get events from the space ball.
If FALSE: SpaceBall events are received only if the cursor is in the window or when the window has the focus (default).
If TRUE: SpaceBall events are received even if cursor is out of the window.
|
inline |
The spaceball reports rotations and translations as integers.
These values must be scaled to be useful. This method sets the rotation scale factor. Default is .006.
Definition at line 114 of file SoQtSpaceball.h.
|
inline |
The spaceball reports rotations and translations as integers.
These values must be scaled to be useful. This method sets the translation scale factor. Default is .006.
Definition at line 124 of file SoQtSpaceball.h.
|
virtual |
Attempts to convert the passed event into an SoEvent.
Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.
Implements SoQtDevice.