summaryrefslogtreecommitdiff
path: root/core/settings/button/buttonsettings.h
Unidiff
Diffstat (limited to 'core/settings/button/buttonsettings.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/button/buttonsettings.h74
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
35class QTimer;
36
37using namespace Opie;
38
39class buttoninfo;
40
41class ButtonSettings : public QDialog {
42 Q_OBJECT
43
44public:
45 ButtonSettings ( );
46 ~ButtonSettings ( );
47
48 virtual void accept ( );
49 virtual void done ( int r );
50
51private slots:
52 void keyTimeout ( );
53 void updateLabels ( );
54
55protected:
56 virtual void keyPressEvent ( QKeyEvent *e );
57 virtual void keyReleaseEvent ( QKeyEvent *e );
58
59private:
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