]> Shamusworld >> Repos - virtualjaguar/blob - src/gui/keygrabber.h
aae59616fe1401441939e0c0f98a1a01b6fea216
[virtualjaguar] / src / gui / keygrabber.h
1 //
2 // keygrabber.h - Widget to grab a key and dismiss itself
3 //
4 // by James Hammons
5 // (C) 2011 Underground Software
6 //
7
8 #ifndef __KEYGRABBER_H__
9 #define __KEYGRABBER_H__
10
11 #include <QtGui>
12
13 class KeyGrabber: public QDialog
14 {
15         Q_OBJECT
16
17         public:
18                 KeyGrabber(QWidget * parent = 0);
19                 ~KeyGrabber();
20                 void SetKeyText(int);
21
22         protected:
23                 void keyPressEvent(QKeyEvent *);
24
25 private:
26                 QLabel * label;
27
28         public:
29                 int key;
30 };
31
32 #endif  // __KEYGRABBER_H__