Diffstat (limited to 'core/settings/button/buttonsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index 942d5e4..b6a07a8 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp | |||
@@ -17,3 +17,3 @@ | |||
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 |
@@ -52,3 +52,3 @@ struct buttoninfo { | |||
52 | QLabel *m_hlabel; | 52 | QLabel *m_hlabel; |
53 | 53 | ||
54 | bool m_pdirty : 1; | 54 | bool m_pdirty : 1; |
@@ -58,3 +58,3 @@ struct buttoninfo { | |||
58 | 58 | ||
59 | ButtonSettings::ButtonSettings ( ) | 59 | ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f ) |
60 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) | 60 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) |
@@ -67,6 +67,6 @@ ButtonSettings::ButtonSettings ( ) | |||
67 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); | 67 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); |
68 | 68 | ||
69 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); | 69 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); |
70 | toplay-> addWidget ( l ); | 70 | toplay-> addWidget ( l ); |
71 | 71 | ||
72 | QGridLayout *lay = new QGridLayout ( toplay ); | 72 | QGridLayout *lay = new QGridLayout ( toplay ); |
@@ -79,3 +79,3 @@ ButtonSettings::ButtonSettings ( ) | |||
79 | m_infos. setAutoDelete ( true ); | 79 | m_infos. setAutoDelete ( true ); |
80 | 80 | ||
81 | int i = 1; | 81 | int i = 1; |
@@ -97,8 +97,8 @@ ButtonSettings::ButtonSettings ( ) | |||
97 | bi-> m_hdirty = false; | 97 | bi-> m_hdirty = false; |
98 | 98 | ||
99 | l = new QLabel ( this ); | 99 | l = new QLabel ( this ); |
100 | l-> setPixmap (( *it ). pixmap ( )); | 100 | l-> setPixmap (( *it ). pixmap ( )); |
101 | 101 | ||
102 | lay-> addMultiCellWidget ( l, i, i + 1, 0, 0 ); | 102 | lay-> addMultiCellWidget ( l, i, i + 1, 0, 0 ); |
103 | 103 | ||
104 | l = new QLabel ( tr( "Press:" ), this ); | 104 | l = new QLabel ( tr( "Press:" ), this ); |
@@ -107,3 +107,3 @@ ButtonSettings::ButtonSettings ( ) | |||
107 | lay-> addWidget ( l, i + 1, 1, AlignLeft | AlignTop ); | 107 | lay-> addWidget ( l, i + 1, 1, AlignLeft | AlignTop ); |
108 | 108 | ||
109 | l = new QLabel ( this ); | 109 | l = new QLabel ( this ); |
@@ -117,3 +117,3 @@ ButtonSettings::ButtonSettings ( ) | |||
117 | bi-> m_plabel = l; | 117 | bi-> m_plabel = l; |
118 | 118 | ||
119 | l = new QLabel ( this ); | 119 | l = new QLabel ( this ); |
@@ -127,7 +127,7 @@ ButtonSettings::ButtonSettings ( ) | |||
127 | bi-> m_hlabel = l; | 127 | bi-> m_hlabel = l; |
128 | 128 | ||
129 | i += 2; | 129 | i += 2; |
130 | 130 | ||
131 | m_infos. append ( bi ); | 131 | m_infos. append ( bi ); |
132 | } | 132 | } |
133 | 133 | ||
@@ -137,3 +137,3 @@ ButtonSettings::ButtonSettings ( ) | |||
137 | m_lock = false; | 137 | m_lock = false; |
138 | 138 | ||
139 | m_timer = new QTimer ( this ); | 139 | m_timer = new QTimer ( this ); |
@@ -141,4 +141,4 @@ ButtonSettings::ButtonSettings ( ) | |||
141 | 141 | ||
142 | updateLabels ( ); | 142 | updateLabels ( ); |
143 | 143 | ||
144 | QPEApplication::grabKeyboard ( ); | 144 | QPEApplication::grabKeyboard ( ); |
@@ -155,3 +155,3 @@ void ButtonSettings::updateLabels ( ) | |||
155 | qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg ); | 155 | qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg ); |
156 | 156 | ||
157 | (*it)-> m_picon-> setPixmap ( cip. m_icon ); | 157 | (*it)-> m_picon-> setPixmap ( cip. m_icon ); |
@@ -170,5 +170,5 @@ buttoninfo *ButtonSettings::buttonInfoForKeycode ( ushort key ) | |||
170 | if ((*it)-> m_button-> keycode ( ) == key ) | 170 | if ((*it)-> m_button-> keycode ( ) == key ) |
171 | return *it; | 171 | return *it; |
172 | } | 172 | } |
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
@@ -178,4 +178,4 @@ void ButtonSettings::keyPressEvent ( QKeyEvent *e ) | |||
178 | buttoninfo *bi = buttonInfoForKeycode ( e-> key ( )); | 178 | buttoninfo *bi = buttonInfoForKeycode ( e-> key ( )); |
179 | 179 | ||
180 | if ( bi && !e-> isAutoRepeat ( )) { | 180 | if ( bi && !e-> isAutoRepeat ( )) { |
181 | m_timer-> stop ( ); | 181 | m_timer-> stop ( ); |
@@ -191,6 +191,6 @@ void ButtonSettings::keyReleaseEvent ( QKeyEvent *e ) | |||
191 | buttoninfo *bi = buttonInfoForKeycode ( e-> key ( )); | 191 | buttoninfo *bi = buttonInfoForKeycode ( e-> key ( )); |
192 | 192 | ||
193 | if ( bi && !e-> isAutoRepeat ( ) && m_timer-> isActive ( )) { | 193 | if ( bi && !e-> isAutoRepeat ( ) && m_timer-> isActive ( )) { |
194 | m_timer-> stop ( ); | 194 | m_timer-> stop ( ); |
195 | edit ( bi, false ); | 195 | edit ( bi, false ); |
196 | } | 196 | } |
@@ -210,3 +210,3 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | |||
210 | { | 210 | { |
211 | 211 | ||
212 | if ( m_lock ) | 212 | if ( m_lock ) |
@@ -214,9 +214,9 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | |||
214 | m_lock = true; | 214 | m_lock = true; |
215 | 215 | ||
216 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); | 216 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); |
217 | 217 | ||
218 | d-> showMaximized ( ); | 218 | d-> showMaximized ( ); |
219 | if ( d-> exec ( ) == QDialog::Accepted ) { | 219 | if ( d-> exec ( ) == QDialog::Accepted ) { |
220 | 220 | ||
221 | 221 | ||
222 | if ( hold ) { | 222 | if ( hold ) { |
@@ -229,8 +229,8 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | updateLabels ( ); | 231 | updateLabels ( ); |
232 | } | 232 | } |
233 | 233 | ||
234 | delete d; | 234 | delete d; |
235 | 235 | ||
236 | m_lock = false; | 236 | m_lock = false; |
@@ -242,3 +242,3 @@ void ButtonSettings::accept ( ) | |||
242 | buttoninfo *bi = *it; | 242 | buttoninfo *bi = *it; |
243 | 243 | ||
244 | if ( bi-> m_pdirty ) | 244 | if ( bi-> m_pdirty ) |