00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SO_QT_FLY_VIEWER_
00026 #define _SO_QT_FLY_VIEWER_
00027 #include <Inventor/Qt/OivQtCompat.h>
00028 #include <Inventor/Qt/viewers/SoQtConstrainedViewer.h>
00029 #include <Inventor/SbLinear.h>
00030 #include <Inventor/SbTime.h>
00031
00032 #include <Inventor/Gui/viewers/SoGuiFlyViewer.h>
00033
00034 class SoFieldSensor;
00035
00088 class SoQtFlyViewer : public SoQtConstrainedViewer
00089 {
00090
00091 Q_OBJECT
00092
00093 public:
00094
00103 SoQtFlyViewer( QWidget* parent = NULL,
00104 const char* name = NULL,
00105 SbBool buildInsideParent = TRUE,
00106 SoQtFullViewer::BuildFlag flag = SoQtFullViewer::BUILD_ALL,
00107 SoQtViewer::Type type = SoQtViewer::BROWSER );
00111 ~SoQtFlyViewer();
00112
00113
00114 virtual void setViewing( SbBool onOrOff );
00115 virtual void resetToHomePosition();
00116 virtual void setCamera( SoCamera* cam );
00117 virtual void setCursorEnabled( SbBool onOrOff );
00118 virtual void setSeekMode( SbBool onOrOff );
00119
00120
00121 virtual void setCameraType( SoType type );
00122
00127 void setMinSpeed( float speed );
00128
00132 float getMinSpeed();
00133
00137 void setSpeedMultiplier( float speedInc );
00138
00142 float getSpeedMultiplier();
00143
00144
00145
00146
00147 private:
00148
00149 SoQtFlyViewer( QWidget* parent,
00150 const char* name,
00151 SbBool buildInsideParent,
00152 SoQtFullViewer::BuildFlag flag,
00153 SoQtViewer::Type type,
00154 SbBool buildNow,
00155 SbBool sync = true );
00156
00157 private:
00158
00159 SoGuiFlyViewer* getGuiFlyViewer() const;
00160
00161 private:
00162
00163
00164 virtual SbString getDefaultWidgetName() const;
00165 virtual SbString getDefaultTitle() const;
00166 virtual SbString getDefaultIconTitle() const;
00167
00168
00169 virtual void processEvent( QEvent* anyevent );
00170 virtual void actualRedraw();
00171 virtual void rightWheelMotion( float newVal);
00172 virtual void mouseWheelMotion( float newVal );
00173
00174
00175 virtual void createPrefSheet();
00176
00177
00178 virtual void openViewerHelpCard();
00179
00180 private:
00181
00182 SoGuiFlyViewer* m_guiFlyViewer;
00183
00184
00185 SbRotation camStartOrientation;
00186
00187 void switchMode( int newMode );
00188 void changeMaxStraightSpeed( SbBool increase );
00189
00190
00191 void constructorCommon( SbBool buildNow );
00192 };
00193
00194 #endif
00195
00196