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-2014 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 00068 class SoQtWrapper : public QWidget 00069 { 00070 Q_OBJECT 00071 00072 public: 00074 enum ViewerType { 00078 RENDER_AREA, 00082 EXAMINER, 00086 WALK, 00090 FLY, 00094 PLANE 00095 }; 00096 00101 SoQtWrapper( QWidget* parent = 0, const char* name = 0, ViewerType type = SoQtWrapper::EXAMINER); 00102 00106 ViewerType getViewerType() const { return viewerType; }; 00107 00113 SoQtRenderArea * getViewer() const {return viewer;}; 00114 00118 bool isDecoration() const; 00119 00120 public Q_SLOTS: 00124 void setDecoration(bool on); 00125 00126 private: 00127 ViewerType viewerType; 00128 private: 00129 // Add a default scene 00130 // This scene will be unref'd automatically at first setSceneGraph() 00131 SoSeparator* putTestSceneGraph(SoQtRenderArea *examiner); 00132 00133 SoQtRenderArea *viewer; 00134 }; 00135 00136 #endif 00137 00138 00139