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
00056 class SoStereoDialog : public SoQtComponent {
00057
00058 Q_OBJECT
00059
00060 public:
00061
00065 SoStereoDialog( QWidget *parent = qApp->activeWindow(), SoStereoViewer * viewer = NULL,
00066 const char *name = NULL, SbBool buildInsideParent = TRUE );
00070 ~SoStereoDialog();
00071
00075 virtual void update();
00076
00077 private:
00078
00079
00080
00081
00082
00083 SoEXTENDER SoStereoDialog(QWidget *parent, SoStereoViewer * viewer,
00084 const char *name, SbBool buildInsideParent, SbBool buildNow);
00085
00086
00087 virtual SbString getDefaultWidgetName() const;
00088 virtual SbString getDefaultTitle() const;
00089 virtual SbString getDefaultIconTitle() const;
00090
00091 static void sliderCallback(void * userData, float value) ;
00092
00093 static SoBaseStereo * getStereoViewType(int stereoTypeListIndex=0) ;
00094
00095
00096 QWidget *mgrWidget;
00097
00098
00099 SoStereoViewer *stereoViewer;
00100 SoQtSlider* sliders[2];
00101
00102
00103 QWidget* buildWidget(QWidget *parent);
00104 QWidget* buildControls(QWidget *parent);
00105 QWidget* buildSliders(QWidget *parent);
00106 void updateSliders();
00107
00108
00109
00110 void constructorCommon(SoStereoViewer * viewer, SbBool buildNow);
00111
00112 virtual bool eventFilter( QObject* object,QEvent *event );
00113
00114 QComboBox* COMBO_STEREO;
00115 QCheckBox* CHECK_STEREO;
00116 QCheckBox* CHECK_BALANCE;
00117 QCheckBox* CHECK_CAMERA;
00118 SoQtSlider* SLIDER_BALNCE;
00119 SoQtSlider* SLIDER_CAMERA;
00120 QCheckBox* CHECK_REVERT_STEREO;
00121
00122 int m_lastStereoMode;
00123 bool m_isStereoActive;
00124 bool m_lastStereoReversed;
00125
00126 protected Q_SLOTS:
00127 void slot_stereo(int value);
00128 void slot_check_balance(bool onOff);
00129 void slot_check_camera(bool onOff);
00130 void slot_check_stereo(bool onOff);
00131 void slot_check_revert_stereo(bool onOff);
00132
00133 };
00134
00135
00136 #endif // _SOQT_STEREO_DIALOG_
00137
00138
00139