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
00089 class SoQtFlyViewer : public SoQtConstrainedViewer
00090 {
00091
00092 Q_OBJECT
00093
00094 public:
00095
00104 SoQtFlyViewer( QWidget* parent = NULL,
00105 const char* name = NULL,
00106 SbBool buildInsideParent = TRUE,
00107 SoQtFullViewer::BuildFlag flag = SoQtFullViewer::BUILD_ALL,
00108 SoQtViewer::Type type = SoQtViewer::BROWSER );
00112 ~SoQtFlyViewer();
00113
00114
00115 virtual void setViewing( SbBool onOrOff );
00116 virtual void resetToHomePosition();
00117 virtual void setCamera( SoCamera* cam );
00118 virtual void setCursorEnabled( SbBool onOrOff );
00119 virtual void setSeekMode( SbBool onOrOff );
00120
00121
00122 virtual void setCameraType( SoType type );
00123
00128 void setMinSpeed( float speed );
00129
00133 float getMinSpeed();
00134
00138 void setSpeedMultiplier( float speedInc );
00139
00143 float getSpeedMultiplier();
00144
00145
00146
00147
00148 private:
00149
00150 SoQtFlyViewer( QWidget* parent,
00151 const char* name,
00152 SbBool buildInsideParent,
00153 SoQtFullViewer::BuildFlag flag,
00154 SoQtViewer::Type type,
00155 SbBool buildNow,
00156 SbBool sync = true );
00157
00158 private:
00159
00160 SoGuiFlyViewer* getGuiFlyViewer() const;
00161
00162 private:
00163
00164
00165 virtual SbString getDefaultWidgetName() const;
00166 virtual SbString getDefaultTitle() const;
00167 virtual SbString getDefaultIconTitle() const;
00168
00169
00170 virtual void processEvent( QEvent* anyevent );
00171 virtual void actualRedraw();
00172 virtual void rightWheelMotion( float newVal);
00173 virtual void mouseWheelMotion( float newVal );
00174
00175
00176 virtual void createPrefSheet();
00177
00178
00179 virtual void openViewerHelpCard();
00180
00181 private:
00182
00183 SoGuiFlyViewer* m_guiFlyViewer;
00184
00185
00186 SbRotation camStartOrientation;
00187
00188 void switchMode( int newMode );
00189 void changeMaxStraightSpeed( SbBool increase );
00190
00191
00192 void constructorCommon( SbBool buildNow );
00193 };
00194
00195 #endif
00196
00197