summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h
Unidiff
Diffstat (limited to 'noncore/applets/keyhelper/keyhelperconf/KHCWidget.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/keyhelper/keyhelperconf/KHCWidget.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h
new file mode 100644
index 0000000..08b29b3
--- a/dev/null
+++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h
@@ -0,0 +1,68 @@
1#ifndef _KHC_WIDGET_H_
2#define _KHC_WIDGET_H_
3
4#include <stdlib.h>
5
6#include <qlabel.h>
7#include <qpushbutton.h>
8#include <qlineedit.h>
9#include <qmultilineedit.h>
10#include <qgroupbox.h>
11#include <qcheckbox.h>
12#include <qlayout.h>
13
14#include <qwindowsystem_qws.h>
15
16#include <qpe/qcopenvelope_qws.h>
17
18#include "KHCWidgetBase.h"
19#include "KeyNames.h"
20
21struct KeyData
22{
23 KeyData(){
24 key = 0;
25 state = 0;
26 ascii = 0;
27 }
28 void setData(QKeyEvent* ke) {
29 key = ke->key();
30 state = ke->state();
31 ascii = ke->ascii();
32 text = ke->text();
33 }
34 int key;
35 int state;
36 int ascii;
37 QString text;
38};
39
40class KHCWidget : public KHCWidgetBase
41{
42 Q_OBJECT
43public:
44 KHCWidget(QWidget* parent=0, const char* name=0, WFlags fl=0);
45 virtual ~KHCWidget();
46
47protected:
48 void closeEvent(QCloseEvent* ce);
49
50private:
51 void setLayout();
52 void setHandler();
53
54 void onPress_Org(QKeyEvent* ke);
55 void onPress_Map(QKeyEvent* ke);
56
57 bool eventFilter(QObject* o, QEvent* e);
58
59 bool m_isEnable;
60 KeyData m_OrgkeyData;
61 KeyData m_MapkeyData;
62private slots:
63 void onClick_Gen();
64 void onClick_Copy();
65 void onClick_Ctrl();
66};
67
68#endif /* _KHC_WIDGET_H_ */