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/keyhelperapplet/extension/TaskSelector.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/keyhelperapplet/extension/TaskSelector.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/extension/TaskSelector.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/extension/TaskSelector.h b/noncore/applets/keyhelper/keyhelperapplet/extension/TaskSelector.h new file mode 100644 index 0000000..ceb157d --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperapplet/extension/TaskSelector.h | |||
@@ -0,0 +1,85 @@ | |||
1 | #ifndef _TASK_SELECTOR_H_ | ||
2 | #define _TASK_SELECTOR_H_ | ||
3 | |||
4 | #include <qstring.h> | ||
5 | #include <qstringlist.h> | ||
6 | #include <qvaluelist.h> | ||
7 | #include <qwindowsystem_qws.h> | ||
8 | #include <qpopupmenu.h> | ||
9 | #include <qpoint.h> | ||
10 | #include <qtimer.h> | ||
11 | #include <qgfx_qws.h> | ||
12 | |||
13 | #include <qpe/global.h> | ||
14 | #include <qpe/applnk.h> | ||
15 | #include <qpe/config.h> | ||
16 | #include <qpe/mimetype.h> | ||
17 | |||
18 | #include "ExtensionInterface.h" | ||
19 | #include "MenuTitle.h" | ||
20 | #include "KeyNames.h" | ||
21 | #include "AppLnkManager.h" | ||
22 | #include "ConfigEx.h" | ||
23 | #include "QPopupMenuEx.h" | ||
24 | |||
25 | class TaskSelector : public QObject, public ExtensionInterface | ||
26 | { | ||
27 | Q_OBJECT | ||
28 | public: | ||
29 | TaskSelector(const QString& kind = "select"); | ||
30 | virtual ~TaskSelector(); | ||
31 | |||
32 | virtual bool onKeyPress(int keycode); | ||
33 | virtual bool onModRelease(int modcode); | ||
34 | virtual int getKeycode() | ||
35 | { | ||
36 | return(m_keycode); | ||
37 | } | ||
38 | virtual int getKeymask() | ||
39 | { | ||
40 | return(m_keymask); | ||
41 | } | ||
42 | virtual const QValueList<int>& getModcodes() | ||
43 | { | ||
44 | return(m_modcodes); | ||
45 | } | ||
46 | virtual void setKeycode(int keycode) | ||
47 | { | ||
48 | m_keycode = keycode; | ||
49 | } | ||
50 | virtual void setKeymask(int keymask) | ||
51 | { | ||
52 | m_keymask = keymask; | ||
53 | } | ||
54 | virtual void setModcodes(const QValueList<int>& modcodes) | ||
55 | { | ||
56 | m_modcodes = modcodes; | ||
57 | } | ||
58 | virtual const QString& kind() | ||
59 | { | ||
60 | return(m_kind); | ||
61 | } | ||
62 | public slots: | ||
63 | void show(); | ||
64 | void select(); | ||
65 | void select(int); | ||
66 | void highlight(int id); | ||
67 | private: | ||
68 | int m_keycode; | ||
69 | int m_keymask; | ||
70 | QString m_kind; | ||
71 | QValueList<int> m_modcodes; | ||
72 | |||
73 | bool m_isShowing; | ||
74 | int m_index; | ||
75 | QPopupMenu* m_pMenu; | ||
76 | QStringList m_applist; | ||
77 | QString m_accesskeys; | ||
78 | |||
79 | int buildMenu(); | ||
80 | void next(); | ||
81 | private slots: | ||
82 | bool eventFilter(QObject* o, QEvent* e); | ||
83 | }; | ||
84 | |||
85 | #endif /* _TASK_SELECTOR_H_ */ | ||