Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 5b7f851..78885e1 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -200,18 +200,18 @@ void ProfileEditorDialog::initUI() | |||
200 | 200 | ||
201 | // signals | 201 | // signals |
202 | 202 | ||
203 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); | 203 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); |
204 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); | 204 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); |
205 | 205 | ||
206 | connect(group_flow, SIGNAL(clicked(int)), SLOT(slotConn(int))); | 206 | connect(group_flow, SIGNAL(clicked(int)), SLOT(slotConnFlow(int))); |
207 | connect(group_parity, SIGNAL(clicked(int)), SLOT(slotConn(int))); | 207 | connect(group_parity, SIGNAL(clicked(int)), SLOT(slotConnParity(int))); |
208 | connect(speed_box, SIGNAL(clicked(int)), SLOT(slotConn(int))); | 208 | connect(speed_box, SIGNAL(activated(int)), SLOT(slotConnSpeed(int))); |
209 | 209 | ||
210 | connect(terminal_box, SIGNAL(clicked(int)), SLOT(slotConn(int))); | 210 | connect(terminal_box, SIGNAL(activated(int)), SLOT(slotTermTerm(int))); |
211 | connect(group_size, SIGNAL(clicked(int)), SLOT(slotConn(int))); | 211 | connect(group_size, SIGNAL(clicked(int)), SLOT(slotTermFont(int))); |
212 | } | 212 | } |
213 | 213 | ||
214 | ProfileEditorDialog::~ProfileEditorDialog() { | 214 | ProfileEditorDialog::~ProfileEditorDialog() { |
215 | 215 | ||
216 | } | 216 | } |
217 | 217 | ||
@@ -264,28 +264,42 @@ QString ProfileEditorDialog::prof_type() | |||
264 | for(QStringList::Iterator it = w.begin(); it != w.end(); it++) | 264 | for(QStringList::Iterator it = w.begin(); it != w.end(); it++) |
265 | if(device_box->currentText() == m_fact->name((*it))) return (*it); | 265 | if(device_box->currentText() == m_fact->name((*it))) return (*it); |
266 | 266 | ||
267 | return QString::null; | 267 | return QString::null; |
268 | } | 268 | } |
269 | 269 | ||
270 | void ProfileEditorDialog::slotConn(int id) | 270 | void ProfileEditorDialog::slotConnFlow(int id) |
271 | { | 271 | { |
272 | switch(id) | 272 | switch(id) |
273 | { | 273 | { |
274 | case id_flow_hw: | 274 | case id_flow_hw: |
275 | m_prof.writeEntry("Flow", 0x01); | 275 | m_prof.writeEntry("Flow", 0x01); |
276 | break; | 276 | break; |
277 | case id_flow_sw: | 277 | case id_flow_sw: |
278 | m_prof.writeEntry("Flow", 0x02); | 278 | m_prof.writeEntry("Flow", 0x02); |
279 | break; | 279 | break; |
280 | } | ||
281 | } | ||
282 | |||
283 | void ProfileEditorDialog::slotConnParity(int id) | ||
284 | { | ||
285 | switch(id) | ||
286 | { | ||
280 | case id_parity_odd: | 287 | case id_parity_odd: |
281 | m_prof.writeEntry("Parity", 2); | 288 | m_prof.writeEntry("Parity", 2); |
282 | break; | 289 | break; |
283 | case id_parity_even: | 290 | case id_parity_even: |
284 | m_prof.writeEntry("Parity", 1); | 291 | m_prof.writeEntry("Parity", 1); |
285 | break; | 292 | break; |
293 | } | ||
294 | } | ||
295 | |||
296 | void ProfileEditorDialog::slotConnSpeed(int id) | ||
297 | { | ||
298 | switch(id) | ||
299 | { | ||
286 | 300 | ||
287 | case id_baud_115200: | 301 | case id_baud_115200: |
288 | m_prof.writeEntry("Speed", 115200); | 302 | m_prof.writeEntry("Speed", 115200); |
289 | break; | 303 | break; |
290 | case id_baud_57600: | 304 | case id_baud_57600: |
291 | m_prof.writeEntry("Speed", 57600); | 305 | m_prof.writeEntry("Speed", 57600); |
@@ -296,23 +310,36 @@ void ProfileEditorDialog::slotConn(int id) | |||
296 | case id_baud_19200: | 310 | case id_baud_19200: |
297 | m_prof.writeEntry("Speed", 19200); | 311 | m_prof.writeEntry("Speed", 19200); |
298 | break; | 312 | break; |
299 | case id_baud_9600: | 313 | case id_baud_9600: |
300 | m_prof.writeEntry("Speed", 9600); | 314 | m_prof.writeEntry("Speed", 9600); |
301 | break; | 315 | break; |
316 | } | ||
317 | } | ||
318 | |||
319 | void ProfileEditorDialog::slotTermTerm(int id) | ||
320 | { | ||
321 | switch(id) | ||
322 | { | ||
302 | 323 | ||
303 | case id_term_vt100: | 324 | case id_term_vt100: |
304 | m_prof.writeEntry("Terminal", 2); | 325 | m_prof.writeEntry("Terminal", 2); |
305 | break; | 326 | break; |
306 | case id_term_vt220: | 327 | case id_term_vt220: |
307 | m_prof.writeEntry("Terminal", 1); | 328 | m_prof.writeEntry("Terminal", 1); |
308 | break; | 329 | break; |
309 | case id_term_ansi: | 330 | case id_term_ansi: |
310 | m_prof.writeEntry("Terminal", 0); | 331 | m_prof.writeEntry("Terminal", 0); |
311 | break; | 332 | break; |
333 | } | ||
334 | } | ||
312 | 335 | ||
336 | void ProfileEditorDialog::slotTermFont(int id) | ||
337 | { | ||
338 | switch(id) | ||
339 | { | ||
313 | case id_size_small: | 340 | case id_size_small: |
314 | m_prof.writeEntry("Font", 0); | 341 | m_prof.writeEntry("Font", 0); |
315 | break; | 342 | break; |
316 | case id_size_medium: | 343 | case id_size_medium: |
317 | m_prof.writeEntry("Font", 1); | 344 | m_prof.writeEntry("Font", 1); |
318 | break; | 345 | break; |