OpenSceneGraph
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgQt::QGraphicsViewAdapter Class Reference
Inheritance diagram for osgQt::QGraphicsViewAdapter:
Inheritance graph
[legend]
Collaboration diagram for osgQt::QGraphicsViewAdapter:
Collaboration graph
[legend]

Public Member Functions

 QGraphicsViewAdapter (osg::Image *image, QWidget *widget)
 
void setUpKeyMap ()
 
bool sendPointerEvent (int x, int y, int buttonMask)
 
bool sendKeyEvent (int key, bool keyDown)
 
void setFrameLastRendered (const osg::FrameStamp *frameStamp)
 
void clearWriteBuffer ()
 
bool requiresRendering () const
 
void render ()
 
void assignImage (unsigned int i)
 
void resize (int width, int height)
 
void setBackgroundColor (QColor color)
 
QColor getBackgroundColor () const
 
void setBackgroundWidget (QWidget *w)
 The 'background widget' will ignore mouse/keyboard events and let following handlers handle them It is mainly used for integrating scene graph and full-screen UIs.
 
QWidget * getBackgroundWidget ()
 
QGraphicsView * getQGraphicsView ()
 
QGraphicsScene * getQGraphicsScene ()
 

Protected Types

typedef std::map< int, Qt::Key > KeyMap
 

Protected Member Functions

bool handlePointerEvent (int x, int y, int buttonMask)
 
bool handleKeyEvent (int key, bool keyDown)
 
QWidget * getWidgetAt (const QPoint &pos)
 
virtual void customEvent (QEvent *event)
 

Protected Attributes

osg::observer_ptr< osg::Image_image
 
QWidget * _backgroundWidget
 
int _previousButtonMask
 
int _previousMouseX
 
int _previousMouseY
 
int _previousQtMouseX
 
int _previousQtMouseY
 
bool _previousSentEvent
 
bool _requiresRendering
 
int _width
 
int _height
 
KeyMap _keyMap
 
Qt::KeyboardModifiers _qtKeyModifiers
 
QColor _backgroundColor
 
QPointer< QGraphicsView > _graphicsView
 
QPointer< QGraphicsScene > _graphicsScene
 
QPointer< QWidget > _widget
 
OpenThreads::Mutex _qimagesMutex
 
OpenThreads::Mutex _qresizeMutex
 
unsigned int _previousFrameNumber
 
bool _newImageAvailable
 
unsigned int _currentRead
 
unsigned int _currentWrite
 
unsigned int _previousWrite
 
QImage _qimages [3]
 

The documentation for this class was generated from the following file: