openscenegraph
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgQt::QGraphicsViewAdapter Class Reference
Inheritance diagram for osgQt::QGraphicsViewAdapter:

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 ()
 
void render ()
 
void assignImage (unsigned int i)
 
void resize (int width, int height)
 
void setBackgroundColor (QColor color)
 
QColor getBackgroundColor () const
 
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
 
int _previousButtonMask
 
int _previousMouseX
 
int _previousMouseY
 
int _previousQtMouseX
 
int _previousQtMouseY
 
bool _previousSentEvent
 
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]
 

Member Typedef Documentation

◆ KeyMap

typedef std::map<int, Qt::Key> osgQt::QGraphicsViewAdapter::KeyMap
protected

Constructor & Destructor Documentation

◆ QGraphicsViewAdapter()

osgQt::QGraphicsViewAdapter::QGraphicsViewAdapter ( osg::Image image,
QWidget *  widget 
)

Member Function Documentation

◆ assignImage()

void osgQt::QGraphicsViewAdapter::assignImage ( unsigned int  i)

◆ clearWriteBuffer()

void osgQt::QGraphicsViewAdapter::clearWriteBuffer ( )

◆ customEvent()

virtual void osgQt::QGraphicsViewAdapter::customEvent ( QEvent *  event)
protectedvirtual

◆ getBackgroundColor()

QColor osgQt::QGraphicsViewAdapter::getBackgroundColor ( ) const
inline

◆ getQGraphicsScene()

QGraphicsScene* osgQt::QGraphicsViewAdapter::getQGraphicsScene ( )
inline

◆ getQGraphicsView()

QGraphicsView* osgQt::QGraphicsViewAdapter::getQGraphicsView ( )
inline

◆ getWidgetAt()

QWidget* osgQt::QGraphicsViewAdapter::getWidgetAt ( const QPoint &  pos)
protected

◆ handleKeyEvent()

bool osgQt::QGraphicsViewAdapter::handleKeyEvent ( int  key,
bool  keyDown 
)
protected

◆ handlePointerEvent()

bool osgQt::QGraphicsViewAdapter::handlePointerEvent ( int  x,
int  y,
int  buttonMask 
)
protected

◆ render()

void osgQt::QGraphicsViewAdapter::render ( )

◆ resize()

void osgQt::QGraphicsViewAdapter::resize ( int  width,
int  height 
)

◆ sendKeyEvent()

bool osgQt::QGraphicsViewAdapter::sendKeyEvent ( int  key,
bool  keyDown 
)

◆ sendPointerEvent()

bool osgQt::QGraphicsViewAdapter::sendPointerEvent ( int  x,
int  y,
int  buttonMask 
)

◆ setBackgroundColor()

void osgQt::QGraphicsViewAdapter::setBackgroundColor ( QColor  color)
inline

◆ setFrameLastRendered()

void osgQt::QGraphicsViewAdapter::setFrameLastRendered ( const osg::FrameStamp frameStamp)

◆ setUpKeyMap()

void osgQt::QGraphicsViewAdapter::setUpKeyMap ( )

Member Data Documentation

◆ _backgroundColor

QColor osgQt::QGraphicsViewAdapter::_backgroundColor
protected

◆ _currentRead

unsigned int osgQt::QGraphicsViewAdapter::_currentRead
protected

◆ _currentWrite

unsigned int osgQt::QGraphicsViewAdapter::_currentWrite
protected

◆ _graphicsScene

QPointer<QGraphicsScene> osgQt::QGraphicsViewAdapter::_graphicsScene
protected

◆ _graphicsView

QPointer<QGraphicsView> osgQt::QGraphicsViewAdapter::_graphicsView
protected

◆ _height

int osgQt::QGraphicsViewAdapter::_height
protected

◆ _image

osg::observer_ptr<osg::Image> osgQt::QGraphicsViewAdapter::_image
protected

◆ _keyMap

KeyMap osgQt::QGraphicsViewAdapter::_keyMap
protected

◆ _newImageAvailable

bool osgQt::QGraphicsViewAdapter::_newImageAvailable
protected

◆ _previousButtonMask

int osgQt::QGraphicsViewAdapter::_previousButtonMask
protected

◆ _previousFrameNumber

unsigned int osgQt::QGraphicsViewAdapter::_previousFrameNumber
protected

◆ _previousMouseX

int osgQt::QGraphicsViewAdapter::_previousMouseX
protected

◆ _previousMouseY

int osgQt::QGraphicsViewAdapter::_previousMouseY
protected

◆ _previousQtMouseX

int osgQt::QGraphicsViewAdapter::_previousQtMouseX
protected

◆ _previousQtMouseY

int osgQt::QGraphicsViewAdapter::_previousQtMouseY
protected

◆ _previousSentEvent

bool osgQt::QGraphicsViewAdapter::_previousSentEvent
protected

◆ _previousWrite

unsigned int osgQt::QGraphicsViewAdapter::_previousWrite
protected

◆ _qimages

QImage osgQt::QGraphicsViewAdapter::_qimages[3]
protected

◆ _qimagesMutex

OpenThreads::Mutex osgQt::QGraphicsViewAdapter::_qimagesMutex
protected

◆ _qresizeMutex

OpenThreads::Mutex osgQt::QGraphicsViewAdapter::_qresizeMutex
protected

◆ _qtKeyModifiers

Qt::KeyboardModifiers osgQt::QGraphicsViewAdapter::_qtKeyModifiers
protected

◆ _widget

QPointer<QWidget> osgQt::QGraphicsViewAdapter::_widget
protected

◆ _width

int osgQt::QGraphicsViewAdapter::_width
protected

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