author | sandman <sandman> | 2002-12-22 23:46:02 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-22 23:46:02 (UTC) |
commit | 92fb302dd801e7f568cd9d66025431e79dad9771 (patch) (unidiff) | |
tree | 1303acdd800fd01d221a1aa261f2ee730ada4ec1 /core/settings/button/buttonsettings.h | |
parent | c5de1fcc13b32e7c1f893dc3f8a1385b8698ebaf (diff) | |
download | opie-92fb302dd801e7f568cd9d66025431e79dad9771.zip opie-92fb302dd801e7f568cd9d66025431e79dad9771.tar.gz opie-92fb302dd801e7f568cd9d66025431e79dad9771.tar.bz2 |
New button settings -- replaces AppsKey, which does not work anymore with
the new device button framework
Diffstat (limited to 'core/settings/button/buttonsettings.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/buttonsettings.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/core/settings/button/buttonsettings.h b/core/settings/button/buttonsettings.h new file mode 100644 index 0000000..f571825 --- a/dev/null +++ b/core/settings/button/buttonsettings.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
28 | #ifndef __BUTTON_SETTINGS_H__ | ||
29 | #define __BUTTON_SETTINGS_H__ | ||
30 | |||
31 | #include <qdialog.h> | ||
32 | #include <qlist.h> | ||
33 | #include <opie/odevice.h> | ||
34 | |||
35 | class QTimer; | ||
36 | |||
37 | using namespace Opie; | ||
38 | |||
39 | class buttoninfo; | ||
40 | |||
41 | class ButtonSettings : public QDialog { | ||
42 | Q_OBJECT | ||
43 | |||
44 | public: | ||
45 | ButtonSettings ( ); | ||
46 | ~ButtonSettings ( ); | ||
47 | |||
48 | virtual void accept ( ); | ||
49 | virtual void done ( int r ); | ||
50 | |||
51 | private slots: | ||
52 | void keyTimeout ( ); | ||
53 | void updateLabels ( ); | ||
54 | |||
55 | protected: | ||
56 | virtual void keyPressEvent ( QKeyEvent *e ); | ||
57 | virtual void keyReleaseEvent ( QKeyEvent *e ); | ||
58 | |||
59 | private: | ||
60 | buttoninfo *buttonInfoForKeycode ( ushort key ); | ||
61 | |||
62 | void edit ( buttoninfo *bi, bool hold ); | ||
63 | QString qcopToString ( const OQCopMessage &c ); | ||
64 | |||
65 | private: | ||
66 | QTimer *m_timer; | ||
67 | buttoninfo *m_last_button; | ||
68 | |||
69 | QList <buttoninfo> m_infos; | ||
70 | }; | ||
71 | |||
72 | #endif | ||
73 | |||
74 | |||