OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgQt::QGraphicsViewAdapter Class Reference

#include <QGraphicsViewAdapter.h>

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)
 
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]
 

Detailed Description

Definition at line 36 of file QGraphicsViewAdapter.h.

Member Typedef Documentation

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

Definition at line 95 of file QGraphicsViewAdapter.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void osgQt::QGraphicsViewAdapter::assignImage ( unsigned int  i)
void osgQt::QGraphicsViewAdapter::clearWriteBuffer ( )
virtual void osgQt::QGraphicsViewAdapter::customEvent ( QEvent *  event)
protectedvirtual
QColor osgQt::QGraphicsViewAdapter::getBackgroundColor ( ) const
inline

Definition at line 64 of file QGraphicsViewAdapter.h.

QWidget* osgQt::QGraphicsViewAdapter::getBackgroundWidget ( )
inline

Definition at line 70 of file QGraphicsViewAdapter.h.

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

Definition at line 73 of file QGraphicsViewAdapter.h.

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

Definition at line 72 of file QGraphicsViewAdapter.h.

QWidget* osgQt::QGraphicsViewAdapter::getWidgetAt ( const QPoint &  pos)
protected
bool osgQt::QGraphicsViewAdapter::handleKeyEvent ( int  key,
bool  keyDown 
)
protected
bool osgQt::QGraphicsViewAdapter::handlePointerEvent ( int  x,
int  y,
int  buttonMask 
)
protected
void osgQt::QGraphicsViewAdapter::render ( )
bool osgQt::QGraphicsViewAdapter::requiresRendering ( ) const
inline

Definition at line 56 of file QGraphicsViewAdapter.h.

void osgQt::QGraphicsViewAdapter::resize ( int  width,
int  height 
)
bool osgQt::QGraphicsViewAdapter::sendKeyEvent ( int  key,
bool  keyDown 
)
bool osgQt::QGraphicsViewAdapter::sendPointerEvent ( int  x,
int  y,
int  buttonMask 
)
void osgQt::QGraphicsViewAdapter::setBackgroundColor ( QColor  color)
inline

Definition at line 63 of file QGraphicsViewAdapter.h.

void osgQt::QGraphicsViewAdapter::setBackgroundWidget ( QWidget *  w)
inline

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

Definition at line 69 of file QGraphicsViewAdapter.h.

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

Member Data Documentation

QColor osgQt::QGraphicsViewAdapter::_backgroundColor
protected

Definition at line 99 of file QGraphicsViewAdapter.h.

QWidget* osgQt::QGraphicsViewAdapter::_backgroundWidget
protected

Definition at line 82 of file QGraphicsViewAdapter.h.

unsigned int osgQt::QGraphicsViewAdapter::_currentRead
protected

Definition at line 108 of file QGraphicsViewAdapter.h.

unsigned int osgQt::QGraphicsViewAdapter::_currentWrite
protected

Definition at line 109 of file QGraphicsViewAdapter.h.

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

Definition at line 101 of file QGraphicsViewAdapter.h.

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

Definition at line 100 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_height
protected

Definition at line 93 of file QGraphicsViewAdapter.h.

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

Definition at line 81 of file QGraphicsViewAdapter.h.

KeyMap osgQt::QGraphicsViewAdapter::_keyMap
protected

Definition at line 96 of file QGraphicsViewAdapter.h.

bool osgQt::QGraphicsViewAdapter::_newImageAvailable
protected

Definition at line 107 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_previousButtonMask
protected

Definition at line 84 of file QGraphicsViewAdapter.h.

unsigned int osgQt::QGraphicsViewAdapter::_previousFrameNumber
protected

Definition at line 106 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_previousMouseX
protected

Definition at line 85 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_previousMouseY
protected

Definition at line 86 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_previousQtMouseX
protected

Definition at line 87 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_previousQtMouseY
protected

Definition at line 88 of file QGraphicsViewAdapter.h.

bool osgQt::QGraphicsViewAdapter::_previousSentEvent
protected

Definition at line 89 of file QGraphicsViewAdapter.h.

unsigned int osgQt::QGraphicsViewAdapter::_previousWrite
protected

Definition at line 110 of file QGraphicsViewAdapter.h.

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

Definition at line 111 of file QGraphicsViewAdapter.h.

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

Definition at line 104 of file QGraphicsViewAdapter.h.

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

Definition at line 105 of file QGraphicsViewAdapter.h.

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

Definition at line 97 of file QGraphicsViewAdapter.h.

bool osgQt::QGraphicsViewAdapter::_requiresRendering
protected

Definition at line 90 of file QGraphicsViewAdapter.h.

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

Definition at line 102 of file QGraphicsViewAdapter.h.

int osgQt::QGraphicsViewAdapter::_width
protected

Definition at line 92 of file QGraphicsViewAdapter.h.


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