summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperapplet/extension/QPopupMenuEx.h
blob: 16e18a161be437b9791e4e3142f4fb48e72a281a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _QPOPUPMENUEX_H_
#define _QPOPUPMENUEX_H_

#include <qpopupmenu.h>
#include <qstring.h>
#include <qevent.h>

class QPopupMenuEx : public QPopupMenu
{
public:
	QPopupMenuEx(QWidget* parent=0, const char* name=0)
		: QPopupMenu(parent, name){}
protected:
	void keyPressEvent(QKeyEvent* e){
		QChar c = e->text()[0];
		QKeyEvent* ke = new QKeyEvent(
			e->type(),
			e->key(),
			c.lower().latin1(),
			0,
			c.lower(),
			e->isAutoRepeat());
		QPopupMenu::keyPressEvent(ke);
	}
private:
};

#endif /* _QPOPUPMENUEX_H_ */