author | alwin <alwin> | 2005-02-28 09:40:30 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-02-28 09:40:30 (UTC) |
commit | 2b64a84d39eeed5681d0ee5068c7d11a01527750 (patch) (unidiff) | |
tree | c8693340dbc5ef5e2f9afa90b690829ddff2c4bd /noncore/applets/keyhelper/keyhelperconf/KHCWidget.h | |
parent | 61fa699140c5efbb6ba0bf2a62f7e8fbf62976be (diff) | |
download | opie-2b64a84d39eeed5681d0ee5068c7d11a01527750.zip opie-2b64a84d39eeed5681d0ee5068c7d11a01527750.tar.gz opie-2b64a84d39eeed5681d0ee5068c7d11a01527750.tar.bz2 |
other keymapping tool - not working this moment, I have to check it out
- the reason is that the config file is somewhat easier to understand than
from zkbapplet and has a nice config tool.
Please don't put it into any repositories this moment.
Diffstat (limited to 'noncore/applets/keyhelper/keyhelperconf/KHCWidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/keyhelper/keyhelperconf/KHCWidget.h | 68 |
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 | |||
21 | struct 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 | |||
40 | class KHCWidget : public KHCWidgetBase | ||
41 | { | ||
42 | Q_OBJECT | ||
43 | public: | ||
44 | KHCWidget(QWidget* parent=0, const char* name=0, WFlags fl=0); | ||
45 | virtual ~KHCWidget(); | ||
46 | |||
47 | protected: | ||
48 | void closeEvent(QCloseEvent* ce); | ||
49 | |||
50 | private: | ||
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; | ||
62 | private slots: | ||
63 | void onClick_Gen(); | ||
64 | void onClick_Copy(); | ||
65 | void onClick_Ctrl(); | ||
66 | }; | ||
67 | |||
68 | #endif /* _KHC_WIDGET_H_ */ | ||