00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef SOQTWRAPPER_H 00025 #define SOQTWRAPPER_H 00026 #include <Inventor/Qt/OivQtCompat.h> 00027 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h> 00028 #include <Inventor/Qt/viewers/SoQtPlaneViewer.h> 00029 #include <Inventor/Qt/viewers/SoQtWalkViewer.h> 00030 #include <Inventor/Qt/viewers/SoQtFlyViewer.h> 00031 00033 // 00034 // Class: SoQtWrapper 00035 // 00036 // The Class is derived from a QWidget and include an Open Inventor Viewer 00037 // in it. The primary goal of this class is to be used in the Qt Designer 00038 // program as a plugin. 00039 // 00041 00069 class SoQtWrapper : public QWidget 00070 { 00071 Q_OBJECT 00072 00073 public: 00075 enum ViewerType { 00079 RENDER_AREA, 00083 EXAMINER, 00087 WALK, 00091 FLY, 00095 PLANE 00096 }; 00097 00102 SoQtWrapper( QWidget* parent = 0, const char* name = 0, ViewerType type = SoQtWrapper::EXAMINER); 00103 00107 ViewerType getViewerType() const { return viewerType; }; 00108 00114 SoQtRenderArea * getViewer() const {return viewer;}; 00115 00119 bool isDecoration() const; 00120 00121 public Q_SLOTS: 00125 void setDecoration(bool on); 00126 00127 private: 00128 ViewerType viewerType; 00129 private: 00130 // Add a default scene 00131 // This scene will be unref'd automatically at first setSceneGraph() 00132 SoSeparator* putTestSceneGraph(SoQtRenderArea *examiner); 00133 00134 SoQtRenderArea *viewer; 00135 }; 00136 00137 #endif 00138 00139 00140