Coin Logo http://www.sim.no
http://www.coin3d.org

SoQtSpaceball.h

00001 #ifndef SOQT_SPACEBALL_H
00002 #define SOQT_SPACEBALL_H
00003 
00004 // src/Inventor/Qt/devices/SoQtSpaceball.h.  Generated from SoGuiSpaceball.h.in by configure.
00005 
00006 /**************************************************************************\
00007  *
00008  *  This file is part of the Coin 3D visualization library.
00009  *  Copyright (C) 1998-2005 by Systems in Motion.  All rights reserved.
00010  *
00011  *  This library is free software; you can redistribute it and/or
00012  *  modify it under the terms of the GNU General Public License
00013  *  ("GPL") version 2 as published by the Free Software Foundation.
00014  *  See the file LICENSE.GPL at the root directory of this source
00015  *  distribution for additional information about the GNU GPL.
00016  *
00017  *  For using Coin with software that can not be combined with the GNU
00018  *  GPL, and for taking advantage of the additional benefits of our
00019  *  support services, please contact Systems in Motion about acquiring
00020  *  a Coin Professional Edition License.
00021  *
00022  *  See <URL:http://www.coin3d.org/> for more information.
00023  *
00024  *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
00025  *  <URL:http://www.sim.no/>.
00026  *
00027 \**************************************************************************/
00028 
00029 #include <Inventor/Qt/devices/SoQtDevice.h>
00030 #include <Inventor/SbLinear.h>
00031 
00032 // *************************************************************************
00033 
00034 class SOQT_DLL_API SoQtSpaceball : public SoQtDevice {
00035   SOQT_OBJECT_HEADER(SoQtSpaceball, SoQtDevice);
00036 
00037 public:
00038   enum Mask {
00039     MOTION_EVENT  = 0x01,  MOTION = MOTION_EVENT,
00040     PRESS_EVENT   = 0x02,  PRESS = PRESS_EVENT,
00041     RELEASE_EVENT = 0x04,  RELEASE = RELEASE_EVENT,
00042     ALL_EVENTS = MOTION_EVENT | PRESS_EVENT | RELEASE_EVENT,
00043     ALL = ALL_EVENTS
00044   };
00045 
00046   enum DeviceType {
00047     SPACE_BALL             = 0x01,
00048     MAGELLAN_SPACE_MOUSE   = 0x02
00049   };
00050 
00051   SoQtSpaceball(int events = ALL_EVENTS);
00052   virtual ~SoQtSpaceball();
00053 
00054   virtual void enable(QWidget * widget, SoQtEventHandler * handler, void * closure);
00055   virtual void disable(QWidget * widget, SoQtEventHandler * handler, void * closure);
00056 
00057   virtual const SoEvent * translateEvent(QEvent * event);
00058 
00059   void setRotationScaleFactor(float f);
00060   float getRotationScaleFactor(void) const;
00061   void setTranslationScaleFactor(float f);
00062   float getTranslationScaleFactor(void) const;
00063 
00064   static SbBool exists(void);
00065 
00066   void setFocusToWindow(SbBool flag);
00067   SbBool isFocusToWindow(void) const;
00068 
00069 private:
00070   class SoQtSpaceballP * pimpl;
00071 };
00072 
00073 // *************************************************************************
00074 
00075 #endif // ! SOQT_SPACEBALL_H

Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.

Generated on Sun May 3 01:47:18 2009 for SoQt by Doxygen. 1.5.8