Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoQtExtEventApplication.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23# include <QEvent>
24# include <QApplication>
25
27#include <Inventor/Qt/SoQt.h>
28
29// For compatibility reasons
30#define ExtEventApplication SoQtExtEventApplication
31
36class ExtEvent : public QEvent
37{
38public:
42 ExtEvent( QEvent::Type type, void* data ) : QEvent( type ), m_data(data) {};
43
47 void* data() { return m_data; }
48
52 void setData( void* data ) { m_data = data; }
53
54private:
55 void* m_data;
56};
57
61class SoQtExtEventApplication : public QApplication {
62public:
63
67 SoQtExtEventApplication( int &argc, char **argv);
68
69 static void allEventFilter( XEvent *event );
70};
71
union _XEvent XEvent
Definition SoQtDef.h:120
QCustomEvent no longer exists in full Qt4 so we have to subclass QEvent to provide our own custom eve...
ExtEvent(QEvent::Type type, void *data)
Constructor.
void setData(void *data)
Sets the data sent with the event.
void * data()
Returns the data sent with the event.
Overload the QApplication to be able to get devices events like SpaceMouse.
static void allEventFilter(XEvent *event)
SoQtExtEventApplication(int &argc, char **argv)
Constructor.