SoQtSpaceball Class Reference
[Qt]

Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device. More...

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

Inheritance diagram for SoQtSpaceball:
SoQtDevice

List of all members.

Public Member Functions

 SoQtSpaceball (SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL)
 SoQtSpaceball (SbGlContextHelper::Display d, SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL)
 ~SoQtSpaceball ()
virtual void enable (QWidget *w, XtEventHandler f, XtPointer data, void *unused=NULL)
virtual void disable (QWidget *w, XtEventHandler f, XtPointer data)
virtual const SoEventtranslateEvent (QEvent *xevent)
void setRotationScaleFactor (float f)
float getRotationScaleFactor () const
void setTranslationScaleFactor (float f)
float getTranslationScaleFactor () const
void setFocusToWindow (SbBool flag)
SbBool isFocusToWindow () const

Static Public Member Functions

static SbBool exists ()
static SbBool exists (SbGlContextHelper::Display d)

Detailed Description

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).

SEE ALSO

SoQtDevice, SoMotion3Event, SoSpaceballButtonEvent

See related examples:

QtSpaceMouse


Constructor & Destructor Documentation

SoQtSpaceball::SoQtSpaceball ( SoGuiSpaceball::Mask  mask = SoGuiSpaceball::ALL  ) 

Constructor.

SoQtSpaceball::SoQtSpaceball ( SbGlContextHelper::Display  d,
SoGuiSpaceball::Mask  mask = SoGuiSpaceball::ALL 
)

Constructor.

SoQtSpaceball::~SoQtSpaceball (  ) 

Destructor.


Member Function Documentation

virtual void SoQtSpaceball::disable ( QWidget *  w,
XtEventHandler  f,
XtPointer  data 
) [virtual]

Disables the device for the passed widget.

Implements SoQtDevice.

virtual void SoQtSpaceball::enable ( QWidget *  w,
XtEventHandler  f,
XtPointer  data,
void *  unused = NULL 
) [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.

static SbBool SoQtSpaceball::exists ( SbGlContextHelper::Display  d  )  [static]

Returns whether or not the spaceball device exists for use.

static SbBool SoQtSpaceball::exists (  )  [inline, static]

Returns whether or not the spaceball device exists for use.

float SoQtSpaceball::getRotationScaleFactor (  )  const [inline]

Returns the rotation scale factor.

float SoQtSpaceball::getTranslationScaleFactor (  )  const [inline]

Returns the translation scale factor.

SbBool SoQtSpaceball::isFocusToWindow (  )  const [inline]

Gets the input focus method.

See setFocusToWindow() for details.

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.

void SoQtSpaceball::setRotationScaleFactor ( float  f  )  [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.

void SoQtSpaceball::setTranslationScaleFactor ( float  f  )  [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.

virtual const SoEvent* SoQtSpaceball::translateEvent ( QEvent *  xevent  )  [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.


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

Open Inventor Toolkit reference manual, generated on 30 May 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/