blob: 08b29b358d74df79b992289d3dc632b9a90c3631 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#ifndef _KHC_WIDGET_H_
#define _KHC_WIDGET_H_
#include <stdlib.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qwindowsystem_qws.h>
#include <qpe/qcopenvelope_qws.h>
#include "KHCWidgetBase.h"
#include "KeyNames.h"
struct KeyData
{
KeyData(){
key = 0;
state = 0;
ascii = 0;
}
void setData(QKeyEvent* ke) {
key = ke->key();
state = ke->state();
ascii = ke->ascii();
text = ke->text();
}
int key;
int state;
int ascii;
QString text;
};
class KHCWidget : public KHCWidgetBase
{
Q_OBJECT
public:
KHCWidget(QWidget* parent=0, const char* name=0, WFlags fl=0);
virtual ~KHCWidget();
protected:
void closeEvent(QCloseEvent* ce);
private:
void setLayout();
void setHandler();
void onPress_Org(QKeyEvent* ke);
void onPress_Map(QKeyEvent* ke);
bool eventFilter(QObject* o, QEvent* e);
bool m_isEnable;
KeyData m_OrgkeyData;
KeyData m_MapkeyData;
private slots:
void onClick_Gen();
void onClick_Copy();
void onClick_Ctrl();
};
#endif /* _KHC_WIDGET_H_ */
|