Diffstat (limited to 'core/settings/button/buttonsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index b6a07a8..523e295 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp | |||
@@ -1,80 +1,79 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This file is free software; you can | 5 | _;:, .> :=|. This file is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qtimer.h> | 30 | #include <qtimer.h> |
31 | 31 | ||
32 | #include <qpe/qpeapplication.h> | ||
33 | 32 | ||
34 | #include <opie/odevice.h> | 33 | #include <opie/odevice.h> |
35 | 34 | ||
36 | #include "buttonsettings.h" | 35 | #include "buttonsettings.h" |
37 | #include "buttonutils.h" | 36 | #include "buttonutils.h" |
38 | #include "remapdlg.h" | 37 | #include "remapdlg.h" |
39 | 38 | ||
40 | using namespace Opie; | 39 | using namespace Opie; |
41 | 40 | ||
42 | struct buttoninfo { | 41 | struct buttoninfo { |
43 | const ODeviceButton *m_button; | 42 | const ODeviceButton *m_button; |
44 | int m_index; | 43 | int m_index; |
45 | 44 | ||
46 | OQCopMessage m_pmsg; | 45 | OQCopMessage m_pmsg; |
47 | QLabel *m_picon; | 46 | QLabel *m_picon; |
48 | QLabel *m_plabel; | 47 | QLabel *m_plabel; |
49 | 48 | ||
50 | OQCopMessage m_hmsg; | 49 | OQCopMessage m_hmsg; |
51 | QLabel *m_hicon; | 50 | QLabel *m_hicon; |
52 | QLabel *m_hlabel; | 51 | QLabel *m_hlabel; |
53 | 52 | ||
54 | bool m_pdirty : 1; | 53 | bool m_pdirty : 1; |
55 | bool m_hdirty : 1; | 54 | bool m_hdirty : 1; |
56 | }; | 55 | }; |
57 | 56 | ||
58 | 57 | ||
59 | ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f ) | 58 | ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f ) |
60 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) | 59 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) |
61 | { | 60 | { |
62 | const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); | 61 | const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); |
63 | (void) ButtonUtils::inst ( ); // initialise | 62 | (void) ButtonUtils::inst ( ); // initialise |
64 | 63 | ||
65 | setCaption ( tr( "Button Settings" )); | 64 | setCaption ( tr( "Button Settings" )); |
66 | 65 | ||
67 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); | 66 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); |
68 | 67 | ||
69 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); | 68 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); |
70 | toplay-> addWidget ( l ); | 69 | toplay-> addWidget ( l ); |
71 | 70 | ||
72 | QGridLayout *lay = new QGridLayout ( toplay ); | 71 | QGridLayout *lay = new QGridLayout ( toplay ); |
73 | lay-> setMargin ( 0 ); | 72 | lay-> setMargin ( 0 ); |
74 | lay-> setColStretch ( 0, 0 ); | 73 | lay-> setColStretch ( 0, 0 ); |
75 | lay-> setColStretch ( 1, 0 ); | 74 | lay-> setColStretch ( 1, 0 ); |
76 | lay-> setColStretch ( 2, 0 ); | 75 | lay-> setColStretch ( 2, 0 ); |
77 | lay-> setColStretch ( 3, 10 ); | 76 | lay-> setColStretch ( 3, 10 ); |
78 | 77 | ||
79 | m_infos. setAutoDelete ( true ); | 78 | m_infos. setAutoDelete ( true ); |
80 | 79 | ||