1 #ifndef QUARTER_QUARTERWIDGET_H 2 #define QUARTER_QUARTERWIDGET_H 36 #include <Inventor/SbBasic.h> 37 #include <Inventor/SoRenderManager.h> 38 #include <Inventor/actions/SoGLRenderAction.h> 42 #if QT_VERSION >= 0x060000 43 #include <QOpenGLWidget> 44 #include <QOpenGLContext> 48 #include <Quarter/Basic.h> 60 namespace SIM {
namespace Coin3D {
namespace Quarter {
63 const char DEFAULT_NAVIGATIONFILE [] =
"coin:///scxml/navigation/examiner.xml";
65 #if QT_VERSION >= 0x060000 66 class QUARTER_DLL_API QuarterWidget :
public QOpenGLWidget {
67 typedef QOpenGLWidget inherited;
74 Q_PROPERTY(QUrl navigationModeFile READ navigationModeFile WRITE setNavigationModeFile RESET resetNavigationModeFile)
75 Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
76 Q_PROPERTY(
bool contextMenuEnabled READ contextMenuEnabled WRITE setContextMenuEnabled)
77 Q_PROPERTY(
bool headlightEnabled READ headlightEnabled WRITE setHeadlightEnabled)
78 Q_PROPERTY(
bool clearZBuffer READ clearZBuffer WRITE setClearZBuffer)
79 Q_PROPERTY(
bool clearWindow READ clearWindow WRITE setClearWindow)
80 Q_PROPERTY(
bool interactionModeEnabled READ interactionModeEnabled WRITE setInteractionModeEnabled)
81 Q_PROPERTY(
bool interactionModeOn READ interactionModeOn WRITE setInteractionModeOn)
83 Q_PROPERTY(
TransparencyType transparencyType READ transparencyType WRITE setTransparencyType)
84 Q_PROPERTY(
RenderMode renderMode READ renderMode WRITE setRenderMode)
85 Q_PROPERTY(
StereoMode stereoMode READ stereoMode WRITE setStereoMode)
86 Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged)
94 #if QT_VERSION >= 0x060000 95 explicit QuarterWidget(QWidget * parent = 0,
const QOpenGLWidget* sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
96 explicit QuarterWidget(QOpenGLContext * context, QWidget * parent = 0,
const QOpenGLWidget* sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
97 explicit QuarterWidget(
const QSurfaceFormat & format, QWidget * parent = 0,
const QOpenGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
98 #elif QT_VERSION >= 0x050F00 99 explicit QuarterWidget(QWidget * parent = 0,
const QGLWidget * sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
100 explicit QuarterWidget(QGLContext * context, QWidget * parent = 0,
const QGLWidget * sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
101 explicit QuarterWidget(
const QGLFormat & format, QWidget * parent = 0,
const QGLWidget * shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
104 explicit QuarterWidget(QGLContext* context, QWidget* parent = 0,
const QGLWidget* sharewidget = 0, Qt::WindowFlags f = 0);
105 explicit QuarterWidget(
const QGLFormat& format, QWidget* parent = 0,
const QGLWidget* shareWidget = 0, Qt::WindowFlags f = 0);
140 TransparencyType transparencyType(
void)
const;
141 RenderMode renderMode(
void)
const;
142 StereoMode stereoMode(
void)
const;
144 void setBackgroundColor(
const QColor & color);
145 QColor backgroundColor(
void)
const;
147 qreal devicePixelRatio(
void)
const;
149 void resetNavigationModeFile(
void);
150 void setNavigationModeFile(
const QUrl & url = QUrl(DEFAULT_NAVIGATIONFILE));
151 const QUrl & navigationModeFile(
void)
const;
153 void setContextMenuEnabled(
bool yes);
154 bool contextMenuEnabled(
void)
const;
155 QMenu * getContextMenu(
void)
const;
157 bool headlightEnabled(
void)
const;
158 void setHeadlightEnabled(
bool onoff);
161 bool clearZBuffer(
void)
const;
162 void setClearZBuffer(
bool onoff);
164 bool clearWindow(
void)
const;
165 void setClearWindow(
bool onoff);
167 bool interactionModeEnabled(
void)
const;
168 void setInteractionModeEnabled(
bool onoff);
170 bool interactionModeOn(
void)
const;
171 void setInteractionModeOn(
bool onoff);
173 void setStateCursor(
const SbName & state,
const QCursor & cursor);
174 QCursor stateCursor(
const SbName & state);
176 uint32_t getCacheContextId(
void)
const;
178 virtual void setSceneGraph(
SoNode * root);
179 virtual SoNode * getSceneGraph(
void)
const;
192 virtual bool processSoEvent(
const SoEvent * event);
193 virtual QSize minimumSizeHint(
void)
const;
195 QList<QAction *> transparencyTypeActions(
void)
const;
196 QList<QAction *> stereoModeActions(
void)
const;
197 QList<QAction *> renderModeActions(
void)
const;
200 virtual void viewAll(
void);
201 virtual void seek(
void);
205 void setRenderMode(RenderMode mode);
206 void setStereoMode(StereoMode mode);
207 void setTransparencyType(TransparencyType type);
210 void devicePixelRatioChanged(qreal dev_pixel_ratio);
213 virtual void resizeGL(
int width,
int height);
214 virtual void initializeGL(
void);
215 virtual void paintGL(
void);
216 virtual void actualRedraw(
void);
217 virtual bool updateDevicePixelRatio(
void);
220 #if QT_VERSION >= 0x060000 221 void constructor(
const QOpenGLWidget* sharewidget);
223 void constructor(
const QGLWidget* sharewidget);
225 friend class QuarterWidgetP;
226 class QuarterWidgetP * pimpl;
231 #endif // QUARTER_QUARTERWIDGET_H
Definition: EventFilter.h:46
SORTED_OBJECT_SORTED_TRIANGLE_BLEND
Definition: QuarterWidget.h:60
SORTED_OBJECT_SORTED_TRIANGLE_ADD