Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoQtWrapper.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef SOQTWRAPPER_H
25#define SOQTWRAPPER_H
26#include <Inventor/Qt/OivQtCompat.h>
27#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
28#include <Inventor/Qt/viewers/SoQtPlaneViewer.h>
29#include <Inventor/Qt/viewers/SoQtWalkViewer.h>
30#include <Inventor/Qt/viewers/SoQtFlyViewer.h>
31
33//
34// Class: SoQtWrapper
35//
36// The Class is derived from a QWidget and include an Open Inventor Viewer
37// in it. The primary goal of this class is to be used in the Qt Designer
38// program as a plugin.
39//
41
68class SoQtWrapper : public QWidget
69{
70 Q_OBJECT
71
72public:
96
101 SoQtWrapper( QWidget* parent = 0, const char* name = 0, ViewerType type = SoQtWrapper::EXAMINER);
102
106 ViewerType getViewerType() const { return viewerType; };
107
113 SoQtRenderArea * getViewer() const {return viewer;};
114
118 bool isDecoration() const;
119
120public Q_SLOTS:
124 void setDecoration(bool on);
125
126private:
127 ViewerType viewerType;
128private:
129 // Add a default scene
130 // This scene will be unref'd automatically at first setSceneGraph()
131 SoSeparator* putTestSceneGraph(SoQtRenderArea *examiner);
132
133 SoQtRenderArea *viewer;
134};
135
136#endif
137
138
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Creates a QWidge...
Definition SoQtWrapper.h:69
ViewerType getViewerType() const
Gets the type of viewer that will be created in the widget.
ViewerType
Viewer Types enumeration.
Definition SoQtWrapper.h:74
@ WALK
Creates a Walk Viewer in the widget.
Definition SoQtWrapper.h:86
@ FLY
Creates a Fly Viewer in the widget.
Definition SoQtWrapper.h:90
@ RENDER_AREA
Creates a render area in the widget.
Definition SoQtWrapper.h:78
@ PLANE
Creates a Plane Viewer in the widget.
Definition SoQtWrapper.h:94
@ EXAMINER
Creates an Examiner Viewer in the widget.
Definition SoQtWrapper.h:82
bool isDecoration() const
Returns whether the viewer decoration is on or off.
SoQtRenderArea * getViewer() const
Gets a pointer to the created viewer.
SoQtWrapper(QWidget *parent=0, const char *name=0, ViewerType type=SoQtWrapper::EXAMINER)
Constructor which specifies the viewer type.
void setDecoration(bool on)
Shows/hides the viewer decoration (default on).
Group node that saves and restores traversal state.