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_KEYBOARD_H
00025
#define SOQT_KEYBOARD_H
00026
00027
#include <Inventor/Qt/devices/SoQtDevice.h>
00028
00029
class SoKeyboardEvent;
00030
00031
00032
00033
#define SO_QT_ALL_KEYBOARD_EVENTS SoQtKeyboard::ALL
00034
00035 class SOQT_DLL_API SoQtKeyboard :
public SoQtDevice {
00036 SOQT_OBJECT_HEADER(SoQtKeyboard,
SoQtDevice);
00037
00038
public:
00039 enum Events {
00040 KEY_PRESS = 0x01,
00041 KEY_RELEASE = 0x02,
00042 ALL_EVENTS = KEY_PRESS | KEY_RELEASE
00043 };
00044
00045 SoQtKeyboard(
int eventmask = ALL_EVENTS);
00046
virtual ~SoQtKeyboard(
void);
00047
00048
virtual void enable(QWidget * widget, SoQtEventHandler * handler,
void * closure);
00049
virtual void disable(QWidget * widget, SoQtEventHandler * handler,
void * closure);
00050
00051
virtual const SoEvent * translateEvent(QEvent * event);
00052
00053
private:
00054
class SoQtKeyboardP * pimpl;
00055
#ifndef DOXYGEN_SKIP_THIS
00056
friend class SoQtKeyboardP;
00057
friend class SoGuiKeyboardP;
00058
#endif // DOXYGEN_SKIP_THIS
00059
};
00060
00061
00062
00063
#endif // ! SOQT_KEYBOARD_H