1
/**************************************************************************\
3
* This file is part of the Coin 3D visualization library.
4
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* ("GPL") version 2 as published by the Free Software Foundation.
9
* See the file LICENSE.GPL at the root directory of this source
10
* distribution for additional information about the GNU GPL.
12
* For using Coin with software that can not be combined with the GNU
13
* GPL, and for taking advantage of the additional benefits of our
14
* support services, please contact Systems in Motion about acquiring
15
* a Coin Professional Edition License.
17
* See <URL:http://www.coin3d.org/> for more information.
19
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20
* <URL:http://www.sim.no/>.
22
\**************************************************************************/
25
\class SoQtSpaceball SoQtSpaceball.h Inventor/Qt/devices/SoQtSpaceball.h
26
\brief The SoQtSpaceball class is the spaceball input device abstraction.
29
The SoQtSpaceball class is the glue between native spaceball
30
handling and how those events translates to generic events for the
31
Inventor API scenegraph.
34
// *************************************************************************
38
#endif // HAVE_CONFIG_H
40
#include <Inventor/Qt/devices/SoQtSpaceball.h>
41
#include <Inventor/Qt/devices/SoQtSpaceballP.h>
43
#define PRIVATE(p) (p->pimpl)
44
#define PUBLIC(p) (p->pub)
46
// *************************************************************************
48
SOQT_OBJECT_SOURCE(SoQtSpaceball);
50
// *************************************************************************
53
\enum SoQtSpaceball::DeviceType
55
Enumeration of spaceball input device types.
58
\enum SoQtSpaceball::Mask
59
Enumeration of spaceball input device event types.
63
\fn SoQtSpaceball::SoQtSpaceball(int mask)
65
Public constructor. The \a mask argument specifies which events we
70
\fn SoQtSpaceball::~SoQtSpaceball()
74
// *************************************************************************
77
This method sets the scale factor for the spaceball rotation vectors.
80
SoQtSpaceball::setRotationScaleFactor(float f)
82
PRIVATE(this)->rotationscale = f;
86
This method returns the scale factor for the spaceball rotation vectors.
89
SoQtSpaceball::getRotationScaleFactor(void) const
91
return PRIVATE(this)->rotationscale;
95
This method sets the scale factor for the spaceball translation vectors.
98
SoQtSpaceball::setTranslationScaleFactor(float f)
100
PRIVATE(this)->translationscale = f;
104
This method returns the scale factor for the spaceball translation vectors.
107
SoQtSpaceball::getTranslationScaleFactor(void) const
109
return PRIVATE(this)->translationscale;
112
// *************************************************************************
115
\fn SbBool SoQtSpaceball::exists(void)
117
Returns \c TRUE iff there could be a device of this type available
120
Note that a return value of \c TRUE does \e not signify that there
121
is such a device active.
124
// *************************************************************************
127
\fn void SoQtSpaceball::setFocusToWindow(SbBool flag)
129
Set to \c TRUE if you want spaceball events to be received even when
130
the component does not have focus.
134
\fn SbBool SoQtSpaceball::isFocusToWindow(void) const
136
Returns whether or not spaceball events are caught even when the
137
component does not have focus.
140
// *************************************************************************
142
#ifndef DOXYGEN_SKIP_THIS
144
SoGuiSpaceballP::SoGuiSpaceballP(SoQtSpaceball * p)
149
SoGuiSpaceballP::~SoGuiSpaceballP()
153
#endif // !DOXYGEN_SKIP_THIS
155
// *************************************************************************