00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SOQT_MOUSE_H
00025 #define SOQT_MOUSE_H
00026
00027 #include <Inventor/Qt/devices/SoQtDevice.h>
00028
00029 class SoMouseButtonEvent;
00030 class SoLocation2Event;
00031
00032
00033
00034 class SOQT_DLL_API SoQtMouse : public SoQtDevice {
00035 SOQT_OBJECT_HEADER(SoQtMouse, SoQtDevice);
00036
00037 public:
00038 enum Events {
00039 BUTTON_PRESS = 0x01,
00040 BUTTON_RELEASE = 0x02,
00041 POINTER_MOTION = 0x04,
00042 BUTTON_MOTION = 0x08,
00043
00044 ALL_EVENTS = BUTTON_PRESS | BUTTON_RELEASE | POINTER_MOTION | BUTTON_MOTION
00045 };
00046
00047 SoQtMouse(int eventmask = ALL_EVENTS);
00048 virtual ~SoQtMouse(void);
00049
00050 virtual void enable(QWidget * widget, SoQtEventHandler * handler, void * closure);
00051 virtual void disable(QWidget * widget, SoQtEventHandler * handler, void * closure);
00052
00053 virtual const SoEvent * translateEvent(QEvent * event);
00054
00055 private:
00056 class SoQtMouseP * pimpl;
00057 friend class SoQtMouseP;
00058 friend class SoGuiMouseP;
00059 };
00060
00061
00062
00063 #endif // ! SOQT_MOUSE_H