00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SOQT_STEREO_DIALOG_
00025 #define _SOQT_STEREO_DIALOG_
00026
00027 #include <Inventor/components/stereo/SoWinXt2Stereo.h>
00028 #include <Inventor/Qt/SoQtComponent.h>
00029
00030 class SoStereoViewer;
00031 class SoBaseStereo;
00032 class SoQtSlider;
00033 class QGridLayout;
00034 class QCheckBox;
00035 class QComboBox;
00036 class QGroupBox;
00037 class QLabel;
00038
00054 class SoStereoDialog : public SoQtComponent {
00055
00056 Q_OBJECT
00057
00058 public:
00059
00063 SoStereoDialog( QWidget *parent = qApp->activeWindow(), SoStereoViewer * viewer = NULL,
00064 const char *name = NULL, SbBool buildInsideParent = TRUE );
00068 ~SoStereoDialog();
00069
00073 virtual void update();
00074
00075 private:
00076
00077
00078
00079
00080
00081 SoEXTENDER SoStereoDialog(QWidget *parent, SoStereoViewer * viewer,
00082 const char *name, SbBool buildInsideParent, SbBool buildNow);
00083
00084
00085 virtual SbString getDefaultWidgetName() const;
00086 virtual SbString getDefaultTitle() const;
00087 virtual SbString getDefaultIconTitle() const;
00088
00089 static void sliderCallback(void * userData, float value) ;
00090
00091 static SoBaseStereo * getStereoViewType(int stereoTypeListIndex=0) ;
00092
00093
00094 QWidget *mgrWidget;
00095
00096
00097 SoStereoViewer *stereoViewer;
00098 SoQtSlider* sliders[2];
00099
00100
00101 QWidget* buildWidget(QWidget *parent);
00102 QWidget* buildControls(QWidget *parent);
00103 QWidget* buildSliders(QWidget *parent);
00104 void updateSliders();
00105
00106
00107
00108 void constructorCommon(SoStereoViewer * viewer, SbBool buildNow);
00109
00110 virtual bool eventFilter( QObject* object,QEvent *event );
00111
00112 QComboBox* COMBO_STEREO;
00113 QCheckBox* CHECK_STEREO;
00114 QCheckBox* CHECK_BALANCE;
00115 QCheckBox* CHECK_CAMERA;
00116 SoQtSlider* SLIDER_BALNCE;
00117 SoQtSlider* SLIDER_CAMERA;
00118 QCheckBox* CHECK_REVERT_STEREO;
00119
00120 int m_lastStereoMode;
00121 bool m_isStereoActive;
00122 bool m_lastStereoReversed;
00123
00124 protected Q_SLOTS:
00125 void slot_stereo(int value);
00126 void slot_check_balance(bool onOff);
00127 void slot_check_camera(bool onOff);
00128 void slot_check_stereo(bool onOff);
00129 void slot_check_revert_stereo(bool onOff);
00130
00131 };
00132
00133
00134 #endif // _SOQT_STEREO_DIALOG_
00135
00136
00137