Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
QEventToSoEvent.h
1#pragma once
2
3#include "QtEventToSoEvent.h"
4class SoDEPRECATED QTVIEWERCOMPONENTS_API QEventToSoEvent : public QtEventToSoEvent
9{
10public:
11
17 static SoMouseButtonEvent*
18 getMousePressEvent( QMouseEvent* qevent, QWidget* widget )
19 {
20 return QtEventToSoEvent::getMousePressEvent( qevent, QPoint( qevent->x() * widget->devicePixelRatio(),
21 ( ( widget->height() - 1 ) - qevent->y() ) * widget->devicePixelRatio() ) );
22 }
23
29 static SoMouseButtonEvent*
30 getMouseReleaseEvent( QMouseEvent* qevent, QWidget* widget )
31 {
32 return QtEventToSoEvent::getMouseReleaseEvent( qevent, QPoint( qevent->x() * widget->devicePixelRatio(),
33 ( ( widget->height() - 1 ) - qevent->y() ) * widget->devicePixelRatio() ) );
34 }
35
41 static SoMouseButtonEvent*
42 getMouseDoubleClickEvent( QMouseEvent* qevent, QWidget* widget )
43 {
44 return QtEventToSoEvent::getMouseDoubleClickEvent( qevent, QPoint( qevent->x() * widget->devicePixelRatio(),
45 ( ( widget->height() - 1 ) - qevent->y() ) * widget->devicePixelRatio() ) );
46 }
47
52 static SoMouseWheelEvent*
53 getMouseWheelEvent( QWheelEvent* qevent, QWidget* )
54 {
56 }
57
63 static SoLocation2Event*
64 getMouseMoveEvent( QMouseEvent* qevent, QWidget* widget )
65 {
66 return QtEventToSoEvent::getMouseMoveEvent( qevent, QPoint( qevent->x() * widget->devicePixelRatio(),
67 ( ( widget->height() - 1 ) - qevent->y() ) * widget->devicePixelRatio() ) );
68 }
69
73 static SoLocation2Event*
74 getMouseEnterEvent( QEvent*, QWidget* )
75 {
77 }
78
82 static SoLocation2Event*
83 getMouseLeaveEvent( QEvent*, QWidget* )
84 {
86 }
87
92 static SoKeyboardEvent*
93 getKeyPressEvent( QKeyEvent* qevent )
94 {
96 }
97
102 static SoKeyboardEvent*
103 getKeyReleaseEvent( QKeyEvent* qevent )
104 {
106 }
107
113 const std::vector<const SoEvent*>&
114 getTouchEvents( QTouchEvent* qevent, QWidget* widget )
115 {
116 return QtEventToSoEvent::getTouchEvents( qevent, widget->height() );
117 }
118};
static SoKeyboardEvent * getKeyReleaseEvent(QKeyEvent *qevent)
Transform QKeyEvent release to SoKeyboardEvent.
static SoMouseButtonEvent * getMouseDoubleClickEvent(QMouseEvent *qevent, QWidget *widget)
Transform QMouseDoubleClickEvent to SoMouseButtonEvent.
static SoMouseButtonEvent * getMouseReleaseEvent(QMouseEvent *qevent, QWidget *widget)
Transform QMouseReleaseEvent to SoMouseButtonEvent.
const std::vector< const SoEvent * > & getTouchEvents(QTouchEvent *qevent, QWidget *widget)
Transform QTouchEvent to a list of SoEvent representing the touch event.
static SoLocation2Event * getMouseMoveEvent(QMouseEvent *qevent, QWidget *widget)
Transform QMouseMoveEvent to SoMouseButtonEvent.
static SoLocation2Event * getMouseLeaveEvent(QEvent *, QWidget *)
Transform QMouseLeaveEvent to SoMouseButtonEvent.
static SoKeyboardEvent * getKeyPressEvent(QKeyEvent *qevent)
Transform QKeyEvent press to SoKeyboardEvent.
static SoMouseWheelEvent * getMouseWheelEvent(QWheelEvent *qevent, QWidget *)
Transform QMouseWheelEvent to SoMouseButtonEvent.
static SoLocation2Event * getMouseEnterEvent(QEvent *, QWidget *)
Transform QMouseEnterEvent to SoMouseButtonEvent.
static SoMouseButtonEvent * getMousePressEvent(QMouseEvent *qevent, QWidget *widget)
Transform QMousePressEvent to SoMouseButtonEvent.
static SoMouseButtonEvent * getMouseReleaseEvent(QMouseEvent *qevent, QPoint eventPosition)
Transform QMouseReleaseEvent to SoMouseButtonEvent.
static SoKeyboardEvent * getKeyPressEvent(QKeyEvent *qevent)
Transform QKeyEvent press to SoKeyboardEvent.
static SoMouseButtonEvent * getMousePressEvent(QMouseEvent *qevent, QPoint eventPosition)
Transform QMousePressEvent to SoMouseButtonEvent.
static SoLocation2Event * getMouseLeaveEvent()
Transform mouse leave event to SoLocation2Event.
const std::vector< const SoEvent * > & getTouchEvents(QTouchEvent *qevent, int height)
Transform QTouchEvent to a list of SoEvent representing the touch event.
static SoKeyboardEvent * getKeyReleaseEvent(QKeyEvent *qevent)
Transform QKeyEvent release to SoKeyboardEvent.
static SoLocation2Event * getMouseEnterEvent()
Transform mouse enter event to SoLocation2Event.
static SoMouseButtonEvent * getMouseDoubleClickEvent(QMouseEvent *qevent, QPoint eventPosition)
Transform QMouseDoubleClickEvent to SoMouseButtonEvent.
static SoLocation2Event * getMouseMoveEvent(QMouseEvent *qevent, QPoint eventPosition)
Transform QMouseEvent to SoLocation2Event.
static SoMouseWheelEvent * getMouseWheelEvent(QWheelEvent *qevent)
Transform QWheelEvent to SoMouseWheelEvent.
Keyboard key press and release events.
2D location events.
Mouse button press and release events.
Mouse wheel events.