~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/msvc6/src/Inventor/Qt/devices/SoQtSpaceballCommon.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-03-01 11:41:00 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090301114100-f4zz3n1oasa52fgk
Tags: 1.4.2~svn20090224-2
* Upload upstream SVN head version containing fixes to build with Coin 3
  (Closes: #515729, #515736, #515742).  Upstream indicated to me that
  SVN is stable enough to release.

* control: Update Standards-Version to 3.8.0; no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**************************************************************************\
2
 
 *
3
 
 *  This file is part of the Coin 3D visualization library.
4
 
 *  Copyright (C) 1998-2005 by Systems in Motion.  All rights reserved.
5
 
 *
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.
11
 
 *
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.
16
 
 *
17
 
 *  See <URL:http://www.coin3d.org/> for more information.
18
 
 *
19
 
 *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20
 
 *  <URL:http://www.sim.no/>.
21
 
 *
22
 
\**************************************************************************/
23
 
 
24
 
/*!
25
 
  \class SoQtSpaceball SoQtSpaceball.h Inventor/Qt/devices/SoQtSpaceball.h
26
 
  \brief The SoQtSpaceball class is the spaceball input device abstraction.
27
 
  \ingroup devices
28
 
 
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.
32
 
*/
33
 
 
34
 
// *************************************************************************
35
 
 
36
 
#ifdef HAVE_CONFIG_H
37
 
#include <config.h>
38
 
#endif // HAVE_CONFIG_H
39
 
 
40
 
#include <Inventor/Qt/devices/SoQtSpaceball.h>
41
 
#include <Inventor/Qt/devices/SoQtSpaceballP.h>
42
 
 
43
 
#define PRIVATE(p) (p->pimpl)
44
 
#define PUBLIC(p) (p->pub)
45
 
 
46
 
// *************************************************************************
47
 
 
48
 
SOQT_OBJECT_SOURCE(SoQtSpaceball);
49
 
 
50
 
// *************************************************************************
51
 
 
52
 
/*!
53
 
  \enum SoQtSpaceball::DeviceType
54
 
 
55
 
  Enumeration of spaceball input device types.
56
 
*/
57
 
/*!
58
 
  \enum SoQtSpaceball::Mask
59
 
  Enumeration of spaceball input device event types.
60
 
*/
61
 
 
62
 
/*!
63
 
  \fn SoQtSpaceball::SoQtSpaceball(int mask)
64
 
 
65
 
  Public constructor. The \a mask argument specifies which events we
66
 
  are interested in.
67
 
*/
68
 
 
69
 
/*!
70
 
  \fn SoQtSpaceball::~SoQtSpaceball()
71
 
  Destructor.
72
 
*/
73
 
 
74
 
// *************************************************************************
75
 
 
76
 
/*!
77
 
  This method sets the scale factor for the spaceball rotation vectors.
78
 
*/
79
 
void
80
 
SoQtSpaceball::setRotationScaleFactor(float f)
81
 
{
82
 
  PRIVATE(this)->rotationscale = f;
83
 
}
84
 
 
85
 
/*!
86
 
  This method returns the scale factor for the spaceball rotation vectors.
87
 
*/
88
 
float
89
 
SoQtSpaceball::getRotationScaleFactor(void) const
90
 
{
91
 
  return PRIVATE(this)->rotationscale;
92
 
}
93
 
 
94
 
/*!
95
 
  This method sets the scale factor for the spaceball translation vectors.
96
 
*/
97
 
void
98
 
SoQtSpaceball::setTranslationScaleFactor(float f)
99
 
{
100
 
  PRIVATE(this)->translationscale = f;
101
 
}
102
 
 
103
 
/*!
104
 
  This method returns the scale factor for the spaceball translation vectors.
105
 
*/
106
 
float
107
 
SoQtSpaceball::getTranslationScaleFactor(void) const
108
 
{
109
 
  return PRIVATE(this)->translationscale;
110
 
}
111
 
 
112
 
// *************************************************************************
113
 
 
114
 
/*!
115
 
  \fn SbBool SoQtSpaceball::exists(void)
116
 
 
117
 
  Returns \c TRUE iff there could be a device of this type available
118
 
  on the system.
119
 
 
120
 
  Note that a return value of \c TRUE does \e not signify that there
121
 
  is such a device active.
122
 
*/
123
 
 
124
 
// *************************************************************************
125
 
 
126
 
/*!
127
 
  \fn void SoQtSpaceball::setFocusToWindow(SbBool flag)
128
 
 
129
 
  Set to \c TRUE if you want spaceball events to be received even when
130
 
  the component does not have focus.
131
 
*/
132
 
 
133
 
/*!
134
 
  \fn SbBool SoQtSpaceball::isFocusToWindow(void) const
135
 
 
136
 
  Returns whether or not spaceball events are caught even when the
137
 
  component does not have focus.
138
 
*/
139
 
 
140
 
// *************************************************************************
141
 
 
142
 
#ifndef DOXYGEN_SKIP_THIS
143
 
 
144
 
SoGuiSpaceballP::SoGuiSpaceballP(SoQtSpaceball * p)
145
 
{
146
 
  this->pub = p;
147
 
}
148
 
 
149
 
SoGuiSpaceballP::~SoGuiSpaceballP()
150
 
{
151
 
}
152
 
 
153
 
#endif // !DOXYGEN_SKIP_THIS
154
 
 
155
 
// *************************************************************************
156
 
 
157
 
#undef PRIVATE
158
 
#undef PUBLIC
159