void AdapterWidget::mousePressEvent( QMouseEvent* event ) { int button = 0; switch(event->button()) { case(Qt::LeftButton): button = 1; break; case(Qt::MidButton): button = 2; break; case(Qt::RightButton): button = 3; break; case(Qt::NoButton): button = 0; break; default: button = 0; break; } _gw->getEventQueue()->mouseButtonPress(event->x(), event->y(), button); }
void AdapterWidget::resizeGL( int width, int height ) { _gw->getEventQueue()->windowResize(0, 0, width, height ); _gw->resized(0,0,width,height); }
void AdapterWidget::keyReleaseEvent( QKeyEvent* event ) { _gw->getEventQueue()->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) *(event->text().toAscii().data() ) ); }
void AdapterWidget::mouseMoveEvent( QMouseEvent* event ) { _gw->getEventQueue()->mouseMotion(event->x(), event->y()); }