 |
OpendTect
6.6
|
Go to the documentation of this file.
18 #include <osgViewer/GraphicsWindow>
25 #include <osg/Version>
37 #if OSG_VERSION_LESS_THAN(3, 5, 6)
38 void mGlobal(uiOSG) initQtWindowingSystem();
59 const QGLWidget* shareWidget=
nullptr,
60 Qt::WindowFlags f=Qt::WindowFlags(),
61 bool forwardKeyEvents=
false);
63 QWidget* parent=
nullptr,
64 const QGLWidget* shareWidget=
nullptr,
65 Qt::WindowFlags f=Qt::WindowFlags(),
66 bool forwardKeyEvents=
false);
68 QWidget* parent=
nullptr,
69 const QGLWidget* shareWidget=
nullptr,
70 Qt::WindowFlags f=Qt::WindowFlags(),
71 bool forwardKeyEvents=
false);
80 {
return _forwardKeyEvents; }
82 { _forwardKeyEvents = yn; }
85 {
return _touchEventsEnabled; }
103 QMutexLocker lock(&_deferredEventQueueMutex);
104 return _deferredEventQueue.count();
109 QMutexLocker lock(&_deferredEventQueueMutex);
113 if (_deferredEventQueue.removeOne(removeEventType))
114 _eventCompressor.remove(eventType);
117 if (_eventCompressor.find(eventType) == _eventCompressor.end())
119 _deferredEventQueue.enqueue(eventType);
120 _eventCompressor.insert(eventType);
148 QWidget* parent=
nullptr,
149 const QGLWidget* shareWidget=0,
150 Qt::WindowFlags f=Qt::WindowFlags());
160 : _widget(widget), _parent(parent) {}
167 const QGLWidget* shareWidget,
171 const osg::GraphicsContext::Traits*);
173 osg::GraphicsContext::Traits*);
174 static osg::GraphicsContext::Traits*
createTraits(
const QGLWidget* widget);
177 int width,
int height);
190 {
return _widget->getTouchEventsEnabled(); }
192 { _widget->setTouchEventsEnabled(yn); }
ODGraphicsWindow(ODGLWidget *widget)
void setViewer(osgViewer::ViewerBase *viewer)
ODGLWidget * getGLWidget()
Definition: odgraphicswindow.h:154
virtual void useCursor(bool cursoron)
virtual void setTouchEventsEnabled(bool yn)
Definition: odgraphicswindow.h:191
virtual bool setWindowRectangleImplementation(int x, int y, int width, int height)
virtual void requestWarpPointer(float x, float y)
#define mGlobal(module)
Definition: commondefs.h:180
virtual void getWindowRectangle(int &x, int &y, int &width, int &height)
#define mExpClass(module)
Definition: commondefs.h:177
virtual void closeImplementation()
static QGLFormat traits2qglFormat(const osg::GraphicsContext::Traits *)
ODGLWidget * _widget
Definition: odgraphicswindow.h:208
virtual bool valid() const
virtual bool realizeImplementation()
bool _ownsWidget
Definition: odgraphicswindow.h:209
virtual bool makeCurrentImplementation()
virtual bool getWindowDecoration() const
QWidget * _parent
Definition: odgraphicswindow.h:163
Definition: odgraphicswindow.h:158
Type
Definition: angles.h:26
virtual void swapBuffersImplementation()
virtual bool setWindowDecorationImplementation(bool yn)
virtual void runOperations()
static void qglFormat2traits(const QGLFormat &format, osg::GraphicsContext::Traits *)
bool init(QWidget *parent, const QGLWidget *shareWidget, Qt::WindowFlags f)
WindowData(ODGLWidget *widget=nullptr, QWidget *parent=nullptr)
Definition: odgraphicswindow.h:159
ODGLWidget * _widget
Definition: odgraphicswindow.h:162
virtual bool releaseContextImplementation()
virtual ~ODGraphicsWindow()
QCursor _currentCursor
Definition: odgraphicswindow.h:210
virtual void setWindowName(const std::string &)
virtual void setCursor(MouseCursor)
ODGraphicsWindow(osg::GraphicsContext::Traits *, QWidget *parent=nullptr, const QGLWidget *shareWidget=0, Qt::WindowFlags f=Qt::WindowFlags())
@ None
Definition: networkcommon.h:33
virtual void raiseWindow()
const ODGLWidget * getGLWidget() const
Definition: odgraphicswindow.h:155
static osg::GraphicsContext::Traits * createTraits(const QGLWidget *widget)
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file....
Definition: mousecursor.h:26
Definition: odgraphicswindow.h:145
virtual std::string getWindowName()
friend class ODGLWidget
Definition: odgraphicswindow.h:207
bool getTouchEventsEnabled() const
Definition: odgraphicswindow.h:189
virtual void grabFocusIfPointerInWindow()
virtual bool isRealizedImplementation() const
bool _realized
Definition: odgraphicswindow.h:211
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021