summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 60bffa5..edeb1de 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -263,68 +263,68 @@ void EditAccounts::slotAdjustColumns()
263 mailList->setColumnWidth( 1, 50 ); 263 mailList->setColumnWidth( 1, 50 );
264 264
265 configTab->showPage( newsTab ); 265 configTab->showPage( newsTab );
266 newsList->setColumnWidth( 0, newsList->visibleWidth() ); 266 newsList->setColumnWidth( 0, newsList->visibleWidth() );
267 267
268 configTab->setCurrentPage( currPage ); 268 configTab->setCurrentPage( currPage );
269} 269}
270 270
271void EditAccounts::accept() 271void EditAccounts::accept()
272{ 272{
273 settings->saveAccounts(); 273 settings->saveAccounts();
274 274
275 QDialog::accept(); 275 QDialog::accept();
276} 276}
277 277
278/** 278/**
279 * SelectMailType 279 * SelectMailType
280 */ 280 */
281 281
282SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) 282SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags )
283 : SelectMailTypeUI( parent, name, modal, flags ) 283 : SelectMailTypeUI( parent, name, modal, flags )
284{ 284{
285 selected = selection; 285 selected = selection;
286 selected->replace( 0, selected->length(), typeBox->currentText() ); 286 selected->replace( 0, selected->length(), typeBox->currentText() );
287 connect( typeBox, SIGNAL( activated( const QString & ) ), SLOT( slotSelection( const QString & ) ) ); 287 connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) );
288} 288}
289 289
290void SelectMailType::slotSelection( const QString &sel ) 290void SelectMailType::slotSelection( const QString &sel )
291{ 291{
292 selected->replace( 0, selected->length(), sel ); 292 selected->replace( 0, selected->length(), sel );
293} 293}
294 294
295/** 295/**
296 * IMAPconfig 296 * IMAPconfig
297 */ 297 */
298 298
299IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 299IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
300 : IMAPconfigUI( parent, name, modal, flags ) 300 : IMAPconfigUI( parent, name, modal, flags )
301{ 301{
302 data = account; 302 data = account;
303 303
304 fillValues(); 304 fillValues();
305 305
306 connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); 306 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
307 ComboBox1->insertItem( "Only if available", 0 ); 307 ComboBox1->insertItem( "Only if available", 0 );
308 ComboBox1->insertItem( "Always, Negotiated", 1 ); 308 ComboBox1->insertItem( "Always, Negotiated", 1 );
309 ComboBox1->insertItem( "Connect on secure port", 2 ); 309 ComboBox1->insertItem( "Connect on secure port", 2 );
310 ComboBox1->insertItem( "Run command instead", 3 ); 310 ComboBox1->insertItem( "Run command instead", 3 );
311 CommandEdit->hide(); 311 CommandEdit->hide();
312 ComboBox1->setCurrentItem( data->ConnectionType() ); 312 ComboBox1->setCurrentItem( data->ConnectionType() );
313} 313}
314 314
315void IMAPconfig::slotConnectionToggle( int index ) 315void IMAPconfig::slotConnectionToggle( int index )
316{ 316{
317 if ( index == 2 ) 317 if ( index == 2 )
318 { 318 {
319 portLine->setText( IMAP_SSL_PORT ); 319 portLine->setText( IMAP_SSL_PORT );
320 } 320 }
321 else if ( index == 3 ) 321 else if ( index == 3 )
322 { 322 {
323 portLine->setText( IMAP_PORT ); 323 portLine->setText( IMAP_PORT );
324 CommandEdit->show(); 324 CommandEdit->show();
325 } 325 }
326 else 326 else
327 { 327 {
328 portLine->setText( IMAP_PORT ); 328 portLine->setText( IMAP_PORT );
329 } 329 }
330} 330}
@@ -342,49 +342,49 @@ void IMAPconfig::fillValues()
342 342
343void IMAPconfig::accept() 343void IMAPconfig::accept()
344{ 344{
345 data->setAccountName( accountLine->text() ); 345 data->setAccountName( accountLine->text() );
346 data->setServer( serverLine->text() ); 346 data->setServer( serverLine->text() );
347 data->setPort( portLine->text() ); 347 data->setPort( portLine->text() );
348 data->setConnectionType( ComboBox1->currentItem() ); 348 data->setConnectionType( ComboBox1->currentItem() );
349 data->setUser( userLine->text() ); 349 data->setUser( userLine->text() );
350 data->setPassword( passLine->text() ); 350 data->setPassword( passLine->text() );
351 data->setPrefix(prefixLine->text()); 351 data->setPrefix(prefixLine->text());
352 352
353 QDialog::accept(); 353 QDialog::accept();
354} 354}
355 355
356/** 356/**
357 * POP3config 357 * POP3config
358 */ 358 */
359 359
360POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 360POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags )
361 : POP3configUI( parent, name, modal, flags ) 361 : POP3configUI( parent, name, modal, flags )
362{ 362{
363 data = account; 363 data = account;
364 fillValues(); 364 fillValues();
365 365
366 connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); 366 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
367 ComboBox1->insertItem( "Only if available", 0 ); 367 ComboBox1->insertItem( "Only if available", 0 );
368 ComboBox1->insertItem( "Always, Negotiated", 1 ); 368 ComboBox1->insertItem( "Always, Negotiated", 1 );
369 ComboBox1->insertItem( "Connect on secure port", 2 ); 369 ComboBox1->insertItem( "Connect on secure port", 2 );
370 ComboBox1->insertItem( "Run command instead", 3 ); 370 ComboBox1->insertItem( "Run command instead", 3 );
371 CommandEdit->hide(); 371 CommandEdit->hide();
372 ComboBox1->setCurrentItem( data->ConnectionType() ); 372 ComboBox1->setCurrentItem( data->ConnectionType() );
373} 373}
374 374
375void POP3config::slotConnectionToggle( int index ) 375void POP3config::slotConnectionToggle( int index )
376{ 376{
377 // 2 is ssl connection 377 // 2 is ssl connection
378 if ( index == 2 ) 378 if ( index == 2 )
379 { 379 {
380 portLine->setText( POP3_SSL_PORT ); 380 portLine->setText( POP3_SSL_PORT );
381 } 381 }
382 else if ( index == 3 ) 382 else if ( index == 3 )
383 { 383 {
384 portLine->setText( POP3_PORT ); 384 portLine->setText( POP3_PORT );
385 CommandEdit->show(); 385 CommandEdit->show();
386 } 386 }
387 else 387 else
388 { 388 {
389 portLine->setText( POP3_PORT ); 389 portLine->setText( POP3_PORT );
390 } 390 }
@@ -400,54 +400,54 @@ void POP3config::fillValues()
400 passLine->setText( data->getPassword() ); 400 passLine->setText( data->getPassword() );
401} 401}
402 402
403void POP3config::accept() 403void POP3config::accept()
404{ 404{
405 data->setAccountName( accountLine->text() ); 405 data->setAccountName( accountLine->text() );
406 data->setServer( serverLine->text() ); 406 data->setServer( serverLine->text() );
407 data->setPort( portLine->text() ); 407 data->setPort( portLine->text() );
408 data->setConnectionType( ComboBox1->currentItem() ); 408 data->setConnectionType( ComboBox1->currentItem() );
409 data->setUser( userLine->text() ); 409 data->setUser( userLine->text() );
410 data->setPassword( passLine->text() ); 410 data->setPassword( passLine->text() );
411 411
412 QDialog::accept(); 412 QDialog::accept();
413} 413}
414 414
415/** 415/**
416 * SMTPconfig 416 * SMTPconfig
417 */ 417 */
418 418
419SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 419SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
420 : SMTPconfigUI( parent, name, modal, flags ) 420 : SMTPconfigUI( parent, name, modal, flags )
421{ 421{
422 data = account; 422 data = account;
423 423
424 connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); 424 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
425 connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); 425 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
426 426
427 fillValues(); 427 fillValues();
428 428
429 connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); 429 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
430 ComboBox1->insertItem( "Only if available", 0 ); 430 ComboBox1->insertItem( "Only if available", 0 );
431 ComboBox1->insertItem( "Always, Negotiated", 1 ); 431 ComboBox1->insertItem( "Always, Negotiated", 1 );
432 ComboBox1->insertItem( "Connect on secure port", 2 ); 432 ComboBox1->insertItem( "Connect on secure port", 2 );
433 ComboBox1->insertItem( "Run command instead", 3 ); 433 ComboBox1->insertItem( "Run command instead", 3 );
434 CommandEdit->hide(); 434 CommandEdit->hide();
435 ComboBox1->setCurrentItem( data->ConnectionType() ); 435 ComboBox1->setCurrentItem( data->ConnectionType() );
436} 436}
437 437
438void SMTPconfig::slotConnectionToggle( int index ) 438void SMTPconfig::slotConnectionToggle( int index )
439{ 439{
440 // 2 is ssl connection 440 // 2 is ssl connection
441 if ( index == 2 ) 441 if ( index == 2 )
442 { 442 {
443 portLine->setText( SMTP_SSL_PORT ); 443 portLine->setText( SMTP_SSL_PORT );
444 } 444 }
445 else if ( index == 3 ) 445 else if ( index == 3 )
446 { 446 {
447 portLine->setText( SMTP_PORT ); 447 portLine->setText( SMTP_PORT );
448 CommandEdit->show(); 448 CommandEdit->show();
449 } 449 }
450 else 450 else
451 { 451 {
452 portLine->setText( SMTP_PORT ); 452 portLine->setText( SMTP_PORT );
453 } 453 }
@@ -465,54 +465,54 @@ void SMTPconfig::fillValues()
465} 465}
466 466
467void SMTPconfig::accept() 467void SMTPconfig::accept()
468{ 468{
469 data->setAccountName( accountLine->text() ); 469 data->setAccountName( accountLine->text() );
470 data->setServer( serverLine->text() ); 470 data->setServer( serverLine->text() );
471 data->setPort( portLine->text() ); 471 data->setPort( portLine->text() );
472 data->setConnectionType( ComboBox1->currentItem() ); 472 data->setConnectionType( ComboBox1->currentItem() );
473 data->setLogin( loginBox->isChecked() ); 473 data->setLogin( loginBox->isChecked() );
474 data->setUser( userLine->text() ); 474 data->setUser( userLine->text() );
475 data->setPassword( passLine->text() ); 475 data->setPassword( passLine->text() );
476 476
477 QDialog::accept(); 477 QDialog::accept();
478} 478}
479 479
480/** 480/**
481 * NNTPconfig 481 * NNTPconfig
482 */ 482 */
483 483
484NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 484NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
485 : NNTPconfigUI( parent, name, modal, flags ) 485 : NNTPconfigUI( parent, name, modal, flags )
486{ 486{
487 data = account; 487 data = account;
488 488
489 connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); 489 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
490 connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); 490 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
491 491
492 fillValues(); 492 fillValues();
493 493
494 connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); 494 connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) );
495} 495}
496 496
497void NNTPconfig::slotSSL( bool enabled ) 497void NNTPconfig::slotSSL( bool enabled )
498{ 498{
499 if ( enabled ) 499 if ( enabled )
500 { 500 {
501 portLine->setText( NNTP_SSL_PORT ); 501 portLine->setText( NNTP_SSL_PORT );
502 } 502 }
503 else 503 else
504 { 504 {
505 portLine->setText( NNTP_PORT ); 505 portLine->setText( NNTP_PORT );
506 } 506 }
507} 507}
508 508
509void NNTPconfig::fillValues() 509void NNTPconfig::fillValues()
510{ 510{
511 accountLine->setText( data->getAccountName() ); 511 accountLine->setText( data->getAccountName() );
512 serverLine->setText( data->getServer() ); 512 serverLine->setText( data->getServer() );
513 portLine->setText( data->getPort() ); 513 portLine->setText( data->getPort() );
514 sslBox->setChecked( data->getSSL() ); 514 sslBox->setChecked( data->getSSL() );
515 loginBox->setChecked( data->getLogin() ); 515 loginBox->setChecked( data->getLogin() );
516 userLine->setText( data->getUser() ); 516 userLine->setText( data->getUser() );
517 passLine->setText( data->getPassword() ); 517 passLine->setText( data->getPassword() );
518} 518}