-rw-r--r-- | kmicromail/editaccounts.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index d272c3b..e7d2750 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -7,24 +7,25 @@ | |||
7 | 7 | ||
8 | /* QT */ | 8 | /* QT */ |
9 | #include <qstringlist.h> | 9 | #include <qstringlist.h> |
10 | 10 | ||
11 | #include <qcombobox.h> | 11 | #include <qcombobox.h> |
12 | #include <qcheckbox.h> | 12 | #include <qcheckbox.h> |
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | #include <qpushbutton.h> | 14 | #include <qpushbutton.h> |
15 | #include <qlineedit.h> | 15 | #include <qlineedit.h> |
16 | #include <qlabel.h> | 16 | #include <qlabel.h> |
17 | #include <qtabwidget.h> | 17 | #include <qtabwidget.h> |
18 | #include <qlistview.h> | 18 | #include <qlistview.h> |
19 | #include <qspinbox.h> | ||
19 | 20 | ||
20 | #include <libmailwrapper/nntpwrapper.h> | 21 | #include <libmailwrapper/nntpwrapper.h> |
21 | 22 | ||
22 | using namespace Opie::Core; | 23 | using namespace Opie::Core; |
23 | 24 | ||
24 | AccountListItem::AccountListItem( QListView *parent, Account *a) | 25 | AccountListItem::AccountListItem( QListView *parent, Account *a) |
25 | : QListViewItem( parent ) | 26 | : QListViewItem( parent ) |
26 | { | 27 | { |
27 | account = a; | 28 | account = a; |
28 | setText( 0, account->getAccountName() ); | 29 | setText( 0, account->getAccountName() ); |
29 | QString ttext = ""; | 30 | QString ttext = ""; |
30 | switch (account->getType()) { | 31 | switch (account->getType()) { |
@@ -411,34 +412,45 @@ void POP3config::slotConnectionToggle( int index ) | |||
411 | portLine->setText( POP3_PORT ); | 412 | portLine->setText( POP3_PORT ); |
412 | } | 413 | } |
413 | } | 414 | } |
414 | 415 | ||
415 | void POP3config::fillValues() | 416 | void POP3config::fillValues() |
416 | { | 417 | { |
417 | accountLine->setText( data->getAccountName() ); | 418 | accountLine->setText( data->getAccountName() ); |
418 | serverLine->setText( data->getServer() ); | 419 | serverLine->setText( data->getServer() ); |
419 | portLine->setText( data->getPort() ); | 420 | portLine->setText( data->getPort() ); |
420 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 421 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
421 | userLine->setText( data->getUser() ); | 422 | userLine->setText( data->getUser() ); |
422 | passLine->setText( data->getPassword() ); | 423 | passLine->setText( data->getPassword() ); |
424 | localFolder->setText( data->getLocalFolder() ); | ||
425 | int max = data->getMaxMailSize() ; | ||
426 | if ( max ) { | ||
427 | CheckBoxDown->setChecked( true ); | ||
428 | SpinBoxDown->setValue ( max ); | ||
429 | } else { | ||
430 | CheckBoxDown->setChecked( false ); | ||
431 | SpinBoxDown->setValue ( 5 ); | ||
432 | } | ||
423 | } | 433 | } |
424 | 434 | ||
425 | void POP3config::accept() | 435 | void POP3config::accept() |
426 | { | 436 | { |
427 | data->setAccountName( accountLine->text() ); | 437 | data->setAccountName( accountLine->text() ); |
428 | data->setServer( serverLine->text() ); | 438 | data->setServer( serverLine->text() ); |
429 | data->setPort( portLine->text() ); | 439 | data->setPort( portLine->text() ); |
430 | data->setConnectionType( ComboBox1->currentItem() ); | 440 | data->setConnectionType( ComboBox1->currentItem() ); |
431 | data->setUser( userLine->text() ); | 441 | data->setUser( userLine->text() ); |
432 | data->setPassword( passLine->text() ); | 442 | data->setPassword( passLine->text() ); |
443 | data->setLocalFolder( localFolder->text() ); | ||
444 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | ||
433 | 445 | ||
434 | QDialog::accept(); | 446 | QDialog::accept(); |
435 | } | 447 | } |
436 | 448 | ||
437 | /** | 449 | /** |
438 | * SMTPconfig | 450 | * SMTPconfig |
439 | */ | 451 | */ |
440 | 452 | ||
441 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 453 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
442 | : SMTPconfigUI( parent, name, modal, flags ) | 454 | : SMTPconfigUI( parent, name, modal, flags ) |
443 | { | 455 | { |
444 | data = account; | 456 | data = account; |