30 #ifndef VIEWPORT_MOUSE_EVENT_H 31 #define VIEWPORT_MOUSE_EVENT_H 33 #include <QMouseEvent> 34 #include <QWheelEvent> 60 , acting_button(e->button())
61 , buttons_down(e->buttons())
62 , modifiers(e->modifiers())
78 , wheel_delta(e->delta())
79 , acting_button(Qt::NoButton)
80 , buttons_down(e->buttons())
81 , modifiers(e->modifiers())
92 return buttons_down & Qt::LeftButton;
96 return buttons_down & Qt::MidButton;
100 return buttons_down & Qt::RightButton;
105 return modifiers & Qt::ShiftModifier;
109 return modifiers & Qt::ControlModifier;
113 return modifiers & Qt::AltModifier;
120 return type == QEvent::MouseButtonRelease && acting_button == Qt::LeftButton;
124 return type == QEvent::MouseButtonRelease && acting_button == Qt::MidButton;
128 return type == QEvent::MouseButtonRelease && acting_button == Qt::RightButton;
133 return type == QEvent::MouseButtonPress && acting_button == Qt::LeftButton;
137 return type == QEvent::MouseButtonPress && acting_button == Qt::MidButton;
141 return type == QEvent::MouseButtonPress && acting_button == Qt::RightButton;
160 #endif // VIEWPORT_MOUSE_EVENT_H
Qt::KeyboardModifiers modifiers
ViewportMouseEvent(RenderPanel *p, Ogre::Viewport *vp, QWheelEvent *e, int lx, int ly)
ViewportMouseEvent(RenderPanel *p, Ogre::Viewport *vp, QMouseEvent *e, int lx, int ly)
Ogre::Viewport * viewport
Qt::MouseButton acting_button
Qt::MouseButtons buttons_down